Spaces:
Running
Running
File size: 1,151 Bytes
414dc55 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | """Clues and facts - the discoverable evidence the player reasons over."""
from __future__ import annotations
from pydantic import BaseModel, ConfigDict, Field
from .enums import DiscoveryMethod
class Fact(BaseModel):
"""An atomic truth about the case. ``true_value`` lets a fact encode a claim
that is false (e.g. a suspect's stated whereabouts)."""
model_config = ConfigDict(frozen=True)
fact_id: str
statement: str
true_value: bool = True
loc_id: str | None = None
at_min: int | None = None
class Clue(BaseModel):
"""A piece of evidence the player can discover and present.
A clue listed in a suspect's ``AnchoredLie.breaks_on`` and whose
``contradicts_alibi_of`` names that suspect is "breaking" evidence.
"""
model_config = ConfigDict(frozen=True)
clue_id: str
name: str
reveal_text: str
discoverable_at_loc_id: str
discovery_method: DiscoveryMethod
supports_fact_id: str | None = None
points_to_sus_id: str | None = None
contradicts_alibi_of: str | None = None
is_red_herring: bool = False
weight: float = Field(default=1.0, ge=0.0, le=1.0)
|