Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
battle.h File Reference

Go to the source code of this file.

Variables

EvtScript EVS_Mario_HandlePhase
 
EvtScript EVS_Peach_HandlePhase
 
EvtScript EVS_ExecuteMarioAction
 
EvtScript EVS_ExecutePeachAction
 
EvtScript EVS_Player_HandleEvent
 
EvtScript BtlPutPartnerAway
 
EvtScript BtlBringPartnerOut
 
EvtScript EVS_MarioEnterStage
 
EvtScript EVS_PeachEnterStage
 
EvtScript EVS_PlayerFirstStrike
 
EvtScript EVS_StartDefend
 
EvtScript EVS_RunAwayStart
 
EvtScript EVS_RunAwayFail
 
EvtScript EVS_PlayerDies
 
EvtScript EVS_Unused_EatItem
 
EvtScript EVS_Unused_DrinkItem
 
EvtScript EVS_UseLifeShroom
 
EvtScript EVS_MerleeRunOut
 
EvtScript EVS_MerleeAttackBonus
 
EvtScript EVS_MerleeDefenseBonus
 
EvtScript EVS_MerleeExpBonus
 
EvtScript EVS_PlayerHappy
 
EvtScript EVS_ApplyDizzyAttack
 
EvtScript EVS_PlayerRegainAbility
 
EvtScript EVS_UseMystery
 
EvtScript EVS_PlaySleepHitFX
 
EvtScript EVS_PlayDizzyHitFX
 
EvtScript EVS_PlayParalyzeHitFX
 
EvtScript EVS_PlayPoisonHitFX
 
EvtScript EVS_PlayStopHitFX
 
EvtScript EVS_PlayFreezeHitFX
 
EvtScript EVS_PlayShrinkHitFX
 
EvtScript EVS_ForceNextTarget
 
EvtScript EVS_Enemy_Hit
 
EvtScript EVS_Partner_RunAway
 
EvtScript EVS_Partner_SpikeContact
 
EvtScript EVS_Partner_BombetteSpikeContact
 
EvtScript EVS_Partner_BurnContact
 
EvtScript EVS_Partner_Recover
 
EvtScript EVS_Partner_ShockHit
 
EvtScript EVS_Partner_BurnHit
 
EvtScript EVS_Partner_Hit
 
EvtScript EVS_Partner_Drop
 
EvtScript EVS_Partner_NoDamageHit
 
EvtScript EVS_Partner_LakilesterHit
 
EvtScript EVS_Enemy_HopToPos
 
EvtScript EVS_Enemy_BurnHit
 
EvtScript EVS_Enemy_ShockHit
 
EvtScript EVS_Enemy_ShockHit_Impl
 
EvtScript EVS_Partner_Celebrate
 
EvtScript EVS_Enemy_NoDamageHit
 
EvtScript EVS_Enemy_Death
 
EvtScript EVS_Enemy_DeathWithoutRemove
 
EvtScript EVS_Enemy_ScareAway
 
EvtScript EVS_Enemy_SpinSmashHit
 
EvtScript EVS_Enemy_FlipBackUp
 
EvtScript EVS_Enemy_Knockback
 
EvtScript EVS_Enemy_ReturnHome
 
EvtScript EVS_Enemy_Recover
 
EvtScript EVS_Enemy_HopHome
 
EvtScript EVS_Enemy_AirLift
 
EvtScript EVS_Enemy_BlowAway
 
EvtScript Rumble_1
 
EvtScript Rumble_2
 
EvtScript Rumble_3
 
EvtScript Rumble_4
 
EvtScript Rumble_5
 
EvtScript Rumble_6
 
EvtScript Rumble_7
 
EvtScript Rumble_Unused_1
 
EvtScript Rumble_Unused_2
 
EvtScript Rumble_Unused_3
 
EvtScript Rumble_Unused_4
 

Variable Documentation

◆ EVS_Mario_HandlePhase

EvtScript EVS_Mario_HandlePhase
extern

Definition at line 752 of file player_events.c.

752 {
753 Call(GetBattlePhase, LVar0)
780 Return
781 End
782};
@ PHASE_PLAYER_HAPPY
Definition enums.h:2073
@ PHASE_MERLEE_ATTACK_BONUS
Definition enums.h:2070
@ PHASE_USE_DEFEND
Definition enums.h:2063
@ PHASE_RUN_AWAY_START
Definition enums.h:2060
@ PHASE_EXECUTE_ACTION
Definition enums.h:2058
@ PHASE_MERLEE_EXP_BONUS
Definition enums.h:2072
@ PHASE_CELEBRATE
Definition enums.h:2062
@ PHASE_USE_LIFE_SHROOM
Definition enums.h:2065
@ PHASE_MERLEE_DEFENSE_BONUS
Definition enums.h:2071
@ PHASE_DEATH
Definition enums.h:2061
@ PHASE_RUN_AWAY_FAIL
Definition enums.h:2064
@ PHASE_FIRST_STRIKE
Definition enums.h:2059
EvtScript EVS_PlayerFirstStrike
EvtScript EVS_MerleeExpBonus
EvtScript EVS_ExecuteMarioAction
EvtScript EVS_PlayerDies
EvtScript EVS_MerleeDefenseBonus
EvtScript EVS_Player_Celebrate
EvtScript EVS_StartDefend
EvtScript EVS_PlayerHappy
EvtScript EVS_UseLifeShroom
EvtScript EVS_RunAwayFail
EvtScript EVS_MerleeAttackBonus
EvtScript EVS_RunAwayStart
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#define CaseEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any pre...
Definition macros.h:319
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:362
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217

Referenced by btl_state_update_9(), btl_state_update_celebration(), btl_state_update_defeat(), btl_state_update_defend(), btl_state_update_end_player_turn(), btl_state_update_first_strike(), btl_state_update_player_move(), btl_state_update_run_away(), and btl_state_update_victory().

◆ EVS_Peach_HandlePhase

EvtScript EVS_Peach_HandlePhase
extern

Definition at line 784 of file player_events.c.

784 {
785 Call(GetBattlePhase, LVar0)
790 Return
791 End
792};
EvtScript EVS_ExecutePeachAction

Referenced by btl_state_update_player_move().

◆ EVS_ExecuteMarioAction

EvtScript EVS_ExecuteMarioAction
extern

Definition at line 794 of file player_events.c.

794 {
795 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
796 Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE)
797 Call(GetMenuSelection, LVar0, LVar1, LVar2)
800 Call(LoadMoveScript)
803 Call(LoadMoveScript)
806 Call(LoadItemScript)
809 Call(LoadStarPowerScript)
812 Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE)
813 Call(UseIdleAnimation, ACTOR_PLAYER, TRUE)
814 Return
815 End
816};
@ BS_FLAGS1_4000
Definition enums.h:3583
@ BTL_MENU_TYPE_SMASH
Definition enums.h:4228
@ BTL_MENU_TYPE_JUMP
Definition enums.h:4227
@ BTL_MENU_TYPE_STAR_POWERS
Definition enums.h:4235
@ BTL_MENU_TYPE_ITEMS
Definition enums.h:4229
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_BLUR_DISABLE
Definition enums.h:6413
#define LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149

◆ EVS_ExecutePeachAction

EvtScript EVS_ExecutePeachAction
extern

Definition at line 818 of file player_events.c.

818 {
819 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
820 Call(GetMenuSelection, LVar0, LVar1, LVar2)
823 Call(LoadStarPowerScript)
826 Call(UseIdleAnimation, ACTOR_PLAYER, TRUE)
827 Return
828 End
829};

◆ EVS_Player_HandleEvent

EvtScript EVS_Player_HandleEvent
extern

Definition at line 854 of file player_events.c.

854 {
855 Call(GetLastEvent, ACTOR_PLAYER, LVarF)
858 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
860 Call(CloseActionCommandInfo)
861 Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE)
862 Call(func_802693F0)
863 Call(ForceDisablePlayerBlurImmediately)
864 Call(GetLastEvent, ACTOR_PLAYER, LVarF)
868 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
869 Call(UseBattleCamPreset, BTL_CAM_PLAYER_HIT_SPIKE)
870 Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
871 Sub(LVar0, 60)
872 Add(LVar1, 40)
873 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.1))
874 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_HurtFoot, ANIM_Mario1_HurtFoot, ANIM_Mario1_HurtFoot)
875 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
876 Call(PlayerHopToGoal, 5, 0, 1)
877 SetConst(LVar1, ANIM_Mario1_HurtFoot)
878 Set(LVar2, 0)
880 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
881 Call(SetGoalToHome, ACTOR_PLAYER)
882 Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
883 Add(LVar0, 30)
884 Set(LVar1, 0)
885 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.4))
886 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
887 Call(PlayerHopToGoal, 10, 0, 2)
888 Sub(LVar0, 20)
889 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
890 Call(PlayerHopToGoal, 7, 0, 2)
891 Sub(LVar0, 10)
892 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
893 Call(PlayerHopToGoal, 4, 0, 2)
894 IfEq(LVarF, 39)
895 Return
896 EndIf
900 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
901 Call(UseBattleCamPreset, BTL_CAM_PLAYER_HIT_HAZARD)
902 Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
903 Sub(LVar0, 60)
904 Add(LVar1, 40)
905 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.1))
906 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_BurnHurt, ANIM_MarioB3_BurnHurt, ANIM_MarioB3_BurnHurt)
907 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
908 Call(PlayerHopToGoal, 5, 0, 1)
910 Call(GetActorPos, ACTOR_PLAYER, LVar5, LVar6, LVar7)
911 Add(LVar5, 5)
912 Add(LVar6, 4)
913 Add(LVar7, 5)
914 PlayEffect(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, Float(1.5), 15)
915 Wait(2)
916 Call(GetActorPos, ACTOR_PLAYER, LVar5, LVar6, LVar7)
917 Add(LVar5, -5)
918 Add(LVar6, 18)
919 Add(LVar7, 5)
920 PlayEffect(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, Float(1.5), 15)
922 SetConst(LVar1, ANIM_MarioB3_BurnHurt)
923 Set(LVar2, 0)
925 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
926 Call(SetGoalToHome, ACTOR_PLAYER)
927 Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
928 Add(LVar0, 30)
929 Set(LVar1, 0)
930 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.4))
931 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
932 Call(PlayerHopToGoal, 10, 0, 2)
933 Sub(LVar0, 20)
934 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
935 Call(PlayerHopToGoal, 7, 0, 2)
936 Sub(LVar0, 10)
937 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
938 Call(PlayerHopToGoal, 4, 0, 2)
939 IfEq(LVarF, 36)
940 Return
941 EndIf
945 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
946 Call(UseBattleCamPreset, BTL_CAM_PLAYER_HIT_HAZARD)
947 Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
948 Sub(LVar0, 60)
949 Add(LVar1, 40)
950 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.1))
951 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_HurtFoot, ANIM_Mario1_HurtFoot, ANIM_Mario1_HurtFoot)
952 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
953 Call(PlayerHopToGoal, 5, 0, 1)
954 Call(ShowShockEffect, ACTOR_SELF)
955 SetConst(LVar1, ANIM_Mario1_HurtFoot)
956 Set(LVar2, 0)
958 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
959 Call(SetGoalToHome, ACTOR_PLAYER)
960 Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
961 Add(LVar0, 30)
962 Set(LVar1, 0)
963 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.4))
964 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
965 Call(PlayerHopToGoal, 10, 0, 2)
966 Sub(LVar0, 20)
967 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
968 Call(PlayerHopToGoal, 7, 0, 2)
969 Sub(LVar0, 10)
970 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
971 Call(PlayerHopToGoal, 4, 0, 2)
972 IfEq(LVarF, 38)
973 Return
974 EndIf
977 Call(TryPlayerLucky)
979 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_AdjustCap)
980 Wait(30)
981 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
982 Else
983 Wait(30)
984 EndIf
986 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8))
987 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
988 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
989 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
990 Call(PlayerHopToGoal, 15, 0, 0)
991 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
992 Call(SetGoalToHome, ACTOR_PLAYER)
993 Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0))
994 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
995 Call(PlayerRunToGoal, 0)
996 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
998 Wait(10)
999 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
1000 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8))
1001 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
1002 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1003 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1004 Call(PlayerHopToGoal, 15, 0, 0)
1005 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
1006 Call(SetGoalToHome, ACTOR_PLAYER)
1007 Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0))
1008 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
1009 Call(PlayerRunToGoal, 0)
1010 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
1013 SetConst(LVar1, ANIM_Mario1_Hurt)
1014 Set(LVar2, 0)
1016 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
1020 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_NO_DAMGE)
1021 SetConst(LVar1, ANIM_Mario1_Idle)
1026 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_NO_DAMGE)
1027 SetConst(LVar0, 1)
1028 SetConst(LVar1, ANIM_Mario1_Crouch)
1030 Wait(10)
1033 SetConst(LVar1, ANIM_MarioB3_BurnHurt)
1034 Set(LVar2, 0)
1036 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
1038 SetConst(LVar1, ANIM_MarioB3_BurnHurt)
1039 Set(LVar2, 0)
1041 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
1042 Return
1044 SetConst(LVar1, ANIM_Mario1_Hurt)
1045 Set(LVar2, 0)
1047 Return
1049 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8))
1050 Call(GetActorPos, ACTOR_PLAYER, LVar7, LVar8, LVar9)
1051 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_BeforeJump)
1052 Call(SetGoalPos, ACTOR_PLAYER, LVar7, LVar8, LVar9)
1053 Call(PlayerHopToGoal, 15, 0, 0)
1054 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump)
1056 EndSwitch
1057 Call(UseIdleAnimation, ACTOR_PLAYER, TRUE)
1058 Return
1059 End
1060};
@ BS_FLAGS1_EXECUTING_MOVE
Definition enums.h:3578
@ BTL_CAM_DEFAULT
Definition enums.h:4824
@ BTL_CAM_PLAYER_HIT_HAZARD
Definition enums.h:4853
@ BTL_CAM_PLAYER_HIT_SPIKE
Definition enums.h:4852
@ SOUND_NO_DAMGE
Definition enums.h:1433
@ ACTOR_SELF
Definition enums.h:2084
@ EVENT_LUCKY
Definition enums.h:2172
@ EVENT_HIT
Definition enums.h:2132
@ EVENT_SPIKE_DEATH
Definition enums.h:2160
@ EVENT_BURN_HIT
Definition enums.h:2136
@ EVENT_SPIKE_CONTACT
Definition enums.h:2163
@ EVENT_FIRE_DEATH
Definition enums.h:2162
@ EVENT_IMMUNE
Definition enums.h:2146
@ EVENT_BURN_DEATH
Definition enums.h:2157
@ EVENT_ZERO_DAMAGE
Definition enums.h:2144
@ EVENT_SHOCK_DEATH
Definition enums.h:2159
@ EVENT_BLOCK
Definition enums.h:2147
@ EVENT_18
Definition enums.h:2145
@ EVENT_HIT_COMBO
Definition enums.h:2131
@ EVENT_DEATH
Definition enums.h:2153
@ EVENT_RECOVER_FROM_KO
Definition enums.h:2170
@ EVENT_SHOCK_HIT
Definition enums.h:2165
@ EVENT_32
Definition enums.h:2168
@ EVENT_BURN_CONTACT
Definition enums.h:2164
@ EVENT_RECOVER_STATUS
Definition enums.h:2167
EvtScript EVS_Player_NoDamageHit
EvtScript EVS_Player_SimpleHit
EvtScript EVS_Player_ComplexHit
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:295
#define LVar6
Definition macros.h:154
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define CaseNe(RVAR)
Marks the start of a switch case that executes only if LVAR != RVAR. It also marks the end of any pre...
Definition macros.h:322
#define EndChildThread
Marks the end of a child thread block.
Definition macros.h:563
#define Sub(VAR, INT_VALUE)
Definition macros.h:377
#define LVarF
Definition macros.h:163
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define IfFalse(b)
Definition macros.h:646
#define EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:352
#define Float(DOUBLE)
Definition macros.h:51
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:341
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define LVar5
Definition macros.h:153
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:337
#define LVar7
Definition macros.h:155
#define LVar8
Definition macros.h:156
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define LVar9
Definition macros.h:157
#define PlayEffect(args...)
Definition macros.h:807
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#define ChildThread
Marks the start of a child thread block.
Definition macros.h:560
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:370

