@maka/maka-cli 5.6.0 → 5.8.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 (243) hide show
  1. package/bundle/typescript/package.json +2 -2
  2. package/bundle/typescript/src/commands/_index.d.ts +4 -0
  3. package/bundle/typescript/src/commands/_index.js +4 -0
  4. package/bundle/typescript/src/commands/_index.js.map +1 -1
  5. package/bundle/typescript/src/commands/debug.js +1 -7
  6. package/bundle/typescript/src/commands/debug.js.map +1 -1
  7. package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.js +33 -32
  8. package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.js.map +1 -1
  9. package/bundle/typescript/src/commands/env/_index.d.ts +3 -0
  10. package/bundle/typescript/src/commands/env/_index.js +4 -0
  11. package/bundle/typescript/src/commands/env/_index.js.map +1 -0
  12. package/bundle/typescript/src/commands/env/env.command.d.ts +3 -0
  13. package/bundle/typescript/src/commands/env/env.command.js +22 -0
  14. package/bundle/typescript/src/commands/env/env.command.js.map +1 -0
  15. package/bundle/typescript/src/commands/env/get.sub.cmd.d.ts +1 -0
  16. package/bundle/typescript/src/commands/env/get.sub.cmd.js +46 -0
  17. package/bundle/typescript/src/commands/env/get.sub.cmd.js.map +1 -0
  18. package/bundle/typescript/src/commands/env/prompt-for-env.d.ts +10 -0
  19. package/bundle/typescript/src/commands/env/prompt-for-env.js +27 -0
  20. package/bundle/typescript/src/commands/env/prompt-for-env.js.map +1 -0
  21. package/bundle/typescript/src/commands/env/set.sub.cmd.d.ts +1 -0
  22. package/bundle/typescript/src/commands/env/set.sub.cmd.js +59 -0
  23. package/bundle/typescript/src/commands/env/set.sub.cmd.js.map +1 -0
  24. package/bundle/typescript/src/commands/game/sideQuest/archetypes.d.ts +16 -0
  25. package/bundle/typescript/src/commands/game/sideQuest/archetypes.js +81 -2
  26. package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -1
  27. package/bundle/typescript/src/commands/game/sideQuest/augmentations.d.ts +31 -0
  28. package/bundle/typescript/src/commands/game/sideQuest/augmentations.js +125 -0
  29. package/bundle/typescript/src/commands/game/sideQuest/augmentations.js.map +1 -0
  30. package/bundle/typescript/src/commands/game/sideQuest/commands/advance.d.ts +17 -7
  31. package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js +113 -15
  32. package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js.map +1 -1
  33. package/bundle/typescript/src/commands/game/sideQuest/commands/ask.d.ts +37 -0
  34. package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js +197 -0
  35. package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js.map +1 -0
  36. package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js +3 -0
  37. package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js.map +1 -1
  38. package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js +21 -11
  39. package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -1
  40. package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.d.ts +3 -2
  41. package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js +13 -5
  42. package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js.map +1 -1
  43. package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js +7 -1
  44. package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js.map +1 -1
  45. package/bundle/typescript/src/commands/game/sideQuest/commands/buy.d.ts +16 -0
  46. package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js +97 -0
  47. package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js.map +1 -0
  48. package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.d.ts +21 -10
  49. package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +41 -27
  50. package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -1
  51. package/bundle/typescript/src/commands/game/sideQuest/commands/call.d.ts +6 -7
  52. package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +54 -20
  53. package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
  54. package/bundle/typescript/src/commands/game/sideQuest/commands/cast.d.ts +35 -1
  55. package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +306 -55
  56. package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -1
  57. package/bundle/typescript/src/commands/game/sideQuest/commands/companions.d.ts +33 -0
  58. package/bundle/typescript/src/commands/game/sideQuest/commands/companions.js +137 -0
  59. package/bundle/typescript/src/commands/game/sideQuest/commands/companions.js.map +1 -0
  60. package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.d.ts +13 -0
  61. package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js +37 -0
  62. package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js.map +1 -0
  63. package/bundle/typescript/src/commands/game/sideQuest/commands/drink.d.ts +14 -0
  64. package/bundle/typescript/src/commands/game/sideQuest/commands/drink.js +15 -0
  65. package/bundle/typescript/src/commands/game/sideQuest/commands/drink.js.map +1 -0
  66. package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js +1 -1
  67. package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js.map +1 -1
  68. package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +7 -0
  69. package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -1
  70. package/bundle/typescript/src/commands/game/sideQuest/commands/eat.d.ts +14 -0
  71. package/bundle/typescript/src/commands/game/sideQuest/commands/eat.js +15 -0
  72. package/bundle/typescript/src/commands/game/sideQuest/commands/eat.js.map +1 -0
  73. package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js +10 -0
  74. package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js.map +1 -1
  75. package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +3 -0
  76. package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
  77. package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +101 -1
  78. package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -1
  79. package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +6 -1
  80. package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +67 -22
  81. package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
  82. package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +15 -7
  83. package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -1
  84. package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js +58 -2
  85. package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js.map +1 -1
  86. package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.d.ts +26 -0
  87. package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.js +125 -0
  88. package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.js.map +1 -0
  89. package/bundle/typescript/src/commands/game/sideQuest/commands/install.d.ts +21 -0
  90. package/bundle/typescript/src/commands/game/sideQuest/commands/install.js +125 -0
  91. package/bundle/typescript/src/commands/game/sideQuest/commands/install.js.map +1 -0
  92. package/bundle/typescript/src/commands/game/sideQuest/commands/jump.d.ts +16 -0
  93. package/bundle/typescript/src/commands/game/sideQuest/commands/jump.js +83 -0
  94. package/bundle/typescript/src/commands/game/sideQuest/commands/jump.js.map +1 -0
  95. package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.d.ts +16 -0
  96. package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.js +76 -0
  97. package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.js.map +1 -0
  98. package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js +4 -0
  99. package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js.map +1 -1
  100. package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +7 -6
  101. package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
  102. package/bundle/typescript/src/commands/game/sideQuest/commands/order.d.ts +19 -0
  103. package/bundle/typescript/src/commands/game/sideQuest/commands/order.js +151 -0
  104. package/bundle/typescript/src/commands/game/sideQuest/commands/order.js.map +1 -0
  105. package/bundle/typescript/src/commands/game/sideQuest/commands/pay.d.ts +13 -0
  106. package/bundle/typescript/src/commands/game/sideQuest/commands/pay.js +39 -0
  107. package/bundle/typescript/src/commands/game/sideQuest/commands/pay.js.map +1 -0
  108. package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js +5 -1
  109. package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js.map +1 -1
  110. package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +6 -3
  111. package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js.map +1 -1
  112. package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.d.ts +21 -0
  113. package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.js +121 -0
  114. package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.js.map +1 -0
  115. package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js +60 -12
  116. package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js.map +1 -1
  117. package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +27 -10
  118. package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
  119. package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +15 -4
  120. package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
  121. package/bundle/typescript/src/commands/game/sideQuest/commands/sell.d.ts +17 -0
  122. package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js +125 -0
  123. package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js.map +1 -0
  124. package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js +36 -3
  125. package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js.map +1 -1
  126. package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js +9 -1
  127. package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js.map +1 -1
  128. package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js +27 -4
  129. package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js.map +1 -1
  130. package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js +1 -1
  131. package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js.map +1 -1
  132. package/bundle/typescript/src/commands/game/sideQuest/commands/summon.d.ts +19 -0
  133. package/bundle/typescript/src/commands/game/sideQuest/commands/summon.js +112 -0
  134. package/bundle/typescript/src/commands/game/sideQuest/commands/summon.js.map +1 -0
  135. package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +8 -0
  136. package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
  137. package/bundle/typescript/src/commands/game/sideQuest/commands/treat.d.ts +14 -0
  138. package/bundle/typescript/src/commands/game/sideQuest/commands/treat.js +67 -0
  139. package/bundle/typescript/src/commands/game/sideQuest/commands/treat.js.map +1 -0
  140. package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +7 -0
  141. package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +1 -1
  142. package/bundle/typescript/src/commands/game/sideQuest/commands/use.d.ts +29 -0
  143. package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +118 -11
  144. package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
  145. package/bundle/typescript/src/commands/game/sideQuest/commands/work.d.ts +15 -0
  146. package/bundle/typescript/src/commands/game/sideQuest/commands/work.js +68 -0
  147. package/bundle/typescript/src/commands/game/sideQuest/commands/work.js.map +1 -0
  148. package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +2 -1
  149. package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +1 -1
  150. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.d.ts +1 -1
  151. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +132 -5
  152. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -1
  153. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.d.ts +6 -2
  154. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +10 -6
  155. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js.map +1 -1
  156. package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +196 -0
  157. package/bundle/typescript/src/commands/game/sideQuest/game.js +828 -31
  158. package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
  159. package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +28 -0
  160. package/bundle/typescript/src/commands/game/sideQuest/models/item.js +111 -0
  161. package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
  162. package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +33 -1
  163. package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +232 -10
  164. package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
  165. package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +111 -5
  166. package/bundle/typescript/src/commands/game/sideQuest/models/player.js +432 -41
  167. package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
  168. package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +6 -6
  169. package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +38 -14
  170. package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
  171. package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +1 -0
  172. package/bundle/typescript/src/commands/game/sideQuest/models/room.js +6 -0
  173. package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
  174. package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +9 -0
  175. package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +48 -8
  176. package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
  177. package/bundle/typescript/src/commands/game/sideQuest/qualities.d.ts +44 -0
  178. package/bundle/typescript/src/commands/game/sideQuest/qualities.js +155 -0
  179. package/bundle/typescript/src/commands/game/sideQuest/qualities.js.map +1 -0
  180. package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +274 -5
  181. package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +1 -0
  182. package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +17 -0
  183. package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.d.ts +2 -0
  184. package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js +4 -0
  185. package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js.map +1 -1
  186. package/bundle/typescript/src/commands/game/sideQuest/ui.js +82 -8
  187. package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
  188. package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.d.ts +13 -6
  189. package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js +28 -15
  190. package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js.map +1 -1
  191. package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +15 -3
  192. package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +207 -34
  193. package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -1
  194. package/bundle/typescript/src/commands/game/sideQuest/utilities/commerce.d.ts +56 -0
  195. package/bundle/typescript/src/commands/game/sideQuest/utilities/commerce.js +144 -0
  196. package/bundle/typescript/src/commands/game/sideQuest/utilities/commerce.js.map +1 -0
  197. package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.d.ts +7 -4
  198. package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js +8 -5
  199. package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js.map +1 -1
  200. package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.d.ts +14 -0
  201. package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.js +15 -0
  202. package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.js.map +1 -0
  203. package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.d.ts +16 -0
  204. package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js +49 -4
  205. package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js.map +1 -1
  206. package/bundle/typescript/src/commands/game/sideQuest/utilities/outdoors.d.ts +10 -0
  207. package/bundle/typescript/src/commands/game/sideQuest/utilities/outdoors.js +16 -0
  208. package/bundle/typescript/src/commands/game/sideQuest/utilities/outdoors.js.map +1 -0
  209. package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.d.ts +21 -0
  210. package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +107 -0
  211. package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -1
  212. package/bundle/typescript/src/commands/game/sideQuest/utilities/terminal-reset.d.ts +17 -0
  213. package/bundle/typescript/src/commands/game/sideQuest/utilities/terminal-reset.js +23 -0
  214. package/bundle/typescript/src/commands/game/sideQuest/utilities/terminal-reset.js.map +1 -0
  215. package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +51 -15
  216. package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
  217. package/bundle/typescript/src/commands/remote/reconfig.sub.cmd.js +27 -1
  218. package/bundle/typescript/src/commands/remote/reconfig.sub.cmd.js.map +1 -1
  219. package/bundle/typescript/src/commands/run/run.command.js +1 -7
  220. package/bundle/typescript/src/commands/run/run.command.js.map +1 -1
  221. package/bundle/typescript/src/commands/ssl.js +10 -15
  222. package/bundle/typescript/src/commands/ssl.js.map +1 -1
  223. package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.js +1 -6
  224. package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.js.map +1 -1
  225. package/bundle/typescript/src/generators/config.js +11 -10
  226. package/bundle/typescript/src/generators/config.js.map +1 -1
  227. package/bundle/typescript/src/templates/meteor/config/pm2.config.js +3 -3
  228. package/bundle/typescript/src/templates/meteor/project/gitignore +2 -1
  229. package/bundle/typescript/src/templates/react/kit/mui/auth/password-reset/basic-password-reset-page.js.tsx +3 -4
  230. package/bundle/typescript/src/tool.d.ts +2 -0
  231. package/bundle/typescript/src/tool.js +3 -0
  232. package/bundle/typescript/src/tool.js.map +1 -1
  233. package/bundle/typescript/src/tools/aws/aws.class.js +6 -4
  234. package/bundle/typescript/src/tools/aws/aws.class.js.map +1 -1
  235. package/bundle/typescript/src/tools/dotenvx/dotenvx.class.d.ts +24 -0
  236. package/bundle/typescript/src/tools/dotenvx/dotenvx.class.js +66 -0
  237. package/bundle/typescript/src/tools/dotenvx/dotenvx.class.js.map +1 -0
  238. package/bundle/typescript/src/tools/ssh/ssh.class.js +1 -1
  239. package/bundle/typescript/src/tools/ssh/ssh.class.js.map +1 -1
  240. package/bundle/typescript/src/tools/ssl/ssl.class.d.ts +8 -0
  241. package/bundle/typescript/src/tools/ssl/ssl.class.js +53 -0
  242. package/bundle/typescript/src/tools/ssl/ssl.class.js.map +1 -1
  243. package/package.json +2 -2
