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

            return base.GetSelectionShares(collector);
        }
Exemple #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;
        }
Exemple #3
0
 public static float GetMaximumRange(Actor self)
 {
     return new[] { self.GetPrimaryWeapon(), self.GetSecondaryWeapon() }
         .Where(w => w != null).Max(w => w.Range);
 }
Exemple #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)));
        }