Esempio n. 1
0
    def test_wood_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: "5")
        c.char_subrace(2)
        assert c.subrace == "Wood Elf"

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

        approved_multiclasses = c.multiclass_by_race()
        assert approved_multiclasses == ["cleric/fighter",
                                         "cleric/fighter/mage",
                                         "cleric/ranger",
                                         "cleric/ranger/mage",
                                         "cleric/thief (inc. acrobat)",
                                         "druid/ranger",
                                         "fighter/mage",
                                         "fighter/mage/mountebank",
                                         "fighter/mage/thief (inc. acrobat)",
                                         "fighter/mountebank",
                                         "fighter/thief (inc. acrobat)",
                                         "mage/mountebank",
                                         "mage/thief (inc. acrobat)",
                                         "mystic/fighter",
                                         "mystic/fighter/mage",
                                         "mystic/mage",
                                         "mystic/ranger",
                                         "mystic/ranger/mage",
                                         "mystic/thief (inc. acrobat)"]
Esempio n. 2
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. 3
0
    def test_dwarf(self, monkeypatch):
        c = Character()
        monkeypatch.setattr("builtins.input", lambda x: "1")
        c.char_race()
        assert c.race == "Dwarf"

        approved_classes = c.multiclass_by_race()
        assert approved_classes == ["cleric/fighter",
                                    "cleric/thief (inc. acrobat)",
                                    "fighter/mountebank",
                                    "fighter/thief (inc. acrobat)"]
Esempio n. 4
0
    def test_wild_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: "4")
        c.char_subrace(2)
        assert c.subrace == "Wild Elf"

        approved_classes = c.class_by_race()
        assert approved_classes == ['Druid', 'Mystic', 'Fighter', 'Thief', 'Acrobat']

        approved_multiclasses = c.multiclass_by_race()
        assert approved_multiclasses == ["fighter/thief (inc. acrobat)"]
Esempio n. 5
0
    def test_half_orc(self, monkeypatch):
        c = Character()
        monkeypatch.setattr("builtins.input", lambda x: "5")
        c.char_race()
        assert c.race == "Half-Orc"

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

        approved_multiclasses = c.multiclass_by_race()
        assert approved_multiclasses == ["cleric/fighter",
                                         "cleric/mountebank",
                                         "cleric/thief (inc. acrobat)",
                                         "fighter/mountebank",
                                         "fighter/thief (inc. acrobat)"]
Esempio n. 6
0
    def test_halfling(self, monkeypatch):
        c = Character()
        monkeypatch.setattr("builtins.input", lambda x: "4")
        c.char_race()
        assert c.race == "Halfling"

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

        approved_multiclasses = c.multiclass_by_race()
        assert approved_multiclasses == ["cleric/fighter",
                                         "cleric/thief (inc. acrobat)",
                                         "druid/fighter",
                                         "druid/thief (inc. acrobat)",
                                         "fighter/mountebank",
                                         "fighter/thief (inc. acrobat)",
                                         "jester/thief (inc. acrobat)",
                                         "mystic/fighter"]
Esempio n. 7
0
    def test_high_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: "3")
        c.char_subrace(2)
        assert c.subrace == "High Elf"

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

        approved_multiclasses = c.multiclass_by_race()
        assert approved_multiclasses == ["cleric/fighter",
                                         "cleric/fighter/mage",
                                         "cleric/fighter/savant",
                                         "cleric/mage",
                                         "cleric/ranger",
                                         "cleric/ranger/mage",
                                         "cleric/ranger/savant",
                                         "cleric/savant",
                                         "cleric/thief (inc. acrobat)",
                                         "druid/ranger",
                                         "fighter/mage",
                                         "fighter/mage (inc. savant)/thief (inc. acrobat or mountebank)",
                                         "fighter/mage/mountebank",
                                         "fighter/mountebank",
                                         "fighter/savant",
                                         "fighter/savant/mountebank",
                                         "fighter/savant/thief",
                                         "fighter/thief (inc. acrobat)",
                                         "mage (inc. savant)/thief (inc. acrobat or mountebank)",
                                         "mystic/fighter",
                                         "mystic/fighter/mage",
                                         "mystic/mage",
                                         "mystic/ranger",
                                         "mystic/savant",
                                         "mystic/thief (inc. acrobat)",
                                         "ranger/mage",
                                         "ranger/savant"]
Esempio n. 8
0
    def test_hill_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: "2")
        c.char_subrace(3)
        assert c.subrace == "Hill 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)",
                                         "druid/fighter",
                                         "druid/thief (inc. acrobat)",
                                         "fighter/mountebank",
                                         "fighter/thief (inc. acrobat)",
                                         "jester/thief (inc. acrobat)",
                                         "mystic/fighter"]
Esempio n. 9
0
    def test_forest_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: "1")
        c.char_subrace(3)
        assert c.subrace == "Forest Gnome"

        approved_classes = c.class_by_race()
        assert approved_classes == ['Bard', 'Jester', 'Druid', 'Fighter', 'Savant', 'Thief', 'Acrobat', 'Mountebank']

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