@@ -0,0 +1,97 @@
1
+ import { Command } from './command.js';
2
+ import { priceOf, vendorsInRoom, waresOf, shelfNote } from '../utilities/commerce.js';
3
+ /**
4
+ * Diegetic shopping: "browse" (or bare "buy") in a vendor's room reads
5
+ * their shelves with live prices; "buy <item>" slides the nuyen across
6
+ * the counter. A vendor is any live NPC whose name is on items in the
7
+ * room (see commerce.vendorsInRoom) -- the hub's shopkeepers and any
8
+ * generated merchant alike. Stealing stays possible exactly as before;
9
+ * this is just the version where nobody comes after you.
10
+ */
11
+ export class BuyCommand extends Command {
12
+ static verb = 'buy';
13
+ static description = 'Shop a vendor\'s shelves: "browse" lists their wares and prices, "buy <item>" pays for one. Vendors are NPCs with goods under their name.';
14
+ async execute(args = []) {
15
+ const actor = this.actor;
16
+ if (actor.plane !== 'meat') {
17
+ return `Commerce is a meat-world ritual -- come back to your body first.`;
18
+ }
19
+ if (actor.inExchange) {
20
+ return `Nobody rings up a sale in a firefight.`;
21
+ }
22
+ const room = actor.currentLocation;
23
+ const vendors = vendorsInRoom(this.scene, room);
24
+ if (vendors.length === 0) {
25
+ return `Nobody here is selling anything. Shelves without a shopkeeper are called "theft waiting to happen".`;
26
+ }
27
+ if (!args || args.length === 0 || args.join(' ').toLowerCase() === 'wares') {
28
+ return this.browse(vendors, room);
29
+ }
30
+ return this.purchase(args.join(' '), vendors);
31
+ }
32
+ browse(vendors, room) {
33
+ const lines = [];
34
+ for (const vendor of vendors) {
35
+ const wares = waresOf(this.actor.currentLocation, vendor.name);
36
+ lines.push(`${vendor.name}'s wares:`);
37
+ for (const item of wares) {
38
+ const price = priceOf(item);
39
+ const dots = '.'.repeat(Math.max(2, 28 - item.name.length));
40
+ lines.push(` ${item.name} ${dots} ${price} nuyen${shelfNote(item)}`);
41
+ }
42
+ }
43
+ lines.push('');
44
+ lines.push(`You're carrying ${this.actor.currency} nuyen. "buy <item>" to make it yours.`);
45
+ this.logger.write(`BuyCommand: ${this.actor.name} browsed in ${room.name}.`);
46
+ return lines.join('\n');
47
+ }
48
+ purchase(wanted, vendors) {
49
+ const actor = this.actor;
50
+ const room = actor.currentLocation;
51
+ const item = room.inventory.getItem(wanted) ?? undefined;
52
+ if (!item) {
53
+ return `No "${wanted}" on any shelf here. "browse" to see what's actually for sale.`;
54
+ }
55
+ const vendor = vendors.find(v => v.name === item.owner);
56
+ if (!vendor) {
57
+ return item.owner
58
+ ? `That's ${item.owner}'s stock, and ${item.owner} isn't minding the counter. Taking it anyway has a different name.`
59
+ : `The ${item.name} isn't merchandise -- nobody's selling it. (Taking it is a "take", not a "buy".)`;
60
+ }
61
+ const price = priceOf(item);
62
+ if (actor.currency < price) {
63
+ return `The ${item.name} runs ${price} nuyen -- you're carrying ${actor.currency}. ${vendor.name} doesn't do tabs.`;
64
+ }
65
+ // Money first, then goods -- with the weight check between, so a
66
+ // too-heavy purchase refunds cleanly instead of eating the cred.
67
+ actor.adjustCurrency(-price);
68
+ room.inventory.removeItem(item.name);
69
+ try {
70
+ actor.addInventory(item);
71
+ }
72
+ catch {
73
+ room.inventory.addItem(item);
74
+ actor.adjustCurrency(price);
75
+ return `You count out the cred, then do the math on your pack -- the ${item.name} is more than you can carry. The deal's off.`;
76
+ }
77
+ item.owner = actor.name;
78
+ actor.performAction('buys', `${item.name} from ${vendor.name}`);
79
+ this.logger.write(`BuyCommand: ${actor.name} bought ${item.name} from ${vendor.name} for ${price} (${actor.currency} left).`);
80
+ this.scene.addWorldEvent(`${actor.name} bought ${item.name} from ${vendor.name}.`);
81
+ this.scene.updateInventory(this.scene.getPlayer().inventory);
82
+ this.scene.updateStatus();
83
+ // The shopkeeper's AI hears the sale as part of the scene, so they
84
+ // can talk about it like a person instead of a cash register.
85
+ void Promise.resolve(vendor.hear(actor, `I'll take the ${item.name}. [System note: the sale is complete -- ${actor.name} paid you ${price} nuyen for it. React briefly and in character; no need to restate the price.]`)).catch(err => {
86
+ this.logger.error(`${vendor.name} failed to hear the sale: ${err}`);
87
+ });
88
+ // A sale is how a shopkeeper becomes a CONTACT (see Game.touchContact).
89
+ const bond = this.game?.touchContact(vendor.name, 'trade', price);
90
+ return [
91
+ `You slide ${price} nuyen across to ${vendor.name}. (${actor.currency} left.)`,
92
+ `The ${item.name} is yours.`,
93
+ ...(bond ? [bond] : []),
94
+ ].join('\n');
95
+ }
96
+ }
97
+ //# sourceMappingURL=buy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buy.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/buy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGtF;;;;;;;GAOG;AACH,MAAM,OAAO,UAAW,SAAQ,OAAO;IAC3B,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,MAAM,CAAC,WAAW,GAAG,2IAA2I,CAAC;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,EAAE,CAAC,SAAS,CAAC,CAAC;QAC7D,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAE1B,mEAAmE;QACnE,8DAA8D;QAC9D,KAAK,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,iBAAiB,IAAI,CAAC,IAAI,2CAA2C,KAAK,CAAC,IAAI,aAAa,KAAK,+EAA+E,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACrO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,6BAA6B,GAAG,EAAE,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;QAEH,wEAAwE;QACxE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QAElE,OAAO;YACL,aAAa,KAAK,oBAAoB,MAAM,CAAC,IAAI,MAAM,KAAK,CAAC,QAAQ,SAAS;YAC9E,OAAO,IAAI,CAAC,IAAI,YAAY;YAC5B,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SACxB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC"}
@@ -1,21 +1,32 @@
1
1
  import { Command, ICommand } from './command.js';
