2024-06-22 10:29:05 +00:00
|
|
|
from flask_restx import fields
|
|
|
|
|
|
|
|
# Common fields
|
2024-06-22 13:22:39 +00:00
|
|
|
chartype_field = fields.String(
|
|
|
|
required=False, default="human",
|
2024-06-23 17:30:13 +00:00
|
|
|
description='Character type. Allowed values: "human", "humanoid", "mutant", "cyborg", "android"')
|
2024-06-22 10:29:05 +00:00
|
|
|
|
|
|
|
# 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 = {
|
2024-06-23 17:30:13 +00:00
|
|
|
'chartype': chartype_field,
|
|
|
|
'ability': fields.String(required=False, description='The ability to roll. Not required. Defaults "generic"'),
|
2024-06-22 10:29:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Hp model
|
|
|
|
hp_model = {
|
|
|
|
'chartype': chartype_field,
|
|
|
|
'conscore': fields.Integer(required=True, description='Conscore')
|
|
|
|
}
|
2024-06-22 13:22:39 +00:00
|
|
|
|
2024-06-23 11:13:42 +00:00
|
|
|
ma_model = {
|
|
|
|
'ams': fields.Integer(required=True, description='Attacker Mental Strength'),
|
|
|
|
'dms': fields.Integer(required=True, description='Defender Mental Strength'),
|
|
|
|
'modifier': fields.Integer(required=True, description='Modifier For Mental Strength'),
|
|
|
|
}
|
|
|
|
|
2024-06-22 13:22:39 +00:00
|
|
|
character_model = {
|
|
|
|
'chartype': chartype_field,
|
|
|
|
}
|
2024-06-22 22:56:55 +00:00
|
|
|
|
|
|
|
encounter_model = {
|
|
|
|
'terrain': fields.String(
|
|
|
|
required=True,
|
|
|
|
default="clear",
|
|
|
|
description='The terrain being traversed by the party when the encounter roll is made'
|
|
|
|
)
|
|
|
|
}
|