Beispiel #1
0
        private void AfterSkippedCombatActivation(GenericShip ship)
        {
            ship.CallAfterAttackWindow();
            ship.IsAttackPerformed = true;

            Selection.DeselectThisShip();
            Selection.DeselectAnotherShip();

            //TODO: From select target to select ship
        }
Beispiel #2
0
        private void AfterSkippedCombatActivation(GenericShip ship)
        {
            if (!ship.IsAttackPerformed)
            {
                ship.CallAfterAttackWindow();
            }
            ship.IsAttackPerformed = true;

            Selection.DeselectThisShip();
            Selection.DeselectAnotherShip();
            ChangeSelectionMode(Team.Type.Friendly);
        }
Beispiel #3
0
    // Extra Attacks

    public static void StartSelectAttackTarget
    (
        GenericShip ship,
        Action callback,
        Func <GenericShip, IShipWeapon, bool, bool> extraAttackFilter = null,
        string abilityName            = null,
        string description            = null,
        IImageHolder imageSource      = null,
        bool showSkipButton           = true,
        Action <Action> payAttackCost = null
    )
    {
        Selection.ChangeActiveShip("ShipId:" + ship.ShipId);
        Phases.CurrentSubPhase.RequiredPlayer = ship.Owner.PlayerNo;

        ExtraAttackFilter  = extraAttackFilter;
        PayExtraAttackCost = payAttackCost;

        SelectTargetForAttackSubPhase newAttackSubphase = (SelectTargetForAttackSubPhase)Phases.StartTemporarySubPhaseNew(
            "Second attack",
            typeof(SelectTargetForAttackSubPhase),
            delegate
        {
            ship.CallAfterAttackWindow();
            Phases.FinishSubPhase(typeof(SelectTargetForAttackSubPhase));
            CameraScript.RestoreCamera();
            callback();
        }
            );

        newAttackSubphase.DescriptionShort = abilityName;
        newAttackSubphase.DescriptionLong  = description;
        newAttackSubphase.ImageSource      = imageSource;
        newAttackSubphase.ShowSkipButton   = showSkipButton;

        newAttackSubphase.Start();
    }