示例#1
0
class SpellFactory(factory.Factory):
    """Definition of spell factory."""
    class Meta:
        """Bind model to factory."""

        model = Spell

    name = factory.Faker('word',
                         ext_word_list=random_wordlist(max_length=40,
                                                       prefix='Spell_'))

    type_ = factory.Faker('random_element',
                          elements=Fixtures['spell']['spellTypeOptions'])

    damage = factory.Faker('word',
                           ext_word_list=random_wordlist(max_length=40,
                                                         prefix='Damage_'))

    damage_type = factory.Faker('word',
                                ext_word_list=random_wordlist(
                                    max_length=40, prefix='DamageType_'))

    school = factory.Faker('random_element',
                           elements=Fixtures['spell']['spellSchoolOptions'])

    level = factory.Faker('random_int', min=0, max=10)

    material_components = factory.Faker('word',
                                        ext_word_list=random_wordlist(
                                            max_length=40,
                                            prefix='MaterialComponents_'))

    is_ritual = factory.Faker('boolean', chance_of_getting_true=50)

    prepared = factory.Faker('boolean', chance_of_getting_true=50)

    always_prepared = factory.Faker('boolean', chance_of_getting_true=50)

    casting_time = factory.Faker(
        'random_element',
        elements=Fixtures['spell']['spellCastingTimeOptions'])

    components = factory.Faker(
        'random_element', elements=Fixtures['spell']['spellComponentsOptions'])

    duration = factory.Faker(
        'random_element', elements=Fixtures['spell']['spellDurationOptions'])

    range_ = factory.Faker('random_element',
                           elements=Fixtures['spell']['spellRangeOptions'])

    description = factory.Faker('text', max_nb_chars=150)
示例#2
0
class EncounterAddEditModalFactory(factory.Factory):
    """Definition of EncounterAddEditModal factory."""
    class Meta:
        """Bind model to factory."""

        model = EncounterAddEditModal

    encounter_name = factory.Faker('word',
                                   ext_word_list=random_wordlist(
                                       max_length=40, prefix='EncounterName_'))

    location = factory.Faker('word',
                             ext_word_list=random_wordlist(max_length=40,
                                                           prefix='Location_'))
示例#3
0
class MagicItemFactory(factory.Factory):
    """Definition of magic item factory."""
    class Meta:
        """Bind model to factory."""

        model = MagicItem

    name = factory.Faker('word',
                         ext_word_list=random_wordlist(max_length=40,
                                                       prefix='MagicItem_'))

    type_ = factory.Faker(
        'random_element',
        elements=Fixtures['magicItem']['magicItemTypeOptions'])
    rarity = factory.Faker(
        'random_element',
        elements=Fixtures['magicItem']['magicItemRarityOptions'])

    requires_attunement = factory.Faker('boolean', chance_of_getting_true=50)

    attuned = factory.Faker('boolean', chance_of_getting_true=50)

    max_charges = factory.Faker('random_int', min=0, max=1000000)

    used_charges = factory.Faker('random_int', min=0, max=1000000)

    weight = factory.Faker('random_int', min=0, max=10000)

    description = factory.Faker('text', max_nb_chars=150)
示例#4
0
class ArmorFactory(factory.Factory):
    """Definition of armor factory."""
    class Meta:
        """Bind model to factory."""

        model = Armor

    name = factory.Faker('word',
                         ext_word_list=random_wordlist(prefix='Armor_',
                                                       max_length=40))

    type_ = factory.Faker('random_element',
                          elements=Fixtures['armor']['armorTypeOptions'])

    magical_modifier = factory.Faker('random_int', min=1, max=10)

    price = factory.Faker('random_int', min=0, max=1000000)

    currency_denomination = factory.Faker(
        'random_element',
        elements=Fixtures['general']['currencyDenominationList'])

    weight = factory.Faker('random_int', min=0, max=10000)

    armor_class = factory.Faker('random_int', min=10, max=30)

    stealth = factory.Faker('random_element',
                            elements=Fixtures['armor']['armorStealthOptions'])

    description = factory.Faker('text', max_nb_chars=150)
