games.among_us.models¶

Comprehensive data models for Among Us social deduction gameplay.

This module provides sophisticated data models for the Among Us game implementation, supporting both cooperative crew tasks and deceptive impostor gameplay. The models enable structured data handling for complex social deduction mechanics, spatial navigation, task management, and strategic decision-making.

The models support: - Role-based gameplay (Crewmate vs Impostor) - Spatial navigation with rooms and vents - Task management with multiple task types - Sabotage systems with critical and non-critical events - Memory and observation tracking for deduction - Strategic analysis and decision-making - Meeting and voting mechanics

Examples

Creating a player with tasks:

player = PlayerState(
    id="player1",
    role=PlayerRole.CREWMATE,
    location="cafeteria",
    tasks=[
        Task(
            id="task1",
            type=TaskType.SHORT,
            location="electrical",
            description="Fix wiring"
        )
    ]
)

Impostor actions:

impostor = PlayerState(
    id="impostor1",
    role=PlayerRole.IMPOSTOR,
    location="medbay"
)

# Check kill ability
if impostor.can_kill(kill_cooldown=0):
    decision = AmongUsPlayerDecision(
        action_type=AmongUsActionType.KILL,
        target_player="player2",
        reasoning="Isolated target in medbay"
    )

Sabotage management:

sabotage = SabotageEvent(
    type="reactor",
    location="reactor",
    timer=30,
    resolution_points=[
        SabotageResolutionPoint(
            id="reactor_left",
            location="reactor",
            description="Left panel"
        ),
        SabotageResolutionPoint(
            id="reactor_right",
            location="reactor",
            description="Right panel"
        )
    ]
)

# Check if critical
if sabotage.is_critical():
    print("Emergency! Reactor meltdown imminent!")

Note

All models use Pydantic for validation and support both JSON serialization and integration with LLM-based strategic decision systems.

Classes¶

AmongUsActionType

All possible player actions in Among Us.

AmongUsAnalysis

Comprehensive game state analysis for strategic planning.

AmongUsGamePhase

Current phase of gameplay.

AmongUsPlayerDecision

Strategic decision model for player actions.

PlayerMemory

Cognitive model for player observations and deductions.

PlayerRole

Player roles defining objectives and abilities.

PlayerState

Complete state representation for a player in Among Us.

Room

Physical location on the game map.

RoomConnection

Physical connection between adjacent rooms.

SabotageEvent

Active sabotage affecting gameplay.

SabotageResolutionPoint

Interactive point for resolving sabotages.

SabotageStatus

Current state of a sabotage event.

SabotageType

Types of sabotage available to impostors.

Task

Individual task assignment for crewmates.

TaskStatus

Task completion status for tracking progress.

TaskType

Types of tasks with different characteristics.

Vent

Ventilation system access point for impostor movement.

VentConnection

Connection between two vents for impostor movement.

Module Contents¶

class games.among_us.models.AmongUsActionType¶

Bases: str, enum.Enum

All possible player actions in Among Us.

Actions are phase-dependent and role-restricted: - Movement and tasks: Available to all during task phase - Kill/Sabotage/Vent: Impostor-only actions - Report/Meeting: Emergency actions - Vote/Skip: Meeting phase only

Values:

MOVE: Travel between connected rooms DO_TASK: Perform assigned task (crewmates) KILL: Eliminate a player (impostors) SABOTAGE: Trigger map disruption (impostors) USE_VENT: Enter/exit ventilation (impostors) REPORT_BODY: Report a discovered body CALL_MEETING: Call emergency meeting VOTE: Vote to eject a player SKIP_VOTE: Vote to skip ejection

Initialize self. See help(type(self)) for accurate signature.

class games.among_us.models.AmongUsAnalysis(/, **data)¶

Bases: pydantic.BaseModel

Comprehensive game state analysis for strategic planning.

Provides high-level analysis of the current game situation, including win probability, player suspicions, and strategic recommendations. Used by AI agents for decision-making.

Parameters:

data (Any)

game_phase¶

Current game phase.

Type:

AmongUsGamePhase

crew_advantage¶

Balance of power (-1 to +1).

Type:

float

task_completion_percentage¶

Overall task progress.

Type:

float

suspected_impostors¶

Likely impostor IDs.

Type:

List[str]

trusted_players¶

Confirmed crewmate IDs.

