state Base { Conditions { } Actions { SetBoss NoLosCheck CanSeeBehind SetViewDistance "99" SetMinViewHeight "-99" SetMaxViewHeight "99" SetDefensive KeepWeaponOut PrefersPlayers SetDoomedEscapeLocator "name=Recover3" SetState "Phase1_Start" } } //First go in the room, he should have 10 health. You fight him until this is depleted (he should do his super-jump at several intervals). //There should be no crazy steam pipes for you to break. //Once you have got his health down, he re-forms the pipes into platforms and the section plays out as it does now. //Once you have destroyed the three platforms, he should get his ten health back again and begin his final attack, like he does now. ///////////Phase1///////// state Phase1_Start { Conditions { if NearestPlayerRange < 0.5 goto Phase1_StartRecover } Actions { SetHitPoints "10" SetMessage "name=ShowHearts" "value=1" Idle "2" SetState "Phase1_Attack" } } state Phase1_Attack { Conditions { if HitPoints < 5 goto Phase2_Start if BeenHit == 1 and if HitPoints == 8 goto Phase1_StartRecover if BeenHit == 1 and if HitPoints == 6 goto Phase1_StartRecover } Actions { AttackOpponent "range 0.5" } } state Phase1_StartRecover { Conditions { if InTriggerArea "Top_Right" == 1 goto Phase1_GoToBottomLeft if InTriggerArea "Top_Left" == 1 goto Phase1_GoToBottomRight if InTriggerArea "Bottom_Right" == 1 goto Phase1_GoToTopLeft if InTriggerArea "Bottom_Left" == 1 goto Phase1_GoToTopRight if PreviousResult == 0 goto Phase1_GoToTopRight } Actions { SetInvulnerable } } state Phase1_GoToBottomLeft { Conditions { } Actions { SetLocator "name=Bottom_Left" SetState "Phase1_GoToRecover" } } state Phase1_GoToBottomRight { Conditions { } Actions { SetLocator "name=Bottom_Right" SetState "Phase1_GoToRecover" } } state Phase1_GoToTopLeft { Conditions { } Actions { SetLocator "name=Top_Left" SetState "Phase1_GoToRecover" } } state Phase1_GoToTopRight { Conditions { } Actions { SetLocator "name=Top_Right" SetState "Phase1_GoToRecover" } } state Phase1_GoToRecover { Conditions { } Actions { BigJumpToLocator SetState "Phase1_Recover" } } state Phase1_Recover { Conditions { if NearestPlayerRange < 1.5 goto Phase1_RecoveryComplete } Actions { FacePlayer "2" SetState "Phase1_RecoveryComplete" } } state Phase1_RecoveryComplete { Conditions { } Actions { BigJump "tgt_character=player" SetInvulnerable "FALSE" SetState "Phase1_Attack" } } ///////////Phase2///////// state Phase2_Start { Conditions { } Actions { DontUseShadowTerrain SetHitPoints "4" "dont_set_max" SetInvulnerable "TRUE" "still_do_take_hit_anim" SetDefensive "FALSE" DontPush SetMessage "name=ShowHearts" "value=0" SetState "Phase2_SelectNextPlatform" } } state Phase2_SelectNextPlatform { Conditions { if ObstacleChainPhase "platform1" == 1 goto Phase2_GoToPlatform1 if ObstacleChainPhase "platform2" == 1 goto Phase2_GoToPlatform2 if ObstacleChainPhase "platform3" == 1 goto Phase2_GoToPlatform3 if PreviousResult > 1 goto Phase3_Start } Actions { SetDefensive FacePlayer } } state Phase2_GoToPlatform1 { Conditions { if DoorOpened "platform1" == 1 goto Phase2_JumpToPlatform1 } Actions { SetDefensive "FALSE" SetLocator "name=pipes1" CameraCut "use_current_campos" "tgt_character=AI_MAUL" "FollowTgt" "blend_in_time=0.5" "end_time=infinite" "no_borders" BigJumpToLocator UnlockDoor "platform1" OpenDoor "platform1" "stayopen" } } state Phase2_JumpToPlatform1 { Conditions { if ObstacleChainPhase "platform1" > 2 goto Phase2_SelectNextPlatform } Actions { SetLocator "name=platform1" BigJumpToLocator CameraCut "use_current_campos" "tgt_character=AI_MAUL" "FollowTgt" "blend_in_time=0.5" "end_time=2" "no_borders" SetState "Phase2_WaitForMiniCutEnd1" } } state Phase2_WaitForMiniCutEnd1 { Conditions { if InMiniCut == 0 goto Phase2_ChuckStuffFromPlatform1 } Actions { FacePlayer } } state Phase2_GoToPlatform2 { Conditions { if DoorOpened "platform2" == 1 goto Phase2_JumpToPlatform2 } Actions { SetDefensive "FALSE" SetLocator "name=pipes2" CameraCut "use_current_campos" "tgt_character=AI_MAUL" "FollowTgt" "blend_in_time=0.5" "end_time=infinite" "no_borders" BigJumpToLocator UnlockDoor "platform2" OpenDoor "platform2" "stayopen" } } state Phase2_JumpToPlatform2 { Conditions { if ObstacleChainPhase "platform2" > 2 goto Phase2_SelectNextPlatform } Actions { SetLocator "name=platform2" BigJumpToLocator CameraCut "use_current_campos" "tgt_character=AI_MAUL" "FollowTgt" "blend_in_time=0.5" "end_time=2" "no_borders" SetState "Phase2_WaitForMiniCutEnd2" } } state Phase2_WaitForMiniCutEnd2 { Conditions { if InMiniCut == 0 goto Phase2_ChuckStuffFromPlatform2 } Actions { FacePlayer } } state Phase2_GoToPlatform3 { Conditions { if DoorOpened "platform3" == 1 goto Phase2_JumpToPlatform3 } Actions { SetDefensive "FALSE" SetLocator "name=pipes3" CameraCut "use_current_campos" "tgt_character=AI_MAUL" "FollowTgt" "blend_in_time=0.5" "end_time=infinite" "no_borders" BigJumpToLocator UnlockDoor "platform3" OpenDoor "platform3" "stayopen" } } state Phase2_JumpToPlatform3 { Conditions { if ObstacleChainPhase "platform3" > 2 goto Phase2_SelectNextPlatform } Actions { SetLocator "name=platform3" BigJumpToLocator CameraCut "use_current_campos" "tgt_character=AI_MAUL" "FollowTgt" "blend_in_time=0.5" "end_time=2" "no_borders" SetState "Phase2_WaitForMiniCutEnd3" } } state Phase2_WaitForMiniCutEnd3 { Conditions { if InMiniCut == 0 goto Phase2_ChuckStuffFromPlatform3 } Actions { FacePlayer } } state Phase2_ChuckStuffFromPlatform1 { Conditions { if BeenHit == 1 goto Phase2_SelectNextPlatform //See if current platform is being or has been messed with by the player if CurrentLocatorIs "platform1" == 1 and if ObstacleChainPhase "platform1" > 2 goto Phase2_SelectNextPlatform if CurrentLocatorIs "platform1" == 1 and if RigidAnimFrame "form_1_c_1" > 30 goto Phase2_SelectNextPlatform } Actions { UseForce "throwable" "name=throw_object1" "name=throw_object2" "name=throw_object3 FacePlayer "3" SetState "Phase2_ChuckStuffFromPlatform1" } } state Phase2_ChuckStuffFromPlatform2 { Conditions { if BeenHit == 1 goto Phase2_SelectNextPlatform //See if current platform is being or has been messed with by the player if CurrentLocatorIs "platform2" == 1 and if ObstacleChainPhase "platform2" > 2 goto Phase2_SelectNextPlatform if CurrentLocatorIs "platform2" == 1 and if RigidAnimFrame "form_2_c_1" > 30 goto Phase2_SelectNextPlatform } Actions { UseForce "throwable" "name=throw_object1" "name=throw_object2" "name=throw_object3 FacePlayer "3" SetState "Phase2_ChuckStuffFromPlatform2" } } state Phase2_ChuckStuffFromPlatform3 { Conditions { if BeenHit == 1 goto Phase2_SelectNextPlatform //See if current platform is being or has been messed with by the player if CurrentLocatorIs "platform3" == 1 and if ObstacleChainPhase "platform3" > 2 goto Phase2_SelectNextPlatform if CurrentLocatorIs "platform3" == 1 and if RigidAnimFrame "form_3_c_1" > 30 goto Phase2_SelectNextPlatform } Actions { UseForce "throwable" "name=throw_object1" "name=throw_object2" "name=throw_object3 FacePlayer "3" SetState "Phase2_ChuckStuffFromPlatform3" } } ///////////Phase3///////// state Phase3_Start { Conditions { } Actions { DontUseShadowTerrain "FALSE" SetInvulnerable SetMessage "name=ShowHearts" "value=1" SetMessage "name=Stage" "value=3" SetState "Phase3_NormalAttack" } } state Phase3_NormalAttack { Conditions { if Timer > 5 and if HitPoints == 1 goto Phase3_ForceAttackObiWan if Timer > 5 goto Phase3_StartForceAttack } Actions { ResetTimer SetDefensive SetInvulnerable AttackOpponent "range 0.5" } } state Phase3_StartForceAttack { Conditions { if UsingForceFreeze == 0 goto Phase3_NormalAttack if UsingForceFreeze == 2 goto Phase3_UsingForceFreeze } Actions { SetDefensive "FALSE" ForceFreeze } } state Phase3_ForceAttackObiWan { Conditions { if FreePlay == 1 goto Phase3_FinalForceAttackFreeplay if HitPoints == 0 goto FightOver if UsingForceFreeze == 0 goto Phase3_NormalAttack if UsingForceFreeze == 2 goto Phase3_UsingForceFreeze } Actions { SetDefensive "FALSE" ForceFreeze "character=ObiWanKenobi" } } state Phase3_FinalForceAttackFreeplay { Conditions { if HitPoints == 0 goto FightOver if UsingForceFreeze == 0 goto Phase3_NormalAttack if UsingForceFreeze == 2 goto Phase3_UsingForceFreeze } Actions { SetDefensive "FALSE" ForceFreeze } } state Phase3_UsingForceFreeze { Conditions { if UsingForceFreeze == 0 goto Phase3_NormalAttack } Actions { SetInvulnerable "FALSE" MoveAwayFromOpponent "0.75" "face" } } state FightOver { Conditions { } Actions { CameraCut "use_current_campos" "tgt_character=AI_MAUL" "FollowTgt" "blend_in_time=0.5" "end_time=infinite" "no_borders" FacePlayer } }