state Base { Conditions { } Actions { SetBoss CanSeeBehind SetDefensive KeepWeaponOut PrefersPlayers SetState "Phase1_Start" } } ///////////Phase1///////// state Phase1_Start { Conditions { } Actions { SetHitPoints "3" SetMessage "name=ShowHearts" "value=1" SetState "Phase1_SelectNextPipe" } } state Phase1_SelectNextPipe { Conditions { if CurrentLocatorIs "Recover1" == 1 and if ObstacleChainPhase "Pipes1" == 1 goto Phase1_GoToPipes1 if CurrentLocatorIs "Recover2" == 1 and if ObstacleChainPhase "Pipes2" == 1 goto Phase1_GoToPipes2 if CurrentLocatorIs "Recover3" == 1 and if ObstacleChainPhase "Pipes3" == 1 goto Phase1_GoToPipes3 if ObstacleChainPhase "Pipes1" == 1 goto Phase1_GoToPipes1 if ObstacleChainPhase "Pipes2" == 1 goto Phase1_GoToPipes2 if ObstacleChainPhase "Pipes3" == 1 goto Phase1_GoToPipes3 if PreviousResult != 1 goto Phase2_Start } Actions { } } state Phase1_GoToPipes1 { Conditions { } Actions { SetLocator "name=Pipes1" SetState "Phase1_GoToPipe" } } state Phase1_GoToPipes2 { Conditions { } Actions { SetLocator "name=Pipes2" SetState "Phase1_GoToPipe" } } state Phase1_GoToPipes3 { Conditions { } Actions { SetLocator "name=Pipes3" SetState "Phase1_GoToPipe" } } state Phase1_GoToPipe { Conditions { if CurrentLocatorIs "Pipes1" == 0 and if ObstacleChainPhase "Pipes1" == 1 and if CameraYRot > 0 and if CameraYRot < 120 goto Phase1_GoToPipes1 if CurrentLocatorIs "Pipes2" == 0 and if ObstacleChainPhase "Pipes2" == 1 and if CameraYRot > 240 and if CameraYRot < 355 goto Phase1_GoToPipes2 if CurrentLocatorIs "Pipes3" == 0 and if ObstacleChainPhase "Pipes3" == 1 and if CameraYRot > 130 and if CameraYRot < 230 goto Phase1_GoToPipes3 if CurrentLocatorIs "Pipes1" == 1 and if ObstacleChainPhase "Pipes1" != 1 goto Phase1_SelectNextPipe if CurrentLocatorIs "Pipes2" == 1 and if ObstacleChainPhase "Pipes2" != 1 goto Phase1_SelectNextPipe if CurrentLocatorIs "Pipes3" == 1 and if ObstacleChainPhase "Pipes3" != 1 goto Phase1_SelectNextPipe } Actions { BigJumpToLocator SetState "Phase1_Attack" } } state Phase1_StartRecover { Conditions { if CurrentLocatorIs "Pipes1" == 1 goto Phase1_GoToRecover1 if CurrentLocatorIs "Pipes2" == 1 goto Phase1_GoToRecover2 if CurrentLocatorIs "Pipes3" == 1 goto Phase1_GoToRecover3 if PreviousResult == 0 goto Phase1_GoToRecover3 } Actions { } } state Phase1_GoToRecover1 { Conditions { } Actions { ;BigJumpToLocator "name=Recover1A" SetLocator "name=Recover1" SetState "Phase1_GoToRecover" } } state Phase1_GoToRecover2 { Conditions { } Actions { BigJumpToLocator "name=Pipes1" SetLocator "name=Recover2" SetState "Phase1_GoToRecover" } } state Phase1_GoToRecover3 { Conditions { } Actions { BigJumpToLocator "name=Pipes2" SetLocator "name=Recover3" SetState "Phase1_GoToRecover" } } state Phase1_GoToRecover { Conditions { } Actions { BigJumpToLocator SetDefensive SetState "Phase1_Recover" } } state Phase1_Recover { Conditions { if NearestPlayerRange < 1.5 goto Phase1_RecoveryComplete } Actions { Idle "5" SetState "Phase1_RecoveryComplete" } } state Phase1_RecoveryComplete { Conditions { } Actions { SetHitPoints "3" SetState "Phase1_SelectNextPipe" } } state Phase1_Attack { Conditions { if HitPoints == 0 goto Phase1_StartRecover if CurrentLocatorIs "Pipes1" == 0 and if ObstacleChainPhase "Pipes1" == 1 and if CameraYRot > 0 and if CameraYRot < 120 goto Phase1_GoToPipes1 if CurrentLocatorIs "Pipes2" == 0 and if ObstacleChainPhase "Pipes2" == 1 and if CameraYRot > 240 and if CameraYRot < 355 goto Phase1_GoToPipes2 if CurrentLocatorIs "Pipes3" == 0 and if ObstacleChainPhase "Pipes3" == 1 and if CameraYRot > 130 and if CameraYRot < 230 goto Phase1_GoToPipes3 if CurrentLocatorIs "Pipes1" == 1 and if ObstacleChainPhase "Pipes1" != 1 goto Phase1_SelectNextPipe if CurrentLocatorIs "Pipes2" == 1 and if ObstacleChainPhase "Pipes2" != 1 goto Phase1_SelectNextPipe if CurrentLocatorIs "Pipes3" == 1 and if ObstacleChainPhase "Pipes3" != 1 goto Phase1_SelectNextPipe if LocatorRange > 1.0f goto Phase1_GoToPipe if OpponentToLocator > 1.0 goto Phase1_Defend } Actions { AttackOpponent "range 0.5" } } state Phase1_Defend { Conditions { if HitPoints == 0 goto Phase1_StartRecover if CurrentLocatorIs "Pipes1" == 0 and if ObstacleChainPhase "Pipes1" == 1 and if CameraYRot > 0 and if CameraYRot < 120 goto Phase1_GoToPipes1 if CurrentLocatorIs "Pipes2" == 0 and if ObstacleChainPhase "Pipes2" == 1 and if CameraYRot > 240 and if CameraYRot < 355 goto Phase1_GoToPipes2 if CurrentLocatorIs "Pipes3" == 0 and if ObstacleChainPhase "Pipes3" == 1 and if CameraYRot > 130 and if CameraYRot < 230 goto Phase1_GoToPipes3 if CurrentLocatorIs "Pipes1" == 1 and if ObstacleChainPhase "Pipes1" != 1 goto Phase1_SelectNextPipe if CurrentLocatorIs "Pipes2" == 1 and if ObstacleChainPhase "Pipes2" != 1 goto Phase1_SelectNextPipe if CurrentLocatorIs "Pipes3" == 1 and if ObstacleChainPhase "Pipes3" != 1 goto Phase1_SelectNextPipe if LocatorRange > 1.0f goto Phase1_GoToPipe if OpponentToLocator < 1.0 goto Phase1_Attack } Actions { FaceOpponent } } ///////////Phase2///////// state Phase2_Start { Conditions { } Actions { SetDefensive "FALSE" DontPush SetMessage "name=ShowHearts" "value=0" SetState "Phase2_SelectNextPlatform" } } state Phase2_SelectNextPlatform { Conditions { if ObstacleChainPhase "Pipes1" > 3 and if ObstacleChainPhase "Pipes2" > 3 and if ObstacleChainPhase "Pipes3" > 3 goto Phase3_Start if CurrentLocatorIs "Recover1" == 1 and if ObstacleChainPhase "Pipes1" == 3 and if RigidAnimFrame "form_1_c_1" == 1 goto Phase2_GoToPlatform1 if CurrentLocatorIs "Recover2" == 1 and if ObstacleChainPhase "Pipes2" == 3 and if RigidAnimFrame "form_2_c_1" == 1 goto Phase2_GoToPlatform2 if CurrentLocatorIs "Recover3" == 1 and if ObstacleChainPhase "Pipes3" == 3 and if RigidAnimFrame "form_3_c_1" == 1 goto Phase2_GoToPlatform3 if ObstacleChainPhase "Pipes1" < 3 goto Phase2_GoToPlatform1 if ObstacleChainPhase "Pipes1" == 3 and if RigidAnimFrame "form_1_c_1" == 1 goto Phase2_GoToPlatform1 if ObstacleChainPhase "Pipes2" < 3 goto Phase2_GoToPlatform2 if ObstacleChainPhase "Pipes2" == 3 and if RigidAnimFrame "form_2_c_1" == 1 goto Phase2_GoToPlatform2 if ObstacleChainPhase "Pipes3" < 3 goto Phase2_GoToPlatform3 if ObstacleChainPhase "Pipes3" == 3 and if RigidAnimFrame "form_3_c_1" == 1 goto Phase2_GoToPlatform3 } Actions { SetDefensive FacePlayer } } state Phase2_StartRecover { Conditions { if CurrentLocatorIs "platform1" == 1 goto Phase2_Recover1 if CurrentLocatorIs "platform2" == 1 goto Phase2_Recover2 if CurrentLocatorIs "platform3" == 1 goto Phase2_Recover3 if PreviousResult == 0 goto Phase2_GoToRecover3 } Actions { } } state Phase2_GoToPlatform1 { Conditions { } Actions { SetDefensive "FALSE" SetLocator "name=pipes1" BigJumpToLocator SetState "Phase2_OpenPlatform1" } } state Phase2_OpenPlatform1 { Conditions { if DoorOpened "platform1" == 1 goto Phase2_JumpToPlatform1 } Actions { UnlockDoor "platform1" OpenDoor "platform1" "stayopen" } } state Phase2_JumpToPlatform1 { Conditions { if ObstacleChainPhase "Pipes1" > 3 goto Phase2_SelectNextPlatform if RigidAnimFrame "form_1_c_1" > 30 goto Phase2_SelectNextPlatform } Actions { SetLocator "name=platform1" BigJumpToLocator SetHitPoints "1" SetState "Phase2_ChuckStuffFromPlatform1" } } state Phase2_ChuckStuffFromPlatform1 { Conditions { if Hitpoints == 0 goto Phase2_StartRecover if ObstacleChainPhase "Pipes1" > 3 goto Phase2_StartRecover if RigidAnimFrame "form_1_c_1" > 30 goto Phase2_StartRecover if CurrentLocatorIs "platform1" == 0 and if ObstacleChainPhase "Pipes1" < 4 and if RigidAnimFrame "form_1_c_1" == 1 and if CameraYRot > 0 and if CameraYRot < 120 goto Phase2_GoToPlatform1 if CurrentLocatorIs "platform2" == 0 and if ObstacleChainPhase "Pipes2" < 4 and if RigidAnimFrame "form_2_c_1" == 1 and if CameraYRot > 240 and if CameraYRot < 355 goto Phase2_GoToPlatform2 if CurrentLocatorIs "platform3" == 0 and if ObstacleChainPhase "Pipes3" < 4 and if RigidAnimFrame "form_3_c_1" == 1 and if CameraYRot > 130 and if CameraYRot < 230 goto Phase2_GoToPlatform3 } Actions { UseForce "throwable" "name=throw_object1" FacePlayer "3" SetState "Phase2_ChuckStuffFromPlatform1" } } state Phase2_Recover1 { Conditions { } Actions { SetLocator "name=Recover1" BigJumpToLocator SetDefensive FacePlayer "1" SetState "Phase2_SelectNextPlatform" } } state Phase2_GoToPlatform2 { Conditions { } Actions { SetDefensive "FALSE" SetLocator "name=pipes2" BigJumpToLocator SetState "Phase2_OpenPlatform2" } } state Phase2_OpenPlatform2 { Conditions { if DoorOpened "platform2" == 1 goto Phase2_JumpToPlatform2 } Actions { UnlockDoor "platform2" OpenDoor "platform2" "stayopen" } } state Phase2_JumpToPlatform2 { Conditions { if ObstacleChainPhase "Pipes2" > 3 goto Phase2_StartRecover if RigidAnimFrame "form_2_c_1" > 30 goto Phase2_StartRecover } Actions { SetLocator "name=platform2" BigJumpToLocator SetHitPoints "1" SetState "Phase2_ChuckStuffFromPlatform2" } } state Phase2_ChuckStuffFromPlatform2 { Conditions { if Hitpoints == 0 goto Phase2_StartRecover if ObstacleChainPhase "Pipes2" > 3 goto Phase2_StartRecover if RigidAnimFrame "form_2_c_1" > 30 goto Phase2_StartRecover if CurrentLocatorIs "platform1" == 0 and if ObstacleChainPhase "Pipes1" < 4 and if RigidAnimFrame "form_1_c_1" == 1 and if CameraYRot > 0 and if CameraYRot < 120 goto Phase2_GoToPlatform1 if CurrentLocatorIs "platform2" == 0 and if ObstacleChainPhase "Pipes2" < 4 and if RigidAnimFrame "form_2_c_1" == 1 and if CameraYRot > 240 and if CameraYRot < 355 goto Phase2_GoToPlatform2 if CurrentLocatorIs "platform3" == 0 and if ObstacleChainPhase "Pipes3" < 4 and if RigidAnimFrame "form_3_c_1" == 1 and if CameraYRot > 130 and if CameraYRot < 230 goto Phase2_GoToPlatform3 } Actions { UseForce "throwable" "name=throw_object2" FacePlayer "3" SetState "Phase2_ChuckStuffFromPlatform2" } } state Phase2_Recover2 { Conditions { } Actions { SetLocator "name=Recover2" BigJumpToLocator SetDefensive FacePlayer "1" SetState "Phase2_SelectNextPlatform" } } state Phase2_GoToPlatform3 { Conditions { } Actions { SetDefensive "FALSE" SetLocator "name=pipes3" BigJumpToLocator SetState "Phase2_OpenPlatform3" } } state Phase2_OpenPlatform3 { Conditions { if DoorOpened "platform3" == 1 goto Phase2_JumpToPlatform3 } Actions { UnlockDoor "platform3" OpenDoor "platform3" "stayopen" } } state Phase2_JumpToPlatform3 { Conditions { if ObstacleChainPhase "Pipes3" > 3 goto Phase2_SelectNextPlatform if RigidAnimFrame "form_3_c_1" > 30 goto Phase2_SelectNextPlatform } Actions { SetLocator "name=platform3" BigJumpToLocator SetHitPoints "1" SetState "Phase2_ChuckStuffFromPlatform3" } } state Phase2_ChuckStuffFromPlatform3 { Conditions { if Hitpoints == 0 goto Phase2_StartRecover if ObstacleChainPhase "Pipes3" > 3 goto Phase2_SelectNextPlatform if RigidAnimFrame "form_3_c_1" > 30 goto Phase2_SelectNextPlatform if CurrentLocatorIs "platform1" == 0 and if ObstacleChainPhase "Pipes1" < 4 and if RigidAnimFrame "form_1_c_1" == 1 and if CameraYRot > 0 and if CameraYRot < 120 goto Phase2_GoToPlatform1 if CurrentLocatorIs "platform2" == 0 and if ObstacleChainPhase "Pipes2" < 4 and if RigidAnimFrame "form_2_c_1" == 1 and if CameraYRot > 240 and if CameraYRot < 355 goto Phase2_GoToPlatform2 if CurrentLocatorIs "platform3" == 0 and if ObstacleChainPhase "Pipes3" < 4 and if RigidAnimFrame "form_3_c_1" == 1 and if CameraYRot > 130 and if CameraYRot < 230 goto Phase2_GoToPlatform3 } Actions { UseForce "throwable" "name=throw_object3" FacePlayer "3" SetState "Phase2_ChuckStuffFromPlatform3" } } state Phase2_Recover3 { Conditions { } Actions { SetLocator "name=Recover3" BigJumpToLocator SetDefensive FacePlayer "1" SetState "Phase2_SelectNextPlatform" } } ///////////Phase3///////// state Phase3_Start { Conditions { } Actions { SetHitPoints "10" SetMessage "name=ShowHearts" "value=1" SetMessage "name=Stage" "value=3" } }