4#define FIRST_BULLET_NPCID 50
5#define LAST_BULLET_NPCID 59
21#define AI_VAR_BULLET_BLASTER varTable[1]
22#define AI_VAR_BULLET_RANGE varTable[2]
24#define AI_VAR_BLASTER_BULLET varTable[0]
25#define AI_VAR_BLASTER_RANGE varTable[1]
27static s32 N(BillBlasterAI_GetIdleBulletNpcID)(void) {
39API_CALLABLE(N(BulletBillAI_Main)) {
40 Enemy* enemy = script->owner1.enemy;
43 s32 hitDetected = FALSE;
56 enemy->AI_VAR_BULLET_BLASTER = -1;
63 enemy->
aiFlags &= ~AI_FLAG_SUSPEND;
66 switch (script->AI_TEMP_STATE) {
74 npc->
flags &= ~NPC_FLAG_DONT_UPDATE_SHADOW_Y;
85 npc->
flags &= ~NPC_FLAG_INVISIBLE;
87 npc->
pos.
y = blasterNpc->
pos.
y + 11.0;
88 npc->
pos.
z = blasterNpc->
pos.
z + 1.0;
89 npc->
yaw = blasterNpc->
yaw;
93 if (npc->
yaw < 180.0f) {
106 if ((deltaY > 190.0) || (deltaY < -120.0)) {
114 if (npc->
yaw < 180.0f) {
115 if (enemy->AI_VAR_BULLET_RANGE <= nextX) {
127 fx_ring_blast(0, npc->
pos.
x, npc->
pos.
y + 5.0f, npc->
pos.
z + 1.0f, 0.05f, 20);
128 fx_smoke_burst(0, npc->
pos.
x, npc->
pos.
y + 5.0f, npc->
pos.
z + 0.0f, 1.2f, 25);
153API_CALLABLE(N(BillBlasterAI_Main)) {
154 Bytecode* args = script->ptrReadPos;
155 Enemy* enemy = script->owner1.enemy;
171 if ((deltaY > 190.0) || (deltaY < -80.0)) {
180 enemy->
aiFlags &= ~AI_FLAG_SUSPEND;
183 switch (script->AI_TEMP_STATE) {
191 bulletNpcID = N(BillBlasterAI_GetIdleBulletNpcID)();
192 enemy->AI_VAR_BLASTER_BULLET = bulletNpcID;
193 if (bulletNpcID > 0) {
196 bulletEnemy->AI_VAR_BULLET_BLASTER = enemy->
npcID;
197 bulletEnemy->AI_VAR_BULLET_RANGE = enemy->AI_VAR_BLASTER_RANGE;
212 bulletEnemy =
get_enemy(enemy->AI_VAR_BLASTER_BULLET);
@ AI_STATE_BLASTER_COOLDOWN
@ AI_STATE_BLASTER_PREPARE
#define AI_VAR_BULLET_RANGE
#define LAST_BULLET_NPCID
#define FIRST_BULLET_NPCID
@ ENEMY_ANIM_INDEX_MELEE_PRE
@ AI_FLAG_SKIP_EMOTE_AFTER_FLEE
@ ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN
@ PROJECTILE_HITBOX_STATE_ACTIVE
@ PROJECTILE_HITBOX_STATE_NONE
@ PROJECTILE_HITBOX_STATE_INIT
@ PROJECTILE_HITBOX_STATE_DONE
@ PROJECTILE_HITBOX_STATE_PRE
@ SOUND_SEQ_BULLET_BILL_EXPLODE
@ NPC_FLAG_IGNORE_CAMERA_FOR_YAW
@ NPC_FLAG_DONT_UPDATE_SHADOW_Y
s32 evt_get_variable(Evt *script, Bytecode var)
void ai_enemy_play_sound(Npc *npc, s32 arg1, s32 arg2)
void add_vec2D_polar(f32 *x, f32 *y, f32 r, f32 theta)
Enemy * get_enemy(s32 npcID)
Looks for an enemy matching the specified npcID.
void enable_npc_shadow(Npc *npc)
void disable_npc_shadow(Npc *npc)
Npc * get_npc_unsafe(s32 npcID)
void npc_move_heading(Npc *npc, f32 speed, f32 yaw)
#define NPC_DISPOSE_POS_Z
#define NPC_DISPOSE_POS_X
#define NPC_DISPOSE_POS_Y
PlayerStatus * gPlayerStatusPtr