2
2
  import { PuzzleBypassType } from '../types/seed/puzzle-seed.js';
3
3
  /**
4
- * Shared implementation for pick/hack/cast. The gate check (already
5
- * solved? prerequisite met? does this puzzle even have this bypassType?)
6
- * always runs first and synchronously, so a doomed attempt never makes the
7
- * player sit through an interactive challenge they were never going to be
8
- * allowed to attempt. Each concrete command differs in its verb,
9
- * description, bypass type, the "nothing to do that to" message, and
10
- * optionally how the outcome itself gets determined (see
11
- * determineOutcome() -- defaults to a coin flip; lockpicking overrides it
12
- * with a real minigame).
4
+ * Shared implementation for pick/hack/cast/bluff. The gate check (already
5
+ * solved? prerequisite met? does this puzzle even have this bypassType?
6
+ * route already burned?) always runs first and synchronously, so a doomed
7
+ * attempt never makes the player sit through an interactive challenge they
8
+ * were never going to be allowed to attempt. Each concrete command differs
9
+ * in its verb, description, bypass type, the "nothing to do that to"
10
+ * message, how the outcome gets determined (see determineOutcome() --
11
+ * every real bypass overrides it with a skill roll), and what failure
12
+ * costs beyond the burned route (onBypassFailure()).
13
13
  */