Referenced by dispatch_event_player(), and dispatch_event_player_continue_turn().

◆ BtlPutPartnerAway

EvtScript BtlPutPartnerAway
extern

Definition at line 51 of file 16C8E0.c.

51 {
54 SetF(LVar0, Float(1.0))
55 Loop(10)
56 Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, Float(1.0))
57 SubF(LVar0, Float(0.1))
58 Wait(1)
61 Call(EnablePartnerBlur)
62 Call(PlaySoundAtActor, 0, SOUND_PARTNER_GET_OUT)
63 Call(GetActorPos, 0, LVar0, LVar1, LVar2)
64 Add(LVar1, 25)
65 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0))
66 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
67#if VERSION_JP
68 Call(JumpToGoal, ACTOR_PARTNER, 10, 0, 1, 1)
69#else
70 Call(JumpToGoal, ACTOR_PARTNER, 10, 0, 0, 1)
71#endif
72 Call(DisablePartnerBlur)
73 Return
74 End
75};
@ SOUND_PARTNER_GET_OUT
Definition enums.h:559
@ ACTOR_PARTNER
Definition enums.h:2086
@ EVENT_PUT_PARTNER_AWAY
Definition enums.h:2177
#define EndLoop
Marks the end of a loop.
Definition macros.h:248
#define SetF(VAR, FLOAT_VALUE)
Sets the given variable to a given value, but supports Floats.
Definition macros.h:373
#define SubF(VAR, FLOAT_VALUE)
Definition macros.h:384
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245

Referenced by btl_state_update_change_partner().

◆ BtlBringPartnerOut

EvtScript BtlBringPartnerOut
extern

Definition at line 77 of file 16C8E0.c.

77 {
79 SetF(LVar0, Float(0.1))
80 Loop(20)
81 Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, Float(1.0))
82 AddF(LVar0, Float(0.05))
83 Wait(1)
85 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
87 Call(PlaySoundAtActor, 0, SOUND_PARTNER_PUT_AWAY)
88 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
89 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0))
90 IfEq(LVar1, 0)
91 Call(JumpToGoal, ACTOR_PARTNER, 20, 0, 0, 1)
92 Else
93#if VERSION_JP
94 Call(JumpToGoal, ACTOR_PARTNER, 20, 0, 1, 1)
95#else
96 Call(JumpToGoal, ACTOR_PARTNER, 20, 0, 0, 1)
97#endif
98 EndIf
99 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
100 Call(ForceHomePos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
101 Return
102 End
103};
@ SOUND_PARTNER_PUT_AWAY
Definition enums.h:558
#define AddF(VAR, FLOAT_VALUE)
Definition macros.h:383

Referenced by btl_state_update_change_partner().

◆ EVS_MarioEnterStage

EvtScript EVS_MarioEnterStage
extern

Definition at line 683 of file player_events.c.

683 {
684 Call(UseBattleCamPreset, BTL_CAM_PLAYER_ENTRY)
685 Call(SetBattleCamTarget, -80, 35, 8)
686 Call(BattleCamTargetActor, ACTOR_PLAYER)
687 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
688 Sub(LVar0, 100)
689 Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
690 Call(RandInt, 100, LVar0)
692 CaseGt(50)
693 Call(SetGoalToHome, ACTOR_SELF)
694 Call(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Run)
695 Call(PlayerRunToGoal, 25)
696 Call(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle)
697 CaseGt(20)
698 Call(SetGoalToHome, ACTOR_SELF)
699 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
700 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0))
701 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_BeforeJump)
702 Call(PlayerHopToGoal, 18, 0, 0)
703 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump)
704 Wait(7)
705 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
707 Call(SetGoalToHome, ACTOR_SELF)
708 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
709 Call(PlayerRunToGoal, 20)
710 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
712 Call(ShakeCam, 1, 0, 5, Float(1.0))
714 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP)
715 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_GetUp)
716 Wait(10)
717 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_DustOff)
718 Wait(10)
719 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
721 Return
722 End
723};
@ BTL_CAM_PLAYER_ENTRY
Definition enums.h:4844
@ SOUND_TRIP
Definition enums.h:784
ApiStatus RandInt(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
#define CaseGt(RVAR)
Marks the start of a switch case that executes only if LVAR <= RVAR. It also marks the end of any pre...
Definition macros.h:328

Referenced by btl_state_update_normal_start().

◆ EVS_PeachEnterStage

EvtScript EVS_PeachEnterStage
extern

Definition at line 725 of file player_events.c.

725 {
726 Call(FreezeBattleState, TRUE)
727 Call(UseBattleCamPreset, BTL_CAM_PLAYER_ENTRY)
728 Call(SetBattleCamTarget, -80, 35, 8)
729 Call(BattleCamTargetActor, ACTOR_PLAYER)
731 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
732 Sub(LVar0, 100)
733 Add(LVar1, 50)
734 Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
735 Call(SetGoalToHome, ACTOR_PARTNER)
736 Call(SetAnimation, ACTOR_PARTNER, 0, ANIM_Twink_Angry)
737 Call(FlyToGoal, ACTOR_PARTNER, 45, -10, 10)
739 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
740 Sub(LVar0, 100)
741 Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
742 Call(SetGoalToHome, ACTOR_SELF)
743 Call(SetAnimation, ACTOR_SELF, 0, ANIM_Peach1_Run)
744 Call(PlayerRunToGoal, 40)
745 Call(SetAnimation, ACTOR_SELF, 0, ANIM_Peach1_Walk)
746 Wait(15)
747 Call(FreezeBattleState, FALSE)
748 Return
749 End
750};

Referenced by btl_state_update_normal_start().

◆ EVS_PlayerFirstStrike

EvtScript EVS_PlayerFirstStrike
extern

Definition at line 831 of file player_events.c.

831 {
832 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
833 Call(GetMenuSelection, LVar0, LVar1, LVar2)
835 CaseEq(0)
836 Call(LoadMoveScript)
838 CaseEq(1)
839 Call(LoadMoveScript)
842 Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE)
843 Call(UseIdleAnimation, ACTOR_PLAYER, TRUE)
844 Return
845 End
846};

◆ EVS_StartDefend

EvtScript EVS_StartDefend
extern

Definition at line 848 of file player_events.c.

848 {
849 Call(ActivateDefend)
850 Return
851 End
852};

◆ EVS_RunAwayStart

EvtScript EVS_RunAwayStart
extern

Definition at line 1172 of file player_events.c.

