Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
PiranhaPlant.inc.c
Go to the documentation of this file.
1#include "PiranhaPlant.h"
2
4
6
7MobileAISettings N(AISettings_PiranhaPlant) = {
8 .moveTime = 30,
9 .waitTime = 30,
10 .alertRadius = 150.0f,
11 .playerSearchInterval = 1,
12};
13
14EvtScript N(EVS_NpcAI_PiranhaPlant) = {
15 Call(SetSelfVar, 7, 0)
16 Call(SetSelfVar, 8, 12)
17 Call(SetSelfVar, 9, 11)
18 Call(SetSelfVar, 10, 14)
19 Call(SetSelfVar, 11, 9)
20 Call(SetSelfVar, 12, 25)
21 Call(SetSelfVar, 13, -1)
22 Call(SetSelfVar, 14, 10)
23 Call(SetSelfVar, 15, 15)
24 Call(N(PiranhaPlantAI_Main), Ref(N(AISettings_PiranhaPlant)))
25 Return
26 End
27};
28
29NpcSettings N(NpcSettings_PiranhaPlant) = {
30 .height = 32,
31 .radius = 26,
32 .level = ACTOR_LEVEL_PIRANHA_PLANT,
33 .ai = &N(EVS_NpcAI_PiranhaPlant),
34 .onHit = &EnemyNpcHit,
35 .onDefeat = &EnemyNpcDefeat,
36};
37
38EvtScript N(EVS_NpcAI_PiranhaPlant_Hitbox) = {
40 Call(SetSelfVar, 0, 10)
41 Call(SetSelfVar, 1, 18)
42 Call(SetSelfVar, 4, 3)
44 Call(N(MeleeHitbox_Main))
45 Return
46 End
47};
48
49EvtScript N(EVS_8024411C) = {
60 Return
61 End
62};
63
64NpcSettings N(NpcSettings_PiranhaPlant_Hitbox) = {
65 .height = 18,
66 .radius = 18,
67 .level = ACTOR_LEVEL_PIRANHA_PLANT,
68 .ai = &N(EVS_NpcAI_PiranhaPlant_Hitbox),
69 .onDefeat = &N(EVS_GenericHitboxDefeat),
70 .actionFlags = AI_ACTION_08,
71};
Bytecode EvtScript[]
@ ENEMY_ANIM_INDEX_HIT
Definition enums.h:3433
@ ENCOUNTER_TRIGGER_JUMP
Definition enums.h:269
@ ENCOUNTER_TRIGGER_HAMMER
Definition enums.h:271
@ ENCOUNTER_TRIGGER_NONE
Definition enums.h:268
@ ENCOUNTER_TRIGGER_PARTNER
Definition enums.h:273
@ NPC_SELF
Definition enums.h:2526
@ SOUND_PIRANHA_BITE
Definition enums.h:1508
@ AI_ACTION_08
Definition enums.h:4615
s16 height
Definition npc.h:145
ApiStatus EnableNpcShadow(Evt *script, b32 isInitialCall)
EvtScript EnemyNpcDefeat
Definition encounter.c:158
EvtScript EnemyNpcHit
Definition encounter.c:131
ApiStatus GetSelfAnimationFromTable(Evt *script, b32 isInitialCall)
ApiStatus GetOwnerEncounterTrigger(Evt *script, b32 isInitialCall)
ApiStatus SetSelfVar(Evt *script, b32 isInitialCall)
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#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 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 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
EvtScript EVS_NpcHitRecoil
Definition 38F00.c:13