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
 
PlayerCelebrationAnimOptions 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:3609
void set_actor_anim(s32 actorID, s32 partID, AnimID animID)
Definition 190B20.c:1005
s32 bPeachIdleAnims[]
Definition actors.c:122
BattleStatus gBattleStatus
Definition battle.c:11
u32 bMarioIdleAnims[]
Definition actors.c:53

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:2085
@ ACTOR_SELF
Definition enums.h:2084
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define EndLoop
Marks the end of a loop.
Definition macros.h:248
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217

Definition at line 1062 of file player_events.c.

1062 {
1063 Set(LVar0, 0)
1064 Loop(5)
1065 Add(LVar0, 72)
1067 Wait(1)
1068 EndLoop
1071 Wait(31)
1072 Return
1073 End
1074};

◆ 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:272
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define LVar2
Definition macros.h:150
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:2012
@ DMG_SRC_NEXT_SLAP_RIGHT
Definition enums.h:1999
@ DMG_SRC_LAST_SLAP_RIGHT
Definition enums.h:2001
@ DMG_SRC_LEECH
Definition enums.h:1989
@ DMG_SRC_DEFAULT
Definition enums.h:1988
@ DMG_SRC_TUBBA_SMASH
Definition enums.h:2011
@ DMG_SRC_NEXT_SLAP_LEFT
Definition enums.h:1998
@ DMG_SRC_CRUSH_PARTNER
Definition enums.h:2013
@ DMG_SRC_INK_BLAST
Definition enums.h:2014
@ DMG_SRC_LAST_SLAP_LEFT
Definition enums.h:2000
#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 EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:352
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:341
#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 LVar1
Definition macros.h:149
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:362
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:2834
@ DMG_SRC_TUTORIAL_GOOMBARIO
Definition enums.h:1993
#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

◆ bPlayerCelebrations

PlayerCelebrationAnimOptions bPlayerCelebrations
extern

Definition at line 5 of file actors.c.

5 {
6 10, 90,
7 {
10 0, 0,
11 0, 0,
12 0, 0,
13 0, 0,
14 0, 0,
15 0, 0,
18 0, 0,
19 0, 0,
20 0, 0,
21 0, 0,
22 0, 0,
23 0, 0,
26 0, 0,
27 0, 0,
28 0, 0,
29 0, 0,
30 0, 0,
31 0, 0,
34 0, 0,
35 0, 0,
36 0, 0,
37 0, 0,
38 0, 0,
39 0, 0,
42 0, 0,
43 0, 0,
44 0, 0,
45 0, 0,
46 0, 0,
47 0, 0,
48 }
49};

◆ 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 673 of file player_events.c.

673 {
674 Return
675 End
676};

Referenced by btl_state_update_normal_start().

◆ EVS_Peach_OnActorCreate

EvtScript EVS_Peach_OnActorCreate
Initial value:
= {
}

Definition at line 678 of file player_events.c.

678 {
679 Return
680 End
681};

Referenced by btl_state_update_normal_start().

◆ EVS_MarioEnterStage

EvtScript EVS_MarioEnterStage

Definition at line 683 of file player_events.c.

683 {
685 Call(SetBattleCamTarget, -80, 35, 8)
688 Sub(LVar0, 100)
690 Call(RandInt, 100, LVar0)
692 CaseGt(50)
697 CaseGt(20)
702 Call(PlayerHopToGoal, 18, 0, 0)
704 Wait(7)
712 Call(ShakeCam, 1, 0, 5, Float(1.0))
716 Wait(10)
718 Wait(10)
721 Return
722 End
723};
@ BTL_CAM_PLAYER_ENTRY
Definition enums.h:4843
@ SOUND_TRIP
Definition enums.h:784
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:563
#define Sub(VAR, INT_VALUE)
Definition macros.h:377
#define Float(DOUBLE)
Definition macros.h:51
#define ChildThread
Marks the start of a child thread block.
Definition macros.h:560
#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
Initial value:

