private void CheckAbility() { if (Combat.Defender.Owner.PlayerNo != HostShip.Owner.PlayerNo) { return; } DistanceInfo distInfo = new DistanceInfo(HostShip, Combat.Defender); if (distInfo.Range > 3) { return; } BombsAndMinesInRangeCount = 0; foreach (var bombHolder in BombsManager.GetBombsOnBoard().Where(n => n.Value.HostShip.Owner.PlayerNo == HostShip.Owner.PlayerNo)) { //January 2020 errata: This ability now only works with bombs if (bombHolder.Value.UpgradeInfo.SubType != UpgradeSubType.Bomb) { break; } if (BombsManager.IsShipInRange(Combat.Defender, bombHolder.Key, 1)) { BombsAndMinesInRangeCount++; break; } } if (BombsAndMinesInRangeCount > 0) { RegisterAbilityTrigger(TriggerTypes.OnDefenseStart, AskToAddExtraDice); } }
private void CheckCatAbility(ref int count) { if (Combat.ChosenWeapon.WeaponType == WeaponTypes.PrimaryWeapon) { foreach (var bombHolder in BombsManager.GetBombsOnBoard()) { if (bombHolder.Value.HostShip.Owner.PlayerNo == HostShip.Owner.PlayerNo && BombsManager.IsShipInRange(Combat.Defender, bombHolder.Key, 1)) { Messages.ShowInfo(HostShip.PilotInfo.PilotName + " gains +1 attack die"); count++; return; } } } }