//CloudCityTrap_C //VaderPhaseC state Base { Conditions { if Message "VaderPhaseC" == 0 goto Phase0_Start if Message "VaderPhaseC" == 1 goto Phase1_Start if Message "VaderPhaseC" == 2 goto Phase2_SnapToStart if Message "VaderPhaseC" == 3 goto Phase3_SnapToStart if Message "VaderPhaseC" == 4 goto Phase4_SnapToStart if Message "VaderPhaseC" == 14 goto Phase14_SnapToEnd //Phase 5, 6, 7, 8, 9, 10, 11, 12, 13 if AlwaysTrue == 1 goto MainEncounter_SnapToStart } Actions { SetBoss DontPush SetDefensive PrefersPlayers SetHitPoints "10" SetMessage "name=ShowHearts" "value=0" SetMessage "name=SpawnCTroopers" "value=0" } } ///Phase 0 state Phase0_Start { Conditions { } Actions { SetState "Phase0_Wait" } } state Phase0_Wait { Conditions { if NearestPartyXZRange < 1.5 goto Phase0_Flee if BeenHit == 1 goto Phase0_Flee if PlayerInTriggerArea "Vader_Fight" == 1 goto MainEncounter_SnapToStart } Actions { FacePlayer } } state Phase0_Flee { Conditions { } Actions { GoToLocator "name" "Vader1_1" "xz_rangecheck" SetMessage "name=VaderPhaseC" "value=1" SetState "Phase1_Wait" } } ///Phase 1 state Phase1_Start { Conditions { } Actions { SetMessage "name=VaderPhaseC" "value=1" SetState "Phase1_Wait" } } state Phase1_Wait { Conditions { if NearestPartyXZRange < 1.5 goto Phase1_Flee if BeenHit == 1 goto Phase1_Flee if PlayerInTriggerArea "Vader_Fight" == 1 goto MainEncounter_SnapToStart } Actions { FacePlayer } } state Phase1_Flee { Conditions { } Actions { GoToLocator "name" "Vader1_1" "xz_rangecheck" BigJumpToLocator "name=Vader1_2" Idle "0.5" BigJumpToLocator "name=Vader2_1" SetMessage "name=VaderPhaseC" "value=2" SetState "Phase2_Wait" } } ///Phase 2 state Phase2_SnapToStart { Conditions { } Actions { SnapToLocator "name=Vader2_1" SetState "Phase2_Wait" } } state Phase2_Wait { Conditions { if NearestPartyXZRange < 1 goto Phase2_Flee if BeenHit == 1 goto Phase2_Flee if PlayerInTriggerArea "Vader_Fight" == 1 goto MainEncounter_SnapToStart } Actions { FacePlayer } } state Phase2_Flee { Conditions { } Actions { BigJumpToLocator "name=Vader3_1" SetMessage "name=VaderPhaseC" "value=3" SetState "Phase3_Wait" } } ///Phase 3 state Phase3_SnapToStart { Conditions { } Actions { SnapToLocator "name=Vader3_1" SetState "Phase3_Wait" } } state Phase3_Wait { Conditions { if NearestPartyRange < 1.5 goto Phase3_Flee if BeenHit == 1 goto Phase3_Flee if PlayerInTriggerArea "Vader_Fight" == 1 goto MainEncounter_SnapToStart } Actions { FacePlayer } } state Phase3_Flee { Conditions { } Actions { GoToLocator "name" "Vader3_2" "xz_rangecheck" BigJumpToLocator "name=Vader4_1" SetMessage "name=VaderPhaseC" "value=4" SetState "Phase4_Wait" } } ///Phase 4 state Phase4_SnapToStart { Conditions { } Actions { SnapToLocator "name=Vader4_1" SetState "Phase4_Wait" } } state Phase4_Wait { Conditions { if ObstacleAtStart "lift_stop2" == 0 and if NearestPartyRange < 1 goto Phase4_Flee if BeenHit == 1 goto Phase4_Flee if PlayerInTriggerArea "Vader_Fight" == 1 goto MainEncounter_SnapToStart } Actions { FacePlayer } } state Phase4_Flee { Conditions { } Actions { GoToLocator "name" "Vader4_2" "xz_rangecheck" SetMessage "name=VaderPhaseC" "value=5" SetState "MainEncounter_SnapToStart" } } //Fighting phase ///Phase 5,6,7,8,9,10,11,12 //Phase 5 = fight //Phase 6 = steam vent left //Phase 7 = fight //Phase 8 = steam vent right //Phase 9 = fight //Phase 10 = steam vent left //Phase 11 = fight //Phase 12 = steam vent right state MainEncounter_SnapToStart { Conditions { if ScreenWipe == 0 and if PlayerInTriggerArea "Vader_Fight" == 1 goto MainEncounter_GoToPhase } Actions { KeepWeaponOut SetLocator "name=Vader5_1" SetDoomedEscapeLocator "name=Vader5_1" SnapToLocator SetMessage "name=ShowHearts" "value=0" SetMessage "name=VaderPhaseC" "value=5" SetMessage "name=SpawnCTroopers" "value=0" FacePlayer } } state MainEncounter_GoToPhase { Conditions { if Message "VaderPhaseC" == 5 goto MainEncounter_Fight if Message "VaderPhaseC" == 6 goto MainEncounter_JumpVentLeft if Message "VaderPhaseC" == 7 goto MainEncounter_Fight if Message "VaderPhaseC" == 8 goto MainEncounter_JumpVentRight if Message "VaderPhaseC" == 9 goto MainEncounter_Fight if Message "VaderPhaseC" == 10 goto MainEncounter_JumpVentLeft if Message "VaderPhaseC" == 11 goto MainEncounter_Fight if Message "VaderPhaseC" == 12 goto MainEncounter_JumpVentRight if Message "VaderPhaseC" == 13 goto MainEncounter_Fight if Message "VaderPhaseC" == 14 goto Phase14_Flee } Actions { } } state MainEncounter_SetNextPhase { Conditions { } Actions { SetMessage "name=VaderPhaseC" "increment=1" SetState "MainEncounter_GoToPhase" } } state MainEncounter_Fight { Conditions { if PlayerInTriggerArea "Vader_Fight" == 0 goto MainEncounter_SnapToStart if Message "VaderPhaseC" == 5 and if HitPoints < 9 goto MainEncounter_SetNextPhase if Message "VaderPhaseC" == 7 and if HitPoints < 7 goto MainEncounter_SetNextPhase if Message "VaderPhaseC" == 9 and if HitPoints < 5 goto MainEncounter_SetNextPhase if Message "VaderPhaseC" == 11 and if HitPoints < 3 goto MainEncounter_SetNextPhase if Message "VaderPhaseC" == 13 and if HitPoints < 1 goto MainEncounter_SetNextPhase } Actions { SetMessage "name=ShowHearts" "value=1" SetInvulnerable "FALSE" DontPush "FALSE" SetLocator "name=Vader5_1" SetDoomedEscapeLocator "name=Vader5_1" BigJumpToLocator AttackOpponent "range 0.5" } } /// state MainEncounter_JumpVentLeft { Conditions { if PlayerInTriggerArea "Vader_Fight" == 0 goto MainEncounter_SnapToStart } Actions { CameraCut "use_current_campos" "tgt_character=myself" "FollowTgt" "blend_in_time=0.5" "blend_out_time=0.5" "end_time=2" "no_borders" SetMessage "name=ShowHearts" "value=1" SetInvulnerable DontPush SetLocator "name=Vader5_2A" BigJumpToLocator FaceCamera "1" SetMessage "name=SpawnCTroopers" "value=1" SetState "MainEncounter_WaitVentLeft" } } state MainEncounter_WaitVentLeft { Conditions { if EitherPlayerInTriggerArea "VaderSteam" == 1 goto MainEncounter_PlayerReachedVader if PlayerInTriggerArea "Vader_Fight" == 0 goto MainEncounter_SnapToStart if ObstacleChainPhase "steam_1" == 2 goto MainEncounter_DamagedBySteam } Actions { FaceCamera } } /// state MainEncounter_JumpVentRight { Conditions { if PlayerInTriggerArea "Vader_Fight" == 0 goto MainEncounter_SnapToStart } Actions { CameraCut "use_current_campos" "tgt_character=myself" "FollowTgt" "blend_in_time=0.5" "blend_out_time=0.5" "end_time=2" "no_borders" SetMessage "name=ShowHearts" "value=1" SetInvulnerable DontPush SetLocator "name=Vader5_2B" BigJumpToLocator FaceCamera "1" SetMessage "name=SpawnCTroopers" "value=1" SetState "MainEncounter_WaitVentRight" } } state MainEncounter_WaitVentRight { Conditions { if EitherPlayerInTriggerArea "VaderSteam" == 1 goto MainEncounter_PlayerReachedVader if PlayerInTriggerArea "Vader_Fight" == 0 goto MainEncounter_SnapToStart if ObstacleChainPhase "steam_2" == 2 goto MainEncounter_DamagedBySteam } Actions { FaceCamera } } /// state MainEncounter_DamagedBySteam { Conditions { } Actions { SetMessage "name=SpawnCTroopers" "value=3" CameraCut "use_current_campos" "tgt_character=myself" "FollowTgt" "blend_in_time=0.5" "blend_out_time=0.5" "end_time=3" "no_borders" SnapWeaponOut "FALSE" SetDefensive "FALSE" OverrideAnimation "from=All" "to=cough" FaceCamera "2" SetDefensive OverrideAnimation "reset" SetState "MainEncounter_SetNextPhase" } } state MainEncounter_PlayerReachedVader { Conditions { } Actions { SetMessage "name=SpawnCTroopers" "value=3" SetState "MainEncounter_SetNextPhase" } } ///Phase 14 state Phase14_Flee { Conditions { } Actions { SetMessage "name=VaderPhaseC" "value=14" SetMessage "name=ShowHearts" "value=0" CameraCut "use_current_campos" "tgt_character=myself" "FollowTgt" "blend_in_time=0.5" "blend_out_time=0.5" "end_time=10" "no_borders" SetLocator "name=Vader5_1" BigJumpToLocator OpenDoor "door_out" GoToLocator "name" "Vader6_1" "xz_rangecheck" EndCameraCut "blend_out_time=0.5" "end_time=0.5" "no_borders" Idle "0.5" SetState "Phase14_SnapToEnd" } } state Phase14_SnapToEnd { Conditions { } Actions { Kill } }