1172 {
1173 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
1174 Call(GetActionCommandMode, LVar2)
1177 Call(UseIdleAnimation, ACTOR_PLAYER, TRUE)
1178 Return
1179 EndIf
1180 Call(ShowActionHud, 1)
1181 Call(GetActorVar, ACTOR_SELF, 0, LVar0)
1182 Call(LoadActionCommand, ACTION_COMMAND_FLEE)
1183 Call(action_command_flee_init, LVar0)
1184 Call(SetupMashMeter, 1, 100, 0, 0, 0, 0)
1185 Call(func_80260E38)
1186 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hustled)
1187 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_IN_PLACE)
1188 Call(SetActorYaw, ACTOR_PLAYER, 30)
1189 Wait(1)
1190 Call(SetActorYaw, ACTOR_PLAYER, 60)
1191 Wait(1)
1192 Call(SetActorYaw, ACTOR_PLAYER, 90)
1193 Wait(1)
1194 Call(SetActorYaw, ACTOR_PLAYER, 120)
1195 Wait(1)
1196 Call(SetActorYaw, ACTOR_PLAYER, 150)
1197 Wait(1)
1198 Call(SetActorYaw, ACTOR_PLAYER, 180)
1199 Wait(5)
1200 Call(action_command_flee_start, 0, 60, 3)
1201 Call(func_80260E5C)
1202 Wait(5)
1203 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1204 Wait(2)
1205 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1206 Wait(5)
1207 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1208 Wait(2)
1209 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1210 Wait(2)
1211 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1212 Wait(5)
1213 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1214 Wait(2)
1215 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1216 Wait(5)
1217 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1218 Wait(15)
1219 Wait(30)
1220 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1221 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8))
1222 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
1223 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1224 Call(PlayerHopToGoal, 8, 0, 0)
1225 Call(GetActionSuccess, LVar0)
1226 Call(DetermineAutoRunAwaySuccess)
1227 IfEq(LVar0, 1)
1228 Call(SetFledBattleFlag)
1229 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_AWAY)
1230 Call(SetGoalPos, ACTOR_PLAYER, -240, 0, 10)
1231 Call(SetActorSpeed, ACTOR_PLAYER, Float(16.0))
1232 Call(PlayerRunToGoal, 0)
1233 Wait(5)
1234 Else
1236 Call(ShakeCam, 1, 0, 5, Float(1.0))
1238 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Trip)
1239 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP)
1240 Call(SetGoalPos, ACTOR_PLAYER, -100, 0, 10)
1241 Call(SetActorSpeed, ACTOR_PLAYER, Float(10.0))
1242 Call(PlayerRunToGoal, 0)
1243 Set(LVar3, 6)
1244 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1246 Loop(2)
1247 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1248 PlayEffect(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, Float(1.0))
1249 Wait(5)
1250 EndLoop
1252 Loop(10)
1253 Sub(LVar0, LVar3)
1254 Sub(LVar3, 1)
1255 IfLt(LVar3, 1)
1256 Set(LVar3, 1)
1257 EndIf
1258 Call(SetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1259 Wait(1)
1260 EndLoop
1261 Wait(15)
1262 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_DUST_OFF)
1263 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_GetUp)
1264 Wait(20)
1265 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_DustOff)
1267 Wait(7)
1268 Loop(2)
1269 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1270 Sub(LVar0, 8)
1271 Add(LVar1, 14)
1272 Add(LVar2, 5)
1273 PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, Float(1.0), Float(1.0))
1274 Wait(5)
1275 EndLoop
1277 Wait(5)
1278 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1279 Wait(10)
1280 EndIf
1281 Call(UseIdleAnimation, ACTOR_PLAYER, TRUE)
1282 Return
1283 End
1284};
@ ACTION_COMMAND_MODE_NOT_LEARNED
Definition action_cmd.h:38
@ ACTION_COMMAND_FLEE
Definition enums.h:3475
@ SOUND_PLAYER_RUN_IN_PLACE
Definition enums.h:780
@ SOUND_DUST_OFF
Definition enums.h:791
@ SOUND_PLAYER_RUN_AWAY
Definition enums.h:781
EvtScript EVS_RunAwayNoCommand
#define IfLt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR < RVAR.
Definition macros.h:275
#define LVar3
Definition macros.h:151

◆ EVS_RunAwayFail

EvtScript EVS_RunAwayFail
extern

Definition at line 1286 of file player_events.c.

1286 {
1287 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
1288 Call(SetGoalToHome, ACTOR_PLAYER)
1289 Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0))
1290 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
1291 Call(SetActorYaw, ACTOR_PLAYER, 0)
1292 Call(PlayerRunToGoal, 0)
1293 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
1294 Call(UseIdleAnimation, ACTOR_PLAYER, TRUE)
1295 Return
1296 End
1297};

◆ EVS_PlayerDies

EvtScript EVS_PlayerDies
extern

Definition at line 1299 of file player_events.c.

1299 {
1300 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
1301 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Dying)
1302 Call(UseBattleCamPreset, BTL_CAM_PLAYER_DIES)
1303 Wait(15)
1304 Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE)
1305 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_SPINNING)
1306 Set(LVar0, 0)
1307 Loop(30)
1308 Add(LVar0, 60)
1309 Call(SetActorYaw, ACTOR_PLAYER, LVar0)
1310 Wait(1)
1311 EndLoop
1312 Set(LVar0, 0)
1313 Loop(10)
1314 Add(LVar0, 36)
1315 Call(SetActorYaw, ACTOR_PLAYER, LVar0)
1316 Wait(1)
1317 EndLoop
1318 Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE)
1319 Wait(30)
1320 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_COLLAPSE)
1321 Set(LVar0, 0)
1322 Set(LVar1, 1)
1323 Loop(0)
1324 IfEq(LVar0, 90)
1325 BreakLoop
1326 EndIf
1327 Add(LVar0, LVar1)
1328 Add(LVar1, 2)
1329 IfGt(LVar0, 90)
1330 Set(LVar0, 90)
1331 EndIf
1332 Call(SetActorRotation, ACTOR_PLAYER, LVar0, 0, 0)
1333 Wait(1)
1334 EndLoop
1335 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1336 Add(LVar1, 2)
1337 Call(SetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1338 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1339 Add(LVar2, 20)
1340 PlayEffect(EFFECT_WALKING_DUST, 1, LVar0, LVar1, LVar2, Float(1.0), Float(1.0))
1341 Wait(15)
1342 Return
1343 End
1344};
@ BTL_CAM_PLAYER_DIES
Definition enums.h:4846
@ SOUND_PLAYER_COLLAPSE
Definition enums.h:1312
@ SOUND_PLAYER_SPINNING
Definition enums.h:1185
@ ACTOR_BLUR_ENABLE
Definition enums.h:6414
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
Definition macros.h:278
#define BreakLoop
Breaks out of the innermost loop.
Definition macros.h:251

◆ EVS_Unused_EatItem

EvtScript EVS_Unused_EatItem
extern

Definition at line 1421 of file player_events.c.

1421 {
1422 Thread
1423 Loop(4)
1424 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK)
1425 Wait(10)
1426 EndLoop
1427 EndThread
1428 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Eat)
1429 Wait(45)
1430 Return
1431 End
1432};
@ SOUND_EAT_OR_DRINK
Definition enums.h:1441
#define Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547

◆ EVS_Unused_DrinkItem

EvtScript EVS_Unused_DrinkItem
extern

Definition at line 1434 of file player_events.c.

1434 {
1435 Thread
1436 Loop(4)
1437 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK)
1438 Wait(10)
1439 EndLoop
1440 EndThread
1441 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Drink)
1442 Wait(45)
1443 Return
1444 End
1445};

◆ EVS_UseLifeShroom

EvtScript EVS_UseLifeShroom
extern

Definition at line 1447 of file player_events.c.

1447 {
1448 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
1450 Call(func_80261388)
1451 IfEq(LVar0, 1)
1453 Call(SetActorFlagBits, ACTOR_PARTNER, ACTOR_FLAG_NO_SHADOW, 1)
1454 Set(LVar0, 255)
1455 Loop(10)
1456 Sub(LVar0, 25)
1457 IfLt(LVar0, 0)
1458 Set(LVar0, 0)
1459 EndIf
1460 Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0)
1461 Wait(1)
1462 EndLoop
1463 Call(SetPartAlpha, ACTOR_PARTNER, -1, 0)
1464 EndIf
1466 Call(LifeShroomShroudWorld)
1467 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1468 Call(MakeItemEntity, ITEM_LIFE_SHROOM, LVar0, LVar1, LVar2, 1, 0)
1469 Set(LVarA, LVar0)
1470 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1471 Set(LVar3, 30)
1472 Set(LVar4, 16)
1473 Loop(LVar3)
1474 Add(LVar4, 8)
1475 IfGt(LVar4, 255)
1476 Set(LVar4, 255)
1477 EndIf
1478 AddF(LVar1, Float(1.0))
1480 Wait(1)
1481 EndLoop
1482 Set(LVar3, LVar0)
1483 Set(LVar4, LVar1)
1484 Set(LVar5, LVar2)
1485 Call(SetItemAsLifeShroom)
1486 Call(GiveRefund)
1487 IfGt(LVar0, 0)
1488 Wait(LVar0)
1489 Wait(15)
1490 Call(GiveRefundCleanup)
1491 EndIf
1492 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LIFE_SHROOM_CHIME)
1493 Add(LVar4, 15)
1494 PlayEffect(EFFECT_ENERGY_IN_OUT, 3, LVar3, LVar4, LVar5, Float(1.0))
1495 Set(LVar0, LVarF)
1496 Loop(4)
1497 Call(SetItemFlags, LVarA, 64, 1)
1498 Wait(2)
1499 Call(SetItemFlags, LVarA, 64, 0)
1500 Wait(8)
1501 EndLoop
1504 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_START_RECOVERY)
1505 PlayEffect(EFFECT_STARS_SHIMMER, 1, LVar3, LVar4, LVar5, 70, 70, 10, 20)
1506 Wait(20)
1507 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_REVIVAL_MAGIC)
1508 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1509 PlayEffect(EFFECT_STARS_SHIMMER, 2, LVar0, LVar1, LVar2, 50, 20, 32, 30)
1510 Wait(40)
1511 PlayEffect(EFFECT_STARS_SHIMMER, 2, LVar0, LVar1, LVar2, 30, 50, 32, 30)
1513 Loop(3)
1514 Call(SetActorDispOffset, ACTOR_PLAYER, 1, 0, 0)
1515 Wait(4)
1516 Call(SetActorDispOffset, ACTOR_PLAYER, -1, 0, 0)
1517 Wait(4)
1518 EndLoop
1519 Loop(3)
1520 Call(SetActorDispOffset, ACTOR_PLAYER, 1, 0, 0)
1521 Wait(2)
1522 Call(SetActorDispOffset, ACTOR_PLAYER, -1, 0, 0)
1523 Wait(2)
1524 EndLoop
1525 Loop(7)
1526 Call(SetActorDispOffset, ACTOR_PLAYER, 1, 0, 0)
1527 Wait(1)
1528 Call(SetActorDispOffset, ACTOR_PLAYER, -1, 0, 0)
1529 Wait(1)
1530 EndLoop
1532 Wait(50)
1534 Call(LifeShroomRevealWorld)
1536 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_REVIVE)
1537 Call(SetActorRotation, ACTOR_PLAYER, 0, 0, 0)
1538 Call(SetActorYaw, ACTOR_SELF, 0)
1539 Call(ConsumeLifeShroom)
1540 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1541 Add(LVar1, 25)
1542 PlayEffect(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3)
1543 Call(FreezeBattleCam, 0)
1544 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1545 Call(MoveBattleCamOver, 15)
1547 Call(func_80261388)
1548 IfEq(LVar0, 1)
1549 Call(SetActorFlagBits, ACTOR_PARTNER, ACTOR_FLAG_NO_SHADOW, 0)
1550 Set(LVar0, 0)
1551 Loop(10)
1552 Add(LVar0, 25)
1553 IfGt(LVar0, 255)
1554 Set(LVar0, 255)
1555 EndIf
1556 Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0)
1557 Wait(1)
1558 EndLoop
1559 Call(DispatchEvent, ACTOR_PARTNER, EVENT_REVIVE)
1560 Call(SetPartAlpha, ACTOR_PARTNER, -1, 255)
1561 EndIf
1564 Loop(5)
1565 Wait(2)
1566 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1567 PlayEffect(EFFECT_MISC_PARTICLES, 2, LVar0, LVar1, LVar2, 20, 20, Float(1.0), 10, 50)
1568 EndLoop
1570 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP)
1571 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0))
1572 Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0))
1573 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1574 Set(LVar1, 0)
1575 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
1576 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1577 Call(PlayerHopToGoal, 20, 0, 0)
1578 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land)
1579 Wait(4)
1580 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
1581 Wait(10)
1582 Call(UseIdleAnimation, ACTOR_PLAYER, TRUE)
1583 Call(RestorePreDefeatState)
1584 Return
1585 End
1586};
@ SOUND_REVIVAL_MAGIC
Definition enums.h:1187
@ SOUND_START_RECOVERY
Definition enums.h:1385
@ SOUND_PLAYER_REVIVE
Definition enums.h:1188
@ SOUND_LIFE_SHROOM_CHIME
Definition enums.h:1186
@ SOUND_LONG_PLAYER_JUMP
Definition enums.h:782
@ ACTOR_FLAG_NO_SHADOW
Hide shadow.
Definition enums.h:3325
@ EVENT_REVIVE
Definition enums.h:2180
@ EVENT_LIFE_SHROOM_PROC
Definition enums.h:2179
ApiStatus RemoveItemEntity(Evt *script, b32 isInitialCall)
ApiStatus SetItemPos(Evt *script, b32 isInitialCall)
ApiStatus SetItemFlags(Evt *script, b32 isInitialCall)
ApiStatus RemoveEffect(Evt *script, b32 isInitialCall)
ApiStatus MakeItemEntity(Evt *script, b32 isInitialCall)
#define LVarA
Definition macros.h:158
#define LVar4
Definition macros.h:152

