示例#1
0
文件: Dice.cs 项目: eliphee/Lore
 public DefenseDice RollBlackDice()
 {
     // Black Dice
     // 1 = 0 Defense
     // 2 = 2 Defense
     // 3 = 2 Defense
     // 4 = 2 Defense
     // 5 = 3 Defense
     // 6 = 4 Defense
     DefenseDice ret = new DefenseDice();
     int dice = DiceRoll();
     if (dice == 1)
         ret.defense = 0;
     else if (dice > 1 && dice < 5)
         ret.defense = 2;
     else if (dice == 5)
         ret.defense = 3;
     else
         ret.defense = 4;
     return ret;
 }
示例#2
0
文件: Dice.cs 项目: eliphee/Lore
        public DefenseDice RollDefense(int amountBrown, int amountGrey, int amountBlack)
        {
            DefenseDice ret = new DefenseDice();
            DefenseDice dd;

            // brown dice
            for (int bD = 0; bD < amountBrown; bD++)
            {
                dd = RollBrownDice();
                ret.defense = dd.defense;
            }

            // grey dice
            for (int gD = 0; gD < amountGrey; gD++)
            {
                dd = RollGreyDice();
                ret.defense = dd.defense;
            }

            // black dice
            for (int bD = 0; bD < amountBlack; bD++)
            {
                dd = RollBlackDice();
                ret.defense = dd.defense;
            }
            return ret;
        }
示例#3
0
文件: Dice.cs 项目: eliphee/Lore
 public DefenseDice RollGreyDice()
 {
     // Grey Dice
     // 1 = 0 Defense
     // 2 = 1 Defense
     // 3 = 1 Defense
     // 4 = 1 Defense
     // 5 = 2 Defense
     // 6 = 3 Defense
     DefenseDice ret = new DefenseDice();
     int dice = DiceRoll();
     if (dice == 1)
         ret.defense = 0;
     else if (dice > 1 && dice < 5)
         ret.defense = 1;
     else if (dice == 5)
         ret.defense = 2;
     else
         ret.defense = 3;
     return ret;
 }
示例#4
0
文件: Dice.cs 项目: eliphee/Lore
 public DefenseDice RollBrownDice()
 {
     // Brown Dice
     // 1 = 0 Defense
     // 2 = 0 Defense
     // 3 = 0 Defense
     // 4 = 1 Defense
     // 5 = 1 Defense
     // 6 = 2 Defense
     DefenseDice ret = new DefenseDice();
     int dice = DiceRoll();
     if (dice < 4)
         ret.defense = 0;
     else if (dice == 5)
         ret.defense = 1;
     else
         ret.defense = 2;
     return ret;
 }