14
14
  export declare abstract class BypassCommand extends Command implements ICommand {
15
15
  protected abstract bypassType: PuzzleBypassType;
16
16
  protected abstract noPuzzleMessage: string;
17
- /** Default: a flat coin flip. Override for a type with its own minigame. */
17
+ /** Fallback: a flat coin flip. Every real bypass overrides this with a
18
+ * skill roll (pick: Agility+locksmith, hack: Logic+hacking, bluff:
19
+ * Charisma+con, cast: the casting pool). */
18
20
  protected determineOutcome(): Promise<boolean>;
21
+ /**
22
+ * Type-specific teeth for a failed bypass, beyond the burned route and
23
+ * the alarm world event both applied by execute(). Returns narration
24
+ * lines. Default: nothing extra -- the cost of a snapped pick or a blown
25
+ * story is the burned shortcut and a district that heard about it. The
26
+ * spell bypass overrides this with ward backlash (see cast.ts), which
27
+ * runs through the real damage tracks and can still knock out or kill.
28
+ */
29
+ protected onBypassFailure(): Promise<string[]>;
19
30
  /**
20
31
  * There's no typed answer here to disambiguate with (unlike solve.ts),
21
32
  * so with more than one barrier in the room the player has to name which
@@ -1,20 +1,33 @@
1
1
  import { Command } from './command.js';
2
2
  /**
3
- * Shared implementation for pick/hack/cast. The gate check (already
4
- * solved? prerequisite met? does this puzzle even have this bypassType?)
5
- * always runs first and synchronously, so a doomed attempt never makes the
6
- * player sit through an interactive challenge they were never going to be
7
- * allowed to attempt. Each concrete command differs in its verb,
8
- * description, bypass type, the "nothing to do that to" message, and
9
- * optionally how the outcome itself gets determined (see
10
- * determineOutcome() -- defaults to a coin flip; lockpicking overrides it
11
- * with a real minigame).
3
+ * Shared implementation for pick/hack/cast/bluff. The gate check (already
4
+ * solved? prerequisite met? does this puzzle even have this bypassType?
5
+ * route already burned?) always runs first and synchronously, so a doomed
6
+ * attempt never makes the player sit through an interactive challenge they
7
+ * were never going to be allowed to attempt. Each concrete command differs
8
+ * in its verb, description, bypass type, the "nothing to do that to"
9
+ * message, how the outcome gets determined (see determineOutcome() --
10
+ * every real bypass overrides it with a skill roll), and what failure
11
+ * costs beyond the burned route (onBypassFailure()).
12
12
  */
13
13
  export class BypassCommand extends Command {
14
- /** Default: a flat coin flip. Override for a type with its own minigame. */
14
+ /** Fallback: a flat coin flip. Every real bypass overrides this with a
15
+ * skill roll (pick: Agility+locksmith, hack: Logic+hacking, bluff:
16
+ * Charisma+con, cast: the casting pool). */
15
17
  async determineOutcome() {
16
18
  return Math.random() < 0.5;
17
19
  }
20
+ /**
21
+ * Type-specific teeth for a failed bypass, beyond the burned route and
22
+ * the alarm world event both applied by execute(). Returns narration
23
+ * lines. Default: nothing extra -- the cost of a snapped pick or a blown
24
+ * story is the burned shortcut and a district that heard about it. The
25
+ * spell bypass overrides this with ward backlash (see cast.ts), which
26
+ * runs through the real damage tracks and can still knock out or kill.
27
+ */
28
+ async onBypassFailure() {
29
+ return [];
30
+ }
18
31
  /**
19
32
  * There's no typed answer here to disambiguate with (unlike solve.ts),
20
33
  * so with more than one barrier in the room the player has to name which
@@ -77,23 +90,24 @@ export class BypassCommand extends Command {
77
90
  }
78
91
  this.logger.write(`${this.actor.name} attempted to ${this.bypassType} "${target.puzzle.name}": ${result.success ? 'success' : 'failure'}${result.alarmed ? ' (alarmed)' : ''}`);
79
92
  this.actor.performAction(this.bypassType, result.message);
80
- // A failed bypass is instant, unrecoverable death -- there's no partial
81
- // credit for tripping an alarm or a ward's backlash mid-run. Reuses the
82
- // same endGame() a player-kill already uses (see kill.ts): freezes
83
- // input and self-announces directly to the screen, so the fatal reason
84
- // stays on screen instead of vanishing the instant blessed's alternate
85
- // buffer tears down. That announcement happens synchronously before
86
- // this returns, so it renders BEFORE this command's own return value --
87
- // found via a real session where an immediate process.exit() killed the
88
- // alternate screen before the player had any chance to read why. Only
89
- // ends the actual player's session: an NPC has no `game` in its context
90
- // (see command.ts), so this is a no-op for an NPC's own failed attempt.
91
- if (result.alarmed && this.game) {
92
- await this.scene.endGame();
93
- this.logger.logWithColor(result.message, 'red');
94
- this.logger.logWithColor(`💀 GAME OVER -- your run ends here.`, 'red');
95
- this.logger.logWithColor(`Press ctrl-c to quit.`, 'red');
96
- return '';
93
+ // A failed bypass used to be instant, unrecoverable death by fiat --
94
+ // no dice, no damage, just endGame(). Replaced (after a real session
95
+ // died to it) with consequences that run through the systems that now
96
+ // exist: the route BURNS (puzzle.bypassBurned -- this trick never works
97
+ // on this barrier again; the findable answer still does), the alarm
98
+ // world event above puts every NPC on notice, any sneak is over, and
99
+ // the type-specific teeth in onBypassFailure() (spell backlash damage,
100
+ // see cast.ts) can still put you down -- but through the damage
101
+ // tracks, resisted and narrated, not by administrative decree.
102
+ if (result.alarmed) {
103
+ this.actor.sneaking = false;
104
+ const consequence = await this.onBypassFailure();
105
+ this.scene.updateStatus();
106
+ return [
107
+ result.message,
108
+ ` The route is BURNED -- that trick will never work on this barrier again. The real answer still will, if you can find it.`,
109
+ ...consequence,
110
+ ].join('\n');
97
111
  }
98
112
  return result.message;
99
113
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bypass-command.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/bypass-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAIjD;;;;;;;;;;GAUG;AACH,MAAM,OAAgB,aAAc,SAAQ,OAAO;IAIjD,4EAA4E;IAClE,KAAK,CAAC,gBAAgB;QAC9B,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;IAC7B,CAAC;IAED;;;;;;OAMG;IACK,aAAa,CAAC,IAAc,EAAE,OAAuB;QAC3D,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC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AAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAChL,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAE1D,wEAAwE;QACxE,wEAAwE;QACxE,mEAAmE;QACnE,uEAAuE;QACvE,uEAAuE;QACvE,oEAAoE;QACpE,wEAAwE;QACxE,wEAAwE;QACxE,sEAAsE;QACtE,wEAAwE;QACxE,wEAAwE;QACxE,IAAI,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAChC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAChD,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;YACvE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;YACzD,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;CACF"}
1
+ {"version":3,"file":"bypass-command.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/bypass-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAIjD;;;;;;;;;;GAUG;AACH,MAAM,OAAgB,aAAc,SAAQ,OAAO;IAIjD;;gDAE4C;IAClC,KAAK,CAAC,gBAAgB;QAC9B,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;IAC7B,CAAC;IAED;;;;;;;OAOG;IACO,KAAK,CAAC,eAAe;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED;;;;;;OAMG;IACK,aAAa,CAAC,IAAc,EAAE,OAAuB;QAC3D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AAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAChL,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAE1D,qEAAqE;QACrE,qEAAqE;QACrE,sEAAsE;QACtE,wEAAwE;QACxE,oEAAoE;QACpE,qEAAqE;QACrE,uEAAuE;QACvE,gEAAgE;QAChE,+DAA+D;QAC/D,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;YAC5B,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;YACjD,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;YAC1B,OAAO;gBACL,MAAM,CAAC,OAAO;gBACd,4HAA4H;gBAC5H,GAAG,WAAW;aACf,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACf,CAAC;QAED,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;CACF"}
@@ -4,13 +4,12 @@ export declare class CallCommand extends Command implements ICommand {
4
4
  protected static description: string;
5
5
  execute(args: string[]): Promise<string>;
6
6
  /**
7
- * Whether a cab can physically reach this room -- a name/type
8
- * heuristic rather than a schema field, so generated scenes work
9
- * unmodified: street-level open ground counts, anything underground
10
- * or interior doesn't. Both static seeds and the chunked generator
11
- * name outdoor rooms with exactly these words (streets, alleys,
12
- * gates, yards...), and the walk-home-through-the-hideout path always
13
- * exists as the fallback when a run has no outdoor ground at all.
7
+ * Whether a cab can physically reach this room. The predicate itself
8
+ * lives in utilities/outdoors.ts, SHARED with the generator: every
9
+ * drafted run is guaranteed an outdoor START room (the curb the cab
10
+ * dropped you on -- normalizeSkeleton injects one if the model built
11
+ * an indoor start), so walking back to where you arrived always
12
+ * reaches a hailable curb.
14
13
  */
15
14
  static isOutdoors(room: {
16
15
  name: string;
@@ -4,6 +4,7 @@ import { parseArgsWithQuotes } from './talk.js';
4
4
  import { CALL_ICON, CALL_COLOR } from '../utilities/comm-style.js';
5
5
  import { FIXER_NAME } from '../factories/scene-seed-generator.js';
6
6
  import { fuzzyPickName } from '../utilities/fuzzy-match.js';
7
+ import { isOutdoorsPlace } from '../utilities/outdoors.js';
7
8
  export class CallCommand extends Command {
8
9
  static verb = 'call';
9
10
  static description = 'Call someone remotely over a commlink (no need to be in the same room; commlink must be equipped).';
@@ -41,8 +42,14 @@ export class CallCommand extends Command {
41
42
  return `Mid-fight is no time to hail a cab.`;
42
43
  }
43
44
  // Curbside pickup only: no cab noses into a bar, a crypt, or your
44
- // hideout. Step out to a street-level room first.
45
- if (!CallCommand.isOutdoors(this.actor.currentLocation)) {
45
+ // hideout. Step out to a street-level room first. EXCEPTION: the
46
+ // ride home off a WRAPPED job hails from anywhere -- the cab is the
47
+ // only road home now (no hideout door on runs), and a generated
48
+ // scene isn't guaranteed a single outdoor room; the fiction walks
49
+ // you to the curb instead of the gate stranding you.
50
+ const homeboundIndoors = !this.scene.isHub && this.scene.isCompleted()
51
+ && !CallCommand.isOutdoors(this.actor.currentLocation);
52
+ if (!CallCommand.isOutdoors(this.actor.currentLocation) && !homeboundIndoors) {
46
53
  return `The dispatcher grunts: "Curbside pickup only, chummer." Step outside -- a street, an alley, somewhere a cab can actually reach.`;
47
54
  }
48
55
  if (this.scene.isHub && this.game.pendingRun) {
@@ -51,15 +58,46 @@ export class CallCommand extends Command {
51
58
  const trip = await this.game.launchPendingRun();
52
59
  return `${ride?.arrive ?? 'A cab pulls up.'}\n${ride?.board ?? 'You climb in.'}\n${trip}`;
53
60
  }
54
- if (!this.scene.isHub && this.scene.isCompleted()) {
55
- this.actor.performAction('calls a taxi', 'for the ride home');
61
+ if (!this.scene.isHub) {
62
+ // The ride home runs on the meter -- the ride TO a job stays on
63
+ // the client, as Johnson promises. The cab is the ONLY road home
64
+ // now (run scenes no longer carry the hideout door), so broke
65
+ // doesn't strand you: whatever the stick can't cover goes on the
66
+ // tab, collected with the rent at the door (Game.returnToHub).
67
+ //
68
+ // A job does NOT have to be finished to leave it: a run gone
69
+ // sideways (real session: failed the job, stuck in the scene)
70
+ // ends by walking back to the curb you were dropped on -- the
71
+ // dispatcher doesn't care about your employer's feelings. The
72
+ // payout simply never lands; that's the price of walking.
73
+ const wrapped = this.scene.isCompleted();
74
+ const FARE = 80;
75
+ const paid = Math.min(this.actor.currency, FARE);
76
+ const owed = FARE - paid;
77
+ if (paid > 0)
78
+ this.actor.adjustCurrency(-paid);
79
+ if (owed > 0)
80
+ this.game.rentDebt += owed;
81
+ this.actor.performAction('calls a taxi', wrapped ? 'for the ride home' : 'and walks away from the job');
56
82
  const home = await this.game.continueToNextScene();
57
- return `A cab noses out of the dark and finds you like it always knew where you'd be.\n${home}`;
58
- }
59
- if (this.scene.isHub) {
60
- return `The dispatcher's bored voice: "No fare on the books for you, chummer." (No job arranged -- "call ${FIXER_NAME}" first.)`;
83
+ const meterLine = owed === 0
84
+ ? `The meter takes its ${FARE}.`
85
+ : paid > 0
86
+ ? `The meter takes the ${paid} you've got; the other ${owed} goes on your tab.`
87
+ : `The cabbie eyes your dead stick and sighs: "On the tab, chummer. All ${FARE} of it."`;
88
+ const curbLine = homeboundIndoors
89
+ ? `You pick your way back out to street level -- the job's done, and nothing here argues.\n`
90
+ : '';
91
+ // "Refusing to finish a run" is on the book's own notoriety list
92
+ // (SR5e p.368) -- each abandoned job is its own incident.
93
+ let walkLine = '';
94
+ if (!wrapped) {
95
+ const stained = this.actor.addNotoriety(`walked out on "${this.game.currentJobName ?? 'a job'}"`);
96
+ walkLine = `You're leaving the job on the table -- no payout follows you home${stained ? `, and word WILL travel. (+1 Notoriety, now ${this.actor.notoriety})` : '.'}\n`;
97
+ }
98
+ return `${curbLine}${walkLine}A cab noses out of the dark and finds you like it always knew where you'd be. ${meterLine}\n${home}`;
61
99
  }
62
- return `No cab rolls into the middle of a live job. Finish it -- or walk.`;
100
+ return `The dispatcher's bored voice: "No fare on the books for you, chummer." (No job arranged -- "call ${FIXER_NAME}" first.)`;
63
101
  }
64
102
  const { target, remainingWords } = this.resolveTargetAndMessage(rawWords);
65
103
  if (!target) {
@@ -190,21 +228,17 @@ export class CallCommand extends Command {
190
228
  return `{${CALL_COLOR}-fg}${CALL_ICON} You call ${target.name}: "${greeting}"${deliveryNote}{/${CALL_COLOR}-fg}`;
191
229
  }
192
230
  /**
193
- * Whether a cab can physically reach this room -- a name/type
194
- * heuristic rather than a schema field, so generated scenes work
195
- * unmodified: street-level open ground counts, anything underground
196
- * or interior doesn't. Both static seeds and the chunked generator
197
- * name outdoor rooms with exactly these words (streets, alleys,
198
- * gates, yards...), and the walk-home-through-the-hideout path always
199
- * exists as the fallback when a run has no outdoor ground at all.
231
+ * Whether a cab can physically reach this room. The predicate itself
232
+ * lives in utilities/outdoors.ts, SHARED with the generator: every
233
+ * drafted run is guaranteed an outdoor START room (the curb the cab
234
+ * dropped you on -- normalizeSkeleton injects one if the model built
235
+ * an indoor start), so walking back to where you arrived always
236
+ * reaches a hailable curb.
200
237
  */
201
238
  static isOutdoors(room) {
202
239
  if (!room)
203
240
  return false;
204
- const haystack = `${room.roomType ?? ''} ${room.name}`.toLowerCase();
205
- if (/under|tunnel|crypt|basement|cellar|sewer|vault|sub-|subterran/.test(haystack))
206
- return false;
207
- return /street|alley|strip|yard|dock|gate|road|plaza|lot\b|court|bridge|park|curb|waterfront|pier|rooftop|exterior|outside|market/.test(haystack);
241
+ return isOutdoorsPlace(room.name, room.roomType);
208
242
  }
209
243
  hasEquippedCommlink(actor) {
210
244
  return actor.equipment.head?.commlink != null;
@@ -1 +1 @@
1
- {"version":3,"file":"call.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/call.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAA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AAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACpG,OAAO,WAAW,IAAI,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;;;;OASG;IACK,uBAAuB,CAAC,KAAe;QAC7C,kEAAkE;QAClE,mEAAmE;QACnE,sDAAsD;QACtD,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACzD,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAE1C,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;YACjE,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,EAAE,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7F,CAAC;QACH,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC;IACnD,CAAC"}
@@ -13,6 +13,27 @@ export declare class CastCommand extends BypassCommand {
13
13
  protected static description: string;
14
14
  protected bypassType: PuzzleBypassType;
15
15
  protected noPuzzleMessage: string;
16
+ /** Backlash drain when a ward-bypass fails -- resisted with Willpower,
17
+ * like any drain. The nastiest drain in the game: forcing a hostile
18
+ * ward is harder on the caster than any spell of their own. */
19
+ private static readonly BACKLASH_DRAIN;
20
+ /**
21
+ * The ward-bypass outcome is a real SPELLCASTING test now, not the
22
+ * legacy coin flip (a real session died to a 50/50 that ignored Magic 6
23
+ * + spellcasting entirely): the full casting pool -- Magic +
24
+ * spellcasting (or the book-caster's base), best focus, wounds,
25
+ * sustaining -- needs 2 hits to unweave the barrier, same threshold as
26
+ * pick/hack/bluff.
27
+ */
28
+ protected determineOutcome(): Promise<boolean>;
29
+ /**
30
+ * A failed unweaving isn't quiet OR free: the ward's backlash is drain
31
+ * (BACKLASH_DRAIN, resisted with Willpower like any drain), landing on
32
+ * the real stun track with overflow into physical. Enough of it still
33
+ * knocks out or kills -- but through dice and the condition monitors,
34
+ * the same death any spell drain earns, not by fiat.
35
+ */
36
+ protected onBypassFailure(): Promise<string[]>;
16
37
  execute(args?: string[]): Promise<string>;
17
38
  /**
18
39
  * Lenient spell-name matching: the exact key, or a unique fragment of at
@@ -45,9 +66,22 @@ export declare class CastCommand extends BypassCommand {
45
66
  * knockout -- out of the run, but honestly narrated as unconsciousness.
46
67
  */
47
68
  private drainCollapse;
48
- private castManabolt;
69
+ /**
70
+ * The shared combat-spell engine (manabolt/stunbolt/powerbolt/
71
+ * fireball): one exchange flow, parameterized by what SOAKS the hit
72
+ * (SPELLS[key].soak -- the direct/indirect distinction, RAW p.283),
73
+ * whether damage is stun, and the spell's narration.
74
+ */
75
+ private castCombatSpell;
49
76
  private castHeal;
50
77
  private castArmor;
78
+ /**
79
+ * The sustained utility pair (invisibility / increase reflexes), same
80
+ * toggle shape as the armor spell: the BEARER carries the effect and
81
+ * its -2 sustaining burden, the caster pays the drain, and casting at
82
+ * the same bearer again releases it for free.
83
+ */
84
+ private castSustainedUtility;
51
85
  /**
52
86
  * Non-combat casts are a single block, no exchange pacing needed: the
53
87
  * player's own casts return the text for ui.ts to print, while an NPC's