◆ EVS_MerleeRunOut

EvtScript EVS_MerleeRunOut
extern

Definition at line 1588 of file player_events.c.

1588 {
1589 Call(HasMerleeCastsLeft)
1590 IfEq(LVar0, 1)
1591 Return
1592 EndIf
1593 Wait(15)
1594 Call(ShowMessageBox, BTL_MSG_MERLEE_DONE, 60)
1595 Call(WaitForMessageBoxDone)
1596 Return
1597 End
1598};
@ BTL_MSG_MERLEE_DONE
Definition enums.h:4061

◆ EVS_MerleeAttackBonus

EvtScript EVS_MerleeAttackBonus
extern

Definition at line 1600 of file player_events.c.

1600 {
1601 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
1602 Call(BattleMerleeFadeStageToBlack)
1603 Wait(10)
1604 Call(UseBattleCamPreset, BTL_CAM_REPOSITION)
1605 Call(SetBattleCamTarget, 0, 80, 0)
1606 Call(SetBattleCamOffsetY, 0)
1607 Call(SetBattleCamDist, 246)
1608 Call(MoveBattleCamOver, 20)
1609 Wait(10)
1610 Call(CreateNpc, NPC_BTL_MERLEE, ANIM_BattleMerlee_Gather)
1613 Call(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20)
1615 Call(BattleMerleeUpdateFX)
1617 Call(BattleFadeInMerlee)
1618 Wait(30)
1619 Call(SetNpcAnimation, NPC_BTL_MERLEE, ANIM_BattleMerlee_Release)
1620 Call(BattleMerleeStopFX)
1621 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1622 Call(MoveBattleCamOver, 4)
1623 Call(BattleMerleeFadeStageFromBlack)
1624 Wait(20)
1626 Call(BattleFadeOutMerlee)
1629 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MAGIC_DESCENDING)
1630 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1631 Call(PlayBattleMerleeGatherFX, LVar0, LVar1, LVar2)
1632 Call(PlayBattleMerleeOrbFX, LVar0, LVar1, LVar2)
1633 Wait(15)
1634 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1635 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
1636 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
1637 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1638 Call(PlayerHopToGoal, 18, 0, 0)
1639 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land)
1640 Wait(4)
1641 Call(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle)
1642 Call(ShowMessageBox, BTL_MSG_MERLEE_ATK_UP, 60)
1643 Call(WaitForMessageBoxDone)
1645 Return
1646 End
1647};
@ BTL_MSG_MERLEE_ATK_UP
Definition enums.h:4058
@ BTL_CAM_REPOSITION
Definition enums.h:4841
@ NPC_BTL_MERLEE
Definition enums.h:2529
@ SOUND_MAGIC_DESCENDING
Definition enums.h:1414
@ NPC_FLAG_IGNORE_CAMERA_FOR_YAW
Definition enums.h:3016
EvtScript EVS_MerleeRunOut
ApiStatus DeleteNpc(Evt *script, b32 isInitialCall)
ApiStatus SetNpcAnimation(Evt *script, b32 isInitialCall)
ApiStatus SetNpcRenderMode(Evt *script, b32 isInitialCall)
ApiStatus CreateNpc(Evt *script, b32 isInitialCall)
ApiStatus SetNpcPos(Evt *script, b32 isInitialCall)
ApiStatus SetNpcFlagBits(Evt *script, b32 isInitialCall)

◆ EVS_MerleeDefenseBonus

EvtScript EVS_MerleeDefenseBonus
extern

Definition at line 1649 of file player_events.c.

1649 {
1650 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
1651 Call(BattleMerleeFadeStageToBlack)
1652 Wait(10)
1653 Call(UseBattleCamPreset, BTL_CAM_REPOSITION)
1654 Call(SetBattleCamTarget, 0, 80, 0)
1655 Call(SetBattleCamOffsetY, 0)
1656 Call(SetBattleCamDist, 246)
1657 Call(MoveBattleCamOver, 20)
1658 Wait(10)
1659 Call(CreateNpc, NPC_BTL_MERLEE, ANIM_BattleMerlee_Gather)
1662 Call(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20)
1664 Call(BattleMerleeUpdateFX)
1666 Call(BattleFadeInMerlee)
1667 Wait(30)
1668 Call(SetNpcAnimation, NPC_BTL_MERLEE, ANIM_BattleMerlee_Release)
1669 Call(BattleMerleeStopFX)
1670 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1671 Call(MoveBattleCamOver, 4)
1672 Call(BattleMerleeFadeStageFromBlack)
1673 Wait(20)
1675 Call(BattleFadeOutMerlee)
1678 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MAGIC_DESCENDING)
1679 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1680 Call(PlayBattleMerleeGatherFX, LVar0, LVar1, LVar2)
1681 Call(PlayBattleMerleeOrbFX, LVar0, LVar1, LVar2)
1682 Wait(15)
1683 Call(GetStatusFlags, ACTOR_PLAYER, LVar0)
1685 Wait(22)
1686 Else
1687 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1688 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
1689 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
1690 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1691 Call(PlayerHopToGoal, 18, 0, 0)
1692 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land)
1693 Wait(4)
1694 Call(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle)
1695 EndIf
1696 Call(ShowMessageBox, BTL_MSG_MERLEE_DEF_UP, 60)
1697 Call(WaitForMessageBoxDone)
1699 Return
1700 End
1701};
#define STATUS_FLAGS_IMMOBILIZED
Definition enums.h:2834
@ BTL_MSG_MERLEE_DEF_UP
Definition enums.h:4059
#define IfFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR,...
Definition macros.h:288

◆ EVS_MerleeExpBonus

EvtScript EVS_MerleeExpBonus
extern

Definition at line 1703 of file player_events.c.

1703 {
1704 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
1705 Call(BattleMerleeFadeStageToBlack)
1706 Wait(10)
1707 Call(UseBattleCamPreset, BTL_CAM_REPOSITION)
1708 Call(SetBattleCamTarget, 0, 80, 0)
1709 Call(SetBattleCamOffsetY, 0)
1710 Call(SetBattleCamDist, 246)
1711 Call(MoveBattleCamOver, 20)
1712 Wait(10)
1713 Call(CreateNpc, NPC_BTL_MERLEE, ANIM_BattleMerlee_Gather)
1716 Call(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20)
1718 Call(BattleMerleeUpdateFX)
1720 Call(BattleFadeInMerlee)
1721 Wait(30)
1722 Call(SetNpcAnimation, NPC_BTL_MERLEE, ANIM_BattleMerlee_Release)
1723 Call(BattleMerleeStopFX)
1724 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1725 Call(MoveBattleCamOver, 4)
1726 Call(BattleMerleeFadeStageFromBlack)
1727 Wait(20)
1729 Call(BattleFadeOutMerlee)
1732 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MAGIC_DESCENDING)
1733 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1734 Call(PlayBattleMerleeGatherFX, LVar0, LVar1, LVar2)
1735 Call(PlayBattleMerleeOrbFX, LVar0, LVar1, LVar2)
1736 Wait(15)
1737 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1738 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
1739 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
1740 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1741 Call(PlayerHopToGoal, 18, 0, 0)
1742 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land)
1743 Wait(4)
1744 Call(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle)
1745 Call(ShowMessageBox, BTL_MSG_MERLEE_EXP_UP, 60)
1746 Call(WaitForMessageBoxDone)
1748 Return
1749 End
1750};
@ BTL_MSG_MERLEE_EXP_UP
Definition enums.h:4060

◆ EVS_PlayerHappy

EvtScript EVS_PlayerHappy
extern

Definition at line 1752 of file player_events.c.

1752 {
1753 Call(UseIdleAnimation, ACTOR_PLAYER, FALSE)
1754 Call(UseBattleCamPresetWait, BTL_CAM_DEFAULT)
1755 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp)
1756 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1757 Call(SpawnTurnEndFX, LVar0, LVar1, LVar2)
1758 Add(LVar0, 0)
1759 Add(LVar1, 35)
1760 Set(LVar3, LVarA)
1761 Add(LVar3, LVarB)
1762 IfGt(LVar3, 0)
1763 Call(SpawnRecoverHeartFX, LVar0, LVar1, LVar2, LVar3)
1764 EndIf
1765 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1766 Add(LVar0, 20)
1767 Add(LVar1, 25)
1768 IfGt(LVarC, 0)
1769 Call(SpawnRecoverFlowerFX, LVar0, LVar1, LVar2, LVarC)
1770 EndIf
1771 Set(LVar3, LVarA)
1772 Add(LVar3, LVarB)
1773 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1774 Add(LVar1, 25)
1776 Wait(10)
1777 Set(LVar0, LVarA)
1778 IfGt(LVar0, 0)
1779 Loop(LVar0)
1780 Call(IncrementPlayerHP)
1781 Wait(1)
1782 EndLoop
1783 EndIf
1784 Set(LVar0, LVarB)
1785 IfGt(LVar0, 0)
1786 Loop(LVar0)
1787 Call(IncrementPlayerHP)
1788 Wait(1)
1789 EndLoop
1790 EndIf
1791 Set(LVar0, LVarC)
1792 IfGt(LVar0, 0)
1793 Loop(LVar0)
1794 Call(IncrementPlayerFP)
1795 Wait(1)
1796 EndLoop
1797 EndIf
1798 Wait(30)
1799 Call(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle)
1800 Call(RemoveTurnEndFX)
1801 Call(UseIdleAnimation, ACTOR_PLAYER, TRUE)
1802 Return
1803 End
1804};
ApiStatus ShowStartRecoveryShimmer(Evt *script, b32 isInitialCall)
#define LVarC
Definition macros.h:160
#define LVarB
Definition macros.h:159

◆ EVS_ApplyDizzyAttack

EvtScript EVS_ApplyDizzyAttack
extern

Definition at line 1806 of file player_events.c.

1806 {
1807 Set(LVar0, 0)
1808 Loop(40)
1809 Add(LVar0, 72)
1810 Call(SetActorRotation, ACTOR_ENEMY0, 0, LVar0, 0)
1811 Wait(1)
1812 EndLoop
1813 Call(InflictDizzyAttackStatus)
1814 Call(SetActorRotation, ACTOR_ENEMY0, 0, 0, 0)
1815 Return
1816 End
1817};
@ ACTOR_ENEMY0
Definition enums.h:2087

Referenced by btl_state_update_normal_start().

◆ EVS_PlayerRegainAbility

EvtScript EVS_PlayerRegainAbility
extern

Definition at line 1819 of file player_events.c.

1819 {
1820 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1821 Call(GetActorPos, ACTOR_PLAYER, LVarF, LVar1, LVar2)
1822 Loop(LVar0)
1823 Add(LVarF, 3)
1824 Wait(1)
1825 EndLoop
1826 Call(GetLostHammerAndBootsLevel)
1827 Switch(LVarA)
1829 Set(LVarE, 0)
1830 Set(LVarA, ITEM_MENU_ITEMS)
1832 Set(LVarE, 1)
1833 Switch(LVarC)
1834 CaseEq(0)
1835 Set(LVarA, ITEM_MENU_HAMMER1)
1836 CaseEq(1)
1837 Set(LVarA, ITEM_MENU_HAMMER2)
1838 CaseEq(2)
1839 Set(LVarA, ITEM_MENU_HAMMER3)
1840 EndSwitch
1842 Set(LVarE, 2)
1843 Switch(LVarB)
1844 CaseEq(0)
1845 Set(LVarA, ITEM_MENU_BOOTS1)
1846 CaseEq(1)
1847 Set(LVarA, ITEM_MENU_BOOTS2)
1848 CaseEq(2)
1849 Set(LVarA, ITEM_MENU_BOOTS3)
1850 EndSwitch
1851 EndSwitch
1852 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1853 Add(LVarF, 24)
1854 Add(LVar1, 150)
1856 Set(LVarA, LVar0)
1857 Call(DropAbilityItem)
1858 Call(AbilityItemUnkDelay)
1859 Call(PlayerGatherAbilityItem)
1860 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1861 Add(LVar1, 20)
1862 PlayEffect(EFFECT_STARS_SHIMMER, 0, LVar0, LVar1, LVar2, 30, 30, 10, 30)
1864 Call(FreezeBattleState, FALSE)
1865 Return
1866 End
1867};
#define LVarE
Definition macros.h:162

