@umang-boss/claudemon 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/README.md +164 -0
  2. package/bin/claudemon.js +52 -0
  3. package/bunfig.toml +2 -0
  4. package/cli/doctor.ts +334 -0
  5. package/cli/index.ts +42 -0
  6. package/cli/install.ts +248 -0
  7. package/cli/shared.ts +102 -0
  8. package/cli/uninstall.ts +155 -0
  9. package/cli/update.ts +318 -0
  10. package/hooks/post-tool-use.sh +127 -0
  11. package/hooks/stop.sh +49 -0
  12. package/hooks/user-prompt-submit.sh +73 -0
  13. package/package.json +68 -0
  14. package/scripts/download-colorscripts.ts +311 -0
  15. package/skills/buddy/SKILL.md +47 -0
  16. package/sprites/colorscripts/small/1-bulbasaur.txt +11 -0
  17. package/sprites/colorscripts/small/10-caterpie.txt +9 -0
  18. package/sprites/colorscripts/small/100-voltorb.txt +8 -0
  19. package/sprites/colorscripts/small/101-electrode.txt +9 -0
  20. package/sprites/colorscripts/small/102-exeggcute.txt +10 -0
  21. package/sprites/colorscripts/small/103-exeggutor.txt +23 -0
  22. package/sprites/colorscripts/small/104-cubone.txt +11 -0
  23. package/sprites/colorscripts/small/105-marowak.txt +16 -0
  24. package/sprites/colorscripts/small/106-hitmonlee.txt +16 -0
  25. package/sprites/colorscripts/small/107-hitmonchan.txt +19 -0
  26. package/sprites/colorscripts/small/108-lickitung.txt +10 -0
  27. package/sprites/colorscripts/small/109-koffing.txt +14 -0
  28. package/sprites/colorscripts/small/11-metapod.txt +10 -0
  29. package/sprites/colorscripts/small/110-weezing.txt +23 -0
  30. package/sprites/colorscripts/small/111-rhyhorn.txt +11 -0
  31. package/sprites/colorscripts/small/112-rhydon.txt +20 -0
  32. package/sprites/colorscripts/small/113-chansey.txt +11 -0
  33. package/sprites/colorscripts/small/114-tangela.txt +10 -0
  34. package/sprites/colorscripts/small/115-kangaskhan.txt +18 -0
  35. package/sprites/colorscripts/small/116-horsea.txt +10 -0
  36. package/sprites/colorscripts/small/117-seadra.txt +11 -0
  37. package/sprites/colorscripts/small/118-goldeen.txt +11 -0
  38. package/sprites/colorscripts/small/119-seaking.txt +16 -0
  39. package/sprites/colorscripts/small/12-butterfree.txt +20 -0
  40. package/sprites/colorscripts/small/120-staryu.txt +10 -0
  41. package/sprites/colorscripts/small/121-starmie.txt +17 -0
  42. package/sprites/colorscripts/small/122-mr-mime.txt +18 -0
  43. package/sprites/colorscripts/small/123-scyther.txt +21 -0
  44. package/sprites/colorscripts/small/124-jynx.txt +18 -0
  45. package/sprites/colorscripts/small/125-electabuzz.txt +19 -0
  46. package/sprites/colorscripts/small/126-magmar.txt +19 -0
  47. package/sprites/colorscripts/small/127-pinsir.txt +19 -0
  48. package/sprites/colorscripts/small/128-tauros.txt +20 -0
  49. package/sprites/colorscripts/small/129-magikarp.txt +13 -0
  50. package/sprites/colorscripts/small/13-weedle.txt +10 -0
  51. package/sprites/colorscripts/small/130-gyarados.txt +21 -0
  52. package/sprites/colorscripts/small/131-lapras.txt +19 -0
  53. package/sprites/colorscripts/small/132-ditto.txt +8 -0
  54. package/sprites/colorscripts/small/133-eevee.txt +10 -0
  55. package/sprites/colorscripts/small/134-vaporeon.txt +16 -0
  56. package/sprites/colorscripts/small/135-jolteon.txt +17 -0
  57. package/sprites/colorscripts/small/136-flareon.txt +18 -0
  58. package/sprites/colorscripts/small/137-porygon.txt +10 -0
  59. package/sprites/colorscripts/small/138-omanyte.txt +10 -0
  60. package/sprites/colorscripts/small/139-omastar.txt +18 -0
  61. package/sprites/colorscripts/small/14-kakuna.txt +10 -0
  62. package/sprites/colorscripts/small/140-kabuto.txt +8 -0
  63. package/sprites/colorscripts/small/141-kabutops.txt +17 -0
  64. package/sprites/colorscripts/small/142-aerodactyl.txt +17 -0
  65. package/sprites/colorscripts/small/143-snorlax.txt +21 -0
  66. package/sprites/colorscripts/small/144-articuno.txt +24 -0
  67. package/sprites/colorscripts/small/145-zapdos.txt +20 -0
  68. package/sprites/colorscripts/small/146-moltres.txt +23 -0
  69. package/sprites/colorscripts/small/147-dratini.txt +10 -0
  70. package/sprites/colorscripts/small/148-dragonair.txt +12 -0
  71. package/sprites/colorscripts/small/149-dragonite.txt +21 -0
  72. package/sprites/colorscripts/small/15-beedrill.txt +13 -0
  73. package/sprites/colorscripts/small/150-mewtwo.txt +22 -0
  74. package/sprites/colorscripts/small/151-mew.txt +14 -0
  75. package/sprites/colorscripts/small/16-pidgey.txt +10 -0
  76. package/sprites/colorscripts/small/17-pidgeotto.txt +11 -0
  77. package/sprites/colorscripts/small/18-pidgeot.txt +18 -0
  78. package/sprites/colorscripts/small/19-rattata.txt +12 -0
  79. package/sprites/colorscripts/small/2-ivysaur.txt +11 -0
  80. package/sprites/colorscripts/small/20-raticate.txt +12 -0
  81. package/sprites/colorscripts/small/21-spearow.txt +9 -0
  82. package/sprites/colorscripts/small/22-fearow.txt +12 -0
  83. package/sprites/colorscripts/small/23-ekans.txt +12 -0
  84. package/sprites/colorscripts/small/24-arbok.txt +16 -0
  85. package/sprites/colorscripts/small/25-pikachu.txt +11 -0
  86. package/sprites/colorscripts/small/26-raichu.txt +19 -0
  87. package/sprites/colorscripts/small/27-sandshrew.txt +10 -0
  88. package/sprites/colorscripts/small/28-sandslash.txt +16 -0
  89. package/sprites/colorscripts/small/29-nidoran-f.txt +11 -0
  90. package/sprites/colorscripts/small/3-venusaur.txt +21 -0
  91. package/sprites/colorscripts/small/30-nidorina.txt +12 -0
  92. package/sprites/colorscripts/small/31-nidoqueen.txt +19 -0
  93. package/sprites/colorscripts/small/32-nidoran-m.txt +11 -0
  94. package/sprites/colorscripts/small/33-nidorino.txt +12 -0
  95. package/sprites/colorscripts/small/34-nidoking.txt +18 -0
  96. package/sprites/colorscripts/small/35-clefairy.txt +11 -0
  97. package/sprites/colorscripts/small/36-clefable.txt +17 -0
  98. package/sprites/colorscripts/small/37-vulpix.txt +11 -0
  99. package/sprites/colorscripts/small/38-ninetales.txt +18 -0
  100. package/sprites/colorscripts/small/39-jigglypuff.txt +11 -0
  101. package/sprites/colorscripts/small/4-charmander.txt +11 -0
  102. package/sprites/colorscripts/small/40-wigglytuff.txt +20 -0
  103. package/sprites/colorscripts/small/41-zubat.txt +11 -0
  104. package/sprites/colorscripts/small/42-golbat.txt +18 -0
  105. package/sprites/colorscripts/small/43-oddish.txt +11 -0
  106. package/sprites/colorscripts/small/44-gloom.txt +12 -0
  107. package/sprites/colorscripts/small/45-vileplume.txt +17 -0
  108. package/sprites/colorscripts/small/46-paras.txt +11 -0
  109. package/sprites/colorscripts/small/47-parasect.txt +12 -0
  110. package/sprites/colorscripts/small/48-venonat.txt +14 -0
  111. package/sprites/colorscripts/small/49-venomoth.txt +19 -0
  112. package/sprites/colorscripts/small/5-charmeleon.txt +13 -0
  113. package/sprites/colorscripts/small/50-diglett.txt +8 -0
  114. package/sprites/colorscripts/small/51-dugtrio.txt +18 -0
  115. package/sprites/colorscripts/small/52-meowth.txt +12 -0
  116. package/sprites/colorscripts/small/53-persian.txt +20 -0
  117. package/sprites/colorscripts/small/54-psyduck.txt +12 -0
  118. package/sprites/colorscripts/small/55-golduck.txt +17 -0
  119. package/sprites/colorscripts/small/56-mankey.txt +11 -0
  120. package/sprites/colorscripts/small/57-primeape.txt +13 -0
  121. package/sprites/colorscripts/small/58-growlithe.txt +12 -0
  122. package/sprites/colorscripts/small/59-arcanine.txt +20 -0
  123. package/sprites/colorscripts/small/6-charizard.txt +21 -0
  124. package/sprites/colorscripts/small/60-poliwag.txt +9 -0
  125. package/sprites/colorscripts/small/61-poliwhirl.txt +11 -0
  126. package/sprites/colorscripts/small/62-poliwrath.txt +17 -0
  127. package/sprites/colorscripts/small/63-abra.txt +12 -0
  128. package/sprites/colorscripts/small/64-kadabra.txt +14 -0
  129. package/sprites/colorscripts/small/65-alakazam.txt +19 -0
  130. package/sprites/colorscripts/small/66-machop.txt +11 -0
  131. package/sprites/colorscripts/small/67-machoke.txt +12 -0
  132. package/sprites/colorscripts/small/68-machamp.txt +19 -0
  133. package/sprites/colorscripts/small/69-bellsprout.txt +9 -0
  134. package/sprites/colorscripts/small/7-squirtle.txt +10 -0
  135. package/sprites/colorscripts/small/70-weepinbell.txt +11 -0
  136. package/sprites/colorscripts/small/71-victreebel.txt +17 -0
  137. package/sprites/colorscripts/small/72-tentacool.txt +12 -0
  138. package/sprites/colorscripts/small/73-tentacruel.txt +20 -0
  139. package/sprites/colorscripts/small/74-geodude.txt +9 -0
  140. package/sprites/colorscripts/small/75-graveler.txt +12 -0
  141. package/sprites/colorscripts/small/76-golem.txt +18 -0
  142. package/sprites/colorscripts/small/77-ponyta.txt +13 -0
  143. package/sprites/colorscripts/small/78-rapidash.txt +18 -0
  144. package/sprites/colorscripts/small/79-slowpoke.txt +12 -0
  145. package/sprites/colorscripts/small/8-wartortle.txt +12 -0
  146. package/sprites/colorscripts/small/80-slowbro.txt +18 -0
  147. package/sprites/colorscripts/small/81-magnemite.txt +9 -0
  148. package/sprites/colorscripts/small/82-magneton.txt +18 -0
  149. package/sprites/colorscripts/small/83-farfetchd.txt +12 -0
  150. package/sprites/colorscripts/small/84-doduo.txt +10 -0
  151. package/sprites/colorscripts/small/85-dodrio.txt +17 -0
  152. package/sprites/colorscripts/small/86-seel.txt +13 -0
  153. package/sprites/colorscripts/small/87-dewgong.txt +20 -0
  154. package/sprites/colorscripts/small/88-grimer.txt +10 -0
  155. package/sprites/colorscripts/small/89-muk.txt +14 -0
  156. package/sprites/colorscripts/small/9-blastoise.txt +20 -0
  157. package/sprites/colorscripts/small/90-shellder.txt +10 -0
  158. package/sprites/colorscripts/small/91-cloyster.txt +18 -0
  159. package/sprites/colorscripts/small/92-gastly.txt +12 -0
  160. package/sprites/colorscripts/small/93-haunter.txt +14 -0
  161. package/sprites/colorscripts/small/94-gengar.txt +19 -0
  162. package/sprites/colorscripts/small/95-onix.txt +22 -0
  163. package/sprites/colorscripts/small/96-drowzee.txt +12 -0
  164. package/sprites/colorscripts/small/97-hypno.txt +19 -0
  165. package/sprites/colorscripts/small/98-krabby.txt +12 -0
  166. package/sprites/colorscripts/small/99-kingler.txt +20 -0
  167. package/src/engine/constants.ts +121 -0
  168. package/src/engine/encounter-pool.ts +71 -0
  169. package/src/engine/encounters.ts +308 -0
  170. package/src/engine/evolution-data.ts +535 -0
  171. package/src/engine/evolution.ts +310 -0
  172. package/src/engine/pokemon-data.ts +1838 -0
  173. package/src/engine/reactions.ts +877 -0
  174. package/src/engine/starter-pool.ts +47 -0
  175. package/src/engine/stats.ts +97 -0
  176. package/src/engine/types.ts +312 -0
  177. package/src/engine/xp.ts +135 -0
  178. package/src/gamification/achievements.ts +204 -0
  179. package/src/gamification/legendary-quests.ts +265 -0
  180. package/src/gamification/milestones.ts +86 -0
  181. package/src/hooks/award-xp.ts +131 -0
  182. package/src/hooks/increment-counter.ts +27 -0
  183. package/src/server/index.ts +78 -0
  184. package/src/server/instructions.ts +194 -0
  185. package/src/server/tools/achievements.ts +118 -0
  186. package/src/server/tools/catch.ts +295 -0
  187. package/src/server/tools/display-helpers.ts +35 -0
  188. package/src/server/tools/evolve.ts +236 -0
  189. package/src/server/tools/legendary.ts +78 -0
  190. package/src/server/tools/party.ts +251 -0
  191. package/src/server/tools/pet.ts +124 -0
  192. package/src/server/tools/pokedex.ts +286 -0
  193. package/src/server/tools/rename.ts +63 -0
  194. package/src/server/tools/show.ts +136 -0
  195. package/src/server/tools/starter.ts +175 -0
  196. package/src/server/tools/stats.ts +123 -0
  197. package/src/server/tools/visibility.ts +65 -0
  198. package/src/sprites/index.ts +45 -0
  199. package/src/state/io.ts +91 -0
  200. package/src/state/schemas.ts +131 -0
  201. package/src/state/state-manager.ts +321 -0
  202. package/statusline/buddy-status.sh +233 -0
  203. package/tsconfig.json +37 -0
