zero-to-mastery/ZTM-Quest

💼 Implement Job Application Logic

Offen

#212 geöffnet am 03.10.2025

 (6 Kommentare) (0 Reaktionen) (1 zugewiesene Person)JavaScript (132 Forks)auto 404
enhancementhacktoberfest

Repository-Metriken

Stars
 (39 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

This task implements the core game logic for the player to apply for and potentially receive a job within the map_company_interior. This feature is essential for the main character to earn money and advance in the game.

Objectives

  1. Identify Job NPC: Designate one specific NPC (e.g., a manager or receptionist) within the company interior map to initiate the job application process.
  2. Dialogue and Interaction:
    • Set up a conditional dialogue tree when the player interacts with the Job NPC.
    • The dialogue should offer the player the option to "Apply for a Job."
  3. Application Process Logic:
    • Implement a success/failure chance for the job application. This can be a simple random roll initially, or based on hidden player stats (if applicable).
    • If successful, update the player's status (e.g., hasJob = true).
    • If failed, provide a brief feedback message (e.g., "We'll call you," or "Try again later").
  4. Recurring Job Dialogue: Once the player has the job, the NPC's dialogue should change to reflect the new status (e.g., "Welcome back to work," or options to view pay/tasks).
  5. Data Storage: Ensure the new job status is correctly saved and loaded with the player's game data.

Technical Notes

  • This logic will likely reside in a new function within a jobHandler.js file or integrated into the existing questHandler.js if the job is treated as a persistent quest/status.
  • Dialogue/UI: Utilize the existing dialog components (which were updated in the previous task) to handle the job application flow and results.

Dependencies:

  • This task requires the map_company_interior to be completed and accessible.
  • Assumes the basic player state management (saving/loading stats) is functional.

Contributor Guide