Example #1
0
    public static void CompareDiceSidesAgainstServer(DieSide[] dieSides)
    {
        if (!IsServer)
        {
            DiceRoll clientDiceRoll = DiceRoll.CurrentDiceRoll;

            bool syncIsNeeded = false;
            for (int i = 0; i < clientDiceRoll.DiceList.Count; i++)
            {
                if (clientDiceRoll.DiceList[i].GetModelFace() != dieSides[i])
                {
                    syncIsNeeded = true;
                    clientDiceRoll.DiceList[i].SetSide(dieSides[i]);
                    clientDiceRoll.DiceList[i].SetModelSide(dieSides[i]);
                }
            }

            if (syncIsNeeded)
            {
                clientDiceRoll.OrganizeDicePositions();
                Messages.ShowInfo("Dice results are synchronized with server");
            }

            /*else
             * {
             *  Messages.ShowInfo("NO PROBLEMS");
             * }*/
        }

        Network.FinishTask();
    }
Example #2
0
 private void CheckAbility(DiceRoll diceroll)
 {
     if (diceroll.Type == DiceKind.Defence && diceroll.CheckType == DiceRollCheckType.Combat && Combat.Attacker.Tokens.HasToken <JamToken>())
     {
         Messages.ShowInfo("Captain Feroph is being attacked by a Jammed attacker and gains +1 Evade result");
         diceroll.AddDice(DieSide.Success).ShowWithoutRoll();
         diceroll.OrganizeDicePositions();
     }
 }
Example #3
0
 private void CheckAbility(DiceRoll diceroll)
 {
     if (diceroll.Type == DiceKind.Defence && diceroll.CheckType == DiceRollCheckType.Combat && Combat.Attacker.Tokens.HasToken <JamToken>())
     {
         Messages.ShowInfo("Captain Feroph: Evade result is added");
         diceroll.AddDice(DieSide.Success).ShowWithoutRoll();
         diceroll.OrganizeDicePositions();
         diceroll.UpdateDiceCompareHelperPrediction();
     }
 }
Example #4
0
        private void ModifyDice(DiceRoll roll)
        {
            int enemyShipsAtRangeOne = BoardTools.Board.GetShipsAtRange(Combat.Defender, new Vector2(0, 1), Team.Type.Enemy).Count;

            if (Combat.AttackStep == CombatStep.Defence && Combat.Defender == HostShip && enemyShipsAtRangeOne > 0)
            {
                Messages.ShowInfo("Norra Wexley: add evade dice enemy range 1.");
                roll.AddDice(DieSide.Success).ShowWithoutRoll();
                roll.OrganizeDicePositions();
            }
        }
 protected virtual void ApplyReinforceEffect(DiceRoll diceroll)
 {
     if (diceroll.Type == DiceKind.Defence && diceroll.CheckType == DiceRollCheckType.Combat)
     {
         if (RuleSets.RuleSet.Instance.ReinforceEffectCanBeUsed(Facing))
         {
             Messages.ShowInfo("Reinforce: Evade result is added");
             diceroll.AddDice(DieSide.Success).ShowWithoutRoll();
             diceroll.OrganizeDicePositions();
         }
     }
 }
 protected virtual void ApplyReinforceEffect(DiceRoll diceroll)
 {
     if (diceroll.Type == DiceKind.Defence && diceroll.CheckType == DiceRollCheckType.Combat)
     {
         if (Editions.Edition.Current.ReinforceEffectCanBeUsed(Facing))
         {
             Messages.ShowInfo("Reinforce has added an Evade result");
             diceroll.AddDice(DieSide.Success).ShowWithoutRoll();
             diceroll.OrganizeDicePositions();
         }
     }
 }
Example #7
0
 private static void OrganizeDicePositions(DiceRoll diceRoll)
 {
     diceRoll.OrganizeDicePositions();
 }
Example #8
0
 private void AddEvadeDie(DiceRoll diceroll)
 {
     Messages.ShowInfo("C-3PO: added evade for correct guess");
     diceroll.AddDice(DieSide.Success).ShowWithoutRoll();
     diceroll.OrganizeDicePositions();
 }