Skip to content

Add Blacksmith NPC in the village + basic interaction #4

Description

@trynogaunt

Objective

Add a Blacksmith NPC in the starting village and allow the hero to interact with them.

This NPC will later serve as the first shop in the game.

Context

The village already includes a blacksmith_shop room.
We just need:

  • an NPC object representing the Blacksmith
  • a simple interaction when the hero chooses to talk to them

What to implement

  • Create a minimal NPC class

    • name: str
    • dialogue: list[str] or a single greeting: str
    • (no advanced dialogue tree yet)
  • Update the village JSON so the blacksmith_shop room contains:

"npc": ["blacksmith"]

When the player enters the Blacksmith room:

  • UI offers: "Talk" option if an NPC is present
  • Talking to the NPC prints a simple text like:
    • "Welcome! Looking to buy some gear?"

Acceptance criteria

  • Blacksmith NPC is visible in the room display (Ex: “NPC: Blacksmith”)
  • Player can choose Talk
  • A greeting message is displayed
  • No shop logic yet

Hints

  • Interaction should stay in the Exploring state
  • NPC logic can be centralized in ui or world modules for now
  • JSON → code mapping already exists for rooms, you can extend it

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions