wip close round/campaign/war + refacto json None

This commit is contained in:
Maxime Réaux 2026-02-11 19:22:43 +01:00
parent 4c8086caf4
commit 6cbb7c6534
26 changed files with 474 additions and 108 deletions

View file

@ -0,0 +1,30 @@
from datetime import datetime
from uuid import uuid4
class WarEvent:
def __init__(self, participant_id: str):
self.id: str = str(uuid4())
self.participant_id: str = participant_id
self.timestamp: datetime = datetime.now()
class TieResolved(WarEvent):
def __init__(self, participant_id: str, context_type: str, context_id: str):
super().__init__(participant_id)
self.context_type = context_type # battle, round, campaign, war
self.context_id = context_id
class InfluenceGained(WarEvent):
def __init__(self, participant_id: str, amount: int, source: str):
super().__init__(participant_id)
self.amount = amount
self.source = source # "battle", "tie_resolution", etc.
class InfluenceSpent(WarEvent):
def __init__(self, participant_id: str, amount: int, context: str):
super().__init__(participant_id)
self.amount = amount
self.context = context # "battle_tie", "campaign_tie", etc.