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(); }
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(); } }
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(); } }
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(); } } }
private static void OrganizeDicePositions(DiceRoll diceRoll) { diceRoll.OrganizeDicePositions(); }
private void AddEvadeDie(DiceRoll diceroll) { Messages.ShowInfo("C-3PO: added evade for correct guess"); diceroll.AddDice(DieSide.Success).ShowWithoutRoll(); diceroll.OrganizeDicePositions(); }