#--------------------------------------------- # Start state #--------------------------------------------- state Base { Conditions { if LevelValue "Stat" != 0 goto Activate } Actions { Disable NoRingSeg } } #--------------------------------------------- # Activates the character #--------------------------------------------- state Activate { Conditions { if LevelValue "Stat" == 0 goto Base if LevelValue "Stat" == 1 goto DefendStatueMain if LevelValue "Stat" > 1 goto Fly } Actions { Enable } } #--------------------------------------------- # Defends the statue #--------------------------------------------- state DefendStatueMain { Conditions { if LevelValue "Stat" != 1 goto Activate if GotOpponent == 1.0 and if BossOpponentRange < 12.0 goto DefendStatueCombatReady } Actions { SetLevelValue "type Face" "value -1.0" } } #--------------------------------------------- # Wakes up ready for combat #--------------------------------------------- state DefendStatueCombatReady { Conditions { if LevelValue "Stat" != 1 goto Activate if GotOpponent == 0.0 goto DefendStatueMain if BossOpponentRange > 12.0 goto DefendStatueMain if BossOpponentRange > 2.0 and if Timer > 7.0 goto DefendThrowRock if BossOpponentRange < 2.0 and if Timer > 1.0 and if LevelValue "CanH" == 1.0 and if Random > 0.3 goto DefendAttack if BossOpponentRange < 2.0 and if Timer > 1.0 goto DefendGrab } Actions { ResetTimer SetLevelValue "type FOpp" "value 1.0" } } #--------------------------------------------- # Does the attack for Defending the statue #--------------------------------------------- state DefendAttack { Conditions { if LevelValue "Stat" != 1 goto Activate if Timer > 0.5 goto DefendStatueCombatReady } Actions { ResetTimer PressActionButton } } #--------------------------------------------- # Triggers the grab animation #--------------------------------------------- state DefendGrab { Conditions { if LevelValue "Stat" != 1 goto Activate } Actions { PressSpecialButton SetState "DefendGrabWait" } } #--------------------------------------------- # Waits for the wraith to be facing the # correct direction before throwing #--------------------------------------------- state DefendGrabWait { Conditions { if LevelValue "Stat" != 1 goto Activate if LevelValue "Grab" == 0 and if Timer > 0.1 goto DefendStatueCombatReady } Actions { ResetTimer SetLevelValue "type Face" "value -1.0" } } #--------------------------------------------- # Throws a rock at the opponent #--------------------------------------------- state DefendThrowRock { Conditions { if LevelValue "Stat" != 1 goto Activate } Actions { PressTagButton Idle "mintime 1.0" "maxtime 2.0" SetState "DefendStatueCombatReady" } } #--------------------------------------------- # Throws a rock at the Brazier #--------------------------------------------- state DefendPutOutBrazier { Conditions { if LevelValue "Stat" != 1 goto Activate } Actions { SetLevelValue "type TarB" "value 0.0" PressTagButton Idle "mintime 1.0" "maxtime 2.0" SetState "DefendStatueCombatReady" } } #--------------------------------------------- # Throws a rock at the player #--------------------------------------------- state StopPlayerWithRock { Conditions { if LevelValue "Stat" != 1 goto Activate } Actions { SetLevelValue "type TarP" "value 0.0" PressTagButton Idle "mintime 1.0" "maxtime 2.0" SetState "DefendStatueCombatReady" } } #--------------------------------------------- # Lets the level code do the flying #--------------------------------------------- state Fly { Conditions { if LevelValue "Stat" < 2 goto Activate } Actions { Idle "mintime 7.0" "maxtime 15.0" #SetState "FlyThrow" } } #--------------------------------------------- # Throws while flying #--------------------------------------------- state FlyThrow { Conditions { if LevelValue "Stat" < 2 goto Activate if Timer > 2.0 goto Fly } Actions { ResetTimer PressActionButton } }