bool AIScriptMutant1::Update() { if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorMutant1) != 590) { if (Actor_Query_Which_Set_In(kActorMutant1) != Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorMutant1, 590); } return false; } if (Global_Variable_Query(kVariableChapter) != 4) { return false; } switch (Actor_Query_Goal_Number(kActorMutant1)) { case 400: if (!Game_Flag_Query(523) && Game_Flag_Query(524) == 1) { Actor_Set_Goal_Number(kActorMutant1, 401); Actor_Set_Goal_Number(kActorMutant2, 401); Actor_Set_Goal_Number(kActorMutant3, 401); Actor_Set_Targetable(kActorMutant1, 1); Actor_Set_Targetable(kActorMutant2, 1); Actor_Set_Targetable(kActorMutant3, 1); Game_Flag_Set(523); } break; case 401: if (Actor_Query_Which_Set_In(kActorMutant1) == Player_Query_Current_Set() && (Actor_Query_Friendliness_To_Other(kActorMutant1, kActorMcCoy) < 30 || Actor_Query_Combat_Aggressiveness(70) >= 60)) { Actor_Set_Goal_Number(kActorMutant1, 410); } break; case 404: if (!Game_Flag_Query(630)) { Actor_Set_Goal_Number(kActorMutant1, 403); } break; case 410: if (Actor_Query_Which_Set_In(kActorMutant1) != Player_Query_Current_Set()) { Non_Player_Actor_Combat_Mode_Off(kActorMutant1); Actor_Set_Goal_Number(kActorMutant1, 403); } break; case 599: if (Actor_Query_Which_Set_In(kActorMutant1) != Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorMutant1, 411); } break; } if (Game_Flag_Query(630) == 1 && Actor_Query_Goal_Number(kActorMutant1) != 599) { Actor_Set_Goal_Number(kActorMutant1, 404); } return false; }
bool AIScriptFreeSlotB::Update() { if (Global_Variable_Query(kVariableChapter) > 5) { return false; } if (Global_Variable_Query(kVariableChapter) == 4) { switch (Actor_Query_Goal_Number(kActorFreeSlotB)) { case 300: Actor_Set_Goal_Number(kActorFreeSlotB, 301); Actor_Set_Targetable(kActorFreeSlotB, 1); break; case 301: if (Actor_Query_Which_Set_In(kActorFreeSlotB) == Player_Query_Current_Set() && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotB, kActorMcCoy) <= 48) { Actor_Set_Goal_Number(kActorFreeSlotB, 302); } break; case 302: if (Actor_Query_Which_Set_In(kActorFreeSlotB) != Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorFreeSlotB, 301); } break; case 599: if (Actor_Query_Which_Set_In(kActorFreeSlotB) != Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorFreeSlotB, 300); } break; default: Actor_Set_Goal_Number(kActorFreeSlotB, 300); break; } return false; } if (Actor_Query_Goal_Number(kActorFreeSlotB) < 400) { AI_Movement_Track_Flush(kActorFreeSlotB); Actor_Set_Goal_Number(kActorFreeSlotB, 400); return true; } else { if (Actor_Query_Goal_Number(kActorFreeSlotB) != 405 || Actor_Query_Which_Set_In(kActorMcCoy) != kSetKP02) { if (Actor_Query_Goal_Number(kActorFreeSlotB) == 599) { if (Actor_Query_Which_Set_In(kActorFreeSlotB) != Player_Query_Current_Set()) { Non_Player_Actor_Combat_Mode_Off(kActorFreeSlotB); Actor_Set_Goal_Number(kActorFreeSlotB, 400); return true; } } return false; } Actor_Set_Goal_Number(kActorFreeSlotB, 406); Actor_Set_Targetable(kActorFreeSlotB, 1); return true; } }
bool AIScriptMutant2::Update() { if (Global_Variable_Query(kVariableChapter) == 4) { switch (Actor_Query_Goal_Number(kActorMutant2)) { case 401: if (Actor_Query_Which_Set_In(kActorMutant2) == Player_Query_Current_Set() && (Actor_Query_Friendliness_To_Other(kActorMutant2, kActorMcCoy) < 20 || Actor_Query_Combat_Aggressiveness(kActorMutant2) >= 60 ) ) { Actor_Set_Goal_Number(kActorMutant2, 410); } break; case 404: if (!Game_Flag_Query(kFlagMutantsPaused)) { Actor_Set_Goal_Number(kActorMutant2, 403); } break; case 410: if (Actor_Query_Which_Set_In(kActorMutant2) != Player_Query_Current_Set()) { Non_Player_Actor_Combat_Mode_Off(kActorMutant2); Actor_Set_Goal_Number(kActorMutant2, 403); } break; case 599: if (Actor_Query_Which_Set_In(kActorMutant2) != Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorMutant2, 403); } break; } if (Game_Flag_Query(kFlagMutantsPaused) && Actor_Query_Goal_Number(kActorMutant2) != 599 ) { Actor_Set_Goal_Number(kActorMutant2, 404); } } else if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorMutant2) != 590 ) { if (Actor_Query_Which_Set_In(kActorMutant2) != Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorMutant2, 590); } } return false; }