Пример #1
0
        /// <summary>
        /// Will return true if the client wins. False is the target wins.
        /// </summary>
        /// <param name="client"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public static bool CheckStrAgainstOpponent(Client client, Client target, int impact = 0)
        {
            TalentScoresheet clientSheet = client.GetData("TalentScoresheet") as TalentScoresheet;
            TalentScoresheet targetSheet = client.GetData("TalentScoresheet") as TalentScoresheet;

            if (clientSheet.GetStrScore() + Dice.RollDice() > targetSheet.GetStrScore() + Dice.RollDice())
            {
                return(true);
            }

            clientSheet.StrengthModifier += impact;
            return(false);
        }
Пример #2
0
        /// <summary>
        /// Will return true if the client wins. False is the target wins.
        /// </summary>
        /// <param name="client"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public static bool CheckChaAgainstPlayer(Client client, Client target, int impact = 0)
        {
            TalentScoresheet clientSheet = client.GetData("TalentScoresheet") as TalentScoresheet;
            TalentScoresheet targetSheet = client.GetData("TalentScoresheet") as TalentScoresheet;

            if (clientSheet.GetChaScore() + Dice.RollDice() > targetSheet.GetChaScore() + Dice.RollDice())
            {
                return(true);
            }

            clientSheet.CharismaModifier += impact;
            return(false);
        }