Temple System - xopherdeep/do-it-for-the-xp GitHub Wiki

Temple System

Temples are structured environments where players face more challenging beasts representing significant tasks. Each temple corresponds to a specific elemental affinity and offers specialized challenges and rewards.

Temple Structure

Each temple consists of a grid-based maze with different room types. The structure is defined by three main components:

graph TD
    A[Temple Structure] --> B[Entrance Position]
    A --> C[Maze Grid]
    A --> D[Room Definitions]

    C --> C1["Cell Symbols (e.g., q__q, $__$, ____)"]
    
    D --> D1[Room Types]
    D --> D2[Room Content]
    D --> D3[Side Configuration]
    
    D1 --> D1a[Wall]
    D1 --> D1b[Empty]
    D1 --> D1c[Entrance]
    D1 --> D1d[Monster]
    D1 --> D1e[Loot/Chest]
    D1 --> D1f[Boss]
    D1 --> D1g[MiniBoss]
    D1 --> D1h[Teleport]
    D1 --> D1i[Shop]
    D1 --> D1j[Health]
    
    D2 --> D2a[Monster Type]
    D2 --> D2b[Chest Contents]
    D2 --> D2c[Health Points]
    
    D3 --> D3a[Door]
    D3 --> D3b[Locked Door]
    D3 --> D3c[Wall]
    D3 --> D3d[Bombable Wall]
Loading

Example Temple Layout

The Wind Temple layout demonstrates how rooms are organized in a grid:

graph TD
    subgraph "Wind Temple Layout"
        TELE1["Teleport"] --- K1["Key Room"]
        K1 --- M1["Monster"]
        M1 --- BOSS["Boss Room"]
        BOSS --- L1["Loot Room"]
        
        M1 --- LCOM["Compass Room"]
        LCOM --- M2["Monster"]
        M2 --- MINI1["Mini-Boss"]
        
        SHOP["Shop"] --- M3["Monster"]
        M3 --- LCOM
        
        E["Empty Room"] --- M4["Monster"]
        M4 --- LMAP["Map Room"]
        
        LMAP --- M5["Monster"]
        M5 --- MINI2["Mini-Boss"]
        
        KEY["Key Room"] --- ENT["ENTRANCE"]
        ENT --- M6["Monster"]
        M6 --- TELE2["Teleport"]
    end
Loading

Temple Data Structure

A temple is represented with the following JavaScript structure:

const temple = {
  // Entrance coordinates [row, column]
  entrance: [5, 2],
  
  // 2D array representing the maze layout
  // Each cell contains a symbol that maps to a room definition
  maze: [
    [____, TELE, K001, ____, ____, ____], // y: 0
    [____, ____, q__q, ____, X__X, $__$], // y: 1
    [SHOP, q__q, LCOM, q__q, x__x, ____], // y: 2
    [____, O__O, q__q, LMAP, ____, $__$], // y: 3
    [____, ____, q__q, ____, q__q, x__x], // y: 4
    [____, K___, _00_, q__q, ____, TELE], // y: 5
    //x:0,  x:1,  x:2,  x:3,  x:4,  x:5
  ],
  
  // Room definitions - map symbols to their properties
  rooms: {
    // Wall - default empty space
    [____]: { type: "wall" },
    
    // Entrance room
    [_00_]: { 
      type: "entrance", 
      visited: true, 
      sides: { north: "locked" } 
    },
    
    // Monster room
    [q__q]: { 
      type: "monster", 
      content: { monsterType: "small" } 
    },
    
    // Treasure chest with dungeon item
    [$__$]: { 
      type: "loot", 
      content: { chest: "dungeon", dungeon: "compass" } 
    },
    
    // And other room definitions...
  }
};

Room Types

Each cell in the temple grid is assigned one of the following room types:

Room Type Symbol Description
Wall ____ Solid wall, cannot be entered
Entrance 00 Starting point of the temple
Empty O__O Empty room with no special features
Monster q__q Contains a monster to battle
Loot $__$ Contains a treasure chest
Boss X__X Contains the temple's final boss
Miniboss x__x Contains a mini-boss challenge
Teleport TELE Allows quick travel between areas
Shop SHOP Purchase or exchange items
Health H__P Restores health points

