-
Notifications
You must be signed in to change notification settings - Fork 0
/
thor.go
42 lines (37 loc) · 987 Bytes
/
thor.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package micro
import (
"bitbucket.org/aisee/veterran/bot"
"github.com/aiseeq/s2l/lib/scl"
"github.com/aiseeq/s2l/protocol/enums/ability"
)
func ThorRetreat(u *scl.Unit) bool {
if DefaultRetreat(u) {
if med := B.Groups.Get(bot.Medivacs).Units.ClosestTo(u); med != nil {
B.Groups.Add(bot.ThorEvacs, med)
if med.HasAbility(ability.Effect_MedivacIgniteAfterburners) {
med.Command(ability.Effect_MedivacIgniteAfterburners)
}
}
return true
}
return false
}
func ThorMorph(u *scl.Unit) bool {
if u.HasAbility(ability.Morph_ThorHighImpactMode) {
u.Command(ability.Morph_ThorHighImpactMode)
return true
}
return false
}
func ThorAttack(u *scl.Unit) bool {
if Targets.All.Exists() {
u.Attack(Targets.ArmedFlying, Targets.ArmedGround, Targets.Flying, Targets.Ground)
return true
}
return false
}
func ThorsLogic(us scl.Units) {
for _, u := range us {
_ = ThorRetreat(u) || DefaultManeuver(u) || ThorMorph(u) || ThorAttack(u) || DefaultExplore(u)
}
}