Definition at line 725 of file player_events.c.

Referenced by btl_state_update_normal_start().

◆ EVS_Mario_HandlePhase

EvtScript EVS_Mario_HandlePhase

Definition at line 752 of file player_events.c.

752 {
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

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

◆ EVS_ExecuteMarioAction

EvtScript EVS_ExecuteMarioAction
Initial value:

Definition at line 794 of file player_events.c.

◆ EVS_ExecutePeachAction

◆ EVS_PlayerFirstStrike

◆ EVS_StartDefend

EvtScript EVS_StartDefend
Initial value:

Definition at line 848 of file player_events.c.

848 {
850 Return
851 End
852};

◆ EVS_Player_HandleEvent

EvtScript EVS_Player_HandleEvent

Definition at line 854 of file player_events.c.

854 {
871 Sub(LVar0, 60)
872 Add(LVar1, 40)
876 Call(PlayerHopToGoal, 5, 0, 1)
878 Set(LVar2, 0)
883 Add(LVar0, 30)
884 Set(LVar1, 0)
887 Call(PlayerHopToGoal, 10, 0, 2)
888 Sub(LVar0, 20)
890 Call(PlayerHopToGoal, 7, 0, 2)
891 Sub(LVar0, 10)
893 Call(PlayerHopToGoal, 4, 0, 2)
894 IfEq(LVarF, 39)
895 Return
896 EndIf
903 Sub(LVar0, 60)
904 Add(LVar1, 40)
908 Call(PlayerHopToGoal, 5, 0, 1)
911 Add(LVar5, 5)
912 Add(LVar6, 4)
913 Add(LVar7, 5)
915 Wait(2)
917 Add(LVar5, -5)
918 Add(LVar6, 18)
919 Add(LVar7, 5)
923 Set(LVar2, 0)
928 Add(LVar0, 30)
929 Set(LVar1, 0)
932 Call(PlayerHopToGoal, 10, 0, 2)
933 Sub(LVar0, 20)
935 Call(PlayerHopToGoal, 7, 0, 2)
936 Sub(LVar0, 10)
938 Call(PlayerHopToGoal, 4, 0, 2)
939 IfEq(LVarF, 36)
940 Return
941 EndIf
948 Sub(LVar0, 60)
949 Add(LVar1, 40)
953 Call(PlayerHopToGoal, 5, 0, 1)
956 Set(LVar2, 0)
961 Add(LVar0, 30)
962 Set(LVar1, 0)
965 Call(PlayerHopToGoal, 10, 0, 2)
966 Sub(LVar0, 20)
968 Call(PlayerHopToGoal, 7, 0, 2)
969 Sub(LVar0, 10)
971 Call(PlayerHopToGoal, 4, 0, 2)
972 IfEq(LVarF, 38)
973 Return
974 EndIf
980 Wait(30)
982 Else
983 Wait(30)
984 EndIf
990 Call(PlayerHopToGoal, 15, 0, 0)
998 Wait(10)
1004 Call(PlayerHopToGoal, 15, 0, 0)
1014 Set(LVar2, 0)
1027 SetConst(LVar0, 1)
1030 Wait(10)
1034 Set(LVar2, 0)
1039 Set(LVar2, 0)
1042 Return
1045 Set(LVar2, 0)
1047 Return
1053 Call(PlayerHopToGoal, 15, 0, 0)
1056 EndSwitch
1058 Return
1059 End
1060};
@ BS_FLAGS1_EXECUTING_MOVE
Definition enums.h:3577
@ BTL_CAM_DEFAULT
Definition enums.h:4823
@ BTL_CAM_PLAYER_HIT_HAZARD
Definition enums.h:4852
@ BTL_CAM_PLAYER_HIT_SPIKE
Definition enums.h:4851
@ SOUND_NO_DAMGE
Definition enums.h:1433
@ 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 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 LVarF
Definition macros.h:163
#define IfFalse(b)
Definition macros.h:646
#define LVar5
Definition macros.h:153
#define LVar7
Definition macros.h:155
#define LVar8
Definition macros.h:156
#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 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().

◆ EVS_RunAwayNoCommand

EvtScript EVS_RunAwayNoCommand

Definition at line 1076 of file player_events.c.

1076 {
1080 Wait(1)
1082 Wait(1)
1084 Wait(1)
1086 Wait(1)
1088 Wait(1)
1090 Wait(5)
1091 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1092 Wait(2)
1093 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1094 Wait(5)
1095 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1096 Wait(2)
1097 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1098 Wait(2)
1099 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1100 Wait(5)
1101 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1102 Wait(2)
1103 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1104 Wait(5)
1105 Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0)
1106 Wait(15)
1111 Call(PlayerHopToGoal, 8, 0, 0)
1113 IfEq(LVar0, 1)
1116 Call(SetGoalPos, ACTOR_PLAYER, -240, 0, 10)
1119 Wait(5)
1120 Else
1122 Call(ShakeCam, 1, 0, 5, Float(1.0))
1126 Call(SetGoalPos, ACTOR_PLAYER, -100, 0, 10)
1129 Set(LVar3, 6)
1132 Loop(2)
1135 Wait(5)
1136 EndLoop
1138 Loop(10)
1139 Sub(LVar0, LVar3)
1140 Sub(LVar3, 1)
1141 IfLt(LVar3, 1)
1142 Set(LVar3, 1)
1143 EndIf
1145 Wait(1)
1146 EndLoop
1147 Wait(15)
1150 Wait(20)
1153 Wait(7)
1154 Loop(2)
1156 Sub(LVar0, 8)
1157 Add(LVar1, 14)
1158 Add(LVar2, 5)
1160 Wait(5)
1161 EndLoop
1163 Wait(5)
1165 Wait(10)
1166 EndIf
1168 Return
1169 End
1170};
@ SOUND_PLAYER_RUN_IN_PLACE
Definition enums.h:780
@ SOUND_DUST_OFF
Definition enums.h:791
@ SOUND_PLAYER_RUN_AWAY
Definition enums.h:781
#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_RunAwayStart

