Add new Luck stat to the character stats system with class-specific values: - Assassin: 12 (highest - critical specialists) - Luminary: 11 (divine favor) - Wildstrider/Lorekeeper: 10 (average) - Arcanist/Oathkeeper: 9 (modest) - Vanguard: 8 (default - relies on strength) - Necromancer: 7 (lowest - dark arts cost) Changes: - Add luck field to Stats dataclass with default of 8 - Add LUCK to StatType enum - Update all 8 class YAML files with luck values - Display LUK in character panel (play page) and detail page - Update DATA_MODELS.md documentation Backward compatible: existing characters without luck default to 8.
115 lines
3.8 KiB
Python
115 lines
3.8 KiB
Python
"""
|
|
Enumeration types for the Code of Conquest game system.
|
|
|
|
This module defines all enum types used throughout the data models to ensure
|
|
type safety and prevent invalid values.
|
|
"""
|
|
|
|
from enum import Enum
|
|
|
|
|
|
class EffectType(Enum):
|
|
"""Types of effects that can be applied to combatants."""
|
|
|
|
BUFF = "buff" # Temporarily increase stats
|
|
DEBUFF = "debuff" # Temporarily decrease stats
|
|
DOT = "dot" # Damage over time (poison, bleed, burn)
|
|
HOT = "hot" # Heal over time (regeneration)
|
|
STUN = "stun" # Prevent actions (skip turn)
|
|
SHIELD = "shield" # Absorb damage before HP loss
|
|
|
|
|
|
class DamageType(Enum):
|
|
"""Types of damage that can be dealt in combat."""
|
|
|
|
PHYSICAL = "physical" # Standard weapon damage
|
|
FIRE = "fire" # Fire-based magic damage
|
|
ICE = "ice" # Ice-based magic damage
|
|
LIGHTNING = "lightning" # Lightning-based magic damage
|
|
HOLY = "holy" # Holy/divine damage
|
|
SHADOW = "shadow" # Dark/shadow magic damage
|
|
POISON = "poison" # Poison damage (usually DoT)
|
|
|
|
|
|
class ItemType(Enum):
|
|
"""Categories of items in the game."""
|
|
|
|
WEAPON = "weapon" # Adds damage, may have special effects
|
|
ARMOR = "armor" # Adds defense/resistance
|
|
CONSUMABLE = "consumable" # One-time use (potions, scrolls)
|
|
QUEST_ITEM = "quest_item" # Story-related, non-tradeable
|
|
|
|
|
|
class StatType(Enum):
|
|
"""Character attribute types."""
|
|
|
|
STRENGTH = "strength" # Physical power
|
|
DEXTERITY = "dexterity" # Agility and precision
|
|
CONSTITUTION = "constitution" # Endurance and health
|
|
INTELLIGENCE = "intelligence" # Magical power
|
|
WISDOM = "wisdom" # Perception and insight
|
|
CHARISMA = "charisma" # Social influence
|
|
LUCK = "luck" # Fortune and fate
|
|
|
|
|
|
class AbilityType(Enum):
|
|
"""Categories of abilities that can be used in combat or exploration."""
|
|
|
|
ATTACK = "attack" # Basic physical attack
|
|
SPELL = "spell" # Magical spell
|
|
SKILL = "skill" # Special class ability
|
|
ITEM_USE = "item_use" # Using a consumable item
|
|
DEFEND = "defend" # Defensive action
|
|
|
|
|
|
class CombatStatus(Enum):
|
|
"""Status of a combat encounter."""
|
|
|
|
ACTIVE = "active" # Combat is ongoing
|
|
VICTORY = "victory" # Player(s) won
|
|
DEFEAT = "defeat" # Player(s) lost
|
|
FLED = "fled" # Player(s) escaped
|
|
|
|
|
|
class SessionStatus(Enum):
|
|
"""Status of a game session."""
|
|
|
|
ACTIVE = "active" # Session is ongoing
|
|
COMPLETED = "completed" # Session ended normally
|
|
TIMEOUT = "timeout" # Session ended due to inactivity
|
|
|
|
|
|
class ListingStatus(Enum):
|
|
"""Status of a marketplace listing."""
|
|
|
|
ACTIVE = "active" # Listing is live
|
|
SOLD = "sold" # Item has been sold
|
|
EXPIRED = "expired" # Listing time ran out
|
|
REMOVED = "removed" # Seller cancelled listing
|
|
|
|
|
|
class ListingType(Enum):
|
|
"""Type of marketplace listing."""
|
|
|
|
AUCTION = "auction" # Bidding system
|
|
FIXED_PRICE = "fixed_price" # Immediate purchase at set price
|
|
|
|
|
|
class SessionType(Enum):
|
|
"""Type of game session."""
|
|
|
|
SOLO = "solo" # Single-player session
|
|
MULTIPLAYER = "multiplayer" # Multi-player party session
|
|
|
|
|
|
class LocationType(Enum):
|
|
"""Types of locations in the game world."""
|
|
|
|
TOWN = "town" # Town or city
|
|
TAVERN = "tavern" # Tavern or inn
|
|
WILDERNESS = "wilderness" # Outdoor wilderness areas
|
|
DUNGEON = "dungeon" # Underground dungeons/caves
|
|
RUINS = "ruins" # Ancient ruins
|
|
LIBRARY = "library" # Library or archive
|
|
SAFE_AREA = "safe_area" # Safe rest areas
|