Referenced by btl_state_update_begin_player_turn().

◆ EVS_UseMystery

EvtScript EVS_UseMystery
extern

Definition at line 203 of file use_items.c.

203 {
204 Wait(2)
205 Call(LoadMysteryItemScript)
207 Return
208 End
209};

◆ EVS_PlaySleepHitFX

EvtScript EVS_PlaySleepHitFX
extern

Definition at line 85 of file dmg_player.c.

85 {
86 Call(PlaySleepHitFX)
87 Return
88 End
89};

Referenced by calc_enemy_damage_target(), calc_item_damage_enemy(), calc_partner_damage_enemy(), and calc_player_damage_enemy().

◆ EVS_PlayDizzyHitFX

EvtScript EVS_PlayDizzyHitFX
extern

Definition at line 91 of file dmg_player.c.

91 {
92 Call(PlayDizzyHitFX)
93 Return
94 End
95};

Referenced by calc_enemy_damage_target(), calc_item_damage_enemy(), calc_partner_damage_enemy(), and calc_player_damage_enemy().

◆ EVS_PlayParalyzeHitFX

EvtScript EVS_PlayParalyzeHitFX
extern

Definition at line 97 of file dmg_player.c.

97 {
98 Call(PlayParalyzeHitFX)
99 Return
100 End
101};

Referenced by calc_enemy_damage_target(), calc_item_damage_enemy(), calc_partner_damage_enemy(), and calc_player_damage_enemy().

◆ EVS_PlayPoisonHitFX

EvtScript EVS_PlayPoisonHitFX
extern

Definition at line 103 of file dmg_player.c.

103 {
104 Call(PlayPoisonHitFX)
105 Return
106 End
107};

Referenced by calc_enemy_damage_target(), calc_item_damage_enemy(), calc_partner_damage_enemy(), and calc_player_damage_enemy().

◆ EVS_PlayStopHitFX

EvtScript EVS_PlayStopHitFX
extern

Definition at line 109 of file dmg_player.c.

109 {
110 Call(PlayStopHitFX)
111 Return
112 End
113};

Referenced by calc_enemy_damage_target(), calc_item_damage_enemy(), calc_partner_damage_enemy(), and calc_player_damage_enemy().

◆ EVS_PlayFreezeHitFX

EvtScript EVS_PlayFreezeHitFX
extern

Definition at line 115 of file dmg_player.c.

115 {
116 Call(PlayFreezeHitSnowflakeFX)
117 Wait(8)
118 Call(PlayFreezeHitSnowflakeFX)
119 Wait(15)
120 Call(PlayFreezeHitParticleFX)
121 Return
122 End
123};

Referenced by calc_enemy_damage_target(), calc_item_damage_enemy(), calc_partner_damage_enemy(), and calc_player_damage_enemy().

◆ EVS_PlayShrinkHitFX

EvtScript EVS_PlayShrinkHitFX
extern

Definition at line 125 of file dmg_player.c.

125 {
126 Call(PlayShrinkHitFX)
127 Return
128 End
129};

Referenced by calc_enemy_damage_target(), calc_item_damage_enemy(), calc_partner_damage_enemy(), and calc_player_damage_enemy().

◆ EVS_ForceNextTarget

EvtScript EVS_ForceNextTarget
extern

Definition at line 1143 of file standard_events.c.

1143 {
1144 Call(GetOwnerID, LVarA)
1145 Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
1146 Call(InitTargetIterator)
1147 Label(0)
1148 Call(GetOwnerTarget, LVar0, LVar1)
1149 IfNe(LVar0, LVarA)
1150 Call(GetOriginalActorType, LVar0, LVar2)
1151 IfNe(LVar2, ACTOR_TYPE_DRY_BONES)
1152 Return
1153 EndIf
1154 EndIf
1155 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1157 Goto(0)
1158 EndIf
1159 Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
1160 Call(InitTargetIterator)
1161 Label(1)
1162 Call(GetOwnerTarget, LVar0, LVar1)
1163 IfNe(LVar0, LVarA)
1164 Call(GetActorVar, LVar0, 8, LVar3)
1165 IfNe(LVar3, 1)
1166 Return
1167 EndIf
1168 EndIf
1169 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1171 Goto(1)
1172 EndIf
1173 Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
1174 Call(InitTargetIterator)
1175 Label(2)
1176 Call(GetOwnerTarget, LVar0, LVar1)
1177 Call(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, TRUE)
1178 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1180 Goto(2)
1181 EndIf
1182 Return
1183 End
1184};
@ ITER_NO_MORE
Definition enums.h:2030
@ ITER_NEXT
Definition enums.h:2025
@ TARGET_FLAG_PRIMARY_ONLY
Definition enums.h:1863
@ TARGET_FLAG_2
Definition enums.h:1850
@ ACTOR_FLAG_NO_DMG_APPLY
Damage is not applied to actor HP.
Definition enums.h:3340
@ ACTOR_FLAG_NO_ATTACK
Skip attack turn.
Definition enums.h:3339
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
Definition macros.h:272
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:227

◆ EVS_Enemy_Hit

EvtScript EVS_Enemy_Hit
extern

Definition at line 1223 of file standard_events.c.

1223 {
1224 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1225 Call(GetDamageSource, LVar2)
1226 Switch(LVar2)
1228 Call(GetOriginalActorType, ACTOR_SELF, LVar5)
1229 Switch(LVar5)
1230 CaseOrEq(ACTOR_TYPE_MONTY_MOLE)
1231 CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS)
1234 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1235 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01))
1236 Add(LVar1, 55)
1237 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1238 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
1239 EndSwitch
1240 Set(LVar5, 0)
1241 Loop(30)
1242 Add(LVar5, 48)
1243 Call(SetActorYaw, ACTOR_SELF, LVar5)
1244 Wait(1)
1245 EndLoop
1246 Call(GetOriginalActorType, ACTOR_SELF, LVar7)
1247 Switch(LVar7)
1248 CaseOrEq(ACTOR_TYPE_MONTY_MOLE)
1249 CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS)
1250 Wait(30)
1253 Sub(LVar1, 55)
1254 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8))
1255 IfEq(LVar1, 0)
1256 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1257 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
1258 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1259 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
1260 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1261 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
1262 Else
1263 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1264 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE)
1265 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1266 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
1267 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1268 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE)
1269 EndIf
1270 EndSwitch
1275 EndIf
1277 Set(LVar0, 0)
1278 Loop(10)
1279 Add(LVar0, 36)
1280 Call(SetActorYaw, ACTOR_SELF, LVar0)
1281 Wait(1)
1282 EndLoop
1284 Call(GetDamageIntensity)
1291 EndIf
1293 Call(MakeLerp, 0, 0x00000870, 60, EASING_COS_IN_OUT)
1294 Label(0)
1296 Call(SetActorYaw, ACTOR_SELF, LVar0)
1297 Wait(1)
1298 IfEq(LVar1, 1)
1299 Goto(0)
1300 EndIf
1302 Call(GetDamageIntensity)
1304 Wait(60)
1310 EndIf
1312 Set(LVar0, 360)
1313 Loop(10)
1314 Sub(LVar0, 36)
1315 Call(SetActorYaw, ACTOR_SELF, LVar0)
1316 Wait(1)
1317 EndLoop
1319 Call(GetDamageIntensity)
1326 EndIf
1328 Call(MakeLerp, 0x00000870, 0, 60, EASING_COS_IN_OUT)
1329 Label(1)
1331 Call(SetActorYaw, ACTOR_SELF, LVar0)
1332 Wait(1)
1333 IfEq(LVar1, 1)
1334 Goto(1)
1335 EndIf
1337 Call(GetDamageIntensity)
1339 Wait(60)
1346 Call(GetDamageIntensity)
1348 Label(2)
1349 Call(GetActorRotation, ACTOR_SELF, LVar0, LVar1, LVar2)
1350 Mod(LVar1, 360)
1351 IfNe(LVar1, 0)
1352 Wait(1)
1353 Goto(2)
1354 EndIf
1356 Call(SetActorYaw, ACTOR_SELF, 0)
1358 Call(GetDamageIntensity)
1360 EndSwitch
1361 Return
1362 End
1363};
@ DAMAGE_INTENSITY_EXTREME
Definition enums.h:3509
@ EASING_COS_IN_OUT
Definition enums.h:520
@ DMG_SRC_NEXT_SLAP_RIGHT
Definition enums.h:1999
@ DMG_SRC_LAST_SLAP_RIGHT
Definition enums.h:2001
@ DMG_SRC_NEXT_FAN_SMACK_LEFT
Definition enums.h:2002
@ DMG_SRC_LAST_FAN_SMACK_LEFT
Definition enums.h:2004
@ DMG_SRC_POWER_SHELL
Definition enums.h:1995
@ DMG_SRC_SPIN_SMASH
Definition enums.h:1990
@ DMG_SRC_NEXT_SLAP_LEFT
Definition enums.h:1998
@ DMG_SRC_NEXT_FAN_SMACK_RIGHT
Definition enums.h:2003
@ DMG_SRC_SPOOK
Definition enums.h:2006
@ DMG_SRC_LAST_SLAP_LEFT
Definition enums.h:2000
@ DMG_SRC_LAST_FAN_SMACK_RIGHT
Definition enums.h:2005
ApiStatus UpdateLerp(Evt *script, b32 isInitialCall)
ApiStatus MakeLerp(Evt *script, b32 isInitialCall)
#define Mod(VAR, INT_VALUE)
Definition macros.h:380
#define KillThread(TID)
Kills a thread by its thread ID.
Definition macros.h:510
#define ExecGetTID(EVT_SOURCE, OUTVAR)
Identical to Exec, but the newly-launched thread ID is stored in OUTVAR.
Definition macros.h:460
#define Exec(EVT_SOURCE)
Launches a new thread.
Definition macros.h:455
EvtScript EVS_Enemy_FanSmack_Impl
EvtScript EVS_Enemy_Hit_Impl
EvtScript EVS_Enemy_SpinAround_Impl

◆ EVS_Partner_RunAway

EvtScript EVS_Partner_RunAway
extern

Definition at line 97 of file standard_events.c.

97 {
98 Call(UseIdleAnimation, ACTOR_PARTNER, FALSE)
99 Call(SetActorYaw, ACTOR_SELF, 180)
100 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
101 Wait(10)
102 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
103 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2))
104 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
105 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
106 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
107 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
108 Wait(5)
109 Call(SetActorSpeed, ACTOR_SELF, Float(12.0))
110 Call(SetGoalPos, ACTOR_PARTNER, -250, 0, 0)
111 Call(RunToGoal, ACTOR_PARTNER, 0, FALSE)
112 Call(UseIdleAnimation, ACTOR_PARTNER, TRUE)
113 Return
114 End
115};

◆ EVS_Partner_SpikeContact

EvtScript EVS_Partner_SpikeContact
extern

Definition at line 171 of file standard_events.c.

171 {
172 Set(LVarA, LVar1)
173 Set(LVarB, LVar2)
174 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
175 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
176 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
177 Call(UseBattleCamPreset, BTL_CAM_PARTNER_HIT_SPIKE)
178 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
179 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
180 Sub(LVar0, 60)
181 Add(LVar1, 40)
182 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1))
183 Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA)
184 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
185 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE)
186 Set(LVar1, LVarA)
187 Set(LVar2, 0)
189 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
191 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0)
192 Set(LVar0, 0)
193 Loop(15)
194 Add(LVar0, 48)
195 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
196 Wait(1)
197 EndLoop
198 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0)
200 Call(SetGoalToHome, ACTOR_PARTNER)
201 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
202 Add(LVar0, 30)
203 Set(LVar1, 0)
204 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
205 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
206 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
207 Sub(LVar0, 20)
208 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
209 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
210 Sub(LVar0, 10)
211 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
212 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE)
213 Return
214 End
215};
@ BTL_CAM_PARTNER_HIT_SPIKE
Definition enums.h:4883
EvtScript EVS_Partner_Hit

