Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
Lakitu_SpinySpawner.inc.c
Go to the documentation of this file.
1#include "Lakitu.h"
2#include "Spiny.h"
3
5
6MobileAISettings N(AISettings_Lakitu_SpinySpawner) = {
7 .moveSpeed = 1.5f,
8 .moveTime = 60,
9 .waitTime = 30,
10 .alertRadius = 60.0f,
11 .alertOffsetDist = 50.0f,
12 .playerSearchInterval = 3,
13 .chaseSpeed = 3.5f,
14 .chaseTurnRate = 60,
15 .chaseUpdateInterval = 10,
16 .chaseRadius = 80.0f,
17 .chaseOffsetDist = 70.0f,
18 .unk_AI_2C = 1,
19};
20
21EvtScript N(EVS_NpcAI_Lakitu_SpinySpawner) = {
22 #ifdef DEBUG_LAKITU
23 EVT_DEBUG_LOG(Ref("JUGEMU MOVE"))
24 #endif
25 Call(SetSelfVar, 0, 0)
26 Call(SetSelfVar, 5, -650)
27 Call(SetSelfVar, 6, 30)
28 Call(SetSelfVar, 1, 400)
29 Call(N(LakituAI_Main), Ref(N(AISettings_Lakitu_SpinySpawner)))
30 Return
31 End
32};
33
34NpcSettings N(NpcSettings_Lakitu_SpinySpawner) = {
35 .height = 28,
36 .radius = 24,
37 .level = ACTOR_LEVEL_LAKITU,
38 .ai = &N(EVS_NpcAI_Lakitu_SpinySpawner),
39 .onHit = &EnemyNpcHit,
40 .onDefeat = &EnemyNpcDefeat,
41};
42
44
45MobileAISettings N(AISettings_SpawnedSpiny) = {
46 .moveSpeed = 1.5f,
47 .moveTime = 30,
48 .waitTime = 50,
49 .alertRadius = 60.0f,
50 .alertOffsetDist = 30.0f,
51 .playerSearchInterval = 3,
52 .chaseSpeed = 6.0f,
53 .chaseRadius = 100.0f,
54 .chaseOffsetDist = 30.0f,
55 .unk_AI_2C = 3,
56};
57
58EvtScript N(EVS_NpcAI_SpawnedSpiny) = {
59 Call(SetSelfVar, 2, 3)
60 Call(SetSelfVar, 3, 18)
61 Call(SetSelfVar, 5, 3)
62 Call(SetSelfVar, 7, 4)
63 #ifdef DEBUG_LAKITU
64 EVT_DEBUG_LOG(Ref("TOGEZO TYPE1 : NORMAL MOVE"))
65 #endif
66 Call(N(SpinyAI_Main), Ref(N(AISettings_SpawnedSpiny)))
67 Return
68 End
69};
70
71EvtScript N(EVS_NpcDefeat_SpawnedSpiny) = {
76 Call(SetSelfVar, 10, 100)
84 Return
85 End
86};
87
88NpcSettings N(NpcSettings_SpawnedSpiny) = {
89 .height = 21,
90 .radius = 22,
91 .level = ACTOR_LEVEL_SPINY,
92 .ai = &N(EVS_NpcAI_SpawnedSpiny),
93 .onHit = &EnemyNpcHit,
94 .onDefeat = &N(EVS_NpcDefeat_SpawnedSpiny),
95};
Bytecode EvtScript[]
@ ENEMY_FLAG_FLED
Definition enums.h:4525
@ NPC_SELF
Definition enums.h:2526
@ OUTCOME_ENEMY_FLED
Definition enums.h:1905
@ OUTCOME_PLAYER_WON
Definition enums.h:1902
@ OUTCOME_PLAYER_FLED
Definition enums.h:1904
s16 height
Definition npc.h:145
EvtScript EnemyNpcDefeat
Definition encounter.c:158
ApiStatus SetEnemyFlagBits(Evt *script, b32 isInitialCall)
ApiStatus SetNpcRotation(Evt *script, b32 isInitialCall)
EvtScript EnemyNpcHit
Definition encounter.c:131
ApiStatus RemoveNpc(Evt *script, b32 isInitialCall)
ApiStatus DoNpcDefeat(Evt *script, b32 isInitialCall)
ApiStatus OnPlayerFled(Evt *script, b32 isInitialCall)
ApiStatus SetSelfVar(Evt *script, b32 isInitialCall)
ApiStatus GetBattleOutcome(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 EVT_DEBUG_LOG(STRING)
Does nothing in release version.
Definition macros.h:579
#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