private void StartQuestionSubphase(object sender, System.EventArgs e)
        {
            if (HostShip.Owner.Id == Combat.Attacker.Owner.Id && Combat.AttackStep == CombatStep.Attack) // We're attacking
            {
                DiceType           = DiceKind.Attack;
                ShipUsingPalpatine = Combat.Attacker;
            }
            else
            {
                if (HostShip.Owner.Id == Combat.Defender.Owner.Id && Combat.AttackStep == CombatStep.Defence) // We're defending
                {
                    DiceType           = DiceKind.Defence;
                    ShipUsingPalpatine = Combat.Defender;
                }
                else
                {
                    // We're doing something else - for future non-combat Palpatine
                    Triggers.FinishTrigger();
                    return;
                }
            }


            EmperorPalpatineDecisionSubPhase newSubPhase = (EmperorPalpatineDecisionSubPhase)Phases.StartTemporarySubPhaseNew(
                Name,
                typeof(EmperorPalpatineDecisionSubPhase),
                Triggers.FinishTrigger
                );

            newSubPhase.DescriptionShort = "Emperor Palpatine";
            newSubPhase.DescriptionLong  = "Name a die result. After rolling, you must change 1 of your dice results to the named result.";
            newSubPhase.ImageSource      = HostUpgrade;

            newSubPhase.RequiredPlayer        = HostShip.Owner.PlayerNo;
            newSubPhase.ShowSkipButton        = true;
            newSubPhase.OnSkipButtonIsPressed = DontUseEmperorPalpatine;

            if (DiceType == DiceKind.Attack)
            {
                newSubPhase.AddDecision("Critical Hit", ChoiceCriticalHit);
                newSubPhase.AddDecision("Hit", ChoiceHit);
            }
            else
            {
                if (DiceType == DiceKind.Defence)
                {
                    newSubPhase.AddDecision("Evade", ChoiceEvade);
                }
            }

            newSubPhase.AddDecision("Focus", ChoiceFocus);
            newSubPhase.AddDecision("Blank", ChoiceBlank);

            newSubPhase.DefaultDecisionName = GetDefaultDecision();
            newSubPhase.Start();
        }
Example #2
0
        private void StartQuestionSubphase(object sender, System.EventArgs e)
        {
            if (HostShip.Owner.Id == Combat.Attacker.Owner.Id && Combat.AttackStep == CombatStep.Attack) // We're attacking
            {
                DiceType           = DiceKind.Attack;
                ShipUsingPalpatine = Combat.Attacker;
            }
            else
            {
                if (HostShip.Owner.Id == Combat.Defender.Owner.Id && Combat.AttackStep == CombatStep.Defence) // We're defending
                {
                    DiceType           = DiceKind.Defence;
                    ShipUsingPalpatine = Combat.Defender;
                }
                else
                {
                    // We're doing something else - for future non-combat Palpatine
                    Triggers.FinishTrigger();
                    return;
                }
            }


            EmperorPalpatineDecisionSubPhase newSubPhase = (EmperorPalpatineDecisionSubPhase)Phases.StartTemporarySubPhaseNew(
                Name,
                typeof(EmperorPalpatineDecisionSubPhase),
                Triggers.FinishTrigger
                );

            newSubPhase.RequiredPlayer = HostShip.Owner.PlayerNo;
            newSubPhase.InfoText       = "Use " + Name + "?";

            newSubPhase.AddDecision("No", DontUseEmperorPalpatine);

            if (DiceType == DiceKind.Attack)
            {
                newSubPhase.AddDecision("Critical Hit", ChoiceCriticalHit);
                newSubPhase.AddDecision("Hit", ChoiceHit);
            }
            else
            {
                if (DiceType == DiceKind.Defence)
                {
                    newSubPhase.AddDecision("Evade", ChoiceEvade);
                }
            }

            newSubPhase.AddDecision("Focus", ChoiceFocus);
            newSubPhase.AddDecision("Blank", ChoiceBlank);

            newSubPhase.DefaultDecisionName = GetDefaultDecision();
            newSubPhase.Start();
        }