Room Content Types

Rooms can contain different types of content based on their room type:

  1. Monster Rooms:

    • Monster type: small, medium, large, boss
    • Associated task difficulty
  2. Loot Rooms:

    • Chest type: dungeon item or random loot
    • Dungeon items: map, compass, key, boss-key, special-item
    • Random loot: potions, ethers, elixirs, gold, equipment
  3. Health Rooms:

    • Health points amount to restore

Room Side Configuration

Each room can have custom configurations for each of its four sides (north, east, south, west):

  • Door: Standard connection between rooms (default)
  • Wall: Solid wall, no passage
  • Locked Door: Requires a key to open
  • Bombable Wall: Can be broken with a bomb item

Temple Navigation Items

These special items help with temple exploration:

  • Temple Map: Reveals the layout of the temple (walls and passages)
  • Compass: Shows the contents of rooms you haven't visited yet
  • Small Keys: Open locked doors within the temple
  • Boss Key: Required to access the Guardian Chamber

Temple Creator Tool

Game Masters can design custom temples using the Temple Creator tool, which allows:

  • Setting the grid size (5x5, 6x6, 7x7, 8x8, 10x10)
  • Placing different room types
  • Configuring room properties and content
  • Setting side configurations (doors, walls, locks)
  • Designating the temple entrance position

Elemental Temples

The game currently features nine elemental temples, each with unique themes and mechanics:

Temple ID Temple Name Description Level Special Focus
wind-temple Temple of Zephyr Masters of aerial magic and swift techniques 1 Speed and agility tasks
water-temple Aqua Haven Wielders of healing and fluid combat 2 Health and cleanliness tasks
earth-temple Gaia Sanctuary Guardians of nature and earthen powers 3 Organization and stability tasks
moon-temple Lunar Shrine Mysterious powers of the night sky 4 Reflection and planning tasks
fire-temple Inferno Citadel Home to powerful offensive spells 5 Energy and challenge tasks
light-temple Solar Sanctum Light magic and restoration abilities 6 Illumination and clarity tasks
ice-temple Frost Keep Specialists in ice magic and defense 7 Preservation and protection tasks
storm-temple Storm Spire Masters of lightning and thunder 8 Dynamic and forceful tasks
shadow-temple Shadow Sanctum Dark magic and mysterious arts 9 Hidden and complex tasks

Temple Progression

Room Navigation

  • Players can see what beast awaits in each room before entering if they have a compass
  • Once a room is entered, the doors lock until the battle is completed
  • Some rooms may be optional, while others are required for progression
  • Certain paths may be more difficult but offer better rewards

Temple Rewards

Standard Rewards

  • Each defeated beast provides XP, GP, and AP
  • Higher difficulty beasts offer greater rewards
  • Mini-bosses and guardians provide significant reward bonuses

Special Rewards

  • Temple Keys: Allow access to locked areas in this or other temples
  • Temple Artifacts: Enhance abilities related to the temple's elemental affinity
  • Temple Badges: Award achievements for temple completion
  • Temple Abilities: Unique skills only available by defeating temple guardians

Task Categories

Each elemental temple is associated with specific types of real-world tasks:

  • Wind Temple: Quick tasks, errands, communication (emails, messages, phone calls)
  • Water Temple: Cleaning, hygiene, hydration, swimming/water activities
  • Earth Temple: Gardening, organization, physical workspace maintenance
  • Moon Temple: Sleep habits, evening routines, reflection tasks
  • Fire Temple: Exercise, high-energy activities, challenging projects
  • Light Temple: Learning, study, creative work, inspiration-based activities
  • Ice Temple: Preservation tasks, financial planning, savings goals
  • Storm Temple: Crisis management, urgent tasks, intense deadlines
  • Shadow Temple: Private projects, personal development, habit breaking
⚠️ **GitHub.com Fallback** ⚠️