Exemple #1
0
 protected virtual void DiceCheckFinished()
 {
     HostShip.Tokens.AssignTokens(() => new Tokens.FocusToken(HostShip), DiceCheckRoll.Focuses, () => {
         HostShip.Tokens.AssignTokens(() => new Tokens.EvadeToken(HostShip), DiceCheckRoll.Successes, () =>
         {
             AbilityDiceCheck.ConfirmCheck();
         });
     });
 }
Exemple #2
0
        private void AfterRollWrapper(Action callback)
        {
            AbilityDiceCheck subphase = Phases.CurrentSubPhase as AbilityDiceCheck;

            subphase.HideDiceResultMenu();
            DiceCheckRoll = subphase.CurrentDiceRoll;

            callback();
        }
Exemple #3
0
 private void FinishAction()
 {
     if (DiceCheckRoll.RegularSuccesses > 0)
     {
         SufferNegativeEffect(AbilityDiceCheck.ConfirmCheck);
     }
     else
     {
         AbilityDiceCheck.ConfirmCheck();
     }
 }
Exemple #4
0
 private void DiceCheckFinished()
 {
     if (DiceCheckRoll.RegularSuccesses > 0)
     {
         Messages.ShowInfo(HostName + " exposes one damage card");
         HostShip.Damage.ExposeRandomFacedownCard(AbilityDiceCheck.ConfirmCheck);
     }
     else
     {
         AbilityDiceCheck.ConfirmCheck();
     }
 }
Exemple #5
0
 protected virtual void DiceCheckFinished()
 {
     // Check our results for accidental decloaking.  If we got a focus result, we have to decloak.
     if (DiceCheckRoll.Focuses > 0)
     {
         Messages.ShowInfo("Cloaking Device: " + HostShip.PilotInfo.PilotName + "'s cloaking device deactivates.");
         ShowDecloakDecision(AbilityDiceCheck.ConfirmCheck);
     }
     else
     {
         // We aren't automatically decloaking.  As our trigger was just finished, we'll need to re-register it.
         AbilityDiceCheck.ConfirmCheck();
         Phases.Events.OnPlanningPhaseStart += RegisterDecloakChance;
     }
 }
Exemple #6
0
 private void DiceCheckFinished()
 {
     if (DiceCheckRoll.Successes > 0)
     {
         Messages.ShowInfo(HostUpgrade.UpgradeInfo.Name + " Gain 1 Jam Token");
         HostShip.Tokens.AssignToken(
             new JamToken(HostShip, HostShip.Owner),
             AbilityDiceCheck.ConfirmCheck
             );
     }
     else
     {
         AbilityDiceCheck.ConfirmCheck();
     }
 }
Exemple #7
0
        /// <summary>
        /// Starts "Roll dice to check" subphase
        /// </summary>
        public void PerformDiceCheck(string description, DiceKind diceKind, int count, Action finish, Action callback)
        {
            Phases.CurrentSubPhase.Pause();

            Selection.ActiveShip = HostShip;

            AbilityDiceCheck subphase = Phases.StartTemporarySubPhaseNew <AbilityDiceCheck>(
                description,
                callback
                );

            subphase.DiceKind  = diceKind;
            subphase.DiceCount = count;
            subphase.AfterRoll = delegate { AfterRollWrapper(finish); };

            subphase.Start();
        }
Exemple #8
0
 private void FinishAction()
 {
     if (DiceCheckRoll.RegularSuccesses > 0)
     {
         HostShip.Damage.SufferFacedownDamageCard(
             new DamageSourceEventArgs()
         {
             Source     = HostShip,
             DamageType = DamageTypes.CardAbility
         },
             AbilityDiceCheck.ConfirmCheck
             );
     }
     else
     {
         AbilityDiceCheck.ConfirmCheck();
     }
 }
Exemple #9
0
 private void CheckDamage()
 {
     if (DiceCheckRoll.Focuses > 0)
     {
         Messages.ShowInfo("DRK-1 Probe Droid is destroyed");
         HostShip.Damage.TryResolveDamage(
             1,
             0,
             new DamageSourceEventArgs() {
                 DamageType = DamageTypes.CardAbility,
                 Source = HostShip
             },
             AbilityDiceCheck.ConfirmCheck
         );
     }
     else
     {
         Messages.ShowInfo("DRK-1 Probe Droid suffers no damage");
         AbilityDiceCheck.ConfirmCheck();
     }
 }
 private void CleanUpMultiSpectralCamouflage()
 {
     Selection.ActiveShip = TargetingShip;
     Selection.ThisShip   = TargetingShip;
     AbilityDiceCheck.ConfirmCheck();
 }