@@ -0,0 +1,10 @@
1
+ ▄▀▀▄▄ ▄▀▀▀▀▄▄
2
+ ▀▀▀▀▀▄▀▀▀▀▀▀▀▀▀▀▄
3
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
4
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
5
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
6
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
7
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
8
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀
9
+ ▀▀▀▀ ▀▀▀
10
+ 
@@ -0,0 +1,18 @@
1
+ ▀▀▄
2
+ ▀▀▀▀▀▄
3
+ ▀▀▀▀▀▀ ▄▄▀▀▄
4
+ ▀▀▀▀▀▀▀▀▄ ▄▄▄▀▀▀▀▀▀▀
5
+ ▄▀▀▀▀▀▀▀▀▄ ▄▄ ▀▀▀▀▀▀▀▀▀
6
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄▄▄▀▀▀▀▀▀▀▀
7
+ ▄▄▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
8
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
9
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
10
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄▄
11
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
12
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
13
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
14
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
15
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
16
+ ▀▀ ▀▀▀▀▀▀ ▀▀▀▀▀
17
+ ▀▀ ▀▀
18
+ 
@@ -0,0 +1,12 @@
1
+ ▀▀ ▀
2
+ ▄▄▀▀▀▄▄▄ ▄▀▀▄ ▀▀
3
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
4
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▄▄
5
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
6
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄▄▀
7
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄▀▀
8
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
9
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
10
+ ▀▀▀▀▀▀▀▀▀ ▄▄
11
+ ▀▀
12
+ 
@@ -0,0 +1,14 @@
1
+ ▄▀▄
2
+ ▄▀▀▀▄
3
+ ▀▀▄▄▀▀▀▀▀▀▀▀▄▄ ▄▄▄▄
4
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
5
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
6
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
7
+ ▄▄▀▀▄ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
8
+ ▄▀▀▀▀▀▀▀▀▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
9
+ ▀▀▀▀▀▀▀▀▀▀ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄▄
10
+ ▀▀ ▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
11
+ ▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀
12
+ ▀▀▀▀▀▀▀▀▀
13
+ ▀▀▀ ▀▀▀
14
+ 
@@ -0,0 +1,19 @@
1
+ ▀▀▄
2
+ ▀▀▀▀▄▄ ▄▄ ▄▄
3
+ ▀▀▀▀▀▀▄ ▄ ▄▀▀▀ ▄▄ ▄▄▀▀▀▀
4
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▄▀▀▀▀▀▀▀
5
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
6
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
7
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
8
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
9
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄▄
10
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
11
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
12
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
13
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
14
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
15
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
16
+ ▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀
17
+ ▀▀▀▀▀▀▀
18
+ ▀▀
19
+ 
@@ -0,0 +1,22 @@
1
+ ▄▀▄
2
+ ▀▀▀
3
+ ▀▀▀
4
+ ▀▀▀▄ ▄▄
5
+ ▀▀▀▀▄▄▀▀▀▀▀▀▄▄▀▀▀▀▀▄
6
+ ▄▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
7
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
8
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
9
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
10
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
11
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀
12
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▄▀▀▀▀▀▀▄
13
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀
14
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀
15
+ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀
16
+ ▀▀▀▀▀ ▄▀▀▀▀▀▀▀▄
17
+ ▀▀▀▀▀▀▀▀▀
18
+ ▄▄▄ ▄▄▄ ▄▄▀▀▀▀▀▀▀▀▀▀
19
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
20
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
21
+ ▀▀▀▀
22
+ 
@@ -0,0 +1,12 @@
1
+ ▄▀▀▀▄▄▄▄▄
2
+ ▀▀▀▀▀▀▀▀▀▀▄▀▀▀▄
3
+ ▄▄▄▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀
4
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
5
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄▄
6
+ ▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
7
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
8
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
9
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
10
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
11
+ ▀▀▀▀
12
+ 
@@ -0,0 +1,19 @@
1
+ ▄▀▄ ▄
2
+ ▀▀▀▀ ▄▀▀▀
3
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▄
4
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
5
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
6
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
7
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
8
+ ▄▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
9
+ ▄▄▄▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
10
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▄▀▀▀▄
11
+ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀
12
+ ▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀
13
+ ▀▀▀▀▀▀▀▀▀▀▀▄ ▀▀▀
14
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
15
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
16
+ ▄▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▄
17
+ ▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀
18
+ ▀▀▀ ▀▀▀
19
+ 
@@ -0,0 +1,12 @@
1
+ ▄▀▀▀▄
2
+ ▄▀▀▀▀▀
3
+ ▀▀▀▀▀▀▀▄ ▄▀▀▄
4
+ ▀▀▀▀▀▀▀▀▀ ▄ ▄▀▀▀▀▀▀▄
5
+ ▄▀▀▀▀▀▀ ▀▀▀ ▄▀▄ ▄▀▀▀▀▀▀▀▀▀
6
+ ▀▀▀▀▀▀▄▀▀▀▀▀▀▀▀▀▄▀▀▀▀▀▀▀▀▀▀
7
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄▀▀▀▀▀▀
8
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
9
+ ▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
10
+ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀
11
+ ▀▀
12
+ 
@@ -0,0 +1,20 @@
1
+ ▄▀▀▀▀▀▄▄▄▄
2
+ ▀▀▀▀▀▀▀▀▀▀▀▀▄
3
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
4
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
5
+ ▄▀▀▀▄ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
6
+ ▀▀▀▀▀▀▄ ▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀
7
+ ▄▀▀▀▀▀▀▀ ▄ ▄▀▄ ▄▀▄▀▀▀▀▀▀▀▀▀▀
8
+ ▀▀▀▀▀▀▀▀ ▀▀▀▄ ▀▀▀▄▀▀▀▄▄▀▀▀▀▀▀▀▀▄
9
+ ▀▀▀▀▀▀▀▀▀▄ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
10
+ ▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
11
+ ▀▀▀▀▀▀ ▄ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
12
+ ▀▀▀▄ ▀▀▀▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
13
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
14
+ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
15
+ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
16
+ ▄▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
17
+ ▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▄▀▀▀▀▀▄
18
+ ▀▀▀▀▄ ▀▀▀
19
+ ▀▀▀▀▀
20
+ 
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Shared constants for Claudemon.
3
+ * All magic numbers and configuration values live here.
4
+ */
5
+
6
+ import type { XpEventType, CodingStat, TrainerTitle, Badge } from "./types.js";
7
+
8
+ // ── Game Limits ────────────────────────────────────────────
9
+
10
+ export const MAX_PARTY_SIZE = 6;
11
+ export const MAX_LEVEL = 100;
12
+ export const STARTER_LEVEL = 5;
13
+ export const MAX_HAPPINESS = 255;
14
+ export const TOTAL_POKEMON = 151;
15
+
16
+ // ── XP Awards per Event ────────────────────────────────────
17
+
18
+ export const XP_AWARDS: Record<
19
+ XpEventType,
20
+ { xp: number; stat: CodingStat | null; boost: number }
21
+ > = {
22
+ commit: { xp: 15, stat: "velocity", boost: 1 },
23
+ test_pass: { xp: 12, stat: "stability", boost: 1 },
24
+ test_written: { xp: 10, stat: "stability", boost: 1 },
25
+ build_success: { xp: 10, stat: "stability", boost: 1 },
26
+ bug_fix: { xp: 8, stat: "debugging", boost: 1 },
27
+ lint_fix: { xp: 6, stat: "debugging", boost: 1 },
28
+ file_create: { xp: 5, stat: "velocity", boost: 0 },
29
+ file_edit: { xp: 3, stat: "velocity", boost: 0 },
30
+ search: { xp: 1, stat: "wisdom", boost: 0 },
31
+ large_refactor: { xp: 20, stat: "wisdom", boost: 2 },
32
+ session_start: { xp: 5, stat: "stamina", boost: 1 },
33
+ daily_streak: { xp: 15, stat: "stamina", boost: 1 },
34
+ pet: { xp: 2, stat: null, boost: 0 },
35
+ };
36
+
37
+ // ── Stat Display Names ─────────────────────────────────────
38
+
39
+ export const STAT_DISPLAY_NAMES: Record<CodingStat, string> = {
40
+ stamina: "STAMINA",
41
+ debugging: "DEBUGGING",
42
+ stability: "STABILITY",
43
+ velocity: "VELOCITY",
44
+ wisdom: "WISDOM",
45
+ };
46
+
47
+ // ── Encounter Rate ─────────────────────────────────────────
48
+
49
+ /** XP earned between wild encounters */
50
+ export const XP_PER_ENCOUNTER = 500;
51
+
52
+ // ── Reaction Cooldown ──────────────────────────────────────
53
+
54
+ export const DEFAULT_REACTION_COOLDOWN_MS = 30_000;
55
+
56
+ // ── Trainer Titles (by highest Pokemon level) ──────────────
57
+
58
+ export const TRAINER_TITLES: readonly TrainerTitle[] = [
59
+ { minLevel: 1, title: "Bug Catcher" },
60
+ { minLevel: 6, title: "Youngster" },
61
+ { minLevel: 11, title: "Hiker" },
62
+ { minLevel: 21, title: "Ace Trainer" },
63
+ { minLevel: 31, title: "Cooltrainer" },
64
+ { minLevel: 41, title: "Veteran" },
65
+ { minLevel: 51, title: "Elite Four" },
66
+ { minLevel: 61, title: "Champion" },
67
+ { minLevel: 76, title: "Pokemon Master" },
68
+ { minLevel: 91, title: "Professor" },
69
+ ];
70
+
71
+ // ── Badge Definitions ──────────────────────────────────────
72
+
73
+ export const BADGES: readonly Badge[] = [
74
+ {
75
+ type: "blaze",
76
+ name: "Blaze Badge",
77
+ description: "Fix 50 bugs — unlocks Fire Stone evolutions",
78
+ condition: { type: "counter", counter: "bugs_fixed", threshold: 50 },
79
+ },
80
+ {
81
+ type: "flow",
82
+ name: "Flow Badge",
83
+ description: "Pass 100 tests — unlocks Water Stone evolutions",
84
+ condition: { type: "counter", counter: "tests_passed", threshold: 100 },
85
+ },
86
+ {
87
+ type: "spark",
88
+ name: "Spark Badge",
89
+ description: "Make 200 commits — unlocks Thunder Stone evolutions",
90
+ condition: { type: "counter", counter: "commits", threshold: 200 },
91
+ },
92
+ {
93
+ type: "lunar",
94
+ name: "Lunar Badge",
95
+ description: "Maintain a 30-day coding streak — unlocks Moon Stone evolutions",
96
+ condition: { type: "streak", minDays: 30 },
97
+ },
98
+ {
99
+ type: "growth",
100
+ name: "Growth Badge",
101
+ description: "Edit 500 files — unlocks Leaf Stone evolutions",
102
+ condition: { type: "counter", counter: "files_edited", threshold: 500 },
103
+ },
104
+ ];
105
+
106
+ // ── State File Paths ───────────────────────────────────────
107
+
108
+ /** Resolved at call time so tests can override HOME */
109
+ export function getStateDir(): string {
110
+ return `${process.env["HOME"] ?? "~"}/.claudemon`;
111
+ }
112
+ export function getStateFile(): string {
113
+ return `${getStateDir()}/state.json`;
114
+ }
115
+ export function getStatusFile(): string {
116
+ return `${getStateDir()}/status.json`;
117
+ }
118
+
119
+ // ── Terminal Bell ──────────────────────────────────────────
120
+
121
+ export const BELL = "\x07";
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Pre-built encounter pools — computed once at module load.
3
+ * Maps each PokemonType to base-stage Pokemon IDs grouped by rarity.
4
+ */
5
+
6
+ import type { PokemonType, RarityTier } from "./types.js";
7
+ import { POKEDEX } from "./pokemon-data.js";
8
+ import { EVOLUTION_CHAINS } from "./evolution-data.js";
9
+
10
+ // ── Identify evolved Pokemon (targets of any evolution link) ──
11
+
12
+ const EVOLVED_IDS: ReadonlySet<number> = new Set(
13
+ EVOLUTION_CHAINS.flatMap((chain) => chain.links.map((link) => link.to)),
14
+ );
15
+
16
+ /** Returns true if the Pokemon is the base stage of its evolution chain. */
17
+ function isBaseStage(pokemonId: number): boolean {
18
+ return !EVOLVED_IDS.has(pokemonId);
19
+ }
20
+
21
+ // ── Rarity tiers eligible for wild encounters ─────────────────
22
+
23
+ const WILD_RARITIES: ReadonlySet<RarityTier> = new Set(["common", "uncommon", "rare"]);
24
+
25
+ // ── Build pools at module load ────────────────────────────────
26
+
27
+ interface RarityPool {
28
+ readonly common: readonly number[];
29
+ readonly uncommon: readonly number[];
30
+ readonly rare: readonly number[];
31
+ }
32
+
33
+ function buildTypePools(): ReadonlyMap<PokemonType, RarityPool> {
34
+ const pools = new Map<PokemonType, { common: number[]; uncommon: number[]; rare: number[] }>();
35
+
36
+ for (const pokemon of POKEDEX) {
37
+ // Only base-stage Pokemon appear in wild encounters
38
+ if (!isBaseStage(pokemon.id)) continue;
39
+
40
+ // Legendary and mythical never appear in wild encounters
41
+ if (!WILD_RARITIES.has(pokemon.rarity)) continue;
42
+
43
+ for (const pokemonType of pokemon.types) {
44
+ if (pokemonType === undefined) continue;
45
+
46
+ let pool = pools.get(pokemonType);
47
+ if (!pool) {
48
+ pool = { common: [], uncommon: [], rare: [] };
49
+ pools.set(pokemonType, pool);
50
+ }
51
+
52
+ const rarity = pokemon.rarity as "common" | "uncommon" | "rare";
53
+ pool[rarity].push(pokemon.id);
54
+ }
55
+ }
56
+
57
+ // Freeze all inner arrays for immutability
58
+ const frozen = new Map<PokemonType, RarityPool>();
59
+ for (const [type, pool] of pools) {
60
+ frozen.set(type, {
61
+ common: Object.freeze(pool.common),
62
+ uncommon: Object.freeze(pool.uncommon),
63
+ rare: Object.freeze(pool.rare),
64
+ });
65
+ }
66
+
67
+ return frozen;
68
+ }
69
+
70
+ /** Map of PokemonType to Pokemon IDs of that type, grouped by rarity. */
71
+ export const TYPE_POOLS: ReadonlyMap<PokemonType, RarityPool> = buildTypePools();