Type:

List[str]

active_sabotages¶

Current sabotage types.

Type:

List[str]

recommended_strategy¶

Strategic advice.

Type:

str

risk_assessment¶

Current danger evaluation.

Type:

str

priority_actions¶

Urgent actions needed.

Type:

List[str]

Examples

Early game analysis:

analysis = AmongUsAnalysis(
    game_phase=AmongUsGamePhase.TASKS,
    crew_advantage=0.0,
    task_completion_percentage=15.0,
    suspected_impostors=[],
    trusted_players=["Green"],  # Did visual task
    active_sabotages=[],
    recommended_strategy="Focus on tasks, stay in groups",
    risk_assessment="Low risk, no suspicious behavior yet",
    priority_actions=["Complete tasks", "Observe players"]
)

Critical situation:

analysis = AmongUsAnalysis(
    game_phase=AmongUsGamePhase.TASKS,
    crew_advantage=-0.7,
    task_completion_percentage=80.0,
    suspected_impostors=["Red", "Purple"],
    trusted_players=["Blue", "Green"],
    active_sabotages=["reactor"],
    recommended_strategy="Fix reactor immediately!",
    risk_assessment="Critical: reactor meltdown imminent",
    priority_actions=["Fix reactor", "Stay together"]
)

Meeting phase analysis:

analysis = AmongUsAnalysis(
    game_phase=AmongUsGamePhase.VOTING,
    crew_advantage=-0.3,
    task_completion_percentage=60.0,
    suspected_impostors=["Red"],
    trusted_players=["Blue", "Green", "Yellow"],
    active_sabotages=[],
    recommended_strategy="Vote Red based on venting evidence",
    risk_assessment="High stakes vote - wrong choice loses game",
    priority_actions=["Vote Red", "Share observations"]
)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

classmethod validate_priority_actions(v)¶

Ensure priority actions list is reasonable length.

Parameters:

v (List[str]) – Priority actions to validate.

Returns:

Validated actions list.

Return type:

List[str]

Raises:

ValueError – If too many priorities listed.

property game_stage: str¶

Classify game progression stage.

Returns:

Early, mid, or late game classification.

Return type:

str

property is_emergency: bool¶

Check if situation requires immediate action.

Returns:

True if critical sabotages active or crew disadvantaged.

Return type:

bool

model_config¶

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

property win_probability: dict[str, float]¶

Estimate win probability for each team.

Returns:

Win chances for crew and impostors.

Return type:

Dict[str, float]

class games.among_us.models.AmongUsGamePhase¶

Bases: str, enum.Enum

Current phase of gameplay.

Game alternates between task/action phases and discussion/voting.

Values:

TASKS: Normal gameplay with movement and actions MEETING: Discussion phase after body report or emergency VOTING: Active voting to eject a player GAME_OVER: Game concluded with winner determined

Initialize self. See help(type(self)) for accurate signature.

class games.among_us.models.AmongUsPlayerDecision(/, **data)¶

Bases: pydantic.BaseModel

Strategic decision model for player actions.

Encapsulates a player’s chosen action with reasoning and confidence. Used by AI agents to make informed decisions based on game state and objectives. Includes justification for social deduction.

Parameters:

data (Any)

action_type¶

Chosen action to perform.

Type:

AmongUsActionType

target_location¶

Destination for movement.

Type:

Optional[str]

target_player¶

Target for kill/vote actions.

Type:

Optional[str]

target_task¶

Task ID to attempt.

Type:

Optional[str]

reasoning¶

Strategic justification for action.

Type:

str

confidence¶

Confidence level in decision (0-1).

Type:

float

Examples

Crewmate task decision:

decision = AmongUsPlayerDecision(
    action_type=AmongUsActionType.DO_TASK,
    target_task="fix_wiring_1",
    reasoning="Completing tasks helps crew win",
    confidence=0.9
)

Impostor kill decision:

decision = AmongUsPlayerDecision(
    action_type=AmongUsActionType.KILL,
    target_player="Blue",
    reasoning="Blue is isolated in electrical",
    confidence=0.8
)

Strategic movement:

decision = AmongUsPlayerDecision(
    action_type=AmongUsActionType.MOVE,
    target_location="medbay",
    reasoning="Need to establish alibi with visual task",
    confidence=0.7
)

Voting decision:

decision = AmongUsPlayerDecision(
    action_type=AmongUsActionType.VOTE,
    target_player="Red",
    reasoning="Red was seen venting by Green",
    confidence=0.95
)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

classmethod validate_location_for_action(v, info)¶

Ensure target location is provided for movement actions.

Parameters:
  • v (Optional[str]) – Target location value.

  • info – Validation context with other fields.

Returns:

Validated location.

Return type:

Optional[str]

Raises:

ValueError – If location missing for movement.

property is_aggressive_action: bool¶

Check if action is aggressive/hostile.

Returns:

True for kill/sabotage actions.

Return type:

bool

property requires_target_player: bool¶

Check if action needs a target player.

Returns:

True for kill/vote actions.

Return type:

bool

class games.among_us.models.PlayerMemory(/, **data)¶

Bases: pydantic.BaseModel

Cognitive model for player observations and deductions.

Tracks what a player has observed and deduced during gameplay, forming the basis for social deduction. Memory includes direct observations, suspicion levels, alibis, and movement patterns.

Parameters:

data (Any)

observations¶

Chronological list of observations.

Type:

List[str]

player_suspicions¶

Suspicion levels (0-1) per player.

Type:

Dict[str, float]

player_alibis¶

Last known locations of players.

Type:

Dict[str, str]

location_history¶

Recent rooms visited by this player.

Type:

List[str]

Examples

Tracking suspicious behavior:

memory = PlayerMemory(
    observations=[
        "Saw Red near body in electrical",
        "Blue was alone in medbay",
        "Green completed visual task"
    ],
    player_suspicions={
        "Red": 0.8,
        "Blue": 0.4,
        "Green": 0.0
    }
)

Building alibis:

memory.player_alibis = {
    "Red": "electrical",
    "Blue": "medbay",
    "Green": "cafeteria"
}

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

classmethod validate_suspicion_levels(v)¶

Ensure suspicion levels are within valid range.

Parameters:

v (Dict[str, float]) – Suspicion dictionary to validate.

Returns:

Validated suspicion levels.

Return type:

Dict[str, float]

Raises:

ValueError – If suspicion level outside 0-1 range.

property most_suspicious: str | None¶

Identify the most suspicious player.

Returns:

Player ID with highest suspicion or None.

Return type:

Optional[str]

property trusted_players: list[str]¶

List players with low suspicion (< 0.3).

Returns:

IDs of trusted players.

Return type:

List[str]

class games.among_us.models.PlayerRole¶

Bases: str, enum.Enum

Player roles defining objectives and abilities.

Determines the player’s win condition and available actions: - Crewmates: Complete tasks and identify impostors - Impostors: Eliminate crew and avoid detection

Values:

CREWMATE: Innocent crew member focused on tasks IMPOSTOR: Deceptive player who can kill and sabotage

Initialize self. See help(type(self)) for accurate signature.

class games.among_us.models.PlayerState(/, **data)¶

Bases: pydantic.BaseModel

Complete state representation for a player in Among Us.

Encapsulates all information about a player including their role, location, tasks, survival status, and cognitive state. Supports both crewmate and impostor gameplay with appropriate abilities.

Parameters:

data (Any)

id¶

Unique player identifier.

Type:

str

role¶

Crewmate or Impostor designation.

Type:

PlayerRole

location¶

Current room location.

Type:

str

tasks¶

Assigned tasks (empty for impostors).

Type:

List[Task]

is_alive¶

Whether player is still active.

Type:

bool

last_action¶

Most recent action taken.

Type:

Optional[str]

observations¶

Direct observations this turn.

Type:

List[str]

in_vent¶

Whether currently hiding in vent.

Type:

bool

current_vent¶

ID of occupied vent.

Type:

Optional[str]

memory¶

Cognitive state and deductions.

Type:

PlayerMemory

Examples

Crewmate with tasks:

crewmate = PlayerState(
    id="Blue",
    role=PlayerRole.CREWMATE,
    location="electrical",
    tasks=[
        Task(id="wire1", type=TaskType.COMMON,
             location="electrical", description="Fix wiring"),
        Task(id="scan1", type=TaskType.VISUAL,
             location="medbay", description="Submit to scan")
    ]
)

Impostor in vent:

impostor = PlayerState(
    id="Red",
    role=PlayerRole.IMPOSTOR,
    location="electrical",
    tasks=[],
    in_vent=True,
    current_vent="electrical_vent"
)