EvtScript EVS_RunAwayStart

Definition at line 1172 of file player_events.c.

1172 {
1178 Return
1179 EndIf
1184 Call(SetupMashMeter, 1, 100, 0, 0, 0, 0)
1189 Wait(1)
1191 Wait(1)
1193 Wait(1)
1195 Wait(1)
1197 Wait(1)
1199 Wait(5)
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)
1224 Call(PlayerHopToGoal, 8, 0, 0)
1227 IfEq(LVar0, 1)
1230 Call(SetGoalPos, ACTOR_PLAYER, -240, 0, 10)
1233 Wait(5)
1234 Else
1236 Call(ShakeCam, 1, 0, 5, Float(1.0))
1240 Call(SetGoalPos, ACTOR_PLAYER, -100, 0, 10)
1243 Set(LVar3, 6)
1246 Loop(2)
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
1259 Wait(1)
1260 EndLoop
1261 Wait(15)
1264 Wait(20)
1267 Wait(7)
1268 Loop(2)
1270 Sub(LVar0, 8)
1271 Add(LVar1, 14)
1272 Add(LVar2, 5)
1274 Wait(5)
1275 EndLoop
1277 Wait(5)
1279 Wait(10)
1280 EndIf
1282 Return
1283 End
1284};
@ AC_DIFFICULTY_3
Definition action_cmd.h:45
@ AC_MODE_NOT_LEARNED
Definition action_cmd.h:60
@ ACTION_COMMAND_FLEE
Definition enums.h:3475
EvtScript EVS_RunAwayNoCommand

◆ EVS_RunAwayFail

◆ EVS_PlayerDies

EvtScript EVS_PlayerDies

Definition at line 1299 of file player_events.c.

