Esempio n. 1
0
    def test_dark_elf(self, monkeypatch):
        c = Character()
        monkeypatch.setattr("builtins.input", lambda x: "2")
        c.char_race()
        assert c.race == "Elf"

        monkeypatch.setattr("builtins.input", lambda x: "6")
        c.dm_underdark = True
        c.char_subrace(2)
        assert c.subrace == "Dark Elf"

        approved_classes = c.class_by_race()
        assert approved_classes == ['Bard', 'Cavalier', 'Cleric', 'Fighter', 'Ranger', 'Mage', 'Savant', 'Thief',
                                    'Acrobat', 'Mountebank']

        approved_multiclasses = c.multiclass_by_race()
        assert approved_multiclasses == ["cleric/fighter",
                                         "cleric/fighter/mage",
                                         "cleric/fighter/savant",
                                         "cleric/mage",
                                         "cleric/savant",
                                         "cleric/thief (inc. acrobat)",
                                         "fighter/mage",
                                         "fighter/mage (inc. savant)/thief (inc. acrobat)",
                                         "fighter/mage/mountebank",
                                         "fighter/mountebank",
                                         "fighter/savant",
                                         "fighter/savant/mountebank",
                                         "fighter/savant/thief (inc. acrobat)",
                                         "fighter/thief (inc. acrobat)",
                                         "mage/mountebank",
                                         "mage/thief (inc. acrobat)"]
Esempio n. 2
0
    def test_grey_dwarf(self, monkeypatch):
        c = Character()
        monkeypatch.setattr("builtins.input", lambda x: "1")
        c.char_race()
        assert c.race == "Dwarf"

        monkeypatch.setattr("builtins.input", lambda x: "3")
        c.dm_underdark = True
        c.char_subrace(1)
        assert c.subrace == "Grey Dwarf"

        approved_classes = c.class_by_race()
        assert approved_classes == ['Cleric', 'Fighter', 'Thief', 'Acrobat', 'Mountebank']
Esempio n. 3
0
    def test_deep_gnome(self, monkeypatch):
        c = Character()
        monkeypatch.setattr("builtins.input", lambda x: "3")
        c.char_race()
        assert c.race == "Gnome"

        monkeypatch.setattr("builtins.input", lambda x: "3")
        c.dm_underdark = True
        c.char_subrace(3)
        assert c.subrace == "Deep Gnome"

        approved_classes = c.class_by_race()
        assert approved_classes == ['Bard', 'Cleric', 'Fighter', 'Illusionist', 'Thief', 'Acrobat', 'Mountebank']

        approved_multiclasses = c.multiclass_by_race()
        assert approved_multiclasses == ["cleric/fighter",
                                         "cleric/thief (inc. acrobat)",
                                         "fighter/illusionist",
                                         "fighter/mountebank",
                                         "fighter/thief (inc. acrobat)",
                                         "illusionist/mountebank",
                                         "illusionist/thief (inc. acrobat)",
                                         "jester/fighter"]