◆ EVS_Partner_BombetteSpikeContact

EvtScript EVS_Partner_BombetteSpikeContact
extern

Definition at line 221 of file standard_events.c.

221 {
222 Set(LVarA, LVar1)
223 Set(LVarB, LVar2)
224 Set(LVarC, LVar3)
225 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
226 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
227 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
228 Call(UseBattleCamPreset, BTL_CAM_PARTNER_HIT_SPIKE)
229 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
230 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
231 Sub(LVar0, 60)
232 Add(LVar1, 40)
233 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1))
234 Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA)
235 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
236 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE)
237 Set(LVar1, LVarA)
238 Set(LVar2, 0)
240 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
242 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0)
243 Set(LVar0, 0)
244 Loop(15)
245 Add(LVar0, 48)
246 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
247 Wait(1)
248 EndLoop
249 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0)
251 Call(SetGoalToHome, ACTOR_PARTNER)
252 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
253 Add(LVar0, 30)
254 Set(LVar1, 0)
255 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
256 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
257 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
258 Call(SetAnimation, ACTOR_PARTNER, -1, LVarC)
259 Wait(1)
260 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
261 Sub(LVar0, 20)
262 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
263 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
264 Call(SetAnimation, ACTOR_PARTNER, -1, LVarC)
265 Wait(1)
266 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
267 Sub(LVar0, 10)
268 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
269 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE)
270 Return
271 End
272};

◆ EVS_Partner_BurnContact

EvtScript EVS_Partner_BurnContact
extern

Definition at line 121 of file standard_events.c.

121 {
122 Set(LVarA, LVar1)
123 Set(LVarB, LVar2)
124 Set(LVarC, LVar3)
125 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
126 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
127 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
128 Call(UseBattleCamPreset, BTL_CAM_PARTNER_HIT_HAZARD)
129 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
130 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
131 Sub(LVar0, 60)
132 Add(LVar1, 40)
133 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1))
134 Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA)
135 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
136 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE)
137 Set(LVar1, LVarA)
138 Set(LVar2, LVarC)
140 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
142 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0)
143 Set(LVar0, 0)
144 Loop(15)
145 Add(LVar0, 48)
146 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
147 Wait(1)
148 EndLoop
149 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0)
151 Call(SetGoalToHome, ACTOR_PARTNER)
152 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
153 Add(LVar0, 30)
154 Set(LVar1, 0)
155 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
156 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
157 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
158 Sub(LVar0, 20)
159 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
160 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
161 Sub(LVar0, 10)
162 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
163 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE)
164 Return
165 End
166};
@ BTL_CAM_PARTNER_HIT_HAZARD
Definition enums.h:4884
EvtScript EVS_Partner_BurnHit

◆ EVS_Partner_Recover

EvtScript EVS_Partner_Recover
extern

Definition at line 388 of file standard_events.c.

388 {
389 Set(LVar6, LVar3)
390 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.8))
391 Call(GetActorPos, ACTOR_PARTNER, LVar7, LVar8, LVar9)
392 Call(SetAnimation, ACTOR_PARTNER, -1, LVar2)
393 IfEq(LVar6, 0)
394 Call(SetGoalPos, ACTOR_PARTNER, LVar7, LVar6, LVar9)
395 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
396 Else
397 Call(SetGoalPos, ACTOR_PARTNER, LVar7, LVar6, LVar9)
398 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, FALSE, FALSE)
399 EndIf
400 Call(SetGoalToHome, ACTOR_PARTNER)
401 Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0))
402 Call(SetAnimation, ACTOR_PARTNER, -1, LVar1)
403 Call(RunToGoal, ACTOR_PARTNER, 0)
404 Return
405 End
406};

◆ EVS_Partner_ShockHit

EvtScript EVS_Partner_ShockHit
extern

Definition at line 277 of file standard_events.c.

277 {
278 Set(LVarA, LVar1)
279 Set(LVarB, LVar2)
280 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
281 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
282 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
283 Call(UseBattleCamPreset, BTL_CAM_PARTNER_HIT_HAZARD)
284 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
285 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
286 Sub(LVar0, 60)
287 Add(LVar1, 40)
288 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1))
289 Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA)
290 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
291 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE)
292 Call(ShowShockEffect, ACTOR_SELF)
293 Set(LVar1, LVarA)
294 Set(LVar2, 0)
296 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
298 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0)
299 Set(LVar0, 0)
300 Loop(15)
301 Add(LVar0, 48)
302 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
303 Wait(1)
304 EndLoop
305 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0)
307 Call(SetGoalToHome, ACTOR_PARTNER)
308 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
309 Add(LVar0, 30)
310 Set(LVar1, 0)
311 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
312 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
313 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
314 Sub(LVar0, 20)
315 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
316 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
317 Sub(LVar0, 10)
318 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
319 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE)
320 Return
321 End
322};

◆ EVS_Partner_BurnHit

EvtScript EVS_Partner_BurnHit
extern

Definition at line 439 of file standard_events.c.

439 {
440 Call(SetAnimation, ACTOR_PARTNER, -1, LVar1)
442 Call(GetActorPos, ACTOR_PARTNER, LVar5, LVar6, LVar7)
443 Add(LVar5, -5)
444 Add(LVar6, 18)
445 Add(LVar7, 5)
446 PlayEffect(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, Float(1.5), 15)
447 Wait(2)
448 Add(LVar5, 10)
449 Add(LVar6, -14)
450 PlayEffect(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, Float(1.5), 15)
452 Call(GetDamageIntensity)
455 Call(StartRumble, BTL_RUMBLE_HIT_LIGHT)
456 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
457 Wait(1)
458 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
459 Wait(1)
460 Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
461 Wait(1)
462 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
463 Wait(1)
464 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
465 Wait(1)
466 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
467 Wait(1)
468 Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
469 Wait(1)
470 Loop(2)
471 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
472 Wait(1)
473 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
474 Wait(1)
475 EndLoop
476 Loop(4)
477 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
478 Wait(1)
479 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
480 Wait(1)
481 EndLoop
482 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
483 Wait(10)
485 Call(StartRumble, BTL_RUMBLE_HIT_LIGHT)
486 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
487 Wait(1)
488 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
489 Wait(1)
490 Call(SetActorDispOffset, ACTOR_SELF, 0, 20, 0)
491 Wait(1)
492 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
493 Wait(1)
494 Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0)
495 Wait(1)
496 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
497 Wait(1)
498 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
499 Wait(1)
500 Loop(2)
501 Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
502 Wait(1)
503 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
504 Wait(1)
505 EndLoop
506 Loop(6)
507 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
508 Wait(1)
509 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
510 Wait(1)
511 EndLoop
512 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
513 Wait(10)
515 Call(StartRumble, BTL_RUMBLE_HIT_HEAVY)
516 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
517 Wait(1)
518 Call(SetActorDispOffset, ACTOR_SELF, 0, 6, 0)
519 Wait(1)
520 Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0)
521 Wait(1)
522 Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0)
523 Wait(1)
524 Call(SetActorDispOffset, ACTOR_SELF, 0, 25, 0)
525 Wait(1)
526 Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0)
527 Wait(1)
528 Call(SetActorDispOffset, ACTOR_SELF, 0, 17, 0)
529 Wait(1)
530 Loop(2)
531 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
532 Wait(1)
533 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
534 Wait(1)
535 EndLoop
536 Loop(6)
537 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
538 Wait(1)
539 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
540 Wait(1)
541 EndLoop
542 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
543 Wait(10)
545 Call(StartRumble, BTL_RUMBLE_HIT_EXTREME)
546 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
547 Wait(1)
548 Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
549 Wait(1)
550 Call(SetActorDispOffset, ACTOR_SELF, 0, 24, 0)
551 Wait(1)
552 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
553 Wait(1)
554 Call(SetActorDispOffset, ACTOR_SELF, 0, 28, 0)
555 Wait(1)
556 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
557 Wait(1)
558 Call(SetActorDispOffset, ACTOR_SELF, 0, 19, 0)
559 Wait(1)
560 Loop(2)
561 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
562 Wait(1)
563 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
564 Wait(1)
565 EndLoop
566 Loop(6)
567 Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
568 Wait(1)
569 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
570 Wait(1)
571 EndLoop
572 Loop(2)
573 Call(SetActorDispOffset, ACTOR_SELF, 0, 2, 0)
574 Wait(1)
575 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
576 Wait(1)
577 EndLoop
578 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
579 Wait(10)
581 Call(SetAnimation, ACTOR_PARTNER, -1, LVar2)
582 Wait(8)
583 Return
584 End
585};
@ DAMAGE_INTENSITY_LIGHT
Definition enums.h:3506
@ DAMAGE_INTENSITY_HEAVY
Definition enums.h:3508
@ DAMAGE_INTENSITY_MEDIUM
Definition enums.h:3507
@ BTL_RUMBLE_HIT_HEAVY
Definition enums.h:4256
@ BTL_RUMBLE_HIT_LIGHT
Definition enums.h:4255
@ BTL_RUMBLE_HIT_EXTREME
Definition enums.h:4257

◆ EVS_Partner_Hit

EvtScript EVS_Partner_Hit
extern

Definition at line 774 of file standard_events.c.

774 {
776 IfNe(LVar2, 0)
777 Call(SetAnimation, ACTOR_PARTNER, -1, LVar2)
778 Wait(8)
779 EndIf
780 Return
781 End
782};
EvtScript EVS_Partner_Hit_Impl

◆ EVS_Partner_Drop

EvtScript EVS_Partner_Drop
extern

Definition at line 410 of file standard_events.c.

410 {
411 Set(LVarA, LVar1)
412 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
413 IfEq(LVar1, 0)
414 Goto(10)
415 EndIf
416 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
417 Call(func_8026F1A0, ACTOR_PARTNER, 1)
418 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
419 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
420 Set(LVar1, 0)
421 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0))
422 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
423 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
424 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
425 Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE)
426 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
427 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE)
428 Wait(8)
429 Label(10)
430 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
431 PlayEffect(EFFECT_LANDING_DUST, 0, LVar0, LVar1, LVar2)
432 Return
433 End
434};

◆ EVS_Partner_NoDamageHit

EvtScript EVS_Partner_NoDamageHit
extern

Definition at line 787 of file standard_events.c.

787 {
788 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
789 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
790 Call(AddActorPos, ACTOR_SELF, -2, 0, 0)
791 Wait(1)
792 Call(AddActorPos, ACTOR_SELF, 2, 0, 0)
793 Wait(1)
794 Call(AddActorPos, ACTOR_SELF, -4, 0, 0)
795 Wait(1)
796 Call(AddActorPos, ACTOR_SELF, 4, 0, 0)
797 Wait(1)
798 Call(AddActorPos, ACTOR_SELF, -2, 0, 0)
799 Wait(1)
800 Call(AddActorPos, ACTOR_SELF, 2, 0, 0)
801 Wait(1)
802 Call(AddActorPos, ACTOR_SELF, -3, 0, 0)
803 Wait(1)
804 Call(AddActorPos, ACTOR_SELF, 3, 0, 0)
805 Wait(1)
806 Call(AddActorPos, ACTOR_SELF, -2, 0, 0)
807 Wait(1)
808 Call(AddActorPos, ACTOR_SELF, 2, 0, 0)
809 Wait(1)
810 Call(AddActorPos, ACTOR_SELF, -1, 0, 0)
811 Wait(1)
812 Call(AddActorPos, ACTOR_SELF, 1, 0, 0)
813 Wait(1)
814 Return
815 End
816};

◆ EVS_Partner_LakilesterHit

EvtScript EVS_Partner_LakilesterHit
extern

Definition at line 750 of file standard_events.c.

750 {
751 Call(GetDamageSource, LVar0)
763 IfNe(LVar2, 0)
764 Call(SetAnimation, ACTOR_PARTNER, -1, LVar2)
765 Wait(8)
766 EndIf
767 Return
768 End
769};
@ DMG_SRC_CRUSH
Definition enums.h:2012
@ DMG_SRC_DEFAULT
Definition enums.h:1988
@ DMG_SRC_TUBBA_SMASH
Definition enums.h:2011
@ DMG_SRC_CRUSH_PARTNER
Definition enums.h:2013
EvtScript EVS_Partner_Crushed_Impl

