MCPcopy Index your code
hub / github.com/erick-tcsder/duns-n-dracs

github.com/erick-tcsder/duns-n-dracs @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
103 symbols 198 edges 35 files 0 documented · 0% updated 3y ago★ 38
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Duns n Dracs

Author

Erick Fonseca Perez

Description

Duns n Dracs is a variation of this popular game mastered by AI.

Cohere AI is your dungeon master ... each story, each entity was generated using cohere Everthing is about AI:

  • The images was generated using Stable Diffusion.
  • The Name generation service was manually coded to use HMM (Hidden Markov Models) in this sample variables (awareness=3).
  • The game system and the dificulty are manually configurable

Game System

After setting up your character you can enter an instance of an unlocked dungeon. The game have several levels of dificulty through each dungeon. You can move through map defeating enemies and leveling up. In each fight Cohere Dungeon Master will generate a simple short story as introduction, afterwards the player throws the D20 (dice of 20 sides) obtaining random a number between 1 and 20, based on that and the gap of level between your character and the room level a result is obtained and Conhere AI generates an ending for that small story. Your level stands after beeing defeated so you can try again and eventually become the lord of this amazing world.

Cohere

  • The name of the Dungeons are static but was initially generated using cohere
  • When entering a dungeon a sample of 20 magical creatures are generated
  • All the magical creatures are labelled as (HOSTILE, NPC or NEUTRAL)
  • When entering a room and given the name of the entity in thar room, the name of the character and the type of room (hostile, boss, neutral or npc) a story is generated using cohere. That story is used as introduction to the fight.
  • After trowing the dice and obtaining a number, the result is used to generate a story using cohere. That story is used as ending to the fight.

Tech Stack

  • TypeScript
  • React JS
  • Tailwind CSS
  • Cohere AI
  • React Router
  • Axios
  • Font Awesome Icons

Extension points exported contracts — how you extend this code

MoveOptionProps (Interface)
(no doc)
src/components/molecules/MoveOption.tsx
GenerateBody (Interface)
(no doc)
src/services/cohere/BaseCohereService.ts
CharacterStaticsProps (Interface)
(no doc)
src/components/molecules/CharacterStatics.tsx
GenerateResponse (Interface)
(no doc)
src/services/cohere/BaseCohereService.ts
LandscapeImageProps (Interface)
(no doc)
src/components/atoms/LandscapeImage.tsx
ClassifyBody (Interface)
(no doc)
src/services/cohere/BaseCohereService.ts
MapIconSquareProps (Interface)
(no doc)
src/components/atoms/MapIconSquare.tsx
ClassifyResponse (Interface)
(no doc)
src/services/cohere/BaseCohereService.ts

Core symbols most depended-on inside this repo

move
called by 8
src/utils/positionUtils.ts
setGame
called by 4
src/utils/localStorageUtils.ts
getGame
called by 4
src/utils/localStorageUtils.ts
getUnlocks
called by 3
src/utils/localStorageUtils.ts
getDeveloperMode
called by 3
src/utils/localStorageUtils.ts
getCardFromRoomType
called by 3
src/services/Map.ts
m_xp
called by 3
src/services/Character.ts
m_hp
called by 3
src/services/Character.ts

Shape

Method 40
Function 34
Class 16
Interface 11
Enum 2

Languages

TypeScript100%

Modules by API surface

src/services/Map.ts13 symbols
src/services/Character.ts13 symbols
src/services/Game.ts12 symbols
src/services/cohere/BaseCohereService.ts9 symbols
src/utils/localStorageUtils.ts8 symbols
src/services/NameGenerationService.ts6 symbols
src/services/cohere/StoryService.ts4 symbols
src/services/cohere/EntitiesService.ts4 symbols
src/utils/stringUtils.ts3 symbols
src/utils/positionUtils.ts3 symbols
src/pages/AppLayout.tsx2 symbols
src/components/organisms/StageCard.tsx2 symbols

For agents

$ claude mcp add duns-n-dracs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page