JSPM

@oasis-discord/game-blocks

0.1.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 2
    • Score
      100M100P100Q65892F
    • License MIT

    Shared game logic blocks for the Oasis Discord ecosystem

    Package Exports

    • @oasis-discord/game-blocks

    Readme

    @oasis-discord/game-blocks

    Shared game logic blocks for the Oasis Discord ecosystem. Pure TypeScript — no database calls, no HTTP calls. Import what you need, configure it, use it.

    Install

    npm install @oasis-discord/game-blocks

    Blocks

    Block Import Description
    Turn Management TurnManager Player queue, advance, skip, timeout
    Lobby System Lobby Join/leave/ready, host controls, player gates
    State Machine StateMachine Named states, transitions, guards, hooks
    Game Phase GamePhase Named phases with per-phase rules
    Score Tracking ScoreTracker Points per player, leaderboard, tiebreaker
    Player Elimination EliminationTracker Remove players, mark spectators
    Lives / HP LivesSystem Counter with floor, decrement, zero-detection
    Role Assignment RoleAssigner Assign roles from pool to players
    Weighted RNG weightedRandom Weighted random selection
    Payout Table PayoutTable Config table + inputs → payout multiplier
    Prompt Collection PromptCollector Collect N responses, reveal on trigger
    Judge Rotation JudgeRotation Circular czar/judge queue
    Image Rendering renderBoard Sharp-based board/grid image
    Image Compositing compositeImage Stack image layers into one scene
    Reaction Threshold ReactionThreshold Fire callback when reaction hits count
    Cooldown Engine CooldownEngine Per-user per-action TTL via Redis

    License

    MIT