4#include "sprite/npc/SpearGuy.h"
7 Enemy* enemy = script->owner1.enemy;
12 enemy->varTable[0] = 0;
17 Enemy* enemy = script->owner1.enemy;
21 if (enemy->varTable[0] == 0) {
23 enemy->varTable[0] = 3;
25 enemy->varTable[0] = 1;
30 switch (enemy->varTable[0]) {
32 enemy->varTable[0] = 2;
33 enemy->varTable[1] = 0;
34 npc->
curAnim = ANIM_SpearGuy_Anim0F;
37 if (enemy->varTable[1] > 50) {
38 enemy->varTable[0] = 5;
42 enemy->varTable[0] = 4;
43 enemy->varTable[1] = 0;
44 npc->
curAnim = ANIM_SpearGuy_Anim10;
47 if (enemy->varTable[1] == 25) {
50 if (enemy->varTable[1] > 60) {
51 enemy->varTable[0] = 5;
55 enemy->varTable[0] = 6;
56 enemy->varTable[1] = 0;
57 npc->
curAnim = ANIM_SpearGuy_Anim03;
61 if (enemy->varTable[1] > 10) {
65 enemy->varTable[0] = 7;
66 }
else if (d100 >= 95) {
67 enemy->varTable[0] = 3;
69 enemy->varTable[0] = 1;
75 if (enemy->varTable[0] == 7) {
83API_CALLABLE(N(SpearGuyAI_Main)) {
84 Enemy* enemy = script->owner1.enemy;
105 npc->
flags &= ~NPC_FLAG_JUMPING;
108 npc->
flags &= ~NPC_FLAG_FLYING;
110 npc->
flags &= ~NPC_FLAG_GRAVITY;
117 enemy->
aiFlags &= ~AI_FLAG_SUSPEND;
119 enemy->varTable[0] = 0;
126 switch (script->AI_TEMP_STATE) {
void N MeleeHitbox_31(Evt *script)
void N MeleeHitbox_32(Evt *script)
s32 N MeleeHitbox_CanSeePlayer(Evt *script)
void N MeleeHitbox_33(Evt *script)
void N MeleeHitbox_30(Evt *script)
void N SpearGuyAI_LoiterInit(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *territory)
void N SpearGuyAI_Loiter(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *territory)
@ AI_STATE_MELEE_HITBOX_INIT
@ AI_STATE_MELEE_HITBOX_ACTIVE
@ AI_STATE_MELEE_HITBOX_MISS
@ AI_STATE_MELEE_HITBOX_PRE
s32 evt_get_variable(Evt *script, Bytecode var)
void basic_ai_chase_init(Evt *script, MobileAISettings *npcAISettings, EnemyDetectVolume *territory)
void basic_ai_lose_player(Evt *script, MobileAISettings *npcAISettings, EnemyDetectVolume *territory)
void basic_ai_wander(Evt *script, MobileAISettings *npcAISettings, EnemyDetectVolume *territory)
void basic_ai_chase(Evt *script, MobileAISettings *npcAISettings, EnemyDetectVolume *territory)
void basic_ai_found_player_jump_init(Evt *script, MobileAISettings *npcAISettings, EnemyDetectVolume *territory)
void basic_ai_wander_init(Evt *script, MobileAISettings *npcAISettings, EnemyDetectVolume *territory)
void basic_ai_found_player_jump(Evt *script, MobileAISettings *npcAISettings, EnemyDetectVolume *territory)
void basic_ai_suspend(Evt *script)
enum TerritoryShape shape
enum TerritoryShape detectShape
Npc * get_npc_unsafe(s32 npcID)
void set_npc_yaw(Npc *npc, f32 yaw)
s32 skipPlayerDetectChance
EnemyTerritoryWander wander
EnemyTerritory * territory