示例#5
0
class EnvironmentFactory(factory.Factory):
    """Definition of Environment factory."""
    class Meta:
        """Bind model to factory."""

        model = Environment

    image_link = factory.Faker('image_url')

    weather = factory.Faker('word',
                            ext_word_list=random_wordlist(max_length=40,
                                                          prefix='Weather_'))

    terrain = factory.Faker('word',
                            ext_word_list=random_wordlist(max_length=40,
                                                          prefix='Terrain_'))

    description = factory.Faker('text', max_nb_chars=150)
示例#6
0
class NPCFactory(factory.Factory):
    """Definition of npc factory."""

    class Meta:
        """Bind model to factory."""

        model = NPC

    name = factory.Faker(
        'word',
        ext_word_list=random_wordlist(max_length=40, prefix='Name_'))

    race = factory.Faker(
        'word',
        ext_word_list=random_wordlist(max_length=40, prefix='Race_'))

    description = factory.Faker(
        'text',
        max_nb_chars=150
    )
示例#7
0
class PointOfInterestFactory(factory.Factory):
    """Definition of Point Of Interest factory."""
    class Meta:
        """Bind model to factory."""

        model = PointOfInterest

    name = factory.Faker('word',
                         ext_word_list=random_wordlist(
                             prefix='PointOfInterest_', max_length=40))

    description = factory.Faker('text', max_nb_chars=150)
示例#8
0
class ReadAloudTextFactory(factory.Factory):
    """Definition of Read aloud text factory."""
    class Meta:
        """Bind model to factory."""

        model = ReadAloudText

    name = factory.Faker('word',
                         ext_word_list=random_wordlist(prefix='ReadAloudText_',
                                                       max_length=40))

    description = factory.Faker('text', max_nb_chars=150)
示例#9
0
class AppearanceFactory(factory.Factory):
    """Definition of appearance factory."""
    class Meta:
        """Bind model to factory."""

        model = Appearance

    weight = factory.Faker('random_int', min=0, max=10000)

    height = factory.Faker('word',
                           ext_word_list=random_wordlist(prefix='Height_',
                                                         max_length=40))

    hair_color = factory.Faker('word',
                               ext_word_list=random_wordlist(
                                   prefix='HairColor_', max_length=40))
    eye_color = factory.Faker('word',
                              ext_word_list=random_wordlist(prefix='EyeColor_',
                                                            max_length=40))
    skin_color = factory.Faker('word',
                               ext_word_list=random_wordlist(
                                   prefix='SkinColor_', max_length=40))
示例#10
0
class FeatFactory(factory.Factory):
    """Definition of feat factory."""

    class Meta:
        """Bind model to factory."""

        model = Feat

    name = factory.Faker(
        'word',
        ext_word_list=random_wordlist(max_length=125, prefix='Feat_')
    )

    description = factory.Faker(
        'text',
        max_nb_chars=150
    )
示例#11
0
class MapOrImageFactory(factory.Factory):
    """Definition of Map Image factory."""

    class Meta:
        """Bind model to factory."""

        model = MapOrImage

    name = factory.Faker(
        'word',
        ext_word_list=random_wordlist(prefix='ImageLink_', max_length=40)
    )

    image_link = factory.Faker(
        'image_url'
    )

    description = factory.Faker(
        'text',
        max_nb_chars=150
    )
示例#12
0
class ItemFactory(factory.Factory):
    """Definition of item factory."""
    class Meta:
        """Bind model to factory."""

        model = Item

    name = factory.Faker('word',
                         ext_word_list=random_wordlist(max_length=40,
                                                       prefix='Item_'))

    quantity = factory.Faker('random_int', min=1, max=10000)

    weight = factory.Faker('random_int', min=0, max=10000)

    cost = factory.Faker('random_int', min=0, max=10000)

    currency_denomination = factory.Faker(
        'random_element',
        elements=Fixtures['general']['currencyDenominationList'])

    description = factory.Faker('text', max_nb_chars=150)