1299 {
1303 Wait(15)
1306 Set(LVar0, 0)
1307 Loop(30)
1308 Add(LVar0, 60)
1310 Wait(1)
1311 EndLoop
1312 Set(LVar0, 0)
1313 Loop(10)
1314 Add(LVar0, 36)
1316 Wait(1)
1317 EndLoop
1319 Wait(30)
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
1333 Wait(1)
1334 EndLoop
1336 Add(LVar1, 2)
1339 Add(LVar2, 20)
1341 Wait(15)
1342 Return
1343 End
1344};
@ BTL_CAM_PLAYER_DIES
Definition enums.h:4845
@ SOUND_PLAYER_COLLAPSE
Definition enums.h:1312
@ SOUND_PLAYER_SPINNING
Definition enums.h:1185
@ ACTOR_BLUR_ENABLE
Definition enums.h:6413
#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_UseItemWithEffect

EvtScript EVS_Unused_UseItemWithEffect

Definition at line 1346 of file player_events.c.

1346 {
1347 IfEq(LVar1, 0)
1349 Wait(10)
1353 Add(LVar0, 18)
1357 Add(LVar1, 45)
1358 Set(LVar3, LVar1)
1359 Add(LVar3, 10)
1360 Add(LVar3, 2)
1363 Set(LVarA, LVar0)
1365 Wait(LVar0)
1366 Wait(15)
1369 Else
1373 Wait(4)
1374 Add(LVar1, 45)
1375 Set(LVar3, LVar1)
1376 Add(LVar3, 10)
1377 Add(LVar3, 2)
1380 Set(LVarA, LVar0)
1381 Wait(15)
1383 EndIf
1384 Return
1385 End
1386};
@ BTL_CAM_PLAYER_WISH
Definition enums.h:4890
@ SOUND_USE_ITEM
Definition enums.h:1434
ApiStatus RemoveItemEntity(Evt *script, b32 isInitialCall)
ApiStatus MakeItemEntity(Evt *script, b32 isInitialCall)
#define LVarA
Definition macros.h:158

◆ 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: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

Definition at line 1421 of file player_events.c.

1421 {
1422 Thread
1423 Loop(4)
1425 Wait(10)
1426 EndLoop
1427 EndThread
1429 Wait(45)
1430 Return
1431 End
1432};

◆ EVS_Unused_DrinkItem

EvtScript EVS_Unused_DrinkItem

◆ EVS_UseLifeShroom

EvtScript EVS_UseLifeShroom

Definition at line 1447 of file player_events.c.

1447 {
1451 IfEq(LVar0, 1)
1454 Set(LVar0, 255)
1455 Loop(10)
1456 Sub(LVar0, 25)
1457 IfLt(LVar0, 0)
1458 Set(LVar0, 0)
1459 EndIf
1461 Wait(1)
1462 EndLoop
1464 EndIf
1469 Set(LVarA, LVar0)
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)
1487 IfGt(LVar0, 0)
1488 Wait(LVar0)
1489 Wait(15)
1491 EndIf
1493 Add(LVar4, 15)
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
1505 PlayEffect(EFFECT_STARS_SHIMMER, 1, LVar3, LVar4, LVar5, 70, 70, 10, 20)
1506 Wait(20)
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)
1515 Wait(4)
1517 Wait(4)
1518 EndLoop
1519 Loop(3)
1521 Wait(2)
1523 Wait(2)
1524 EndLoop
1525 Loop(7)
1527 Wait(1)
1529 Wait(1)
1530 EndLoop
1532 Wait(50)
1541 Add(LVar1, 25)
1548 IfEq(LVar0, 1)
1550 Set(LVar0, 0)
1551 Loop(10)
1552 Add(LVar0, 25)
1553 IfGt(LVar0, 255)
1554 Set(LVar0, 255)
1555 EndIf
1557 Wait(1)
1558 EndLoop
1561 EndIf
1564 Loop(5)
1565 Wait(2)
1567 PlayEffect(EFFECT_MISC_PARTICLES, 2, LVar0, LVar1, LVar2, 20, 20, Float(1.0), 10, 50)
1568 EndLoop
1574 Set(LVar1, 0)
1577 Call(PlayerHopToGoal, 20, 0, 0)
1579 Wait(4)
1581 Wait(10)
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 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:383
#define LVar4
Definition macros.h:152

