58 lines
1.4 KiB
Python
58 lines
1.4 KiB
Python
from __future__ import annotations
|
|
from dataclasses import dataclass, field
|
|
from typing import Dict, List, Any, Tuple
|
|
|
|
from app.game.models.races import Race
|
|
from app.game.models.professions import Profession
|
|
from app.game.models.abilities import Ability
|
|
|
|
@dataclass
|
|
class AbilityScores:
|
|
STR: int = 10
|
|
DEX: int = 10
|
|
INT: int = 10
|
|
WIS: int = 10
|
|
CON: int = 10
|
|
LUK: int = 10
|
|
CHA: int = 10
|
|
|
|
@dataclass
|
|
class Status:
|
|
max_hp: int = 0
|
|
max_mp: int = 0
|
|
current_hp: int=0
|
|
current_mp: int=0
|
|
max_energy_credits: int = 0
|
|
current_energy_credits: int = 0
|
|
is_dead = False
|
|
|
|
@dataclass
|
|
class Entity:
|
|
uuid: str = ""
|
|
name: str = ""
|
|
origin_story:str = ""
|
|
race: Race = field(default_factory=Race)
|
|
profession: Profession = field(default_factory=Profession)
|
|
ability_pathway: str = ""
|
|
|
|
level: int = 0
|
|
xp: int = 0
|
|
xp_to_next_level:int = 100
|
|
|
|
fame: int = 0
|
|
alignment: int = 0
|
|
|
|
physical_attack: int = 1
|
|
physical_defense: int = 1
|
|
|
|
magic_attack: int = 1
|
|
magic_defense: int = 1
|
|
|
|
status: Status = field(default_factory=Status)
|
|
ability_scores: AbilityScores = field(default_factory=AbilityScores)
|
|
weapons: List[Dict[str, int]] = field(default_factory=list)
|
|
armor: List[Dict[str, int]] = field(default_factory=list)
|
|
abilities: List[Ability] = field(default_factory=list)
|
|
skills: List[Dict[str, int]] = field(default_factory=list)
|
|
|