-
Notifications
You must be signed in to change notification settings - Fork 0
/
banshee.go
38 lines (32 loc) · 844 Bytes
/
banshee.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
package micro
import (
"bitbucket.org/aisee/veterran/bot"
"github.com/aiseeq/s2l/lib/scl"
"github.com/aiseeq/s2l/protocol/enums/ability"
"github.com/aiseeq/s2l/protocol/enums/buff"
)
func BansheeRetreat(u *scl.Unit) bool {
if (u.Hits < u.HitsMax/2) || u.HasBuff(buff.RavenScramblerMissile) || u.HasBuff(buff.LockOn) {
B.Groups.Add(bot.MechRetreat, u)
return true
}
return false
}
func BansheesAttack(u *scl.Unit) bool {
if Targets.All.Exists() {
u.Attack(Targets.ArmedGround, Targets.Ground)
return true
}
return false
}
func BansheesLogic(us scl.Units) {
if us.Empty() {
return
}
for _, u := range us {
if u.HPS > 0 && u.HasAbility(ability.Behavior_CloakOn_Banshee) {
u.Command(ability.Behavior_CloakOn_Banshee)
}
_ = BansheeRetreat(u) || DefaultManeuver(u) || BansheesAttack(u) || DefaultExplore(u)
}
}