◆ EVS_MerleeRunOut

EvtScript EVS_MerleeRunOut
Initial value:

Definition at line 1588 of file player_events.c.

1588 {
1590 IfEq(LVar0, 1)
1591 Return
1592 EndIf
1593 Wait(15)
1596 Return
1597 End
1598};

◆ EVS_MerleeAttackBonus

EvtScript EVS_MerleeAttackBonus

Definition at line 1600 of file player_events.c.

1600 {
1603 Wait(10)
1605 Call(SetBattleCamTarget, 0, 80, 0)
1609 Wait(10)
1613 Call(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20)
1618 Wait(30)
1624 Wait(20)
1633 Wait(15)
1638 Call(PlayerHopToGoal, 18, 0, 0)
1640 Wait(4)
1645 Return
1646 End
1647};
@ BTL_MSG_MERLEE_ATK_UP
Definition enums.h:4057
@ 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

Definition at line 1649 of file player_events.c.

1649 {
1652 Wait(10)
1654 Call(SetBattleCamTarget, 0, 80, 0)
1658 Wait(10)
1662 Call(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20)
1667 Wait(30)
1673 Wait(20)
1682 Wait(15)
1685 Wait(22)
1686 Else
1691 Call(PlayerHopToGoal, 18, 0, 0)
1693 Wait(4)
1695 EndIf
1699 Return
1700 End
1701};
@ BTL_MSG_MERLEE_DEF_UP
Definition enums.h:4058
#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

Definition at line 1703 of file player_events.c.

1703 {
1706 Wait(10)
1708 Call(SetBattleCamTarget, 0, 80, 0)
1712 Wait(10)
1716 Call(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20)
1721 Wait(30)
1727 Wait(20)
1736 Wait(15)
1741 Call(PlayerHopToGoal, 18, 0, 0)
1743 Wait(4)
1748 Return
1749 End
1750};
@ BTL_MSG_MERLEE_EXP_UP
Definition enums.h:4059

◆ EVS_PlayerHappy

EvtScript EVS_PlayerHappy

Definition at line 1752 of file player_events.c.

1752 {
1758 Add(LVar0, 0)
1759 Add(LVar1, 35)
1760 Set(LVar3, LVarA)
1761 Add(LVar3, LVarB)
1762 IfGt(LVar3, 0)
1764 EndIf
1766 Add(LVar0, 20)
1767 Add(LVar1, 25)
1768 IfGt(LVarC, 0)
1770 EndIf
1771 Set(LVar3, LVarA)
1772 Add(LVar3, LVarB)
1774 Add(LVar1, 25)
1776 Wait(10)
1777 Set(LVar0, LVarA)
1778 IfGt(LVar0, 0)
1779 Loop(LVar0)
1781 Wait(1)
1782 EndLoop
1783 EndIf
1784 Set(LVar0, LVarB)
1785 IfGt(LVar0, 0)
1786 Loop(LVar0)
1788 Wait(1)
1789 EndLoop
1790 EndIf
1791 Set(LVar0, LVarC)
1792 IfGt(LVar0, 0)
1793 Loop(LVar0)
1795 Wait(1)
1796 EndLoop
1797 EndIf
1798 Wait(30)
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
Initial value:

Definition at line 1806 of file player_events.c.

1806 {
1807 Set(LVar0, 0)
1808 Loop(40)
1809 Add(LVar0, 72)
1811 Wait(1)
1812 EndLoop
1815 Return
1816 End
1817};

Referenced by btl_state_update_normal_start().

◆ EVS_PlayerRegainAbility