◆ EVS_Enemy_HopToPos

EvtScript EVS_Enemy_HopToPos
extern

Definition at line 2021 of file standard_events.c.

2021 {
2022 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
2023 Label(0)
2024 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
2025 IfEq(LVar3, LVar0)
2026 Goto(10)
2027 EndIf
2028 IfLt(LVar3, LVar0)
2029 Set(LVar4, LVar0)
2030 Sub(LVar4, LVar3)
2031 IfLt(LVar4, 30)
2032 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
2033 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
2034 Else
2035 Set(LVar4, LVar3)
2036 Add(LVar3, 30)
2037 Call(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2)
2038 Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE)
2039 EndIf
2040 Else
2041 Set(LVar4, LVar3)
2042 Sub(LVar4, LVar0)
2043 IfLt(LVar4, 30)
2044 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
2045 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
2046 Else
2047 Sub(LVar3, 30)
2048 Call(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2)
2049 Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE)
2050 EndIf
2051 EndIf
2052 Goto(0)
2053 Label(10)
2054 Return
2055 End
2056};

◆ EVS_Enemy_BurnHit

EvtScript EVS_Enemy_BurnHit
extern

Definition at line 1492 of file standard_events.c.

1492 {
1493 Call(GetLastEvent, ACTOR_SELF, LVar3)
1495 Call(EnableActorGlow, ACTOR_SELF, FALSE)
1496 EndIf
1497 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1498 Call(GetDamageSource, LVar3)
1499 Switch(LVar3)
1501 Call(GetOriginalActorType, ACTOR_SELF, LVar7)
1502 Switch(LVar7)
1503 CaseOrEq(ACTOR_TYPE_MONTY_MOLE)
1504 CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS)
1507 Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1508 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01))
1509 Add(LVar5, 55)
1510 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1511 Call(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE)
1512 EndSwitch
1513 Set(LVar7, 0)
1514 Loop(30)
1515 Add(LVar7, 48)
1516 Call(SetActorYaw, ACTOR_SELF, LVar7)
1517 Wait(1)
1518 EndLoop
1519 Call(GetOriginalActorType, ACTOR_SELF, LVar7)
1520 Switch(LVar7)
1521 CaseOrEq(ACTOR_TYPE_MONTY_MOLE)
1522 CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS)
1523 Wait(30)
1526 Sub(LVar5, 55)
1527 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8))
1528 IfEq(LVar5, 0)
1529 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1530 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
1531 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1532 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
1533 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1534 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
1535 Else
1536 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1537 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE)
1538 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1539 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
1540 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1541 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE)
1542 EndIf
1543 EndSwitch
1545 Wait(20)
1546 EndSwitch
1547 IfNe(LVar2, -1)
1548 Call(SetAnimation, ACTOR_SELF, LVar0, LVar2)
1549 EndIf
1550 Wait(10)
1551 Call(GetLastEvent, ACTOR_SELF, LVar1)
1552 Switch(LVar1)
1554 Call(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1)
1556 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1557 Call(GetActorSize, ACTOR_SELF, LVar3, LVar4)
1558 Call(GetStatusFlags, ACTOR_SELF, LVar5)
1560 MulF(LVar3, Float(0.4))
1561 MulF(LVar4, Float(0.4))
1562 EndIf
1563 DivF(LVar3, Float(2.0))
1564 Call(GetActorFlags, ACTOR_SELF, LVar5)
1566 SubF(LVar1, LVar3)
1567 Else
1568 AddF(LVar1, LVar3)
1569 EndIf
1570 AddF(LVar2, Float(5.0))
1571 DivF(LVar3, Float(10.0))
1572 Call(GetStatusFlags, ACTOR_SELF, LVar5)
1574 MulF(LVar3, Float(0.4))
1575 IfLt(LVar3, 1)
1576 SetF(LVar3, Float(1.0))
1577 EndIf
1578 EndIf
1579 PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10)
1580 EndIf
1582 EndSwitch
1583 Return
1584 End
1585};
@ ACTOR_EVENT_FLAG_FIREY
Player takes burn damage upon contact.
Definition enums.h:3371
@ ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION
Blast and fire attacks trigger an explosion.
Definition enums.h:3377
@ STATUS_FLAG_SHRINK
Definition enums.h:2819
@ DMG_SRC_FIRE_SHELL
Definition enums.h:1997
@ ACTOR_FLAG_UPSIDE_DOWN
HP bar offset below actor (e.g. Swooper when upside-down).
Definition enums.h:3331
#define DivF(VAR, FLOAT_VALUE)
Definition macros.h:386
#define MulF(VAR, FLOAT_VALUE)
Definition macros.h:385
#define IfNotFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is unset on LVAR,...
Definition macros.h:292

◆ EVS_Enemy_ShockHit

EvtScript EVS_Enemy_ShockHit
extern

Definition at line 1587 of file standard_events.c.

1587 {
1588 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
1589 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
1590 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1592 Return
1593 End
1594};
EvtScript EVS_Enemy_ShockHit_Impl

Referenced by A(), and A().

◆ EVS_Enemy_ShockHit_Impl

EvtScript EVS_Enemy_ShockHit_Impl
extern

Definition at line 1596 of file standard_events.c.

1596 {
1597 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1598 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1599 Call(GetActorSize, ACTOR_SELF, LVar3, LVar4)
1600 SetF(LVar5, LVar3)
1601 DivF(LVar5, Float(20.0))
1602 AddF(LVar1, LVar5)
1603 PlayEffect(EFFECT_FLASHING_BOX_SHOCKWAVE, FX_SHOCK_OVERLAY_SHOCK_HIT, LVar0, LVar1, LVar2, LVar4, LVar3)
1604 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HIT_SHOCK)
1605 Call(HideHealthBar, ACTOR_SELF)
1606 Call(HPBarToCurrent, ACTOR_SELF)
1607 Call(ShowHealthBar, ACTOR_SELF)
1608 Call(AddActorPos, ACTOR_SELF, 0, 1, 0)
1609 Call(AddEffectOffset, LVarF, 0, 1, 0)
1610 Wait(1)
1611 Call(AddActorPos, ACTOR_SELF, 0, 3, 0)
1612 Call(AddEffectOffset, LVarF, 0, 3, 0)
1613 Wait(1)
1614 Call(AddActorPos, ACTOR_SELF, 0, 12, 0)
1615 Call(AddEffectOffset, LVarF, 0, 12, 0)
1616 Wait(1)
1617 Call(AddActorPos, ACTOR_SELF, 0, -8, 0)
1618 Call(AddEffectOffset, LVarF, 0, -8, 0)
1619 Wait(1)
1620 Call(AddActorPos, ACTOR_SELF, 0, 12, 0)
1621 Call(AddEffectOffset, LVarF, 0, 12, 0)
1622 Wait(1)
1623 Call(AddActorPos, ACTOR_SELF, 0, -4, 0)
1624 Call(AddEffectOffset, LVarF, 0, -4, 0)
1625 Wait(1)
1626 Call(AddActorPos, ACTOR_SELF, 0, -4, 0)
1627 Call(AddEffectOffset, LVarF, 0, -4, 0)
1628 Wait(1)
1629 Call(AddActorPos, ACTOR_SELF, 0, -6, 0)
1630 Call(AddEffectOffset, LVarF, 0, -6, 0)
1631 Wait(1)
1632 Call(AddActorPos, ACTOR_SELF, 0, -6, 0)
1633 Call(AddEffectOffset, LVarF, 0, -6, 0)
1634 Wait(1)
1635 Call(AddActorPos, ACTOR_SELF, 0, 6, 0)
1636 Call(AddEffectOffset, LVarF, 0, 6, 0)
1637 Wait(1)
1638 Call(AddActorPos, ACTOR_SELF, 0, -6, 0)
1639 Call(AddEffectOffset, LVarF, 0, -6, 0)
1640 Wait(1)
1641 Loop(6)
1642 Call(AddActorPos, ACTOR_SELF, 0, 2, 0)
1643 Call(AddEffectOffset, LVarF, 0, 2, 0)
1644 Wait(1)
1645 Call(AddActorPos, ACTOR_SELF, 0, -2, 0)
1646 Call(AddEffectOffset, LVarF, 0, -2, 0)
1647 Wait(1)
1648 EndLoop
1649 Wait(5)
1650 Call(HideHealthBar, ACTOR_SELF)
1651 Call(HPBarToHome, ACTOR_SELF)
1652 Call(GetLastEvent, ACTOR_SELF, LVar0)
1654 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1655 EndIf
1656 Return
1657 End
1658};
@ FX_SHOCK_OVERLAY_SHOCK_HIT
Definition effects.h:1263
@ SOUND_HIT_SHOCK
Definition enums.h:1195

◆ EVS_Partner_Celebrate

EvtScript EVS_Partner_Celebrate
extern

Definition at line 39 of file standard_events.c.

39 {
40 Call(UseIdleAnimation, ACTOR_PARTNER, FALSE)
41 Loop(2)
42 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
43 Call(AddActorPos, ACTOR_SELF, 0, 6, 0)
44 Wait(1)
45 Call(AddActorPos, ACTOR_SELF, 0, 4, 0)
46 Wait(1)
47 Call(AddActorPos, ACTOR_SELF, 0, 3, 0)
48 Wait(1)
49 Call(AddActorPos, ACTOR_SELF, 0, 2, 0)
50 Wait(1)
51 Call(AddActorPos, ACTOR_SELF, 0, 1, 0)
52 Wait(1)
53 Call(AddActorPos, ACTOR_SELF, 0, -1, 0)
54 Wait(1)
55 Call(AddActorPos, ACTOR_SELF, 0, -2, 0)
56 Wait(1)
57 Call(AddActorPos, ACTOR_SELF, 0, -3, 0)
58 Wait(1)
59 Call(AddActorPos, ACTOR_SELF, 0, -4, 0)
60 Wait(1)
61 Call(AddActorPos, ACTOR_SELF, 0, -6, 0)
62 Wait(1)
63 Wait(1)
64 Call(SetAnimation, ACTOR_SELF, LVar0, LVar2)
65 Wait(1)
67 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
68 Call(AddActorPos, ACTOR_SELF, 0, 6, 0)
69 Wait(1)
70 Call(AddActorPos, ACTOR_SELF, 0, 4, 0)
71 Wait(1)
72 Call(AddActorPos, ACTOR_SELF, 0, 3, 0)
73 Wait(1)
74 Call(AddActorPos, ACTOR_SELF, 0, 2, 0)
75 Wait(1)
76 Call(AddActorPos, ACTOR_SELF, 0, 1, 0)
77 Wait(1)
78 Call(AddActorPos, ACTOR_SELF, 0, -1, 0)
79 Wait(1)
80 Call(AddActorPos, ACTOR_SELF, 0, -2, 0)
81 Wait(1)
82 Call(AddActorPos, ACTOR_SELF, 0, -3, 0)
83 Wait(1)
84 Call(AddActorPos, ACTOR_SELF, 0, -4, 0)
85 Wait(1)
86 Call(AddActorPos, ACTOR_SELF, 0, -6, 0)
87 Wait(1)
88 Wait(1)
89 Call(SetAnimation, ACTOR_SELF, LVar0, LVar3)
90 Return
91 End
92};

◆ EVS_Enemy_NoDamageHit

EvtScript EVS_Enemy_NoDamageHit
extern

Definition at line 1663 of file standard_events.c.

1663 {
1664 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1665 Call(GetStatusFlags, ACTOR_SELF, LVar2)
1667 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1668 EndIf
1669 Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0)
1670 Wait(1)
1671 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1672 Wait(1)
1673 Call(SetActorDispOffset, ACTOR_SELF, -4, 0, 0)
1674 Wait(1)
1675 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1676 Wait(1)
1677 Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0)
1678 Wait(1)
1679 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1680 Wait(1)
1681 Call(SetActorDispOffset, ACTOR_SELF, -3, 0, 0)
1682 Wait(1)
1683 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1684 Wait(1)
1685 Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0)
1686 Wait(1)
1687 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1688 Wait(1)
1689 Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0)
1690 Wait(1)
1691 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1692 Wait(1)
1693 Return
1694 End
1695};

