PARAM 0 AttackRange 6.0 DeriveFromScript { Script=DefeatMinion Source=Level } #--------------------------------------------- # Chooses the Attack #--------------------------------------------- state Attack { Conditions { if LevelValue "Stat" != 1 goto Control if OpponentRange < 3.5 goto AttackOppClose if PreviousResult < 4.2 goto AttackOppMid if PreviousResult > 5.5 goto AttackOppFar } Actions { } } #--------------------------------------------- # Attacks the opponent from a close range #--------------------------------------------- state AttackOppClose { Conditions { if LevelValue "Stat" != 1 goto Control if Timer > 2.0 goto Think } Actions { ResetTimer EngageOpponent "goalrange 1.0" "firerange 3.5" "instant" Idle "mintime 3.0" "maxtime 3.0" } } #--------------------------------------------- # Attacks the opponent from a middle range #--------------------------------------------- state AttackOppMid { Conditions { if LevelValue "Stat" != 1 goto Control } Actions { FaceOpponent "0.5" SetActionValue "value 2" "waitcontextfree" WaitActionFinished Idle "mintime 1.0" "maxtime 2.0" SetState "Think" } } #--------------------------------------------- # Attacks the opponent from a far range #--------------------------------------------- state AttackOppFar { Conditions { if LevelValue "Stat" != 1 goto Control } Actions { FaceOpponent "1.0" SetActionValue "value 3" "waitcontextfree" WaitActionFinished Idle "mintime 1.0" "maxtime 2.0" SetState "Think" } }