bool AIScriptSadik::ShotAtAndHit() { #if BLADERUNNER_ORIGINAL_BUGS // Sadik killed in BB09 dead end bug fix #else if (Actor_Query_Goal_Number(kActorSadik) == kGoalSadikRunFromBB09) { // Like Izo's ShotAtAndHit() and the code below for kGoalSadikUG18Move // this will keep resetting Sadik's health to avoid killing him // Still, this is lowering Sadik's health from 80 (when Replicant) and 50 (when Human) if (Game_Flag_Query(kFlagSadikIsReplicant)) { Actor_Set_Health(kActorSadik, 60, 60); } else { Actor_Set_Health(kActorSadik, 40, 40); } return true; } #endif // BLADERUNNER_ORIGINAL_BUGS if (Actor_Query_Goal_Number(kActorSadik) == kGoalSadikUG18Move) { // this lowers Sadik's original health but makes it impossible to kill him here (UG18) if (Game_Flag_Query(kFlagSadikIsReplicant)) { #if BLADERUNNER_ORIGINAL_BUGS Actor_Set_Health(kActorSadik, 60, 60); #else // Sadik killed in BB09 dead end bug fix if (Actor_Query_Current_HP(kActorSadik) == 60) { // shot also at Bradbury, so lower his health further Actor_Set_Health(kActorSadik, 50, 50); } else { Actor_Set_Health(kActorSadik, 60, 60); } #endif } else { #if BLADERUNNER_ORIGINAL_BUGS Actor_Set_Health(kActorSadik, 40, 40); #else // Sadik killed in BB09 dead end bug fix if (Actor_Query_Current_HP(kActorSadik) == 40) { // shot also at Bradbury, so lower his health further Actor_Set_Health(kActorSadik, 30, 30); } else { Actor_Set_Health(kActorSadik, 40, 40); } #endif } return true; } if (Actor_Query_Goal_Number(kActorSadik) == 414 || Actor_Query_Goal_Number(kActorSadik) == kGoalSadikUG18NeedsReactorCoreFromMcCoy ) { Game_Flag_Set(kFlagMcCoyAttackedReplicants); if (Actor_Query_Which_Set_In(kActorSadik) != kSetKP07) { Actor_Set_Goal_Number(kActorSadik, 418); Scene_Exits_Disable(); } } return false; }
bool AIScriptSadik::ShotAtAndHit() { if (Actor_Query_Goal_Number(kActorSadik) == 301) { if (Game_Flag_Query(kFlagSadikIsReplicant)) { Actor_Set_Health(kActorSadik, 60, 60); } else { Actor_Set_Health(kActorSadik, 40, 40); } return true; } if (Actor_Query_Goal_Number(kActorSadik) == 414 || Actor_Query_Goal_Number(kActorSadik) == 416 ) { Game_Flag_Set(714); if (Actor_Query_Which_Set_In(kActorSadik) != kSetKP07) { Actor_Set_Goal_Number(kActorSadik, 418); Scene_Exits_Disable(); } } return false; }
bool AIScriptFreeSlotB::GoalChanged(int currentGoalNumber, int newGoalNumber) { switch (newGoalNumber) { case 300: AI_Movement_Track_Flush(kActorFreeSlotB); AI_Movement_Track_Append(kActorFreeSlotB, 39, 2); AI_Movement_Track_Repeat(kActorFreeSlotB); break; case 301: AI_Movement_Track_Flush(kActorFreeSlotB); processGoal301(); AI_Movement_Track_Repeat(kActorFreeSlotB); break; case 302: Actor_Set_Targetable(kActorFreeSlotB, 1); Non_Player_Actor_Combat_Mode_On(kActorFreeSlotB, 0, 0, 0, 8, 4, 7, 8, 25, 0, 75, 5, 300, 0); break; case 400: AI_Movement_Track_Append(kActorFreeSlotB, 39, 0); AI_Movement_Track_Repeat(kActorFreeSlotB); break; case 406: AI_Movement_Track_Flush(kActorFreeSlotB); AI_Movement_Track_Append(kActorFreeSlotB, 527, 0); AI_Movement_Track_Repeat(kActorFreeSlotB); break; case 599: Actor_Set_Health(kActorFreeSlotB, 20, 20); break; default: return false; } return true; }
bool AIScriptMutant1::GoalChanged(int currentGoalNumber, int newGoalNumber) { switch (newGoalNumber) { case 400: AI_Movement_Track_Flush(kActorMutant1); AI_Movement_Track_Append(kActorMutant1, 39, 0); AI_Movement_Track_Repeat(kActorMutant1); if (Game_Flag_Query(kFlagCT04HomelessKilledByMcCoy)) { Actor_Set_Combat_Aggressiveness(kActorMutant1, 70); Actor_Set_Friendliness_To_Other(kActorMutant1, kActorMcCoy, 20); } return true; case 401: Actor_Set_Targetable(kActorMutant1, 1); AI_Movement_Track_Flush(kActorMutant1); AI_Movement_Track_Append(kActorMutant1, 39, 0); switch (Random_Query(1, 8)) { case 1: AI_Movement_Track_Append(kActorMutant1, 182, 0); AI_Movement_Track_Append(kActorMutant1, 183, 2); AI_Movement_Track_Append(kActorMutant1, 184, 0); AI_Movement_Track_Repeat(kActorMutant1); break; case 2: AI_Movement_Track_Append(kActorMutant1, 296, 0); AI_Movement_Track_Append(kActorMutant1, 297, 0); AI_Movement_Track_Repeat(kActorMutant1); break; case 3: AI_Movement_Track_Append(kActorMutant1, 176, 0); AI_Movement_Track_Append(kActorMutant1, 177, 0); AI_Movement_Track_Append(kActorMutant1, 178, 2); AI_Movement_Track_Append(kActorMutant1, 177, 0); AI_Movement_Track_Append(kActorMutant1, 176, 1); AI_Movement_Track_Append(kActorMutant1, 39, 45); AI_Movement_Track_Repeat(kActorMutant1); break; case 4: AI_Movement_Track_Append(kActorMutant1, 298, 0); AI_Movement_Track_Append(kActorMutant1, 300, 0); AI_Movement_Track_Repeat(kActorMutant1); break; case 5: AI_Movement_Track_Append(kActorMutant1, 301, 0); AI_Movement_Track_Append(kActorMutant1, 302, 2); AI_Movement_Track_Append(kActorMutant1, 303, 0); AI_Movement_Track_Append(kActorMutant1, 304, 0); AI_Movement_Track_Append(kActorMutant1, 305, 0); AI_Movement_Track_Append(kActorMutant1, 304, 0); AI_Movement_Track_Append(kActorMutant1, 306, 0); AI_Movement_Track_Append(kActorMutant1, 39, 60); AI_Movement_Track_Repeat(kActorMutant1); break; case 6: AI_Movement_Track_Append(kActorMutant1, 307, 0); AI_Movement_Track_Append(kActorMutant1, 308, 0); AI_Movement_Track_Append(kActorMutant1, 309, 1); AI_Movement_Track_Append(kActorMutant1, 310, 3); AI_Movement_Track_Append(kActorMutant1, 311, 0); AI_Movement_Track_Repeat(kActorMutant1); break; case 7: switch (Random_Query(1, 5)) { case 1: AI_Movement_Track_Append(kActorMutant1, 532, 0); AI_Movement_Track_Append(kActorMutant1, 533, 0); AI_Movement_Track_Append(kActorMutant1, 534, 2); AI_Movement_Track_Append(kActorMutant1, 535, 3); AI_Movement_Track_Append(kActorMutant1, 533, 0); AI_Movement_Track_Append(kActorMutant1, 532, 0); AI_Movement_Track_Repeat(kActorMutant1); break; case 2: AI_Movement_Track_Append(kActorMutant1, 532, 0); AI_Movement_Track_Append(kActorMutant1, 533, 0); AI_Movement_Track_Append(kActorMutant1, 535, 2); AI_Movement_Track_Append(kActorMutant1, 534, 3); AI_Movement_Track_Append(kActorMutant1, 533, 0); AI_Movement_Track_Append(kActorMutant1, 532, 0); AI_Movement_Track_Repeat(kActorMutant1); break; case 3: AI_Movement_Track_Append(kActorMutant1, 536, 0); AI_Movement_Track_Append(kActorMutant1, 537, 0); AI_Movement_Track_Append(kActorMutant1, 538, 2); AI_Movement_Track_Append(kActorMutant1, 537, 0); AI_Movement_Track_Append(kActorMutant1, 536, 0); AI_Movement_Track_Repeat(kActorMutant1); break; case 4: AI_Movement_Track_Append(kActorMutant1, 532, 0); AI_Movement_Track_Append(kActorMutant1, 533, 0); AI_Movement_Track_Append(kActorMutant1, 534, 3); AI_Movement_Track_Append(kActorMutant1, 533, 0); AI_Movement_Track_Append(kActorMutant1, 532, 0); AI_Movement_Track_Repeat(kActorMutant1); break; case 5: AI_Movement_Track_Append(kActorMutant1, 532, 0); AI_Movement_Track_Append(kActorMutant1, 533, 0); AI_Movement_Track_Append(kActorMutant1, 535, 1); AI_Movement_Track_Append(kActorMutant1, 533, 0); AI_Movement_Track_Append(kActorMutant1, 532, 0); AI_Movement_Track_Repeat(kActorMutant1); break; default: return true; } break; case 8: if (Game_Flag_Query(623) == 1) { AI_Movement_Track_Append(kActorMutant1, 418, 0); AI_Movement_Track_Append(kActorMutant1, 417, 0); AI_Movement_Track_Append(kActorMutant1, 539, 0); AI_Movement_Track_Repeat(kActorMutant1); } else { Actor_Set_Goal_Number(kActorMutant1, 403); } break; default: AI_Movement_Track_Append(kActorMutant1, 39, 60); AI_Movement_Track_Repeat(kActorMutant1); break; } return true; case 403: Actor_Set_Targetable(kActorMutant1, 0); Actor_Set_Goal_Number(kActorMutant1, 401); return true; case 404: AI_Movement_Track_Flush(kActorMutant1); AI_Movement_Track_Append(kActorMutant1, 39, 0); AI_Movement_Track_Repeat(kActorMutant1); return true; case 410: switch (Actor_Query_Which_Set_In(kActorMutant1)) { case kSetUG01: Non_Player_Actor_Combat_Mode_On(kActorMutant1, kActorCombatStateIdle, false, kActorMcCoy, 11, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; case kSetUG04: case kSetUG05: case kSetUG06: Non_Player_Actor_Combat_Mode_On(kActorMutant1, kActorCombatStateIdle, false, kActorMcCoy, 10, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; case kSetUG07: Non_Player_Actor_Combat_Mode_On(kActorMutant1, kActorCombatStateIdle, false, kActorMcCoy, 12, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; case kSetUG10: case kSetUG12: case kSetUG14: Non_Player_Actor_Combat_Mode_On(kActorMutant1, kActorCombatStateIdle, false, kActorMcCoy, 14, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; } return true; case 411: AI_Movement_Track_Flush(kActorMutant1); Actor_Set_Intelligence(kActorMutant1, 40); Actor_Set_Health(kActorMutant1, 10 * Query_Difficulty_Level() + 30, 10 * Query_Difficulty_Level() + 30); if (Game_Flag_Query(kFlagCT04HomelessKilledByMcCoy)) { Actor_Set_Combat_Aggressiveness(kActorMutant1, 70); Actor_Set_Friendliness_To_Other(kActorMutant1, kActorMcCoy, 20); } else { Actor_Set_Combat_Aggressiveness(kActorMutant1, 40); Actor_Set_Friendliness_To_Other(kActorMutant1, kActorMcCoy, 45); } Actor_Modify_Friendliness_To_Other(kActorMutant2, kActorMcCoy, -10); Actor_Modify_Friendliness_To_Other(kActorMutant3, kActorMcCoy, -20); Actor_Modify_Combat_Aggressiveness(kActorMutant2, 10); Actor_Modify_Combat_Aggressiveness(kActorMutant3, 15); Actor_Set_Goal_Number(kActorMutant1, 403); return true; case 590: AI_Movement_Track_Flush(kActorMutant1); AI_Movement_Track_Append(kActorMutant1, 39, 100); AI_Movement_Track_Repeat(kActorMutant1); return true; case 599: AI_Movement_Track_Flush(kActorMutant1); Actor_Change_Animation_Mode(kActorMutant1, 48); Actor_Modify_Friendliness_To_Other(kActorMutant2, kActorMcCoy, -10); Actor_Modify_Friendliness_To_Other(kActorMutant3, kActorMcCoy, -20); Actor_Modify_Combat_Aggressiveness(kActorMutant2, 10); Actor_Modify_Combat_Aggressiveness(kActorMutant3, 15); return true; default: break; } return false; }
bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { if (!newGoalNumber) { Actor_Put_In_Set(kActorLucy, kSetFreeSlotA); return false; } switch (newGoalNumber) { case 200: if (Global_Variable_Query(40) == 3) { if (Game_Flag_Query(591) && Game_Flag_Query(592) && Player_Query_Current_Scene() != 36) { Actor_Set_Goal_Number(kActorLucy, 205); } else { if (Random_Query(1, 2) - 1) { Actor_Set_Goal_Number(kActorLucy, 225); } else { Actor_Set_Goal_Number(kActorLucy, 220); } } } else { int rnd = Random_Query(1, 4) - 1; if (rnd) { if (rnd == 1) { Actor_Set_Goal_Number(kActorLucy, 225); } else if (Player_Query_Current_Scene() == 36) { Actor_Set_Goal_Number(kActorLucy, 220); } else { Actor_Set_Goal_Number(kActorLucy, 205); } } else { Actor_Set_Goal_Number(kActorLucy, 220); } } break; case 205: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_With_Facing(kActorLucy, 371, 0, 156); AI_Movement_Track_Repeat(kActorLucy); break; case 210: Actor_Set_Immunity_To_Obstacles(kActorLucy, 1); AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 377, 0); AI_Movement_Track_Repeat(kActorLucy); break; case 211: Actor_Set_Immunity_To_Obstacles(kActorLucy, 0); AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 372, 0); AI_Movement_Track_Append(kActorLucy, 33, 0); AI_Movement_Track_Repeat(kActorLucy); break; case 212: Actor_Set_Immunity_To_Obstacles(kActorLucy, 1); AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 378, 0); AI_Movement_Track_Repeat(kActorLucy); break; case 213: Actor_Set_Immunity_To_Obstacles(kActorLucy, 0); AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 373, 0); AI_Movement_Track_Append(kActorLucy, 33, 0); AI_Movement_Track_Repeat(kActorLucy); break; case 214: Actor_Says(kActorLucy, 320, 16); Actor_Set_Goal_Number(kActorHolloway, 242); Actor_Set_Immunity_To_Obstacles(6, 1); AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append(kActorLucy, 378, 0); AI_Movement_Track_Repeat(kActorLucy); break; case 215: Actor_Set_Immunity_To_Obstacles(kActorLucy, 0); AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 373, 0); AI_Movement_Track_Append(kActorLucy, 33, 30); AI_Movement_Track_Repeat(kActorLucy); break; case 220: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append(kActorLucy, 39, Random_Query(5, 10)); AI_Movement_Track_Append(kActorLucy, 33, Random_Query(5, 10)); AI_Movement_Track_Append(kActorLucy, 39, Random_Query(5, 10)); AI_Movement_Track_Repeat(kActorLucy); break; case 225: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append(kActorLucy, 39, Random_Query(5, 15)); AI_Movement_Track_Append(kActorLucy, 33, Random_Query(10, 30)); AI_Movement_Track_Append(kActorLucy, 40, Random_Query(15, 30)); AI_Movement_Track_Append(kActorLucy, 42, Random_Query(10, 20)); AI_Movement_Track_Repeat(kActorLucy); break; case 230: AI_Movement_Track_Flush(kActorLucy); Actor_Put_In_Set(kActorLucy, kSetHF04); Actor_Set_At_Waypoint(kActorLucy, 518, 0); Actor_Set_Targetable(kActorLucy, 1); Actor_Set_Health(kActorLucy, 5, 5); break; case 232: Player_Loses_Control(); Actor_Says(kActorMcCoy, 1700, 16); AI_Movement_Track_Flush(kActorLucy); Actor_Face_Actor(kActorLucy, 0, 1); Actor_Face_Actor(kActorMcCoy, kActorLucy, 1); Actor_Says(kActorLucy, 350, 13); Actor_Says(kActorMcCoy, 1705, 13); Actor_Says(kActorLucy, 360, 13); Actor_Says(kActorMcCoy, 1710, 13); if (Global_Variable_Query(kVariableAffectionTowards) == 3) { Actor_Says(kActorLucy, 940, 13); Actor_Says(kActorMcCoy, 6780, 12); Actor_Says(kActorLucy, 950, 12); Actor_Says(kActorLucy, 960, 14); Actor_Says(kActorMcCoy, 6785, 13); Actor_Says(kActorLucy, 970, 16); Actor_Says(kActorLucy, 980, 13); if (Game_Flag_Query(47)) { Actor_Says(kActorLucy, 990, 15); } Actor_Says(kActorMcCoy, 6790, 13); if (Game_Flag_Query(47) && Game_Flag_Query(46)) { Actor_Says(kActorLucy, 1000, 12); } Actor_Says(kActorLucy, 1010, 15); Actor_Says(kActorLucy, 1020, 12); Actor_Says(kActorMcCoy, 6795, 18); Actor_Says(kActorLucy, 1030, 15); Actor_Says(kActorMcCoy, 6800, 16); Actor_Says(kActorLucy, 1040, 12); Actor_Says(kActorMcCoy, 6805, 15); Actor_Says(kActorLucy, 1050, 12); } Actor_Says(kActorLucy, 370, 14); Actor_Set_Goal_Number(kActorLucy, 239); if (Global_Variable_Query(40) == 3) { Actor_Set_Goal_Number(kActorSteele, 243); Game_Flag_Set(593); } Player_Gains_Control(); break; case 233: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 519, 0); AI_Movement_Track_Repeat(kActorLucy); Actor_Set_Health(kActorLucy, 5, 5); break; case 234: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 520, 0); AI_Movement_Track_Repeat(kActorLucy); break; case 236: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 521, 0); AI_Movement_Track_Repeat(kActorLucy); break; case 238: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 522, 0); AI_Movement_Track_Repeat(kActorLucy); break; case 239: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 523, 0); AI_Movement_Track_Append(kActorLucy, 33, 0); AI_Movement_Track_Repeat(kActorLucy); Player_Gains_Control(); Actor_Set_Health(kActorLucy, 30, 30); break; case 240: if (Global_Variable_Query(40) == 3) { Actor_Set_Goal_Number(kActorLucy, 599); Actor_Set_Goal_Number(kActorSteele, 240); } else { Actor_Set_Goal_Number(kActorLucy, 299); Game_Flag_Set(593); } break; case 250: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append(kActorLucy, 372, 0); AI_Movement_Track_Append_With_Facing(kActorLucy, 371, 0, 156); AI_Movement_Track_Repeat(kActorLucy); break; case 300: Actor_Put_In_Set(kActorLucy, kSetFreeSlotA); Actor_Set_At_Waypoint(kActorLucy, 33, 0); if (Global_Variable_Query(kVariableAffectionTowards) == 3) { Actor_Set_Goal_Number(kActorLucy, 310); } break; case 310: Actor_Put_In_Set(kActorLucy, kSetUG01); Actor_Set_At_Waypoint(kActorLucy, 544, 651); break; case 311: voightKempTest(); break; case 312: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 545, 0); AI_Movement_Track_Append(kActorLucy, 33, 0); AI_Movement_Track_Repeat(kActorLucy); break; case 599: Game_Flag_Set(593); break; } return false; }
void AIScriptLucy::CompletedMovementTrack() { switch (Actor_Query_Goal_Number(kActorLucy)) { case 205: if (!Game_Flag_Query(616) || Global_Variable_Query(40) != 3) { AI_Countdown_Timer_Reset(kActorLucy, 0); AI_Countdown_Timer_Start(kActorLucy, 0, 30); return; //false; } Actor_Set_Goal_Number(kActorLucy, 250); return; //true; case 210: Actor_Set_Goal_Number(kActorLucy, 211); break; case 211: Game_Flag_Set(593); Actor_Set_Goal_Number(kActorLucy, 299); break; case 212: Actor_Set_Goal_Number(kActorLucy, 213); break; case 213: if (Actor_Clue_Query(kActorLucy, 219) && Global_Variable_Query(40) != 3) { Game_Flag_Set(593); } else { Actor_Set_Goal_Number(kActorLucy, 230); Game_Flag_Reset(584); } break; case 214: Actor_Set_Goal_Number(kActorLucy, 215); break; case 215: Actor_Set_Goal_Number(kActorLucy, 201); break; case 220: case 225: Actor_Set_Goal_Number(kActorLucy, 200); break; case 233: Game_Flag_Set(585); Actor_Set_Goal_Number(kActorLucy, 234); break; case 234: Actor_Set_Goal_Number(kActorLucy, 235); break; case 236: Actor_Set_Goal_Number(kActorLucy, 237); break; case 238: Game_Flag_Set(593); Actor_Put_In_Set(kActorLucy, kSetFreeSlotA); Actor_Set_At_Waypoint(kActorLucy, 33, 0); Actor_Set_Health(kActorLucy, 30, 30); if (Global_Variable_Query(40) == 3) { Actor_Set_Goal_Number(kActorSteele, 240); } break; case 239: Game_Flag_Set(593); break; default: break; } return; //false; }