Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
player_events.c File Reference

Go to the source code of this file.

Enumerations

enum  { MERLEE_EFFECTS_HOLD = 0 , MERLEE_EFFECTS_RELEASE = 1 , MERLEE_EFFECTS_DISMISS = 2 }
 

Functions

void btl_set_player_idle_anims (void)
 

Variables

HudScript HES_Happy
 
HudScript HES_HPDrain
 
EvtScript EVS_Player_Celebrate
 
EvtScript EVS_Player_SimpleHit
 
EvtScript EVS_Player_ComplexHit
 
EvtScript EVS_Player_NoDamageHit
 
CelebrationAnimOptions bPlayerCelebrations
 
BSS s32 BattleMerleeEffectsTime
 
BSS f32 BattleMerleeBasePosY
 
BSS EffectInstanceBattleMerleeOrbEffect
 
BSS EffectInstanceBattleMerleeWaveEffect
 
BSS HudElemID HID_Refund
 
BSS s16 BattleMerleeEffectsState
 
BSS HudElemID HID_Happy
 
BSS HudElemID HID_HPDrain
 
BSS s32 D_8029FBB0 [3]
 
EvtScript EVS_Mario_OnActorCreate
 
EvtScript EVS_Peach_OnActorCreate
 
EvtScript EVS_MarioEnterStage
 
EvtScript EVS_PeachEnterStage
 
EvtScript EVS_Mario_HandlePhase
 
EvtScript EVS_Peach_HandlePhase
 
EvtScript EVS_ExecuteMarioAction
 
EvtScript EVS_ExecutePeachAction
 
EvtScript EVS_PlayerFirstStrike
 
EvtScript EVS_StartDefend
 
EvtScript EVS_Player_HandleEvent
 
EvtScript EVS_RunAwayNoCommand
 
EvtScript EVS_RunAwayStart
 
EvtScript EVS_RunAwayFail
 
EvtScript EVS_PlayerDies
 
EvtScript EVS_Unused_UseItemWithEffect
 
EvtScript EVS_Unused_UseItem
 
EvtScript EVS_Unused_PlayerGoHome
 
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
 

Enumeration Type Documentation

◆ anonymous enum

Enumerator
MERLEE_EFFECTS_HOLD 
MERLEE_EFFECTS_RELEASE 
MERLEE_EFFECTS_DISMISS 

Definition at line 32 of file player_events.c.

32 {
33 MERLEE_EFFECTS_HOLD = 0, // effects appear and track Merlee's position
34 MERLEE_EFFECTS_RELEASE = 1, // effects grow larger before vanishing
35 MERLEE_EFFECTS_DISMISS = 2, // effects vanish and are dismissed
36};
@ MERLEE_EFFECTS_DISMISS
@ MERLEE_EFFECTS_RELEASE
@ MERLEE_EFFECTS_HOLD

Function Documentation

◆ btl_set_player_idle_anims()

void btl_set_player_idle_anims ( void )

Definition at line 40 of file player_events.c.

40 {
42 ActorPart* actorPart = &battleStatus->playerActor->partsTable[0];
43
47 } else if (!battleStatus->outtaSightActive) {
48 actorPart->idleAnimations = bMarioIdleAnims;
49 }
50}
BSS s32 PopupMenu_SelectedIndex
u32 * idleAnimations
@ BS_FLAGS2_PEACH_BATTLE
Definition enums.h:3643
void set_actor_anim(s32 actorID, s32 partID, AnimID animID)
Definition 190B20.c:737
s32 bPeachIdleAnims[]
Definition actors.c:99
BattleStatus gBattleStatus
Definition battle.cpp:14
u32 bMarioIdleAnims[]
Definition actors.c:30

Referenced by btl_state_update_end_turn().

Variable Documentation

◆ HES_Happy

HudScript HES_Happy
extern

Definition at line 2210 of file global_hud_scripts.c.

◆ HES_HPDrain

HudScript HES_HPDrain
extern

Definition at line 2212 of file global_hud_scripts.c.

◆ EVS_Player_Celebrate

EvtScript EVS_Player_Celebrate
Initial value:
= {
Set(LVar0, 0)
Loop(5)
Add(LVar0, 72)
Wait(1)
Wait(31)
}
@ ACTOR_PLAYER
Definition enums.h:2118
@ ACTOR_SELF
Definition enums.h:2117
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:366
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:214
#define Add(VAR, INT_VALUE)
Definition macros.h:377
#define EndLoop
Marks the end of a loop.
Definition macros.h:249
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:255
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:577
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:246
#define LVar0
Definition macros.h:149
#define Return
Kills the current EVT thread.
Definition macros.h:218