◆ EVS_Enemy_Death

EvtScript EVS_Enemy_Death
extern

Definition at line 1697 of file standard_events.c.

1697 {
1699 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1701 Call(RemoveActor, ACTOR_SELF)
1702 Return
1703 End
1704};
EvtScript EVS_Enemy_DeathWithoutRemove
EvtScript EVS_ForceNextTarget

◆ EVS_Enemy_DeathWithoutRemove

EvtScript EVS_Enemy_DeathWithoutRemove
extern

Definition at line 1707 of file standard_events.c.

1707 {
1708 Call(HideHealthBar, ACTOR_SELF)
1709 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
1710 Call(EnableActorGlow, ACTOR_SELF, FALSE)
1711 IfNe(LVar1, -1)
1712 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1713 Wait(10)
1714 EndIf
1715 Call(GetDamageSource, LVar5)
1716 Switch(LVar5)
1728 Set(LFlag0, FALSE)
1729 Call(GetOriginalActorType, ACTOR_SELF, LVar1)
1730 Switch(LVar1)
1731 CaseOrEq(ACTOR_TYPE_BOB_OMB)
1732 CaseOrEq(ACTOR_TYPE_BULLET_BILL)
1733 CaseOrEq(ACTOR_TYPE_BOMBSHELL_BILL)
1736 EndSwitch
1737 IfNe(LVar2, EXEC_DEATH_NO_SPINNING) // special signal value
1738 Set(LVar2, 0)
1739 Loop(24)
1740 Call(SetActorYaw, ACTOR_SELF, LVar2)
1741 Add(LVar2, 30)
1742 Wait(1)
1743 EndLoop
1744 Call(SetActorYaw, ACTOR_SELF, 0)
1745 EndIf
1746 EndSwitch
1747 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1748 Add(LVar1, 10)
1749 Add(LVar2, 10)
1750 PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2)
1751 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH)
1752 Call(DropStarPoints, ACTOR_SELF)
1753 Call(SetActorYaw, ACTOR_SELF, 0)
1754 Set(LVar3, 0)
1755 Loop(12)
1756 Call(SetActorRotation, ACTOR_SELF, LVar3, 0, 0)
1757 Add(LVar3, 8)
1758 Wait(1)
1759 EndLoop
1760 Return
1761 End
1762};
@ SOUND_ACTOR_DEATH
Definition enums.h:1293
#define LFlag0
Definition macros.h:167
#define EXEC_DEATH_NO_SPINNING
Definition battle.h:263

◆ EVS_Enemy_ScareAway

EvtScript EVS_Enemy_ScareAway
extern

Definition at line 1764 of file standard_events.c.

1764 {
1765 Call(HideHealthBar, ACTOR_SELF)
1766 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1767 Call(SetAnimation, ACTOR_SELF, LVar0, LVar2)
1768 Call(GetActorFlags, ACTOR_SELF, LVar9)
1769 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.05))
1770 Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
1771 Set(LVarD, LVarB)
1772 Add(LVarD, 20)
1774 Call(SetGoalPos, ACTOR_SELF, LVarA, LVarD, LVarC)
1775 Call(JumpToGoal, ACTOR_SELF, 3, FALSE, FALSE, FALSE)
1776 Wait(20)
1777 Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC)
1778 Call(EnableActorGlow, ACTOR_SELF, FALSE)
1779 Call(FallToGoal, ACTOR_SELF, 7)
1780 Else
1781 Wait(15)
1782 Call(EnableActorGlow, ACTOR_SELF, FALSE)
1783 EndIf
1784 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1785 Wait(17)
1786 Call(SetActorYaw, ACTOR_SELF, 180)
1787 Wait(3)
1788 Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE)
1789 Call(SetActorSpeed, ACTOR_SELF, Float(10.0))
1790 Add(LVarA, 300)
1791 Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC)
1792 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
1794 Call(HideHealthBar, ACTOR_SELF)
1795 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
1796 Call(RemoveActor, ACTOR_SELF)
1797 Return
1798 End
1799};
@ ACTOR_FLAG_FLYING
Quake Hammer can't hit.
Definition enums.h:3329
#define LVarD
Definition macros.h:161

◆ EVS_Enemy_SpinSmashHit

EvtScript EVS_Enemy_SpinSmashHit
extern

Definition at line 1896 of file standard_events.c.

1896 {
1898 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1899 Call(GetPartEventFlags, ACTOR_SELF, LVar0, LVarA)
1901 Call(SetActorPos, ACTOR_SELF, -200, 30, 0)
1902 Call(SetGoalToHome, ACTOR_SELF)
1903 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.4))
1904 Call(SetActorSpeed, ACTOR_SELF, Float(10.0))
1905 Call(AddGoalPos, ACTOR_SELF, -30, 0, 0)
1906 Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE)
1908 Call(AddGoalPos, ACTOR_SELF, 20, 0, 0)
1909 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
1911 Call(AddGoalPos, ACTOR_SELF, 10, 0, 0)
1912 Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
1914 Wait(15)
1915 Label(0)
1916 Call(GetActorRotation, ACTOR_SELF, LVar0, LVar1, LVar2)
1917 Mod(LVar1, 360)
1918 IfNe(LVar1, 0)
1919 Wait(1)
1920 Goto(0)
1921 EndIf
1923 Call(SetActorYaw, ACTOR_SELF, 0)
1924 Return
1925 End
1926};
EvtScript EVS_Enemy_SpinSmash_HitNext
EvtScript EVS_Enemy_SpinSmash_ShakeCam

◆ EVS_Enemy_FlipBackUp

EvtScript EVS_Enemy_FlipBackUp
extern

Definition at line 1928 of file standard_events.c.

1928 {
1929 Set(LVarA, LVar0)
1930 Set(LVarB, LVar1)
1931 Set(LVarC, LVar2)
1932 Call(SetAnimation, ACTOR_SELF, LVarA, LVarB)
1933 Set(LVar0, 0)
1934 Set(LVar1, 0)
1935 Set(LVar2, 0)
1936 Loop(5)
1937 Add(LVar0, 30)
1938 Add(LVar1, 4)
1939 Add(LVar2, -2)
1940 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
1941 Call(SetActorDispOffset, ACTOR_SELF, LVar2, LVar1, 0)
1942 Wait(1)
1943 EndLoop
1944 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
1945 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1946 Call(SetAnimation, ACTOR_SELF, LVarA, LVarC)
1947 Set(LVar2, -10)
1948 Loop(5)
1949 Add(LVar2, 2)
1950 Call(SetActorDispOffset, ACTOR_SELF, LVar2, 0, 0)
1951 Wait(1)
1952 EndLoop
1953 Return
1954 End
1955};

◆ EVS_Enemy_Knockback

EvtScript EVS_Enemy_Knockback
extern

Definition at line 1957 of file standard_events.c.

1957 {
1958 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1959 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1960 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1961 Set(LVar1, 0)
1962 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1963 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4))
1964 Call(AddGoalPos, ACTOR_SELF, 30, 0, 0)
1965 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
1966 Call(AddGoalPos, ACTOR_SELF, 15, 0, 0)
1967 Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
1968 Call(AddGoalPos, ACTOR_SELF, 5, 0, 0)
1969 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
1970 Return
1971 End
1972};

◆ EVS_Enemy_ReturnHome

EvtScript EVS_Enemy_ReturnHome
extern

Definition at line 1974 of file standard_events.c.

1974 {
1975 Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
1976 Call(SetGoalToHome, ACTOR_SELF)
1977 Call(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF)
1979 IfGe(LVar9, Float(8.0))
1980 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1981 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
1982 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
1983 EndIf
1984 Call(SetActorYaw, ACTOR_SELF, 0)
1985 Return
1986 End
1987};
ApiStatus GetDist2D(Evt *script, b32 isInitialCall)
#define IfGe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR >= RVAR.
Definition macros.h:284

◆ EVS_Enemy_Recover

EvtScript EVS_Enemy_Recover
extern

Definition at line 1989 of file standard_events.c.

1989 {
1990 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1991 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
1992 Call(GetActorPos, ACTOR_SELF, LVar7, LVar8, LVar9)
1993 Call(GetActorFlags, ACTOR_SELF, LVar0)
1995 Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9)
1996 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE)
1997 Else
1998 Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9)
1999 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
2000 EndIf
2001 Return
2002 End
2003};

◆ EVS_Enemy_HopHome

EvtScript EVS_Enemy_HopHome
extern

Definition at line 2007 of file standard_events.c.

2007 {
2008 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
2009 Call(SetGoalToHome, ACTOR_SELF)
2010 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
2011 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
2012 Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0))
2014 Return
2015 End
2016};
EvtScript EVS_Enemy_HopToPos

◆ EVS_Enemy_AirLift

EvtScript EVS_Enemy_AirLift
extern

Definition at line 2058 of file standard_events.c.

2058 {
2059 Call(GetStatusFlags, ACTOR_SELF, LVar2)
2061 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
2062 Call(SetAnimationRate, ACTOR_SELF, LVar0, Float(2.0))
2063 Loop(10)
2064 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
2065 Call(GetActorSize, ACTOR_SELF, LVar6, LVar7)
2066 Add(LVar4, LVar6)
2067 PlayEffect(EFFECT_SWEAT, 0, LVar3, LVar4, LVar5, 5, -45, 20)
2068 Wait(10)
2069 EndLoop
2070 Call(SetAnimationRate, ACTOR_SELF, LVar0, Float(1.0))
2071 EndIf
2072 Return
2073 End
2074};

◆ EVS_Enemy_BlowAway

EvtScript EVS_Enemy_BlowAway
extern

Definition at line 2076 of file standard_events.c.

2076 {
2077 Call(GetStatusFlags, ACTOR_SELF, LVar5)
2079 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
2080 Else
2081 Set(LFlag0, FALSE)
2084 Set(LFlag0, TRUE)
2085 EndIf
2086 EndIf
2089 Set(LFlag0, TRUE)
2090 EndIf
2091 EndIf
2094 Set(LFlag0, TRUE)
2095 EndIf
2096 EndIf
2099 Set(LFlag0, TRUE)
2100 EndIf
2101 EndIf
2104 Set(LFlag0, TRUE)
2105 EndIf
2106 EndIf
2109 Set(LFlag0, TRUE)
2110 EndIf
2111 EndIf
2114 Set(LFlag0, TRUE)
2115 EndIf
2116 EndIf
2118 Set(LFlag0, TRUE)
2119 EndIf
2122 Set(LFlag0, TRUE)
2123 EndIf
2124 EndIf
2127 Set(LFlag0, TRUE)
2128 EndIf
2129 EndIf
2130 IfEq(LFlag0, TRUE)
2131 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
2132 EndIf
2133 EndIf
2135 Wait(1000)
2136 Return
2137 End
2138};
@ STATUS_FLAG_FEAR
Definition enums.h:2815
@ STATUS_FLAG_FROZEN
Definition enums.h:2814
@ STATUS_FLAG_STATIC
Definition enums.h:2813
@ STATUS_FLAG_PARALYZE
Definition enums.h:2816
@ STATUS_FLAG_STONE
Definition enums.h:2820
@ STATUS_FLAG_KO
Definition enums.h:2823
@ STATUS_FLAG_DIZZY
Definition enums.h:2818
@ STATUS_FLAG_SLEEP
Definition enums.h:2812
@ STATUS_FLAG_POISON
Definition enums.h:2817

◆ Rumble_1

EvtScript Rumble_1
extern

◆ Rumble_2

EvtScript Rumble_2
extern

◆ Rumble_3

EvtScript Rumble_3
extern

◆ Rumble_4

EvtScript Rumble_4
extern

◆ Rumble_5

EvtScript Rumble_5
extern

◆ Rumble_6

EvtScript Rumble_6
extern

◆ Rumble_7

EvtScript Rumble_7
extern

◆ Rumble_Unused_1

EvtScript Rumble_Unused_1
extern

◆ Rumble_Unused_2

EvtScript Rumble_Unused_2
extern

◆ Rumble_Unused_3

EvtScript Rumble_Unused_3
extern

◆ Rumble_Unused_4

EvtScript Rumble_Unused_4
extern