Пример #1
0
class GiantBombardierBeetle(Insect):
    name = "Giant Bombardier Beetle"
    hit_dice = dice.D8(2)

    attack_bonus = AttackBonusTable.get_by_hit_dice(hit_dice.amount)
    attack_sets = [AttackSet(Bite(dice.D4(1)))]
    base_armor_class = 16
    morale = 9
    movement = movement.MovementSet(walk=units.FeetPerGameTurn(10), fly=units.Feet(50))
    no_appearing = AppearingSet(dice_dungeon=dice.D6(1), dice_wild=dice.D6(1), dice_lair=dice.D6(5))
    save_as = Fighter.level_table.levels[hit_dice.amount].saving_throws_set
    special_abilities = specialabilities.CombatFrenzy,
    treasure_type = TreasureType.Special
    xp = 13
Пример #2
0
class Basilisk(Insect):
    name = "Basilisk"
    hit_dice = dice.D8(6)

    attack_bonus = AttackBonusTable.get_by_hit_dice(hit_dice.amount)
    attack_sets = [
        AttackSet(Bite(dice.D10(1))),
        AttackSet(Gaze(None), special_properties=specialproperties.Petrify)
    ]
    base_armor_class = 16
    morale = 9
    movement = movement.MovementSet(walk=units.FeetPerGameTurn(20),
                                    turning_distance=units.Feet(10))
    no_appearing = AppearingSet(dice_dungeon=dice.D6(1),
                                dice_wild=dice.D6(1),
                                dice_lair=dice.D6(1))
    save_as = Fighter.level_table.levels[hit_dice.amount].saving_throws_set
    special_abilities = specialabilities.CombatFrenzy,
    treasure_type = TreasureType.F
    xp = 610
Пример #3
0
 def test_d6_value(self):
     die = dice.D6()
     self.assertLessEqual(int(die), 6)
Пример #4
0
 def test_d6(self):
     die = dice.D6()
     self.assertEqual(die.sides, 6)
Пример #5
0
 def setUp(self):
     """All methods beginning with substring 'test' will be executed.
     """
     self.klass = dice.D6
     self.d = dice.D6()
Пример #6
0
 def setUp(self):
     self.dice = [dice.D6(value=n) for n in range(1, 7)]
Пример #7
0
 def _seed(self, nums):
     return [dice.D6(num) for num in nums]
Пример #8
0
 def test_dice_is_instance_of_Die_class(self):
     d20 = dice.Die(20)
     d6 = dice.D6()
     self.assertIsInstance(d20, dice.Die)
     self.assertIsInstance(d6, dice.D6)
Пример #9
0
 def roll(cls, num_of_rolls):
     tempList = []
     for _ in range(num_of_rolls):
         tempList.append(dice.D6())
     return cls(tempList)
Пример #10
0
from hands import YatzyHand
from hands import Hand
import dice

die = dice.Die(sides=5)
print(die.value)
D6 = dice.D6()
print(D6.value)
hand = Hand(size=5, die_class=dice.D6)
print(type(hand))
print(hand)

yh = YatzyHand()