Definition at line 1051 of file player_events.c.

1051 {
1052 Set(LVar0, 0)
1053 Loop(5)
1054 Add(LVar0, 72)
1056 Wait(1)
1057 EndLoop
1060 Wait(31)
1061 Return
1062 End
1063};

◆ EVS_Player_SimpleHit

EvtScript EVS_Player_SimpleHit
extern

Definition at line 1090 of file standard_events.c.

1090 {
1092 IfNe(LVar2, 0)
1094 Wait(8)
1095 EndIf
1096 Return
1097 End
1098};
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
Definition macros.h:273
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:299
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:476
#define LVar2
Definition macros.h:151
EvtScript EVS_Player_Hit_Impl

◆ EVS_Player_ComplexHit

EvtScript EVS_Player_ComplexHit
extern

Definition at line 1048 of file standard_events.c.

1048 {
1051 Switch(LVar0)
1053 Wait(1000)
1054 Return
1075 Wait(15)
1078 EndSwitch
1079 IfNe(LVar2, 0)
1081 Wait(8)
1082 EndIf
1083 Return
1084 End
1085};
@ DMG_SRC_CRUSH
Definition enums.h:2038
@ DMG_SRC_NEXT_SLAP_RIGHT
Definition enums.h:2025
@ DMG_SRC_LAST_SLAP_RIGHT
Definition enums.h:2027
@ DMG_SRC_LEECH
Definition enums.h:2015
@ DMG_SRC_DEFAULT
Definition enums.h:2014
@ DMG_SRC_TUBBA_SMASH
Definition enums.h:2037
@ DMG_SRC_NEXT_SLAP_LEFT
Definition enums.h:2024
@ DMG_SRC_CRUSH_PARTNER
Definition enums.h:2039
@ DMG_SRC_INK_BLAST
Definition enums.h:2040
@ DMG_SRC_LAST_SLAP_LEFT
Definition enums.h:2026
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:312
#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:320
#define EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:353
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:342
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:338
#define LVar1
Definition macros.h:150
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:363
EvtScript EVS_Player_NextSlapLeft_Impl
EvtScript EVS_Player_LastSlapLeft_Impl
EvtScript EVS_Player_Crushed_Impl
EvtScript EVS_Player_NextSlapRight_Impl
EvtScript EVS_Player_LastSlapRight_Impl

◆ EVS_Player_NoDamageHit

EvtScript EVS_Player_NoDamageHit
extern

Definition at line 1103 of file standard_events.c.

1103 {
1109 EndIf
1111 Wait(1)
1113 Wait(1)
1115 Wait(1)
1117 Wait(1)
1119 Wait(1)
1121 Wait(1)
1123 Wait(1)
1125 Wait(1)
1127 Wait(1)
1129 Wait(1)
1131 Wait(1)
1133 Wait(1)
1135 Switch(LVar0)
1137 Wait(15)
1138 EndSwitch
1139 Return
1140 End
1141};
#define STATUS_FLAGS_IMMOBILIZED
Definition enums.h:2868
@ DMG_SRC_TUTORIAL_GOOMBARIO
Definition enums.h:2019
#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:293

◆ bPlayerCelebrations

CelebrationAnimOptions bPlayerCelebrations
extern

Definition at line 5 of file actors.c.

5 {
6 .randomChance = 10,
7 .hpBasedChance = 90,
8 .options = {
9 { // 0: random celebration
11 { 50, ANIM_Mario1_Chuckle },
12 }, { // 1: HP <= 25%
13 { 50, ANIM_Mario1_DustOff },
14 { 50, ANIM_Mario1_DustOff },
15 }, { // 2: HP <= 50%
18 }, { // 3: HP <= 75%
21 }, { // 4: HP > 50%
24 }
25 }
26};

◆ BattleMerleeEffectsTime

BSS s32 BattleMerleeEffectsTime

Definition at line 22 of file player_events.c.

◆ BattleMerleeBasePosY

BSS f32 BattleMerleeBasePosY

Definition at line 23 of file player_events.c.

◆ BattleMerleeOrbEffect

BSS EffectInstance* BattleMerleeOrbEffect