Dead player:

ghost = PlayerState(
    id="Green",
    role=PlayerRole.CREWMATE,
    location="cafeteria",
    tasks=[],
    is_alive=False
)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

can_kill(kill_cooldown=0)¶

Check if the player can perform a kill action.

Kill ability requires: - Impostor role - Being alive - Kill cooldown expired - Not currently in vent

Parameters:

kill_cooldown (int) – Remaining cooldown seconds.

Returns:

True if all conditions met for killing.

Return type:

bool

Examples

>>> impostor = PlayerState(id="Red", role=PlayerRole.IMPOSTOR,
...                        location="electrical", is_alive=True)
>>> impostor.can_kill(kill_cooldown=0)
True
>>> impostor.can_kill(kill_cooldown=10)
False
can_use_vent()¶

Check if the player can use ventilation systems.

Vent usage requires: - Impostor role - Being alive

Returns:

True if player can enter/exit vents.

Return type:

bool

Examples

>>> impostor = PlayerState(id="Red", role=PlayerRole.IMPOSTOR,
...                        location="electrical", is_alive=True)
>>> impostor.can_use_vent()
True
is_crewmate()¶

Check if the player is a crewmate.

Returns:

True if player has crewmate role.

Return type:

bool

Examples

>>> crew = PlayerState(id="Blue", role=PlayerRole.CREWMATE, location="cafeteria")
>>> crew.is_crewmate()
True
is_impostor()¶

Check if the player is an impostor.

Returns:

True if player has impostor role.

Return type:

bool

Examples

>>> impostor = PlayerState(id="Red", role=PlayerRole.IMPOSTOR, location="cafeteria")
>>> impostor.is_impostor()
True
property incomplete_tasks: list[Task]¶

Get list of uncompleted tasks.

Returns:

Tasks that still need completion.

Return type:

List[Task]

property is_ghost: bool¶

Check if player is a ghost (dead but still participating).

Returns:

True if player is dead.

Return type:

bool

property task_completion_rate: float¶

Calculate percentage of tasks completed.

Returns:

Completion percentage (0.0-100.0).

Return type:

float

class games.among_us.models.Room(/, **data)¶

Bases: pydantic.BaseModel

Physical location on the game map.

Rooms are the primary spaces where gameplay occurs. Players move between rooms, complete tasks in specific rooms, and use room layout for strategic positioning. Some rooms contain vents for impostor movement.

Parameters:

data (Any)

id¶

Unique room identifier.

Type:

str

name¶

Display name for the room.

Type:

str

connections¶

Adjacent room connections.

Type:

List[RoomConnection]

vents¶

IDs of vents in this room.

Type:

List[str]

Examples

Central hub room:

cafeteria = Room(
    id="cafeteria",
    name="Cafeteria",
    connections=[
        RoomConnection(target_room="upper_engine"),
        RoomConnection(target_room="medbay"),
        RoomConnection(target_room="admin")
    ]
)

Task room with vent:

electrical = Room(
    id="electrical",
    name="Electrical",
    connections=[
        RoomConnection(target_room="storage"),
        RoomConnection(target_room="lower_engine")
    ],
    vents=["electrical_vent"]
)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

get_connection(room_id)¶

Get the connection to another room if it exists.

Parameters:

room_id (str) – ID of the target room.

Returns:

Connection object or None.

Return type:

Optional[RoomConnection]

Examples

>>> conn = cafeteria.get_connection("medbay")
>>> conn.distance
1
is_connected_to(room_id)¶

Check if this room directly connects to another room.

Parameters:

room_id (str) – ID of the target room.

Returns:

True if rooms are directly connected.

Return type:

bool

Examples

>>> cafeteria.is_connected_to("medbay")
True
>>> cafeteria.is_connected_to("reactor")
False
property connection_count: int¶

Count number of room connections.

Returns:

Total adjacent rooms.

Return type:

int

property has_vent: bool¶

Check if room contains any vents.

Returns:

True if room has vents for impostor use.

Return type:

bool

class games.among_us.models.RoomConnection(/, **data)¶

Bases: pydantic.BaseModel

Physical connection between adjacent rooms.

Represents hallways and passages between rooms, defining the map topology. Connections can be blocked by door sabotages, forcing players to find alternate routes.

