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); }
private void HandleMisfireWithReaction(IGunStatus gun) { if (HasMisfireReaction && gun.Status == GunFiringStatus.Misfired) { HasMisfireReaction = false; usedMfReactionThisTurn = true; gun.FixMisfire(PlayerBase.Proficiency); } }
public bool SwapOffHand() { ValidateSwapOffHand(); IGunStatus nextOh = GetNextOffHand(); CurrentOffHand = nextOh; return(nextOh != null); }
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(); } }
public bool Equals(IGunStatus other) { return(other != null && UniqueId == other.UniqueId); }
protected bool IsMisfired(IGunStatus gun) { return(gun.Status == GunFiringStatus.Misfired); }
protected bool IsBroken(IGunStatus gun) { return(gun.Status == GunFiringStatus.Broken); }
public bool Equals(IGunStatus other) { throw new NotImplementedException(); }