Definition at line 24 of file player_events.c.

◆ BattleMerleeWaveEffect

BSS EffectInstance* BattleMerleeWaveEffect

Definition at line 25 of file player_events.c.

◆ HID_Refund

BSS HudElemID HID_Refund

Definition at line 26 of file player_events.c.

◆ BattleMerleeEffectsState

BSS s16 BattleMerleeEffectsState

Definition at line 27 of file player_events.c.

◆ HID_Happy

BSS HudElemID HID_Happy

Definition at line 28 of file player_events.c.

◆ HID_HPDrain

BSS HudElemID HID_HPDrain

Definition at line 29 of file player_events.c.

◆ D_8029FBB0

BSS s32 D_8029FBB0[3]

Definition at line 30 of file player_events.c.

◆ EVS_Mario_OnActorCreate

EvtScript EVS_Mario_OnActorCreate
Initial value:
= {
}

Definition at line 662 of file player_events.c.

662 {
663 Return
664 End
665};

Referenced by btl_state_update_normal_start().

◆ EVS_Peach_OnActorCreate

EvtScript EVS_Peach_OnActorCreate
Initial value:
= {
}

Definition at line 667 of file player_events.c.

667 {
668 Return
669 End
670};

Referenced by btl_state_update_normal_start().

◆ EVS_MarioEnterStage

EvtScript EVS_MarioEnterStage

Definition at line 672 of file player_events.c.

