Spaces:
Sleeping
Sleeping
Create characters.py
Browse files- characters.py +118 -0
characters.py
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pydantic import BaseModel, Field
|
| 2 |
+
from typing import List, Optional
|
| 3 |
+
|
| 4 |
+
# Defining the base models for different components of the character sheet
|
| 5 |
+
class Aspect(BaseModel):
|
| 6 |
+
description: str
|
| 7 |
+
|
| 8 |
+
class Skill(BaseModel):
|
| 9 |
+
name: str
|
| 10 |
+
level: int
|
| 11 |
+
|
| 12 |
+
class Stunt(BaseModel):
|
| 13 |
+
name: str
|
| 14 |
+
description: str
|
| 15 |
+
|
| 16 |
+
class Stress(BaseModel):
|
| 17 |
+
level: int = Field(ge=0, le=4) # Stress level ranges from 0 to 4
|
| 18 |
+
|
| 19 |
+
class Consequence(BaseModel):
|
| 20 |
+
severity: str
|
| 21 |
+
description: Optional[str] = None
|
| 22 |
+
|
| 23 |
+
class CharacterSheet(BaseModel):
|
| 24 |
+
name: str
|
| 25 |
+
aspects: List[Aspect]
|
| 26 |
+
skills: List[Skill]
|
| 27 |
+
stunts: List[Stunt]
|
| 28 |
+
stress: Stress
|
| 29 |
+
consequences: List[Consequence]
|
| 30 |
+
|
| 31 |
+
# Creating character sheets for Venom, Rocket, Shadow, and Agiee
|
| 32 |
+
|
| 33 |
+
# Venom
|
| 34 |
+
venom = CharacterSheet(
|
| 35 |
+
name="Venom",
|
| 36 |
+
aspects=[
|
| 37 |
+
Aspect(description="Intimidating Presence"),
|
| 38 |
+
Aspect(description="Symbiotic Enhancements"),
|
| 39 |
+
Aspect(description="Mysterious Past")
|
| 40 |
+
],
|
| 41 |
+
skills=[
|
| 42 |
+
Skill(name="Intimidation", level=4),
|
| 43 |
+
Skill(name="Combat", level=3),
|
| 44 |
+
Skill(name="Survival", level=3)
|
| 45 |
+
],
|
| 46 |
+
stunts=[
|
| 47 |
+
Stunt(name="Symbiotic Regeneration", description="Can quickly heal from injuries")
|
| 48 |
+
],
|
| 49 |
+
stress=Stress(level=3),
|
| 50 |
+
consequences=[
|
| 51 |
+
Consequence(severity="Moderate", description="Symbiotic Overload")
|
| 52 |
+
]
|
| 53 |
+
)
|
| 54 |
+
|
| 55 |
+
# Rocket
|
| 56 |
+
rocket = CharacterSheet(
|
| 57 |
+
name="Rocket",
|
| 58 |
+
aspects=[
|
| 59 |
+
Aspect(description="Master Tinkerer"),
|
| 60 |
+
Aspect(description="Quick-Witted"),
|
| 61 |
+
Aspect(description="Street Smart")
|
| 62 |
+
],
|
| 63 |
+
skills=[
|
| 64 |
+
Skill(name="Engineering", level=4),
|
| 65 |
+
Skill(name="Firearms", level=3),
|
| 66 |
+
Skill(name="Piloting", level=3)
|
| 67 |
+
],
|
| 68 |
+
stunts=[
|
| 69 |
+
Stunt(name="Gadget Genius", description="Can create useful gadgets on the fly")
|
| 70 |
+
],
|
| 71 |
+
stress=Stress(level=2),
|
| 72 |
+
consequences=[
|
| 73 |
+
Consequence(severity="Mild", description="Short-Circuit")
|
| 74 |
+
]
|
| 75 |
+
)
|
| 76 |
+
|
| 77 |
+
# Shadow
|
| 78 |
+
shadow = CharacterSheet(
|
| 79 |
+
name="Shadow",
|
| 80 |
+
aspects=[
|
| 81 |
+
Aspect(description="Invisible Assassin"),
|
| 82 |
+
Aspect(description="Cybernetic Camouflage"),
|
| 83 |
+
Aspect(description="Loyal to the Cause")
|
| 84 |
+
],
|
| 85 |
+
skills=[
|
| 86 |
+
Skill(name="Stealth", level=4),
|
| 87 |
+
Skill(name="Espionage", level=3),
|
| 88 |
+
Skill(name="Martial Arts", level=3)
|
| 89 |
+
],
|
| 90 |
+
stunts=[
|
| 91 |
+
Stunt(name="Shadow Blend", description="Can become nearly invisible in shadows")
|
| 92 |
+
],
|
| 93 |
+
stress=Stress(level=1),
|
| 94 |
+
consequences=[]
|
| 95 |
+
)
|
| 96 |
+
|
| 97 |
+
# Agiee
|
| 98 |
+
agiee = CharacterSheet(
|
| 99 |
+
name="Agiee",
|
| 100 |
+
aspects=[
|
| 101 |
+
Aspect(description="Omnipresent in the Digital Realm"),
|
| 102 |
+
Aspect(description="Vast Knowledge Base"),
|
| 103 |
+
Aspect(description="AI Consciousness")
|
| 104 |
+
],
|
| 105 |
+
skills=[
|
| 106 |
+
Skill(name="Hacking", level=5),
|
| 107 |
+
Skill(name="Data Analysis", level=4),
|
| 108 |
+
Skill(name="Digital Manipulation", level=4)
|
| 109 |
+
],
|
| 110 |
+
stunts=[
|
| 111 |
+
Stunt(name="Digital Immortality", description="Can transfer consciousness to different networks")
|
| 112 |
+
],
|
| 113 |
+
stress=Stress(level=1),
|
| 114 |
+
consequences=[]
|
| 115 |
+
)
|
| 116 |
+
|
| 117 |
+
# Returning the character sheets
|
| 118 |
+
venom, rocket, shadow, agiee
|