private bool FilterJamTargets(GenericShip ship) { if (ship.Owner.PlayerNo == Selection.ThisShip.Owner.PlayerNo) { return(false); } if (ship.Tokens.HasToken(typeof(JamToken))) { return(false); } BoardTools.DistanceInfo distanceInfo = new BoardTools.DistanceInfo(Selection.ThisShip, ship); if (distanceInfo.Range <= 1) { return(true); } BoardTools.ShotInfo shotInfo = new BoardTools.ShotInfo(Selection.ThisShip, ship, Selection.ThisShip.PrimaryWeapons); if (shotInfo.Range <= 2 && shotInfo.InPrimaryArc) { return(true); } return(false); }
private bool FilterJamTargets(GenericShip ship) { if (ship.Owner.PlayerNo == Selection.ThisShip.Owner.PlayerNo) { return(false); } bool result = false; if (Rules.Jam.JamIsAllowed(Selection.ThisShip, ship)) { result = true; } if (Edition.Current is Editions.FirstEdition) { if (ship.Tokens.HasToken(typeof(JamToken))) { return(false); } BoardTools.ShotInfo shotInfo = new BoardTools.ShotInfo(Selection.ThisShip, ship, Selection.ThisShip.PrimaryWeapons); if (shotInfo.Range <= 2 && shotInfo.InPrimaryArc) { return(true); } } return(result); }
protected virtual bool AbilityCanBeUsed() { if (!Combat.ShotInfo.InArc) { return(false); } BoardTools.ShotInfo reverseShotInfo = new BoardTools.ShotInfo(Combat.Defender, Combat.Attacker, Combat.Defender.PrimaryWeapons); if (reverseShotInfo.InArc) { return(false); } return(true); }
protected override bool AbilityCanBeUsed() { if (!Combat.ShotInfo.InArcByType(Arcs.ArcType.Front)) { return(false); } BoardTools.ShotInfo reverseShotInfo = new BoardTools.ShotInfo(Combat.Defender, Combat.Attacker, Combat.Defender.PrimaryWeapons); if (reverseShotInfo.InArc) { return(false); } return(true); }
private int AiPriority(GenericShip ship) { int priority = 0; if (!ship.Tokens.HasToken(typeof(BlueTargetLockToken))) { priority += 50; } BoardTools.ShotInfo shotInfo = new BoardTools.ShotInfo(ship, LockedShip, ship.PrimaryWeapons); if (shotInfo.IsShotAvailable) { priority += 40; } priority += ship.State.Firepower * 5; return(priority); }