Пример #1
0
 private bool IsAvailable()
 {
     return(Combat.AttackStep == CombatStep.Defence &&
            Combat.Defender.Owner == HostShip.Owner &&
            Combat.CurrentDiceRoll.Blanks > 0 &&
            HostShip.SectorsInfo.IsShipInSector(Combat.Attacker, Arcs.ArcType.Bullseye) &&
            HostShip.GetRangeToShip(Combat.Defender) < 3);
 }
Пример #2
0
        private void CheckDookuAbility()
        {
            GenericShip targetShip = null;

            if (Combat.AttackStep == CombatStep.Attack)
            {
                targetShip = Combat.Attacker;
            }
            else if (Combat.AttackStep == CombatStep.Defence)
            {
                targetShip = Combat.Defender;
            }

            if (targetShip != null && HostShip.GetRangeToShip(targetShip) <= 2 && HostShip.State.Force == HostShip.State.MaxForce)
            {
                RegisterAbilityTrigger(TriggerTypes.OnDiceAboutToBeRolled, StartQuestionSubphase);
                TargetShip = targetShip;
            }
        }
Пример #3
0
        private void ActivateAbility(GenericShip ship, ref bool preventDestruction)
        {
            if (!(Phases.CurrentPhase is CombatPhase))
            {
                return;
            }

            if (ship == HostShip ||
                (ship.Owner == HostShip.Owner && !ship.PilotInfo.IsLimited && HostShip.GetRangeToShip(ship) <= 2))
            {
                preventDestruction = true;
                Messages.ShowInfo(HostName + ": " + ship.PilotInfo.PilotName + " is not removed until the end of the Engagement Phase");

                if (!ShipsToRemoveLater.Any())
                {
                    Phases.Events.OnCombatPhaseEnd_NoTriggers += RegisterTrigger;
                }

                if (!ShipsToRemoveLater.Contains(ship))
                {
                    ShipsToRemoveLater.Enqueue(ship);
                }
            }
        }