gammatools/models.py

24 lines
792 B
Python

from flask_restx import fields
# Common fields
chartype_field = fields.String(required=False, default="human", description='Character type. Allowed values: "human", '
'"mutant", "android", "robot"')
# Dice model
dice_model = {
'quantity': fields.Integer(required=True, description='The number of dice to roll'),
'geometry': fields.Integer(required=True, description='The number of sides on each die'),
'discard_lowest': fields.Boolean(required=False, default=False, description='Drop the lowest score')
}
# Ability model
ability_model = {
'chartype': chartype_field
}
# Hp model
hp_model = {
'chartype': chartype_field,
'conscore': fields.Integer(required=True, description='Conscore')
}