Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
SpikeTop.inc.c
Go to the documentation of this file.
1#include "SpikeTop.h"
2
4
5MobileAISettings N(AISettings_BuzzyBeetle) = {
6 .moveSpeed = 1.0f,
7 .moveTime = 60,
8 .waitTime = 60,
9 .alertRadius = 90.0f,
10 .alertOffsetDist = 40.0f,
11 .playerSearchInterval = 1,
12 .chaseSpeed = 4.5f,
13 .chaseRadius = 100.0f,
14 .chaseOffsetDist = 40.0f,
15 .unk_AI_2C = 1,
16};
17
18EvtScript N(EVS_NpcAI_BuzzyBeetle) = {
19 Call(SetSelfVar, 2, 5)
20 Call(SetSelfVar, 3, 2)
21 Call(SetSelfVar, 5, 5)
22 Call(SetSelfVar, 7, 2)
23 Call(N(TackleAI_Main), Ref(N(AISettings_BuzzyBeetle)))
24 Return
25 End
26};
27
28MobileAISettings N(AISettings_SpikeTop) = {
29 .moveSpeed = 1.0f,
30 .moveTime = 60,
31 .waitTime = 60,
32 .alertRadius = 90.0f,
33 .alertOffsetDist = 40.0f,
34 .playerSearchInterval = 1,
35 .chaseSpeed = 7.0f,
36 .chaseRadius = 100.0f,
37 .chaseOffsetDist = 40.0f,
38 .unk_AI_2C = 1,
39};
40
41EvtScript N(EVS_NpcAI_SpikeTop) = {
42 Call(SetSelfVar, 2, 4)
43 Call(SetSelfVar, 3, 10)
44 Call(SetSelfVar, 5, 4)
45 Call(SetSelfVar, 7, 3)
46 Call(N(TackleAI_Main), Ref(N(AISettings_SpikeTop)))
47 Return
48 End
49};
50
51MobileAISettings N(AISettings_BonyBeetle) = {
52 .moveSpeed = 1.0f,
53 .moveTime = 20,
54 .waitTime = 5,
55 .alertRadius = 120.0f,
56 .playerSearchInterval = 3,
57 .chaseSpeed = 6.0f,
58 .chaseRadius = 150.0f,
59 .unk_AI_2C = 1,
60};
61
62EvtScript N(EVS_NpcAI_BonyBeetle) = {
63 Call(SetSelfVar, 2, 3)
64 Call(SetSelfVar, 3, 8)
65 Call(SetSelfVar, 5, 6)
66 Call(SetSelfVar, 7, 6)
67 Call(N(TackleAI_Main), Ref(N(AISettings_BonyBeetle)))
68 Return
69 End
70};
71
72#include "world/common/todo/AwaitPlayerNearNpc.inc.c"
73
74EvtScript N(EVS_NpcAI_BuzzyBeetle_Ceiling) = {
75 Call(N(func_80240814_97BE44))
76 Call(SetNpcAnimation, NPC_SELF, ANIM_BuzzyBeetle_Anim0F)
77 Call(N(AwaitPlayerNearNpc))
80 Call(SetNpcAnimation, NPC_SELF, ANIM_BuzzyBeetle_Anim00)
81 Call(N(func_802408B4_97BEE4))
83 Call(SetSelfVar, 2, 5)
84 Call(SetSelfVar, 3, 2)
85 Call(SetSelfVar, 5, 5)
86 Call(SetSelfVar, 7, 2)
87 Call(N(TackleAI_Main), Ref(N(AISettings_BuzzyBeetle)))
88 Return
89 End
90};
91
92NpcSettings N(NpcSettings_BuzzyBeetle) = {
93 .height = 20,
94 .radius = 22,
95 .level = ACTOR_LEVEL_BUZZY_BEETLE,
96 .ai = &N(EVS_NpcAI_BuzzyBeetle),
97 .onHit = &EnemyNpcHit,
98 .onDefeat = &EnemyNpcDefeat,
99};
100
101NpcSettings N(NpcSettings_BuzzyBeetle_Ceiling) = {
102 .height = 20,
103 .radius = 22,
104 .level = ACTOR_LEVEL_BUZZY_BEETLE,
105 .ai = &N(EVS_NpcAI_BuzzyBeetle_Ceiling),
106 .onHit = &EnemyNpcHit,
107 .onDefeat = &EnemyNpcDefeat,
108};
109
110NpcSettings N(NpcSettings_SpikeTop) = {
111 .height = 20,
112 .radius = 22,
113 .level = ACTOR_LEVEL_SPIKE_TOP,
114 .ai = &N(EVS_NpcAI_SpikeTop),
115 .onHit = &EnemyNpcHit,
116 .onDefeat = &EnemyNpcDefeat,
117};
118
119NpcSettings N(NpcSettings_BonyBeetle) = {
120 .height = 24,
121 .radius = 24,
122 .level = ACTOR_LEVEL_BONY_BEETLE,
123 .ai = &N(EVS_NpcAI_BonyBeetle),
124 .onHit = &EnemyNpcHit,
125 .onDefeat = &EnemyNpcDefeat,
126};
Bytecode EvtScript[]
@ NPC_SELF
Definition enums.h:2526
@ NPC_FLAG_GRAVITY
Definition enums.h:3007
s16 height
Definition npc.h:145
f32 moveSpeed
Definition npc.h:93
ApiStatus SelfEnemyOverrideSyncPos(Evt *script, b32 isInitialCall)
ApiStatus SetNpcAnimation(Evt *script, b32 isInitialCall)
EvtScript EnemyNpcDefeat
Definition encounter.c:158
EvtScript EnemyNpcHit
Definition encounter.c:131
ApiStatus SetSelfVar(Evt *script, b32 isInitialCall)
ApiStatus SetNpcFlagBits(Evt *script, b32 isInitialCall)
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define Return
Kills the current EVT thread.
Definition macros.h:217