示例#13
0
class MonsterFactory(factory.Factory):
    """Definition of monster factory."""
    class Meta:
        """Bind model to factory."""

        model = Monster

    name = factory.Faker('word',
                         ext_word_list=random_wordlist(prefix='Name_',
                                                       max_length=40))

    size = factory.Faker('word',
                         ext_word_list=random_wordlist(prefix='Size_',
                                                       max_length=40))

    type_ = factory.Faker('word',
                          ext_word_list=random_wordlist(prefix='Type_',
                                                        max_length=40))

    alignment = factory.Faker('word',
                              ext_word_list=random_wordlist(
                                  prefix='Alignment_', max_length=40))

    hit_points = factory.Faker('word',
                               ext_word_list=random_wordlist(
                                   prefix='HitPoints_', max_length=40))

    speed = factory.Faker('word',
                          ext_word_list=random_wordlist(prefix='Speed_',
                                                        max_length=40))

    strength = factory.Faker('random_int', min=0, max=100)

    dexterity = factory.Faker('random_int', min=0, max=100)

    constitution = factory.Faker('random_int', min=0, max=100)

    intelligence = factory.Faker('random_int', min=0, max=100)

    wisdom = factory.Faker('random_int', min=0, max=100)

    charisma = factory.Faker('random_int', min=0, max=100)

    saving_throws = factory.Faker('word',
                                  ext_word_list=random_wordlist(
                                      prefix='SavingThrows_', max_length=40))

    skills = factory.Faker('word',
                           ext_word_list=random_wordlist(prefix='Skills_',
                                                         max_length=40))

    damage_immunities = factory.Faker('word',
                                      ext_word_list=random_wordlist(
                                          prefix='DamageImmunities_',
                                          max_length=40))

    damage_vulnerabilities = factory.Faker('word',
                                           ext_word_list=random_wordlist(
                                               prefix='DamageVulnerabilities_',
                                               max_length=40))

    damage_resistances = factory.Faker('word',
                                       ext_word_list=random_wordlist(
                                           prefix='DamageResistances_',
                                           max_length=40))

    condition_immunities = factory.Faker('word',
                                         ext_word_list=random_wordlist(
                                             prefix='ConditionImmunities_',
                                             max_length=40))

    senses = factory.Faker('word',
                           ext_word_list=random_wordlist(prefix='Senses_',
                                                         max_length=40))

    languages = factory.Faker('word',
                              ext_word_list=random_wordlist(
                                  prefix='Languages_', max_length=40))

    challenge = factory.Faker('word',
                              ext_word_list=random_wordlist(
                                  prefix='Challenge_', max_length=40))

    experience = factory.Faker('word',
                               ext_word_list=random_wordlist(
                                   prefix='Experience_', max_length=40))

    description = factory.Faker('text', max_nb_chars=150)
示例#14
0
class WeaponFactory(factory.Factory):
    """Definition of weapon factory."""

    class Meta:
        """Bind model to factory."""

        model = Weapon

    name = factory.Faker(
        'word',
        ext_word_list=random_wordlist(max_length=40, prefix='Weapon_')
    )

    damage = factory.Faker(
        'word',
        ext_word_list=random_wordlist(max_length=40, prefix='Damage_')
    )

    magical_modifier = factory.Faker('random_int', min=0, max=10)

    to_hit_modifier = factory.Faker('random_int', min=0, max=10)

    type_ = factory.Faker(
        'random_element',
        elements=Fixtures['weapon']['weaponTypeOptions']
    )

    handedness = factory.Faker(
        'random_element',
        elements=Fixtures['weapon']['weaponHandednessOptions']
    )

    proficiency = factory.Faker(
        'random_element',
        elements=Fixtures['weapon']['weaponProficiencyOptions']
    )

    price = factory.Faker('random_int', min=0, max=1000000)

    currency_denomination = factory.Faker(
        'random_element',
        elements=Fixtures['general']['currencyDenominationList']
    )

    weight = factory.Faker('random_int', min=0, max=10000)

    range_ = factory.Faker(
        'word',
        ext_word_list=random_wordlist(max_length=40, prefix='Range_')
    )

    damage_type = factory.Faker(
        'word',
        ext_word_list=random_wordlist(max_length=40, prefix='DamageType_')
    )

    property_ = factory.Faker(
        'random_element',
        elements=Fixtures['weapon']['weaponPropertyOptions']
    )

    quantity = factory.Faker('random_int', min=0, max=1000)

    description = factory.Faker(
        'text',
        max_nb_chars=150
    )