672 {
674 Call(SetBattleCamTarget, -80, 35, 8)
677 Sub(LVar0, 100)
679 Call(RandInt, 100, LVar0)
681 CaseGt(50)
686 CaseGt(20)
691 Call(PlayerHopToGoal, 18, 0, 0)
693 Wait(7)
701 Call(ShakeCam, 1, 0, 5, Float(1.0))
705 Wait(10)
707 Wait(10)
710 Return
711 End
712};
@ BTL_CAM_PLAYER_ENTRY
Definition enums.h:4429
@ SOUND_TRIP
Definition enums.h:787
ApiStatus RandInt(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
#define EndChildThread
Marks the end of a child thread block.
Definition macros.h:564
#define Sub(VAR, INT_VALUE)
Definition macros.h:378
#define Float(DOUBLE)
Definition macros.h:52
#define ChildThread
Marks the start of a child thread block.
Definition macros.h:561
#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:329

Referenced by btl_state_update_normal_start().

◆ EVS_PeachEnterStage

EvtScript EVS_PeachEnterStage
Initial value:

Definition at line 714 of file player_events.c.

Referenced by btl_state_update_normal_start().

◆ EVS_Mario_HandlePhase

EvtScript EVS_Mario_HandlePhase

Definition at line 741 of file player_events.c.

741 {
769 Return
770 End
771};
@ PHASE_PLAYER_HAPPY
Definition enums.h:2106
@ PHASE_MERLEE_ATTACK_BONUS
Definition enums.h:2103
@ PHASE_USE_DEFEND
Definition enums.h:2096
@ PHASE_RUN_AWAY_START
Definition enums.h:2093
@ PHASE_EXECUTE_ACTION
Definition enums.h:2091
@ PHASE_MERLEE_EXP_BONUS
Definition enums.h:2105
@ PHASE_CELEBRATE
Definition enums.h:2095
@ PHASE_USE_LIFE_SHROOM
Definition enums.h:2098
@ PHASE_MERLEE_DEFENSE_BONUS
Definition enums.h:2104
@ PHASE_DEATH
Definition enums.h:2094
@ PHASE_RUN_AWAY_FAIL
Definition enums.h:2097
@ PHASE_FIRST_STRIKE
Definition enums.h:2092
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

Referenced by btl_state_update_celebration(), btl_state_update_defeat(), btl_state_update_defend(), btl_state_update_first_strike(), btl_state_update_player_move(), btl_state_update_run_away(), btl_state_update_transfer_turn(), btl_state_update_victory(), and btl_substate_try_hpfp_recovery().

◆ EVS_Peach_HandlePhase

◆ EVS_ExecuteMarioAction

EvtScript EVS_ExecuteMarioAction
Initial value:

Definition at line 783 of file player_events.c.

◆ EVS_ExecutePeachAction

◆ EVS_PlayerFirstStrike

◆ EVS_StartDefend

EvtScript EVS_StartDefend
Initial value:

Definition at line 837 of file player_events.c.

837 {
839 Return
840 End
841};

◆ EVS_Player_HandleEvent

EvtScript EVS_Player_HandleEvent

Definition at line 843 of file player_events.c.

843 {
860 Sub(LVar0, 60)
861 Add(LVar1, 40)
865 Call(PlayerHopToGoal, 5, 0, 1)
867 Set(LVar2, 0)
872 Add(LVar0, 30)
873 Set(LVar1, 0)
876 Call(PlayerHopToGoal, 10, 0, 2)
877 Sub(LVar0, 20)
879 Call(PlayerHopToGoal, 7, 0, 2)
880 Sub(LVar0, 10)
882 Call(PlayerHopToGoal, 4, 0, 2)
883 IfEq(LVarF, 39)
884 Return
885 EndIf
892 Sub(LVar0, 60)
893 Add(LVar1, 40)
897 Call(PlayerHopToGoal, 5, 0, 1)
900 Add(LVar5, 5)
901 Add(LVar6, 4)
902 Add(LVar7, 5)
904 Wait(2)
906 Add(LVar5, -5)
907 Add(LVar6, 18)
908 Add(LVar7, 5)
912 Set(LVar2, 0)
917 Add(LVar0, 30)
918 Set(LVar1, 0)
921 Call(PlayerHopToGoal, 10, 0, 2)
922 Sub(LVar0, 20)
924 Call(PlayerHopToGoal, 7, 0, 2)
925 Sub(LVar0, 10)
927 Call(PlayerHopToGoal, 4, 0, 2)
928 IfEq(LVarF, 36)
929 Return
930 EndIf
937 Sub(LVar0, 60)
938 Add(LVar1, 40)
942 Call(PlayerHopToGoal, 5, 0, 1)
945 Set(LVar2, 0)
950 Add(LVar0, 30)
951 Set(LVar1, 0)
954 Call(PlayerHopToGoal, 10, 0, 2)
955 Sub(LVar0, 20)
957 Call(PlayerHopToGoal, 7, 0, 2)
958 Sub(LVar0, 10)
960 Call(PlayerHopToGoal, 4, 0, 2)
961 IfEq(LVarF, 38)
962 Return
963 EndIf
969 Wait(30)
971 Else
972 Wait(30)
973 EndIf
979 Call(PlayerHopToGoal, 15, 0, 0)
987 Wait(10)
993 Call(PlayerHopToGoal, 15, 0, 0)
1003 Set(LVar2, 0)
1016 SetConst(LVar0, 1)
1019 Wait(10)
1023 Set(LVar2, 0)
1028 Set(LVar2, 0)
1031 Return
1034 Set(LVar2, 0)
1036 Return
1042 Call(PlayerHopToGoal, 15, 0, 0)
1045 EndSwitch
1047 Return
1048 End
1049};
@ BS_FLAGS1_EXECUTING_MOVE
Definition enums.h:3611
@ BTL_CAM_DEFAULT
Definition enums.h:4409
@ BTL_CAM_PLAYER_HIT_HAZARD
Definition enums.h:4438
@ BTL_CAM_PLAYER_HIT_SPIKE
Definition enums.h:4437
@ SOUND_NO_DAMGE
Definition enums.h:1436
@ EVENT_LUCKY
Definition enums.h:2205
@ EVENT_HIT
Definition enums.h:2165
@ EVENT_SPIKE_DEATH
Definition enums.h:2193
@ EVENT_BURN_HIT
Definition enums.h:2169
@ EVENT_SPIKE_CONTACT
Definition enums.h:2196
@ EVENT_FIRE_DEATH
Definition enums.h:2195
@ EVENT_IMMUNE
Definition enums.h:2179
@ EVENT_BURN_DEATH
Definition enums.h:2190
@ EVENT_ZERO_DAMAGE
Definition enums.h:2177
@ EVENT_SHOCK_DEATH
Definition enums.h:2192
@ EVENT_BLOCK
Definition enums.h:2180
@ EVENT_18
Definition enums.h:2178
@ EVENT_HIT_COMBO
Definition enums.h:2164
@ EVENT_DEATH
Definition enums.h:2186
@ EVENT_RECOVER_FROM_KO
Definition enums.h:2203
@ EVENT_SHOCK_HIT
Definition enums.h:2198
@ EVENT_BURN_CONTACT
Definition enums.h:2197
@ EVENT_RECOVER_STATUS
Definition enums.h:2200
@ EVENT_RECOVER_FROZEN
Definition enums.h:2201
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:296
#define LVar6
Definition macros.h:155
#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:323
#define LVarF
Definition macros.h:164
#define IfFalse(b)
Definition macros.h:650
#define LVar5
Definition macros.h:154
#define LVar7
Definition macros.h:156
#define LVar8
Definition macros.h:157
#define LVar9
Definition macros.h:158
#define PlayEffect(args...)
Definition macros.h:811
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:270
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:371

Referenced by dispatch_event_player(), and dispatch_event_player_continue_turn().

◆ EVS_RunAwayNoCommand

EvtScript EVS_RunAwayNoCommand

Definition at line 1065 of file player_events.c.

1065 {
1069 Wait(1)
1071 Wait(1)
1073 Wait(1)
1075 Wait(1)
1077 Wait(1)
1079 Wait(5)
1080 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1081 Wait(2)
1082 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1083 Wait(5)
1084 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1085 Wait(2)
1086 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1087 Wait(2)
1088 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1089 Wait(5)
1090 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1091 Wait(2)
1092 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1093 Wait(5)
1094 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1095 Wait(15)
1100 Call(PlayerHopToGoal, 8, 0, 0)
1102 IfEq(LVar0, 1)
1105 Call(SetGoalPos, ACTOR_PLAYER, -240, 0, 10)
1108 Wait(5)
1109 Else
1111 Call(ShakeCam, 1, 0, 5, Float(1.0))
1115 Call(SetGoalPos, ACTOR_PLAYER, -100, 0, 10)
1118 Set(LVar3, 6)
1121 Loop(2)
1124 Wait(5)
1125 EndLoop
1127 Loop(10)
1128 Sub(LVar0, LVar3)
1129 Sub(LVar3, 1)
1130 IfLt(LVar3, 1)
1131 Set(LVar3, 1)
1132 EndIf
1134 Wait(1)
1135 EndLoop
1136 Wait(15)
1139 Wait(20)
1142 Wait(7)
1143 Loop(2)
1145 Sub(LVar0, 8)
1146 Add(LVar1, 14)
1147 Add(LVar2, 5)
1149 Wait(5)
1150 EndLoop
1152 Wait(5)
1154 Wait(10)
1155 EndIf
1157 Return
1158 End
1159};
@ SOUND_PLAYER_RUN_IN_PLACE
Definition enums.h:783
@ SOUND_DUST_OFF
Definition enums.h:794
@ SOUND_PLAYER_RUN_AWAY
Definition enums.h:784
#define IfLt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR < RVAR.
Definition macros.h:276
#define LVar3
Definition macros.h:152

◆ EVS_RunAwayStart

EvtScript EVS_RunAwayStart

Definition at line 1161 of file player_events.c.

1161 {
1167 Return
1168 EndIf
1173 Call(SetupMashMeter, 1, 100, 0, 0, 0, 0)
1178 Wait(1)
1180 Wait(1)
1182 Wait(1)
1184 Wait(1)
1186 Wait(1)
1188 Wait(5)
1191 Wait(5)
1192 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1193 Wait(2)
1194 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1195 Wait(5)
1196 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1197 Wait(2)
1198 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1199 Wait(2)
1200 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1201 Wait(5)
1202 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1203 Wait(2)
1204 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1205 Wait(5)
1206 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1207 Wait(15)
1208 Wait(30)
1213 Call(PlayerHopToGoal, 8, 0, 0)
1216 IfEq(LVar0, 1)
1219 Call(SetGoalPos, ACTOR_PLAYER, -240, 0, 10)
1222 Wait(5)
1223 Else
1225 Call(ShakeCam, 1, 0, 5, Float(1.0))
1229 Call(SetGoalPos, ACTOR_PLAYER, -100, 0, 10)
1232 Set(LVar3, 6)
1235 Loop(2)
1238 Wait(5)
1239 EndLoop
1241 Loop(10)
1242 Sub(LVar0, LVar3)
1243 Sub(LVar3, 1)
1244 IfLt(LVar3, 1)
1245 Set(LVar3, 1)
1246 EndIf
1248 Wait(1)
1249 EndLoop
1250 Wait(15)
1253 Wait(20)
1256 Wait(7)
1257 Loop(2)
1259 Sub(LVar0, 8)
1260 Add(LVar1, 14)
1261 Add(LVar2, 5)
1263 Wait(5)
1264 EndLoop
1266 Wait(5)
1268 Wait(10)
1269 EndIf
1271 Return
1272 End
1273};
@ AC_DIFFICULTY_3
Definition action_cmd.h:45
@ AC_MODE_NOT_LEARNED
Definition action_cmd.h:60
@ ACTION_COMMAND_FLEE
Definition enums.h:3509
EvtScript EVS_RunAwayNoCommand

◆ EVS_RunAwayFail

◆ EVS_PlayerDies

EvtScript EVS_PlayerDies

Definition at line 1288 of file player_events.c.

1288 {
1292 Wait(15)
1295 Set(LVar0, 0)
1296 Loop(30)
1297 Add(LVar0, 60)
1299 Wait(1)
1300 EndLoop
1301 Set(LVar0, 0)
1302 Loop(10)
1303 Add(LVar0, 36)
1305 Wait(1)
1306 EndLoop
1308 Wait(30)
1310 Set(LVar0, 0)
1311 Set(LVar1, 1)
1312 Loop(0)
1313 IfEq(LVar0, 90)
1314 BreakLoop
1315 EndIf
1316 Add(LVar0, LVar1)
1317 Add(LVar1, 2)
1318 IfGt(LVar0, 90)
1319 Set(LVar0, 90)
1320 EndIf
1322 Wait(1)
1323 EndLoop
1325 Add(LVar1, 2)
1328 Add(LVar2, 20)
1330 Wait(15)
1331 Return
1332 End
1333};
@ BTL_CAM_PLAYER_DIES
Definition enums.h:4431
@ SOUND_PLAYER_COLLAPSE
Definition enums.h:1315
@ SOUND_PLAYER_SPINNING
Definition enums.h:1188
@ ACTOR_BLUR_ENABLE
Definition enums.h:6005
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
Definition macros.h:279
#define BreakLoop
Breaks out of the innermost loop.
Definition macros.h:252

◆ EVS_Unused_UseItemWithEffect

EvtScript EVS_Unused_UseItemWithEffect

Definition at line 1335 of file player_events.c.

1335 {
1336 IfEq(LVar1, 0)
1338 Wait(10)
1342 Add(LVar0, 18)
1346 Add(LVar1, 45)
1347 Set(LVar3, LVar1)
1348 Add(LVar3, 10)
1349 Add(LVar3, 2)
1352 Set(LVarA, LVar0)
1354 Wait(LVar0)
1355 Wait(15)
1358 Else
1362 Wait(4)
1363 Add(LVar1, 45)
1364 Set(LVar3, LVar1)
1365 Add(LVar3, 10)
1366 Add(LVar3, 2)
1369 Set(LVarA, LVar0)
1370 Wait(15)
1372 EndIf
1373 Return
1374 End
1375};
@ BTL_CAM_PLAYER_WISH
Definition enums.h:4476
@ SOUND_USE_ITEM
Definition enums.h:1437
ApiStatus RemoveItemEntity(Evt *script, b32 isInitialCall)
ApiStatus MakeItemEntity(Evt *script, b32 isInitialCall)
#define LVarA
Definition macros.h:159

◆ EVS_Unused_UseItem

◆ EVS_Unused_PlayerGoHome

◆ EVS_Unused_EatItem

EvtScript EVS_Unused_EatItem
Initial value:
= {
Loop(4)
Wait(10)
Wait(45)
}
@ SOUND_EAT_OR_DRINK
Definition enums.h:1444
#define Thread
Marks the start of a thread block.
Definition macros.h:545
#define EndThread
Marks the end of a thread block.
Definition macros.h:548

Definition at line 1410 of file player_events.c.

1410 {
1411 Thread
1412 Loop(4)
1414 Wait(10)
1415 EndLoop
1416 EndThread
1418 Wait(45)
1419 Return
1420 End
1421};

◆ EVS_Unused_DrinkItem

EvtScript EVS_Unused_DrinkItem

◆ EVS_UseLifeShroom

EvtScript EVS_UseLifeShroom

Definition at line 1436 of file player_events.c.

1436 {
1440 IfEq(LVar0, 1)
1443 Set(LVar0, 255)
1444 Loop(10)
1445 Sub(LVar0, 25)
1446 IfLt(LVar0, 0)
1447 Set(LVar0, 0)
1448 EndIf
1450 Wait(1)
1451 EndLoop
1453 EndIf
1458 Set(LVarA, LVar0)
1460 Set(LVar3, 30)
1461 Set(LVar4, 16)
1462 Loop(LVar3)
1463 Add(LVar4, 8)
1464 IfGt(LVar4, 255)
1465 Set(LVar4, 255)
1466 EndIf
1467 AddF(LVar1, Float(1.0))
1469 Wait(1)
1470 EndLoop
1471 Set(LVar3, LVar0)
1472 Set(LVar4, LVar1)
1473 Set(LVar5, LVar2)
1476 IfGt(LVar0, 0)
1477 Wait(LVar0)
1478 Wait(15)
1480 EndIf
1482 Add(LVar4, 15)
1484 Set(LVar0, LVarF)
1485 Loop(4)
1486 Call(SetItemFlags, LVarA, 64, 1)
1487 Wait(2)
1488 Call(SetItemFlags, LVarA, 64, 0)
1489 Wait(8)
1490 EndLoop
1494 PlayEffect(EFFECT_STARS_SHIMMER, 1, LVar3, LVar4, LVar5, 70, 70, 10, 20)
1495 Wait(20)
1498 PlayEffect(EFFECT_STARS_SHIMMER, 2, LVar0, LVar1, LVar2, 50, 20, 32, 30)
1499 Wait(40)
1500 PlayEffect(EFFECT_STARS_SHIMMER, 2, LVar0, LVar1, LVar2, 30, 50, 32, 30)
1502 Loop(3)
1504 Wait(4)
1506 Wait(4)
1507 EndLoop
1508 Loop(3)
1510 Wait(2)
1512 Wait(2)
1513 EndLoop
1514 Loop(7)
1516 Wait(1)
1518 Wait(1)
1519 EndLoop
1521 Wait(50)
1530 Add(LVar1, 25)
1537 IfEq(LVar0, 1)
1539 Set(LVar0, 0)
1540 Loop(10)
1541 Add(LVar0, 25)
1542 IfGt(LVar0, 255)
1543 Set(LVar0, 255)
1544 EndIf
1546 Wait(1)
1547 EndLoop
1550 EndIf
1553 Loop(5)
1554 Wait(2)
1556 PlayEffect(EFFECT_MISC_PARTICLES, 2, LVar0, LVar1, LVar2, 20, 20, Float(1.0), 10, 50)
1557 EndLoop
1563 Set(LVar1, 0)
1566 Call(PlayerHopToGoal, 20, 0, 0)
1568 Wait(4)
1570 Wait(10)
1573 Return
1574 End
1575};
@ SOUND_REVIVAL_MAGIC
Definition enums.h:1190
@ SOUND_START_RECOVERY
Definition enums.h:1388
@ SOUND_PLAYER_REVIVE
Definition enums.h:1191
@ SOUND_LIFE_SHROOM_CHIME
Definition enums.h:1189
@ SOUND_LONG_PLAYER_JUMP
Definition enums.h:785
@ ACTOR_FLAG_NO_SHADOW
Hide shadow.
Definition enums.h:3359
@ EVENT_REVIVE
Definition enums.h:2213
@ EVENT_LIFE_SHROOM_PROC
Definition enums.h:2212
ApiStatus SetItemPos(Evt *script, b32 isInitialCall)
ApiStatus SetItemFlags(Evt *script, b32 isInitialCall)
ApiStatus RemoveEffect(Evt *script, b32 isInitialCall)
#define AddF(VAR, FLOAT_VALUE)
Definition macros.h:384
#define LVar4
Definition macros.h:153

◆ EVS_MerleeRunOut

EvtScript EVS_MerleeRunOut
Initial value:

Definition at line 1577 of file player_events.c.

1577 {
1579 IfEq(LVar0, 1)
1580 Return
1581 EndIf
1582 Wait(15)
1585 Return
1586 End
1587};

◆ EVS_MerleeAttackBonus

EvtScript EVS_MerleeAttackBonus

Definition at line 1589 of file player_events.c.

1589 {
1592 Wait(10)
1594 Call(SetBattleCamTarget, 0, 80, 0)
1598 Wait(10)
1602 Call(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20)
1607 Wait(30)
1613 Wait(20)
1622 Wait(15)
1627 Call(PlayerHopToGoal, 18, 0, 0)
1629 Wait(4)
1634 Return
1635 End
1636};
@ BTL_MSG_MERLEE_ATK_UP
Definition enums.h:3700
@ NPC_BTL_MERLEE
Definition enums.h:2515
@ SOUND_MAGIC_DESCENDING
Definition enums.h:1417
@ NPC_FLAG_IGNORE_CAMERA_FOR_YAW
Definition enums.h:3050
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

Definition at line 1638 of file player_events.c.

1638 {
1641 Wait(10)
1643 Call(SetBattleCamTarget, 0, 80, 0)
1647 Wait(10)
1651 Call(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20)
1656 Wait(30)
1662 Wait(20)
1671 Wait(15)
1674 Wait(22)
1675 Else
1680 Call(PlayerHopToGoal, 18, 0, 0)
1682 Wait(4)
1684 EndIf
1688 Return
1689 End
1690};
@ BTL_MSG_MERLEE_DEF_UP
Definition enums.h:3701
#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:289

◆ EVS_MerleeExpBonus

EvtScript EVS_MerleeExpBonus

Definition at line 1692 of file player_events.c.

1692 {
1695 Wait(10)
1697 Call(SetBattleCamTarget, 0, 80, 0)
1701 Wait(10)
1705 Call(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20)
1710 Wait(30)
1716 Wait(20)
1725 Wait(15)
1730 Call(PlayerHopToGoal, 18, 0, 0)
1732 Wait(4)
1737 Return
1738 End
1739};
@ BTL_MSG_MERLEE_EXP_UP
Definition enums.h:3702

◆ EVS_PlayerHappy

EvtScript EVS_PlayerHappy

Definition at line 1741 of file player_events.c.

1741 {
1747 Add(LVar0, 0)
1748 Add(LVar1, 35)
1749 Set(LVar3, LVarA)
1750 Add(LVar3, LVarB)
1751 IfGt(LVar3, 0)
1753 EndIf
1755 Add(LVar0, 20)
1756 Add(LVar1, 25)
1757 IfGt(LVarC, 0)
1759 EndIf
1760 Set(LVar3, LVarA)
1761 Add(LVar3, LVarB)
1763 Add(LVar1, 25)
1765 Wait(10)
1766 Set(LVar0, LVarA)
1767 IfGt(LVar0, 0)
1768 Loop(LVar0)
1770 Wait(1)
1771 EndLoop
1772 EndIf
1773 Set(LVar0, LVarB)
1774 IfGt(LVar0, 0)
1775 Loop(LVar0)
1777 Wait(1)
1778 EndLoop
1779 EndIf
1780 Set(LVar0, LVarC)
1781 IfGt(LVar0, 0)
1782 Loop(LVar0)
1784 Wait(1)
1785 EndLoop
1786 EndIf
1787 Wait(30)
1791 Return
1792 End
1793};
ApiStatus ShowStartRecoveryShimmer(Evt *script, b32 isInitialCall)
#define LVarC
Definition macros.h:161
#define LVarB
Definition macros.h:160

◆ EVS_ApplyDizzyAttack

EvtScript EVS_ApplyDizzyAttack
Initial value:

Definition at line 1795 of file player_events.c.

1795 {
1796 Set(LVar0, 0)
1797 Loop(40)
1798 Add(LVar0, 72)
1800 Wait(1)
1801 EndLoop
1804 Return
1805 End
1806};

Referenced by btl_state_update_normal_start().

◆ EVS_PlayerRegainAbility

EvtScript EVS_PlayerRegainAbility

Definition at line 1808 of file player_events.c.

1808 {
1811 Loop(LVar0)
1812 Add(LVarF, 3)
1813 Wait(1)
1814 EndLoop
1816 Switch(LVarA)
1818 Set(LVarE, 0)
1821 Set(LVarE, 1)
1822 Switch(LVarC)
1829 EndSwitch
1831 Set(LVarE, 2)
1832 Switch(LVarB)
1839 EndSwitch
1840 EndSwitch
1842 Add(LVarF, 24)
1843 Add(LVar1, 150)
1845 Set(LVarA, LVar0)
1850 Add(LVar1, 20)
1851 PlayEffect(EFFECT_STARS_SHIMMER, 0, LVar0, LVar1, LVar2, 30, 30, 10, 30)
1854 Return
1855 End
1856};
@ GEAR_RANK_SUPER
Definition enums.h:2046
@ GEAR_RANK_ULTRA
Definition enums.h:2047
@ GEAR_RANK_NORMAL
Definition enums.h:2045

Referenced by update_command_loss().