Server & Game refactor basics

This commit is contained in:
KuMiShi
2026-01-29 16:55:45 +01:00
parent 50d2b16224
commit e655de8f54
23 changed files with 189 additions and 121 deletions

14
events/event.py Normal file
View File

@@ -0,0 +1,14 @@
# Game imports
from serializable import Serializable
from entities.entity import Entity
# Native imports
import json
import uuid
class Event(Serializable):
def __init__(self, location:str):
super().__init__()
self.id = str(uuid.uuid4())
self.location = location
self.description = ""

14
events/turn.py Normal file
View File

@@ -0,0 +1,14 @@
# Native imports
from enum import Enum, IntEnum
class Action(Enum):
ATTACK = 'strength' # Physical Battle action
FORCE = 'strength' # Actions that requires physical effort
SPELL = 'intelligence' # Many kind of spell (battle or not)
SCAN = 'wisdom' # Danger in environment or NPC's lies
SPEECH = 'charisma' # To persuade or deceive
AGILE = 'dexterity' # Avoid traps or incoming attacks & spell
class BonusAction(IntEnum):
EQUIP_ITEM = 0
USE_CONSUMMABLE = 1