Clash Blueprint Engine API
    Preparing search index...

    Interface GameRules

    The behavioral projection of a game that downstream layers (simulation, analyzer, AI) consume. It is a small port interface deliberately living in the core so those packages depend only on the engine, never on how a game is loaded. @clash/rules-engine builds one from a game.json manifest; the engine core itself never reads it (the Village aggregate stays game-neutral).

    interface GameRules {
        coreCategory: string | undefined;
        tierLabel: string;
        wallHitpoints: number;
        categoryHitpoints(category: string): number | undefined;
        hasRole(category: string, role: string): boolean;
        isPassable(category: string): boolean;
        isTargetable(category: string): boolean;
    }
    Index
    coreCategory: string | undefined

    Category whose building is the base's core/HQ, if the game has one.

    tierLabel: string

    Label for the progression axis, e.g. "Town Hall" or "Keep Level".

    wallHitpoints: number
    • Default hit points for a category, or undefined to fall back generically.

      Parameters

      • category: string

      Returns number | undefined

    • Does this category carry a behavioral role (e.g. "storage")?

      Parameters

      • category: string
      • role: string

      Returns boolean