public override bool IsUsed(UnitStratey obj)
 {
     return obj.Target is IAttacker && obj.EnemiesAround.Any() && obj.MakeAttackSense;
 }
 public override void Process(UnitStratey obj)
 {
     obj.PreferedVictim = GetPreferedVictim(obj.EnemiesAround);
 }
 public override void Process(UnitStratey obj)
 {
     obj.EnemiesAround = GetEnemiesAround(GetEnemySignaturesAround(obj.Target)).ToList();
 }
 public override bool IsUsed(UnitStratey obj)
 {
     return obj.Target is IAttacker;
 }
 private bool GetMakeAttackSense(IList<EnemyAround> enemiesAround, UnitStratey strategy)
 {
     return GetEnemyUnitSignatureHealth(enemiesAround) <= GetOwnUnitsHealth(enemiesAround, strategy.Target);
 }
 public override void Process(UnitStratey obj)
 {
     obj.MakeAttackSense = GetMakeAttackSense(obj.EnemiesAround, obj);
 }
Beispiel #7
0
 private UnitAttacksEvent GetUnitAttacksEvent(UnitStratey unitStratey)
 {
     return new UnitAttacksEvent(_ai.Id, unitStratey.Target.Id, unitStratey.PreferedVictim.UnitSignature.Id);
 }