public override int GetSelectionShares(Actor collector)
        {
            if (collector.GetPrimaryWeapon() == null && collector.GetSecondaryWeapon() == null)
                return 0;

            return base.GetSelectionShares(collector);
        }
Esempio n. 2
0
        public AttackBase(Actor self)
        {
            var primaryWeapon = self.GetPrimaryWeapon();
            var secondaryWeapon = self.GetSecondaryWeapon();

            primaryBurst = primaryWeapon != null ? primaryWeapon.Burst : 1;
            secondaryBurst = secondaryWeapon != null ? secondaryWeapon.Burst : 1;
        }
Esempio n. 3
0
 public static float GetMaximumRange(Actor self)
 {
     return new[] { self.GetPrimaryWeapon(), self.GetSecondaryWeapon() }
         .Where(w => w != null).Max(w => w.Range);
 }
Esempio n. 4
0
        protected virtual void QueueAttack(Actor self, Order order)
        {
            /* todo: choose the appropriate weapon, when only one works against this target */
            var weapon = self.GetPrimaryWeapon() ?? self.GetSecondaryWeapon();

            self.QueueActivity(new Activities.Attack(order.TargetActor,
                    Math.Max(0, (int)weapon.Range)));
        }