示例#1
0
        private int DetermineAtksNotShotFromMisfire(IGunStatus gun,
                                                    int numExpectedAttacks,
                                                    int attackNum)
        {
            int ret = 0;

            if (usedMfReactionThisTurn || !gun.CanFire())
            {
                if (attackNum == numExpectedAttacks)
                {
                    /* If attackNum is our max, but we can't fire, then it misfired/broke on the last shot */
                    ret = 1;
                }
                else
                {
                    /* we do numAttacks-1 because we always increment at the end of the first loop;
                     * i.e. if we misfire on first attack, numAttacks == 1, but that should count
                     * for a loss. */
                    ret = numExpectedAttacks - (attackNum - 1);
                }
            }

            usedMfReactionThisTurn = false;
            return(ret);
        }
示例#2
0
 private void HandleMisfireWithReaction(IGunStatus gun)
 {
     if (HasMisfireReaction &&
         gun.Status == GunFiringStatus.Misfired)
     {
         HasMisfireReaction     = false;
         usedMfReactionThisTurn = true;
         gun.FixMisfire(PlayerBase.Proficiency);
     }
 }
示例#3
0
        public bool SwapOffHand()
        {
            ValidateSwapOffHand();

            IGunStatus nextOh = GetNextOffHand();

            CurrentOffHand = nextOh;

            return(nextOh != null);
        }
示例#4
0
 private void MultipleFire(IEnemy enemy, CombatStats combatStats, IGunStatus status, int numClips)
 {
     for (int i = 0; i < numClips; i++)
     {
         while (status.HasShotLoaded())
         {
             status.Shoot(enemy, combatStats);
         }
         status.ReloadChamber();
     }
 }
示例#5
0
 public bool Equals(IGunStatus other)
 {
     return(other != null &&
            UniqueId == other.UniqueId);
 }
示例#6
0
 protected bool IsMisfired(IGunStatus gun)
 {
     return(gun.Status == GunFiringStatus.Misfired);
 }
示例#7
0
 protected bool IsBroken(IGunStatus gun)
 {
     return(gun.Status == GunFiringStatus.Broken);
 }
示例#8
0
 public bool Equals(IGunStatus other)
 {
     throw new NotImplementedException();
 }