Parameters:

data (Any)

target_room¶

ID of the connected room.

Type:

str

distance¶

Travel time in seconds.

Type:

int

is_blocked¶

Whether passage is sabotage-blocked.

Type:

bool

Examples

Standard hallway:

connection = RoomConnection(
    target_room="cafeteria",
    distance=1
)

Long corridor:

connection = RoomConnection(
    target_room="reactor",
    distance=3
)

Sabotaged door:

connection = RoomConnection(
    target_room="electrical",
    distance=1,
    is_blocked=True
)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

class games.among_us.models.SabotageEvent(/, **data)¶

Bases: pydantic.BaseModel

Active sabotage affecting gameplay.

Represents an ongoing sabotage that disrupts normal gameplay. Critical sabotages have timers and can end the game, while non-critical sabotages create tactical advantages.

Parameters:

data (Any)

type¶

Type of sabotage from SabotageType.

Type:

str

location¶

Primary affected location.

Type:

str

timer¶

Seconds until critical failure.

Type:

int

resolved¶

Whether sabotage is fixed.

Type:

bool

resolution_points¶

Fix locations.

Type:

List[SabotageResolutionPoint]

Examples

Critical reactor sabotage:

sabotage = SabotageEvent(
    type="reactor",
    location="reactor",
    timer=30,
    resolution_points=[
        SabotageResolutionPoint(
            id="reactor_left",
            location="reactor",
            description="Left panel"
        ),
        SabotageResolutionPoint(
            id="reactor_right",
            location="reactor",
            description="Right panel"
        )
    ]
)

Non-critical lights sabotage:

sabotage = SabotageEvent(
    type="lights",
    location="electrical",
    timer=0,  # No timer for non-critical
    resolution_points=[
        SabotageResolutionPoint(
            id="light_panel",
            location="electrical",
            description="Fix light switches"
        )
    ]
)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

is_critical()¶

Check if this is a game-ending critical sabotage.

Critical sabotages (O2, Reactor) can end the game if not resolved within the time limit.

Returns:

True if sabotage is critical.

Return type:

bool

Examples

>>> reactor = SabotageEvent(type="reactor", location="reactor", timer=30)
>>> reactor.is_critical()
True
>>> lights = SabotageEvent(type="lights", location="electrical", timer=0)
>>> lights.is_critical()
False
is_resolved()¶

Check if the sabotage is fully resolved.

Sabotage is resolved when either marked resolved or all resolution points are activated.

Returns:

True if sabotage is fixed.

Return type:

bool

Examples

>>> sabotage = SabotageEvent(type="reactor", location="reactor", timer=30)
>>> sabotage.is_resolved()
False
>>> sabotage.resolved = True
>>> sabotage.is_resolved()
True
property points_remaining: int¶

Count unresolved resolution points.

Returns:

Number of points still needing activation.

Return type:

int

property urgency_level: str¶

Determine urgency of addressing this sabotage.

Returns:

Urgency classification.

Return type:

str

class games.among_us.models.SabotageResolutionPoint(/, **data)¶

Bases: pydantic.BaseModel

Interactive point for resolving sabotages.

Critical sabotages require multiple resolution points to be activated simultaneously (e.g., reactor needs two players). Non-critical sabotages may have single resolution points.

Parameters:

data (Any)

id¶

Unique identifier for this point.

Type:

str

location¶

Room containing the resolution point.

Type:

str

description¶

What needs to be done here.

Type:

str

resolved¶

Whether this point is activated.

Type:

bool

resolver_id¶

Player who resolved this.

Type:

Optional[str]

Examples

Reactor resolution point:

point = SabotageResolutionPoint(
    id="reactor_left",
    location="reactor",
    description="Hold left reactor panel"
)

O2 resolution point:

point = SabotageResolutionPoint(
    id="o2_admin",
    location="admin",
    description="Enter O2 code in admin"
)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

class games.among_us.models.SabotageStatus¶

Bases: str, enum.Enum

Current state of a sabotage event.

Values:

ACTIVE: Sabotage in effect, needs resolution RESOLVED: Successfully fixed by crewmates FAILED: Timer expired on critical sabotage (impostor win)

Initialize self. See help(type(self)) for accurate signature.

class games.among_us.models.SabotageType¶

Bases: str, enum.Enum

Types of sabotage available to impostors.

