From 12c643c542de9e73655a15eb3c1e76645ed67dd3 Mon Sep 17 00:00:00 2001 From: evilchili Date: Sat, 20 Apr 2024 23:33:36 -0700 Subject: [PATCH] adding size/speed to ancestry --- src/ttfrog/db/schema/character.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ttfrog/db/schema/character.py b/src/ttfrog/db/schema/character.py index 5c04276..2067dd4 100644 --- a/src/ttfrog/db/schema/character.py +++ b/src/ttfrog/db/schema/character.py @@ -121,7 +121,6 @@ class Character(BaseObject, SlugMixin, SavingThrowsMixin, SkillsMixin): hit_points = Column(Integer, default=1, nullable=False, info={"min": 0, "max": 999}) max_hit_points = Column(Integer, default=1, nullable=False, info={"min": 0, "max": 999}) temp_hit_points = Column(Integer, default=0, nullable=False, info={"min": 0, "max": 999}) - speed = Column(Integer, nullable=False, default=30, info={"min": 0, "max": 99}) str = Column(Integer, nullable=False, default=10, info={"min": 0, "max": 30}) dex = Column(Integer, nullable=False, default=10, info={"min": 0, "max": 30}) con = Column(Integer, nullable=False, default=10, info={"min": 0, "max": 30}) @@ -147,6 +146,14 @@ class Character(BaseObject, SlugMixin, SavingThrowsMixin, SkillsMixin): def traits(self): return self.ancestry.traits + @property + def size(self): + return self.ancestry.size + + @property + def speed(self): + return self.ancestry.speed + @property def level(self): return sum(mapping.level for mapping in self.class_map)