Sabotages disrupt crewmate activities and create opportunities for kills. Critical sabotages can end the game if not resolved.

Values:

LIGHTS: Reduces crewmate vision radius COMMS: Hides task list and prevents meetings OXYGEN: Critical - requires two-point fix within time limit REACTOR: Critical - requires two-point fix within time limit DOORS: Locks specific room doors temporarily

Initialize self. See help(type(self)) for accurate signature.

class games.among_us.models.Task(/, **data)¶

Bases: pydantic.BaseModel

Individual task assignment for crewmates.

Tasks are the primary objective for crewmates, requiring them to visit specific locations and complete mini-games. Visual tasks can prove innocence by showing animations to nearby players.

Parameters:

data (Any)

id¶

Unique task identifier.

Type:

str

type¶

Category of task affecting behavior.

Type:

TaskType

location¶

Room where task must be performed.

Type:

str

description¶

Human-readable task description.

Type:

str

status¶

Current completion state.

Type:

TaskStatus

visual_indicator¶

Whether task shows visible proof.

Type:

bool

Examples

Visual task proving innocence:

task = Task(
    id="medbay_scan",
    type=TaskType.VISUAL,
    location="medbay",
    description="Submit to medbay scan",
    visual_indicator=True
)

Common electrical task:

task = Task(
    id="fix_wiring",
    type=TaskType.COMMON,
    location="electrical",
    description="Fix wiring"
)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

property completion_percentage: float¶

Calculate task completion percentage.

Returns:

0.0 for not started, 0.5 for in progress, 1.0 for completed.

Return type:

float

property is_completed: bool¶

Check if task is fully completed.

Returns:

True if task status is COMPLETED.

Return type:

bool

class games.among_us.models.TaskStatus¶

Bases: str, enum.Enum

Task completion status for tracking progress.

Values:

NOT_STARTED: Task not yet attempted IN_PROGRESS: Task partially completed COMPLETED: Task fully finished

Initialize self. See help(type(self)) for accurate signature.

class games.among_us.models.TaskType¶

Bases: str, enum.Enum

Types of tasks with different characteristics.

Task types affect completion time and verification: - Visual tasks provide visible proof of innocence - Common tasks are shared by all crewmates - Short/Long tasks vary in completion time

Values:

VISUAL: Tasks with visible animations (proves innocence) COMMON: Tasks assigned to all crewmates SHORT: Quick tasks (1-3 seconds) LONG: Extended tasks (5-10 seconds)

Initialize self. See help(type(self)) for accurate signature.

class games.among_us.models.Vent(/, **data)¶

Bases: pydantic.BaseModel

Ventilation system access point for impostor movement.

Vents are strategic tools exclusive to impostors, allowing rapid movement between connected locations while avoiding detection. Each vent can connect to multiple other vents forming a network.

Parameters:

data (Any)

id¶

Unique vent identifier.

Type:

str

location¶

Room containing this vent.

Type:

str

connections¶

Available vent routes.

Type:

List[VentConnection]

Examples

Central vent hub:

vent = Vent(
    id="electrical_vent",
    location="electrical",
    connections=[
        VentConnection(target_vent_id="medbay_vent"),
        VentConnection(target_vent_id="security_vent")
    ]
)

Isolated vent:

vent = Vent(
    id="reactor_vent",
    location="reactor",
    connections=[
        VentConnection(
            target_vent_id="upper_engine_vent",
            travel_time=3
        )
    ]
)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

property connection_count: int¶

Count number of connected vents.

Returns:

Total number of vent connections.

Return type:

int

property is_connected: bool¶

Check if vent has any connections.

Returns:

True if vent connects to other vents.

Return type:

bool

class games.among_us.models.VentConnection(/, **data)¶

Bases: pydantic.BaseModel

Connection between two vents for impostor movement.

Vents provide secret passages for impostors to move quickly and unseen between locations. Travel time simulates crawling through ventilation systems.

Parameters:

data (Any)

target_vent_id¶

ID of the connected vent.

Type:

str

travel_time¶

Seconds required to traverse connection.

Type:

int

Examples

Fast vent connection:

connection = VentConnection(
    target_vent_id="medbay_vent",
    travel_time=1
)

Distant vent connection:

connection = VentConnection(
    target_vent_id="reactor_vent",
    travel_time=4
)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.