flora-search-aurora.lisp 66 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345
  1. ;;;; Copyright © 2023, Jaidyn Ann <jadedctrl@posteo.at>
  2. ;;;;
  3. ;;;; This program is free software: you can redistribute it and/or
  4. ;;;; modify it under the terms of the GNU General Public License as
  5. ;;;; published by the Free Software Foundation, either version 3 of
  6. ;;;; the License, or (at your option) any later version.
  7. ;;;;
  8. ;;;; This program is distributed in the hope that it will be useful,
  9. ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. ;;;; GNU General Public License for more details.
  12. ;;;;
  13. ;;;; You should have received a copy of the GNU General Public License
  14. ;;;; along with this program. If not, see <https://www.gnu.org/licenses/>.
  15. ;;;; FLORA-SEARCH-AURORA ✿
  16. ;;;; A simple TUI-game made for the text-flavoured LibreJam of 2023-06!
  17. ;;;; See: https://jamgaroo.xyz/jams/2
  18. (in-package :flora-search-aurora)
  19. ;;; ———————————————————————————————————
  20. ;;; Trans-map entity interactions
  21. ;;; ———————————————————————————————————
  22. (defun take-item (map entity-id)
  23. "Take an entity from the MAP :ENTITIES and place it in the player’s pockets.
  24. That is, into MAP’s :ITEMS."
  25. (let ((item-plist (cdr (getf-entity map entity-id))))
  26. (when item-plist
  27. (setf (aget-item map entity-id) item-plist)
  28. (removef-entity map entity-id))))
  29. (defun remove-item (map item-id)
  30. "Given an item’s id, remove it from the user’s inventory."
  31. (…:remove-from-alistf item-id (gethash :items map)))
  32. (defun take-item-dialogue (item-plist)
  33. "Return some dialogue expressing surprise/dread or whatever at the collection
  34. of a new item. The attributes set for the entity item should be:
  35. ID
  36. NAME-[EO|EN]
  37. DESC-[EO|EN]
  38. REMARK-[EO|EN]
  39. REACTION-FACE
  40. REACTION-TALKING
  41. All are optional, save ID."
  42. (start-dialogue
  43. (💬:face 'player (or (getf item-plist :reaction-face) "^_^")
  44. (or (getf item-plist :reaction-talking) "^o^"))
  45. (💬:mumble 'player :en (format nil "(Hey, it's a ~A! ~A!)"
  46. (or (getf item-plist :name-en) (getf item-plist :id))
  47. (or (getf item-plist :remark-en) "Nice!"))
  48. :eo (format nil "(Ho, jen ~A! ~A)"
  49. (or (getf item-plist :name-eo) (getf item-plist :id))
  50. (or (getf item-plist :remark-eo) "Interese!")))
  51. (💬:mumble 'player :en (if (getf item-plist :desc-en)
  52. (format nil "~A" (getf item-plist :desc-en))
  53. "(I'm glad I found it.)")
  54. :eo (if (getf item-plist :desc-eo)
  55. (format nil "~A" (getf item-plist :desc-eo))
  56. "(Kia bonŝanco!)"))))
  57. (defun take-item-interact (map interactee-id)
  58. "Try to “pick up” the interactee entity, then have the player react to the
  59. pickup. See TAKE-ITEM-DIALOGUE for customizing the reaction dialogue.
  60. Should be the `interact` function for takeable items."
  61. (let ((item-plist (cdr (getf-entity map interactee-id))))
  62. (when (take-item map interactee-id)
  63. (make-dialogue-state map (take-item-dialogue item-plist)))))
  64. (defun description-interact (map interactee-id)
  65. "An interact-function that can be used for displaying simple descriptions of
  66. items on the map. These descriptions can be set by the :DESC-EN and :DESC-EO
  67. properties of an entity (editable from Tiled)."
  68. (let ((item-plist (cdr (getf-entity map interactee-id))))
  69. (make-dialogue-state
  70. map
  71. (apply #'start-dialogue
  72. (loop for en-line in (str:lines (getf item-plist :desc-en))
  73. for eo-line in (str:lines (getf item-plist :desc-eo))
  74. collect (💬:mumble 'player :en en-line :eo eo-line))))))
  75. (defun monologue-interact (map interactee-id)
  76. "An interact-function that can be used for displaying a monologue of a the
  77. interactee — that is, they say the dialogue defined in the interactee’s
  78. :SPEECH-EN and :SPEECH-EO properties."
  79. (let ((item-plist (cdr (getf-entity map interactee-id))))
  80. (make-dialogue-state
  81. map
  82. (apply #'start-dialogue
  83. (loop for en-line in (str:lines (getf item-plist :speech-en))
  84. for eo-line in (str:lines (getf item-plist :speech-eo))
  85. collect (💬:say interactee-id :en en-line :eo eo-line))))))
  86. (defun random-monologue-interact (map interactee-id)
  87. "An interact-function that can be used for displaying a random piece of
  88. dialogue as a monologue of a the interactee — that is, they say the dialogue
  89. defined in the interactee’s :SPEECH-EN and :SPEECH-EO properties.
  90. Each line in :SPEECH-EN or :SPEECH-EO is treated as a seperate line of
  91. dialogue, among which one will be selected randomly."
  92. (let* ((item-plist (cdr (getf-entity map interactee-id)))
  93. (eo-line (alexandria:random-elt (str:lines (getf item-plist :speech-eo))))
  94. (en-line (alexandria:random-elt (str:lines (getf item-plist :speech-en)))))
  95. (make-dialogue-state
  96. map (start-dialogue (💬:say interactee-id :en en-line :eo eo-line)))))
  97. (defun move-trigger (map trigger-plist)
  98. "A trigger function that forces the player to move either relatively or
  99. absolutely, depending on the properties of TRIGGER-PLIST (:ΔX & ΔY or X & Y).
  100. It will also display a monologue of the :DESC-* properties before movement.
  101. Useful for making barriers the player character refuses to traverse."
  102. (make-dialogue-state
  103. map
  104. (apply
  105. #'start-dialogue
  106. (append
  107. (loop for en-line in (str:lines (getf trigger-plist :desc-en))
  108. for eo-line in (str:lines (getf trigger-plist :desc-eo))
  109. collect (💬:mumble 'player :en en-line :eo eo-line))
  110. (list (move 'player (list :Δx (getf trigger-plist :Δx)
  111. :Δy (getf trigger-plist :Δy)
  112. :x (getf trigger-plist :x)
  113. :y (getf trigger-plist :y))))))))
  114. (defun entrance-trigger (map trigger-plist)
  115. "A trigger that can be used to move the user from one MAP to another, via the
  116. :MAP property in a trigger’s Tiled entity."
  117. (list :parameters
  118. (list :map (🌍:merge-maps
  119. map (symbol-value (read-from-string (getf trigger-plist :map)))))))
  120. (defun avatar-change-trigger (map &optional trigger-plist)
  121. "A somewhat weird trigger that changes the player's face or avatar."
  122. (setf (getf-entity-data map 'player :talking-face) (getf trigger-plist :talking-face))
  123. (setf (getf-entity-data map 'player :face) (getf trigger-plist :face))
  124. (setf (getf-entity-data map 'player :avatar) (getf trigger-plist :avatar))
  125. (list :parameters (list :map map)))
  126. (defun entrance-interact (map interactee)
  127. "An interact function that can be used to move the user from one MAP to another,
  128. via the :MAP property in the INTERACTEE’s Tiled entity."
  129. (let ((new-parameters
  130. (list :map
  131. (merge-maps
  132. map (symbol-value (read-from-string (getf-entity-data map interactee :map)))))))
  133. (if (getf-entity-data map interactee :desc-en)
  134. (make-dialogue-state
  135. map
  136. (apply
  137. #'start-dialogue
  138. (append
  139. (loop for en-line in (str:lines (getf-entity-data map interactee :desc-en))
  140. for eo-line in (str:lines (getf-entity-data map interactee :desc-eo))
  141. collect (💬:mumble 'player :en en-line :eo eo-line))
  142. `(((:parameters ,new-parameters))))))
  143. `(:parameters ,new-parameters))))
  144. (defun item-refusal-lines (string item)
  145. "Given an ITEM’s symbol ID, return all speech lines according it.
  146. These are encoded in an entity’s :ITEM-SPEECH-[EN|EO] properties, with the ID at
  147. the start of each line followed by a tab and the speech line."
  148. (mapcar #'cadr
  149. (remove-if-not
  150. (lambda (pair)
  151. (eq (…:string->symbol (car pair)) item))
  152. (mapcar
  153. (lambda (line)
  154. (str:split #\tab line))
  155. (str:lines string)))))
  156. (defun refusal-use (map item-plist entity)
  157. "A generic use function for entities that can be used to display refusal
  158. messages embedded in the Tiled map data."
  159. (let* ((refusal-en-lines (item-refusal-lines (getf-entity-data map entity :item-speech-en)
  160. (…:string->symbol (getf item-plist :id))))
  161. (refusal-eo-lines (item-refusal-lines (getf-entity-data map entity :item-speech-eo)
  162. (…:string->symbol (getf item-plist :id))))
  163. (en-lines (if (str:emptyp (str:unlines refusal-en-lines))
  164. (str:lines (or (getf-entity-data map entity :item-default-en) "No thanks."))
  165. refusal-en-lines))
  166. (eo-lines (if (str:emptyp (str:unlines refusal-eo-lines))
  167. (str:lines (or (getf-entity-data map entity :item-default-eo) "Ne, dankon."))
  168. refusal-eo-lines)))
  169. (make-dialogue-state
  170. map
  171. (apply #'start-dialogue
  172. (loop for eo-line in eo-lines
  173. for en-line in en-lines
  174. collect (💬:say entity :en en-line :eo eo-line))))))
  175. (defun to-person-use (&optional map item-plist)
  176. "A function ran by INVENTORY 🎒 when an item is “used”, which will try to
  177. run the :USE function of the nearest entity, if it has any."
  178. (let ((nearby (car (entities-near-entity (getf-entity map 'player)
  179. (gethash :entities map)))))
  180. (if (and nearby (getf (cdr nearby) :use))
  181. (let ((use-result (funcall (…:string->symbol (getf (cdr nearby) :use))
  182. map item-plist (car nearby))))
  183. (typecase use-result
  184. (list (nconc (list :drop 1) use-result))
  185. (t use-result)))
  186. (nconc
  187. (list :drop 1)
  188. (make-dialogue-state
  189. map
  190. (start-dialogue (💬:mumble 'player :en "(They don't seem to want it.)"
  191. :eo "(Ĝi verŝajne ne volas tion.)")))))))
  192. ;;; ———————————————————————————————————
  193. ;;; The Outside World™
  194. ;;; ———————————————————————————————————
  195. ;;; ———————————————————————————————————
  196. ;;; Random outdoors NPCs
  197. ;;; ———————————————————————————————————
  198. (defun kvincent-greetings (map)
  199. (case (…:incf-0 (getf-act map :kvincent-greetings))
  200. (0
  201. (start-dialogue
  202. (💬:face 'kvincent "@__@" ">OO<")
  203. (💬:face 'player ":w:" ":o:")
  204. (💬:say 'kvincent :eo "AIIII! Ve! Ve! Diablo! Jen diablo!"
  205. :en "AIIII! Woe is me! The Devil has come!")
  206. (💬:say 'player :eo "Kvincent, Kvincent! Trankviliĝu, trankviliĝu! Estas mi!"
  207. :en "Kvincent, Kvincent! Calm down, it's just me!")
  208. (💬:say 'kvincent :eo "... bedaŭron?"
  209. :en "... pardon?")
  210. (💬:face 'kvincent "@w@" "@o@")
  211. (💬:say 'kvincent :eo "Hooo, vi tute ne estas diablo! Vi estas nura homo!"
  212. :en "Ooooh, you're not the Devil! You're just a person!"
  213. :face "@v@")
  214. (💬:say 'player :eo "Kompreneble!"
  215. :en "Obviously not!")))
  216. (otherwise
  217. (start-dialogue
  218. (💬:face 'player "=w='" "=o='")
  219. (💬:face 'kvincent "@__@" ">OO<")
  220. (💬:say 'kvincent :eo "AJJJJ! Ve! Ve! Dia..."
  221. :en "AIIII! Woe is me! Dev...")
  222. (💬:say 'player :eo "Mi ankoraŭ ne estas diablo!!"
  223. :en "I'm still no demon!!")
  224. (💬:face 'kvincent "@w@" "@o@")
  225. (💬:say 'kvincent :eo "Ha, jes. Pardonu."
  226. :en "Oh, right. Sorry.")))))
  227. (defun kvincent-dialogue (map)
  228. (append (kvincent-greetings map)
  229. (start-dialogue
  230. (💬:face 'player "` `" "`o`")
  231. (💬:say 'player :eo "Ĉu ĉio enordas, Kvincent?"
  232. :en "Everything alright, Kvincent?")
  233. (💬:say 'kvincent :eo "Mi iom anksias, freŝe... mi aŭdas strangajn, metalajn sonojn proksime en la montoj!"
  234. :en "I'm a bit anxious, lately... I hear strange, metalic noises nearby in the mountains!")
  235. (💬:say 'kvincent :eo "Estas sendube diabloj!"
  236. :en "Without a doubt, the sounds of devils!")
  237. (💬:say 'kvincent :eo "Kaj ankaŭ mi apenaŭ trovas fungojn, hodiaŭ... la dioj malbenis min!"
  238. :en "Not to mention that I'm hardly finding any mushrooms... I've been cursed!")
  239. (💬:say 'player :eo "Nek mi povas trovi florojn! Kia malfacila tago."
  240. :en "I can't find any flowers, either! Today sucks."
  241. :face "vov\'"))))
  242. (defun kvincent-interact (map &optional interactee-id)
  243. (make-dialogue-state map (kvincent-dialogue map)))
  244. ;;; ———————————————————————————————————
  245. ;;; Childhood friend (Sasha) arc
  246. ;;; ———————————————————————————————————
  247. (defun childhood-friend-greetings (map)
  248. (…:incf-0 (getf-act map :sasha-greetings))
  249. (let ((sasha 'childhood-friend))
  250. (case (getf-act map :sasha-greetings)
  251. (0
  252. (start-dialogue
  253. (💬:mumble sasha :en "...")
  254. (💬:say 'player :eo "Kielas apud la mar'?"
  255. :en "How's the view?")
  256. (💬:face 'player "<.<" "<o<")
  257. (💬:say sasha :eo "Kielas apud la ruinoj de via viv'?"
  258. :en "How's your trainwreck of a life?")))
  259. (1
  260. (start-dialogue
  261. (💬:mumble 'player :en "...")
  262. (💬:face 'player "<w<")
  263. (💬:say sasha :eo "Kial vi restas? Ĉu tiom solecas ke nur ideas ĝeni min?"
  264. :en "Why are you still here? Are you so lonely you've only got me to bother?")
  265. (💬:face 'player ":w:" ":u:")
  266. (💬:mumble 'player :eo "(Ŝi parolas pri si mem, ĉu ne?)"
  267. :en "(She's projecting, isn't she?)")))
  268. (2
  269. (start-dialogue
  270. (💬:face 'player ":w:" ":o:")
  271. (💬:say 'player :eo "Nu... Vi staris tie ĉi senmove dum la pastintaj tri tagoj..."
  272. :en "So... You've stood around here for three days already, you've hardly moved...")
  273. (💬:say sasha :eo "Pŝ! Do?! Mi simple havas multajn pripensindaĵojn! Mi tiom multe okupiĝas!"
  274. :en "Pff! So what?! My mind's just busy! I've got a lot going on right now!"
  275. :face "vov")
  276. (💬:say sasha :eo "Ne ŝajnigu vin supera al mi, dum vi mem senespere sencelas!!"
  277. :en "Don't act all haughty when you're such an aimless loser yourself!!"
  278. :face ">o<")
  279. (💬:face 'player "=w=" "=u=")
  280. (💬:mumble 'player :eo "Eee.. pardonu."
  281. :en "Well... sorry.")))
  282. (3
  283. (start-dialogue
  284. (💬:say 'player :eo "Nu, vere, mia celo sufiĉe klaras al mi. Jam baldaŭ redungiĝos."
  285. :en "I'm not too aimless, actually. I've got good job prospects, right about now."
  286. :face "<w<")
  287. (💬:say sasha :eo "Mi tute ne prizorgas."
  288. :en "I really don't care."))))))
  289. (defun childhood-friend-partings ()
  290. (let ((partings
  291. '((:eo "Nu? Ĝis! Adiaŭ!"
  292. :en "Well? Bye! Ta-ta!")
  293. (:eo "Ve! Eĉ via rigardo malkomfortigas!"
  294. :en "God! You're such a creep!")
  295. (:eo "Lasu! Min! Sooooola!"
  296. :en "Leave me! The hell! Alooooone!")
  297. (:eo "Subvermo!"
  298. :en "Worm!"))))
  299. (start-dialogue
  300. (apply #'say (append '(childhood-friend)
  301. (nth (random (length partings)) partings))))))
  302. (defun childhood-friend-dialogue (map)
  303. (let ((greetings (getf-act map :sasha-greetings)))
  304. (cond ((or (not greetings)
  305. (< greetings 3))
  306. (childhood-friend-greetings map))
  307. ('t
  308. (childhood-friend-partings)))))
  309. (defun childhood-friend-interact (map &optional interactee-id)
  310. (make-dialogue-state map (childhood-friend-dialogue map)))
  311. (defun childhood-friend-dialogue-bracelet-intro (sasha)
  312. (start-dialogue
  313. (💬:face 'player "=w=" "=v=")
  314. (💬:say 'player :eo "Nu, mi ankoraŭ opinias ke ĉi tio akordas vian stilon tre bone."
  315. :en "I still think this suits you, you know.")
  316. (💬:face sasha ";w:" ":o:")
  317. (💬:say sasha :en "...")
  318. (💬:say sasha :eo "... vi ankoraŭ havas tion?"
  319. :en "... you still have that?")
  320. (💬:say 'player :eo "Kompreneble mi plu havas!"
  321. :en "Of course I do!")
  322. (💬:say 'player :eo "Sed mi ne plu; ĝi ja estas via."
  323. :en "But I shouldn't; it's yours, after all.")
  324. (💬:say sasha :en "...")))
  325. (defun childhood-friend-dialogue-bracelet-bad-end (sasha)
  326. (start-dialogue
  327. (💬:face sasha "v-v" "vov")
  328. (💬:face 'player ":w;" ":o;")
  329. (💬:say sasha :eo "Pŝ!"
  330. :en "Psh!")
  331. (💬:say sasha :eo "Ankoraŭ estas la malĝusta koloro, do..!"
  332. :en "It's still the wrong colour, so..!"
  333. :face "<o<")
  334. (💬:say sasha :eo "Lasu min!"
  335. :en "Leave me alone!"
  336. :face ">o<")
  337. (💬:say 'player :eo "Kial vi ankoraŭ forpuŝas min ĉi tiom?"
  338. :en "Why do you still push me away this much?")
  339. (💬:say sasha :eo "Puŝas? Bona ideo, mi falpuŝu vin al la maro!"
  340. :en "Push? Good idea, I'll push you off this cliff!")
  341. (💬:say 'player :eo "Vi ankoraŭ kompenas nenion ajn, Saŝa."
  342. :en "You still don't get it at all, Sasha.")
  343. (💬:say 'player :eo "... kaj ne puŝu min, bonvole!!"
  344. :en "... and please don't push me!!"
  345. :face "@o@")))
  346. (defun childhood-friend-dialogue-bracelet-good-end (sasha)
  347. (start-dialogue
  348. (💬:face sasha "=v=\"" "=v=\"")
  349. (💬:say sasha :eo "Nu, dankon..."
  350. :en "Well, thanks...")
  351. (💬:say sasha :eo "[SAŜA prenas ĈIRKAŬMANON de vi.]"
  352. :en "[SASHA takes BRACELET from you.]")
  353. (💬:face sasha "<w<" "<w<")
  354. (💬:say sasha :eo "Verdire, mi mensogetis tiam..."
  355. :en "To be honest, I lied a bit, back then...")
  356. (💬:say sasha :eo "Ĉi tiu koloro fakte tre plaĉas al mi."
  357. :en "I actually really like this colour."
  358. :face ">w>")
  359. (💬:say 'player :eo "Mi ĝojas, ke finfine estos via."
  360. :en "I'm glad it's finally yours.")
  361. (💬:say sasha :eo "Mi suportos ĝin ĉiutage!"
  362. :en "I'll wear it every day!"
  363. :face "^o^")
  364. (💬:say sasha :eo "... ho. Fek! Nu!"
  365. :en "... wait. Shit!"
  366. :face "<w<\"")
  367. (💬:say sasha :eo "Simple pro la aspekto! Ne gravas al mi, ĉu estas donaco aŭ ne!!"
  368. :en "Just because it's pretty! I don't care that it's a gift or whatever!!"
  369. :face ">o<")
  370. (💬:face 'player "` `" "`o`")
  371. (💬:mumble 'player :eo "(Mi supozas, ke la kerno de homo ne tro multe sanĝiĝas...)"
  372. :en "(At the end of the day, I guess people can't change too much...)")
  373. (💬:mumble 'player :eo "(Sed tamen."
  374. :en "(But y'know what? This is good enough for me.)")
  375. (💬:face 'player "^w^" "^o^")
  376. (💬:mumble 'player :eo "(Ĉi tio sufiĉas al mi!)"
  377. :en "(This is good enough for me!)")))
  378. (defun childhood-friend-dialogue-edelweiss (sasha)
  379. (start-dialogue
  380. (say sasha :eo "Ĝi iom belas, mi supozas."
  381. :en "It's pretty, I guess.")
  382. (say 'player :eo "Saŝa, mi komprenas vin finfine."
  383. :en "Sasha, I think I understand you now.")
  384. (say 'player :eo "Vi fermiĝas en vi mem, timante ke aliuloj vin vundos kaj malaprobos."
  385. :en "You close up in yourself, afraid that others will reject you.")
  386. (say 'player :eo "Saŝa--! Vi bezonas pli kuraĝi!"
  387. :en "Sasha... you need to be brave!")
  388. (say sasha :eo "... Vi afektemas, laŭkutime."
  389. :en "... You're pretentious, as per usual.")))
  390. (defun childhood-friend-dialogue-lavendula (sasha)
  391. (start-dialogue
  392. (say sasha :eo "Ee... dankon?"
  393. :en "Uh... thanks?")
  394. (say sasha :eo "Kion vi eĉ alcelas per ĉi tio? Je dio."
  395. :en "What're you even getting at? Jesus.")
  396. (say 'player :eo "Saŝa, mi pensas ke lavendo perfekte akordas vin."
  397. :en "Sasha, I think lavender fits you perfectly.")
  398. (say 'player :eo "Vi malfidas ĉiun, eĉ tiujn kiuj plej fidas je vi."
  399. :en "You distrust and alienate everyone, even those who are most loyal to you.")
  400. (say 'player :eo "Mi eble ne diris rekte ĝis nun, do jen:"
  401. :en "Maybe I haven't said it directly before, so I'll go ahead now:")
  402. (face sasha ";w:" ":w:")
  403. (say 'player :eo "Mi zorgas pri vi multe, vi ĉiam estis mia plej kara amiko."
  404. :en "I care about you a lot, Sasha, and you've always been my dearest friend.")
  405. (say 'player :eo "Malgraŭ via mistraktado, mi neniam foriris, ĉu ne?"
  406. :en "Despite your pushing me away -- violently -- I never did leave, right?")
  407. (say 'player :eo "Mi konscias ke vi \"testadis\" nian amikecon, sed vi ne devas tion fari plu."
  408. :en "I know you try to \"test\" our friendship, but you don't have to do that anymore.")
  409. (say sasha :en "...")
  410. (say sasha :eo "... ĉu vere bonas?"
  411. :en "... is it really alright?")
  412. (say 'player :eo "Jes. Friends?"
  413. :en "Yea. Friends?")
  414. (face sasha "<w<" "^o^")
  415. (say sasha :eo "Amikoj."
  416. :en "Friends.")))
  417. (defun childhood-friend-dialogue-bracelet (map sasha)
  418. (append (childhood-friend-dialogue-bracelet-intro sasha)
  419. (if (getf-act map :encourage-friendship)
  420. (childhood-friend-dialogue-bracelet-good-end sasha)
  421. (childhood-friend-dialogue-bracelet-bad-end sasha))))
  422. (defun childhood-friend-use (map item-plist &optional entity-id)
  423. (let ((item-id (…:string->symbol (getf item-plist :id))))
  424. (cond ((eq item-id 'bracelet)
  425. (if (getf-act map :encourage-friendship)
  426. (setf (getf-act map :perfect-friendship) 't))
  427. (make-dialogue-state
  428. map (childhood-friend-dialogue-bracelet map entity-id)))
  429. ((eq item-id 'neĝfloro)
  430. (remove-item map entity-id)
  431. (make-dialogue-state map (childhood-friend-dialogue-edelweiss entity-id)))
  432. ((eq item-id 'lavendula)
  433. (setf (getf-act map :encourage-friendship) 't)
  434. (remove-item map entity-id)
  435. (make-dialogue-state map (childhood-friend-dialogue-lavendula entity-id)))
  436. ('t
  437. (refusal-use map item-plist entity-id)))))
  438. ;;; ———————————————————————————————————
  439. ;;; School prologue: Childhood friend
  440. ;;; ———————————————————————————————————
  441. (defun flashback-school ()
  442. (list
  443. :title '(:eo "ANTAŬLUDO I" :en "PROLOGUE I")
  444. :subtitle '(:eo "Antaŭ kvar jaroj..." :en "Four years ago...")
  445. :side-bar '(:eo "Amikoj, ĉu? Mi ne scias, eble..." :en "Friends? I don't know, maybe...")
  446. :map *flashback-school-map*))
  447. (defun flashback-school-trigger (map &optional trigger-plist)
  448. "This is triggered right as the player enters the map — they literally can't
  449. avoid triggering this."
  450. (take-item map 'bracelet)
  451. 't)
  452. (defun flashback-childhood-friend-dialogue-intro (sasha)
  453. (start-dialogue
  454. (💬:face 'player "` `" "`o`")
  455. (💬:say 'player :eo "Ĉu ĉio enordas, Saŝa? Iom malfruas, ĉu ne?"
  456. :en "Is everything OK, Sasha? It's a bit late, isn't it?")
  457. (💬:face sasha "=_=" "=o=")
  458. (💬:say sasha :eo "Ho, jes, mi simple ĵus eliris klubkunvenon."
  459. :en "Yea, I just left a club-meeting, is all.")
  460. (💬:say 'player :eo "Hodiaŭ ne estas klubotago..."
  461. :en "Today isn't club day...")
  462. (💬:say sasha :eo "Nu, estas escepte speciala klubo!"
  463. :en "Well, whatever, it's a special club!"
  464. :face "<o<")
  465. (💬:say sasha :eo "Nu, kial VI restas? Ĉu ankoraŭ havas ne amikojn?"
  466. :en "And what're YOU doing here? Still no friends?")
  467. (💬:say 'player :eo "Ankoraŭ sole vin."
  468. :en "Still just you.")
  469. (💬:face sasha ":v:" ":o:")
  470. (💬:mumble sasha :en "...")
  471. (💬:say sasha :eo "Nu..."
  472. :en "Well...")
  473. (💬:mumble sasha :en "...")
  474. (💬:face sasha "<-<" "<o<")
  475. (💬:face 'player ":w:" ":u:")
  476. (💬:say sasha :eo "Pŝ! Fermu la buŝon, vermo!"
  477. :en "Ugh! Just shut up, you loser!")
  478. (💬:face sasha ">->" ">o>")
  479. (💬:say sasha :eo "Kvazaŭ ni povus esti tiel!"
  480. :en "As if!")
  481. (💬:face sasha "<-<" "<o<")
  482. (💬:say sasha :eo "Simple lasu min al paco, fek'!!"
  483. :en "Just get the hell out of my face!!"
  484. :face ">o<")
  485. (💬:say 'player :eo "Bedaŭron..."
  486. :en "Sorry...")
  487. (move 'player '(:x 46 :y 11) :delay .05)
  488. (💬:face 'player "^_^" "^o^")
  489. (💬:say 'player :eo "Ho, jes!"
  490. :en "Oh, yea!")
  491. (move sasha '(:x 36 :y 3) :delay .03)
  492. (move 'player '(:x 43 :y 4) :delay .05)
  493. (move sasha '(:x 37 :y 3))))
  494. (defun flashback-childhood-friend-dialogue-bracelet (map sasha)
  495. (start-dialogue
  496. (💬:say 'player :eo "Mi freŝe trovis ĉi tion, ĝi ŝajnis akorda al via stilo."
  497. :en "I found this a while back, I thought you'd like it.")
  498. (💬:face sasha ";w:" ";u:")
  499. (💬:mumble 'player :eo "[Vi donas al SAŜA ĉirkaŭmanon belbrilan.]"
  500. :en "[You give SASHA a shiny bracelet.]")
  501. (💬:say sasha :eo "Ho, tio surprize afablis...."
  502. :en "Oh, that's surprisingly nice...")
  503. (💬:face sasha "<w<" "<o<")
  504. (💬:face 'player ":w;" ":o;")
  505. (💬:say sasha :eo "... jen la sola koloro, kiun mi malamas."
  506. :en "... this is literally the one color I hate.")
  507. (💬:say sasha :eo "Kial vi ne elektis bluan? Dio mia."
  508. :en "You couldn't have gotten blue?")
  509. (💬:say sasha :eo "Mi jam bone sciu, ne atendi bonon de vi."
  510. :en "I should know not to expect so much from you...")
  511. (💬:say sasha :eo "Bonaj \"amikoj\" ni estas, ja..."
  512. :en "\"Friends,\" whatever...")
  513. (💬:face 'player "T_T" "ToT")
  514. (move 'player '(:x 41 :y 3) :delay .05)
  515. (💬:face sasha ":_;")
  516. (💬:mumble 'player :eo "[Vi prenas de SAŜA ĉirkaŭmanon belbrilan.]"
  517. :en "[You take a shiny bracelet from SASHA.]")
  518. (move 'player '(:x 46 :y 5) :delay .05)
  519. (move 'player '(:x 51 :y 19) :delay .05)
  520. (list (make-flashforward-state map))))
  521. (defun flashback-childhood-friend-dialogue (map sasha)
  522. (append (flashback-childhood-friend-dialogue-intro sasha)
  523. (flashback-childhood-friend-dialogue-bracelet map sasha)))
  524. (defun flashback-childhood-friend-interact (map entity-id)
  525. (make-dialogue-state
  526. map (flashback-childhood-friend-dialogue map entity-id)))
  527. (defun flashback-childhood-friend-use (map item-plist &optional entity-id)
  528. (let ((item-id (…:string->symbol (getf item-plist :id))))
  529. (cond ((eq item-id 'bracelet)
  530. ;; If player gives her the special bracelet, skip the dialogue intro
  531. (make-dialogue-state
  532. map (flashback-childhood-friend-dialogue-bracelet map entity-id)))
  533. ('t (childhood-friend-use map item-plist entity-id)))))
  534. ;;; ———————————————————————————————————
  535. ;;; Military-base!
  536. ;;; ———————————————————————————————————
  537. (defun captain-snake-interact (map &optional entity-id)
  538. (make-dialogue-state
  539. map
  540. (start-dialogue
  541. (💬:say 'beatnick :eo "Mi havas sagacan planon, sinjoro."
  542. :en "I've got a cunning plan, sir.")
  543. (💬:say 'captain-snake :en "Of course you do."
  544. :eo "Laŭkutime.")
  545. (💬:say 'captain-snake :en "And what is it this time, Beatnick?"
  546. :eo "Do, kiom ĝi malbonas cî-foje, Balnik?")
  547. (💬:say 'beatnick :en "Well, I figured that, as officers, our job is to catch baddies..."
  548. :eo "Nu, mi rimarkis ke, kiel oficiroj, nia tasko estas kapti malbonulojn...")
  549. (💬:say 'captain-snake :en "Yes..?"
  550. :eo "Kaj..?")
  551. (💬:say 'beatnick :en "... and, well, if we were baddies, we'd have to catch ourselves, wouldn't we?"
  552. :eo "... kaj, nu, se ni estus la malbonuloj, ni devus kapti nin mem, ĉu ne?")
  553. (💬:say 'captain-snake :en "Beatnick, is your plan for us to commit a minor crime so we get tossed in jail rather than shot for desertion?"
  554. :eo "Balnik, ĉu via plano estas ke ni faru krimeton por ke ni malliberiĝu anstataŭ mortpafiĝu?")
  555. (💬:say 'beatnick :en "Yes, sir, Captain Snake sir."
  556. :eo "Jes, sinjoro, Kapitano Serpento.")
  557. (💬:mumble 'captain-snake :en "...")
  558. (💬:say 'captain-snake :en "It's no world-beater, but it's the only plan we've got."
  559. :eo "Ĝia ne elstare bonas, sed ĝi elstaras inter la aliaj planoj... kiel nia sola plano.")
  560. (move 'captain-snake '(:x 75 :y 10) :delay .07)
  561. (💬:say 'beatnick :eo "Ho, ni komencas nun, ĉu? Atendu min!"
  562. :en "Oh, we're starting now? Wait for me!"
  563. :face "ovo")
  564. (move 'beatnick '(:x 75 :y 10) :delay 0)
  565. (move 'captain-snake '(:x 150 :y 10) :delay 0)
  566. (move 'beatnick '(:x 150 :y 10) :delay 0))))
  567. (defun sheriff-trigger-dialogue-intro ()
  568. (start-dialogue
  569. (face 'player "o^o" "o*o")
  570. (face 'sheriff ">,,,<" ">;;;<")
  571. (💬:say 'sheriff :eo "TRUDANTO!"
  572. :en "INTRUDER!")
  573. (move 'sheriff '(:x 29 :y 1) :delay 0)
  574. (move 'sheriff '(:x 14 :y 10) :delay 0)
  575. (face 'player ">^<" ">o<")
  576. (💬:say 'sheriff :eo "MANOJN LEVU! MANOJN POSTDORSU! SURPLANKIĜU!"
  577. :en "HANDS IN THE AIR! HANDS ON YOUR BACK! GET ON THE GROUND, NOW!")
  578. (💬:mumble 'sheriff :en "...")
  579. (face 'player "o^<" "o.o")
  580. (face 'sheriff "u,,,u" "u,,,o")
  581. (💬:say 'sheriff :eo "Hooooooo, vi ne estas kontraŭulo!"
  582. :en "Ohhhhh, you're no enemy!")))
  583. (defun sheriff-trigger-dialogue-postintro (map)
  584. (if (getf-know map :is-intern)
  585. (start-dialogue
  586. (face 'player "=w=" "=v=")
  587. (say 'player :eo "Kompreneble ke ne! Mi estas la nova staĝisto, sinjoro!"
  588. :en "Of course not! I'm the new intern, sir!")
  589. (say 'sheriff :eo "Ha jes, bone do."
  590. :en "Right right, very good."))
  591. (progn
  592. (setf (getf-know map :is-intern) 't)
  593. (start-dialogue
  594. (💬:say 'sheriff :eo "Vi estas la staĝanto nova, ĉu?"
  595. :en "You're clearly the new intern.")
  596. (face 'player "=w=" "=v=")
  597. (💬:say 'player :eo "Eee... bone? Jes. Mi estas ja."
  598. :en "Eee... sure? Yes, I sure am."
  599. :face "=v='")
  600. (💬:say 'sheriff :eo "Vi volis diri \"Mi estas ja, SINJORO.\""
  601. :en "You mean, \"I sure am, SIR.\"")
  602. (💬:say 'sheriff :eo "Vi alparolas la policĉefon, ne forgesu tion!"
  603. :en "It's the sheriff you're talking to, and don't you forget it!")
  604. (face 'player "o^o" "o*o")
  605. (💬:say 'sheriff :eo "Mi \"punos\" vin sekvafoje, ĉu ni interkompreniĝas?"
  606. :en "I'll have you \"reprimanded\" next time, are we clear?")
  607. (💬:say 'player :eo "Eeee!! Tutkomprenite, sinjoro! Pardonu min, sinjoro!"
  608. :en "Eeee!! Crystal, sir! Forgive me, sir!"
  609. :face ">o<")
  610. (💬:say 'sheriff :eo "Bone, bone."
  611. :en "Good, then.")
  612. (face 'player "=*=" "=v=")))))
  613. (defun sheriff-trigger-dialogue-order (map)
  614. (start-dialogue
  615. (💬:say 'sheriff :eo "Nu, vi jam bone scias ke ne multe okupiĝos dum la sekvontaj kelkaj tagoj."
  616. :en "Now, I'm sure you're well aware of how busy we'll be for the next few days.")
  617. (💬:say 'sheriff :eo "Mi mem okupiĝas multe kun tre prema planado kun la kapitanoj."
  618. :en "I'm currently busy making some last-minute plans with the captains.")
  619. (💬:say 'sheriff :eo "Nu, ni komencu."
  620. :en "Now then, down to brass tacks.")
  621. (💬:say 'sheriff :eo "Prenu por mi kafon de la plej proksima kafejo. Poste, petu Kapitanon Serpenton por viaj ordonoj."
  622. :en "Fetch me coffee from the nearest coffee house. Then, see Captain Snake for your orders.")
  623. (if (getf-know map :is-intern)
  624. (💬:say 'player :eo "Jes, sinjoro; mi faros tuj, sinjoro!"
  625. :en "Yes, sir; I'll do it right away, sir!")
  626. (💬:say 'player :eo "Jes sinjoro!! Tuj, sinjoro!!"
  627. :en "Sir yes sir!! Right away, sir!"
  628. :face ">o<"))
  629. (move 'sheriff '(:x 29 :y 1))
  630. (move 'sheriff '(:x 44 :y 1))))
  631. (defun sheriff-trigger-dialogue (map)
  632. (append (sheriff-trigger-dialogue-intro)
  633. (sheriff-trigger-dialogue-postintro map)
  634. (sheriff-trigger-dialogue-order map)))
  635. (defun sheriff-trigger (map &optional trigger-plist)
  636. (declare (ignore trigger-plist))
  637. (if (not (getf-act map :sheriff-met))
  638. (progn
  639. (setf (getf-act map :sheriff-met) 't)
  640. (make-dialogue-state map (sheriff-trigger-dialogue map)))
  641. (list :parameters (list :map map))))
  642. (defun scientist-dialogue-edelweiss (scientist)
  643. (start-dialogue
  644. (say 'player :eo "Jen, por vi."
  645. :en "Here, for you.")
  646. (say scientist :eo "... he?"
  647. :en "... huh?")
  648. (say 'player :eo "Estas neĝfloro, ĉu vi konas ĝian signifon?"
  649. :en "It's an Edelweiss. Do you know what it means?")
  650. (say 'player :eo "Signifas kuraĝon kaj bravecon."
  651. :en "It means courage and bravery.")
  652. (say 'player :eo "La kuraĝo fidi je viaj juĝoj..."
  653. :en "The courage to trust your judgement...")
  654. (say 'player :eo "... kaj braveco por ilin esprimi."
  655. :en "... and the bravery to speak your mind.")
  656. (face scientist "8w8" "8v8")
  657. (say scientist :eo "Dankon, staĝanto."
  658. :en "Thanks, intern.")
  659. (say scientist :eo "Ĉi tio fakte tre agrablas de vi, multan, multan dankon."
  660. :en "This was actually very kind of you, thank you so much.")
  661. (say scientist :eo "Mi pravas... mi scias, kion mi devas fari!"
  662. :en "I'm in the right... I know now what I have to do!")
  663. (say scientist :en "Farewell, intern."
  664. :eo "Adiaŭ, S-ro staĝanto.")
  665. (move scientist '(:x 145 :y 10))))
  666. (defun scientist-use (map item-plist &optional entity-id)
  667. (let ((item-id (…:string->symbol (getf item-plist :id))))
  668. (cond ((eq item-id 'neĝfloro)
  669. (setf (getf-act map :encourage-scientist) 't)
  670. (make-dialogue-state map (scientist-dialogue-edelweiss entity-id)))
  671. ('t
  672. ;; Otherwise, have her politely refuse. =w=
  673. (refusal-use map item-plist entity-id)))))
  674. ;;; ———————————————————————————————————
  675. ;;; Base prologue: Quiet scientist
  676. ;;; ———————————————————————————————————
  677. (defun flashback-base-dialogue (map)
  678. (let ((sheriff 'flashback-sheriff)
  679. (scientist 'flashback-scientist))
  680. (start-dialogue
  681. (move sheriff '(:x 100 :y 26) :delay .1)
  682. (move sheriff '(:x 90 :y 29) :delay .1)
  683. (move sheriff '(:x 87 :y 29))
  684. (mumble sheriff :en "Hm?")
  685. (move scientist '(:x 112 :y 22) :delay 0)
  686. (say scientist :eo "Atendu, sinjoro!!"
  687. :en "Wait, sir!!")
  688. (move scientist '(:x 95 :y 29) :delay 0.02)
  689. (say scientist :eo "Momenton!"
  690. :en "Just a moment!")
  691. (say sheriff :eo "Doktoro Tim?"
  692. :en "Doctor Tim?")
  693. (say sheriff :eo "Kial la kurado, ĉu ĉio enordas?"
  694. :en "Why the hussle, has something happened?")
  695. (say scientist :eo "Mi pensas, ke vi bone konas la problemon, sinjoro."
  696. :en "I think you know very well what the problem is, sir.")
  697. (say sheriff :eo "Pardonu, sed mi tute ne. Ĉu mi misdiris ion, dum la kunveno?"
  698. :en "Sorry, but I have no idea. Did I say something wrong in the meeting?")
  699. (say scientist :eo "Eble mi misaŭdis, fakte..."
  700. :en "Maybe I just misheard, but...")
  701. (say scientist :eo "Ĉu vi vere volas TIOM da tankoj?"
  702. :en "Do you really want THAT MANY tanks?")
  703. (say sheriff :eo "Ĉu tio problemas iel, doktoro?"
  704. :en "Is that a problem, doctor?")
  705. (say sheriff :eo "Mi esperas, ke ne."
  706. :en "I certainly hope not.")
  707. (say scientist :eo "N-ne, ĉefo!"
  708. :en "N-no sheriff!")
  709. (say scientist :eo "Mi simple c-cerbumas..."
  710. :en "I'm just w-wondering, is all...")
  711. (say scientist :eo "Ĉu ni vere bezonas tiom multe da tankoj?"
  712. :en "Do we really need so many tanks?")
  713. (say scientist :eo "Nu, ha, mi simple iom prizorgas."
  714. :en "Well, eh, I'm just worrying a bit.")
  715. (say scientist :eo "Ĉu ne ni jam uzis tro da rimedoj por konstrui ĉi tiun bazon..?"
  716. :en "Haven't we already gone through too many resources just building this place..?")
  717. (say sheriff :eo "He. Tial vi estas sciencisto, kaj nek kapitano nek kontisto."
  718. :en "Heh. That's why you're a scientist, and not a captain nor an accountant.")
  719. (say sheriff :eo "Fidu je mi, Karla! Mi kontrolis la nombrojn, kaj ili balanciĝos bone."
  720. :en "Trust me, Karla! I looked at the numbers personally, and it all checks out.")
  721. (say scientist :eo "Bone, sinjoro. Kaj pardonu min pro la trudo, sinjoro, mi ne intencis malrespekton."
  722. :en "Alright then, sir. I'm sorry for the intrusion, I meant no disrespect.")
  723. (say sheriff :eo "Ne zorgu, doktoro; mi ne dubas vian fidelecon."
  724. :en "Don't worry, doctor; I don't doubt your loyalty.")
  725. (move sheriff '(:x 71 :y 29) :delay .1)
  726. (move sheriff '(:x 40 :y 29) :delay 0)
  727. (mumble scientist :en "...")
  728. (mumble scientist :eo "(Simple... tute ne sencas!)"
  729. :en "(It just doesn't make any sense!)")
  730. (move scientist '(:x 80 :y 29) :delay 0)
  731. (say scientist :eo "S-sinjoro! Momenton plu, bonvolu!!"
  732. :en "S-sir! Just one more thing, please!!")
  733. (move scientist '(:x 71 :y 29) :delay 0)
  734. (move 'player '(:Δx -3 :Δy 0) :delay 0)
  735. (move scientist '(:x 56 :y 29) :delay 0)
  736. (say scientist :eo "Vi diras, ke la nombroj balanciĝos, sed... kiel?"
  737. :en "You say that the numbers'll balance out, but... how?")
  738. (say scientist :eo "Kiel tioma malŝparo repagiĝos? Kiel tioma truo pleniĝos?"
  739. :en "How could such a waste be paid back? Such a hole be filled?")
  740. (say sheriff :eo "Ĉu \"malŝparo,\" Klara?"
  741. :en "\"Waste,\" you say?")
  742. (say scientist :eo "E-eee! Ne tiel, ĉefo! V-volis diri, ke..."
  743. :en "E-eee! Not like that, s-sir! I m-meant to say...")
  744. (say sheriff :eo "Trankviliĝu."
  745. :en "Calm down.")
  746. (say sheriff :eo "Sole kapitanoj scias ĉi tion ĝuste nun, sed..."
  747. :en "Only the captains know this right now, but...")
  748. (say sheriff :eo "La urbolimo removiĝos iom. Preter tiu de nia najbaro, precize."
  749. :en "City limits are expanding somewhat. Beyond those of our neighbor, specifically.")
  750. (say sheriff :eo "Ĝia estraro rifuzis nin, kompreneble, do ni devos peni iom."
  751. :en "Their city council refused our proposal, of course, so we'll have to put in some elbow grease.")
  752. (say sheriff :eo "La landa armeo jam promesis ne entrudiĝi; ni rajtas fari ĉion necesan."
  753. :en "The national army's already promised to keep their nose out of this; we can do what needs to be done.")
  754. (say sheriff :eo "Per la impostoj kaj landopagoj de Etburgo, niaj kontoj balanciĝos."
  755. :en "If we add in the all of Etteburg's revenue, our accounts will balance out.")
  756. (say sheriff :eo "Ĉu vi komprenas, nun? Kiel vi opinias?"
  757. :en "Do you get it, now? What do you think?")
  758. (say scientist :eo "Jes, ĉefo! Dankon!"
  759. :en "Yes, sir! Thank you!")
  760. (say scientist :eo "Ĝi estas t-tre bona ideo, gratulon! Genie!"
  761. :en "It's a f-fantastic idea, sir! Perfect!")
  762. (say scientist :eo "N-nu! Bonan tagon!"
  763. :en "N-now! Good day!")
  764. (say sheriff :eo "Bonan tagon, doktoro."
  765. :en "Good day, doctor.")
  766. (move sheriff '(:x -5 :y 29) :delay .07)
  767. (mumble scientist :eo "(... Li demandis min rekte, kial mi mensogis?)"
  768. :en "(... He asked me directly, so why did I lie?)")
  769. (move scientist '(:x 65 :y 29) :delay 0)
  770. (mumble scientist :eo "(Ni kunigos Etburgon kaj Egburo, ĉi tiel?)"
  771. :en "(We'll merge Etteburg and Bigborough like that?)")
  772. (move scientist '(:x 45 :y 29) :delay 0)
  773. (mumble scientist :eo "(Ĉi tio frenezas! Frenezas!)"
  774. :en "(This is insane! Insane!)")
  775. (move scientist '(:x 65 :y 29) :delay 0)
  776. (mumble scientist :eo "(Kaj la kapitanoj vere aprobas ĉi tion?)"
  777. :en "(The captains really think this is a good idea?)")
  778. (mumble scientist :eo "(Dum la kunveno, ili sciis la veron, kaj diris nenion--!)"
  779. :en "(During the meeting, they knew the truth, and said nothing--!")
  780. (move scientist '(:x 45 :y 29) :delay 0)
  781. (mumble scientist :eo "(Fek'... Neeblas, ke ĉiu aprobas!)"
  782. :en "(Shit... It's impossible that everyone agrees!)")
  783. (mumble scientist :eo "(Sed kio restas al mi?)"
  784. :en "(But what can I do?)")
  785. (move scientist '(:x 65 :y 29) :delay 0)
  786. (mumble scientist :eo "(Mi ne povas esti la sola kontraŭanto!)"
  787. :en "(I couldn't argue against the sheriff alone!)")
  788. (move scientist '(:x 45 :y 29) :delay 0)
  789. (mumble scientist :eo "(Fek'!)"
  790. :en "(Damn!)")
  791. (move scientist '(:x 65 :y 29) :delay 0)
  792. (mumble scientist :en "(...)")
  793. (mumble scientist :eo "(Mi malsatas...)"
  794. :en "(I'm hungry...)")
  795. (mumble scientist :en "(...)")
  796. (move scientist '(:x 56 :y 31) :delay .07)
  797. (move scientist '(:x 56 :y 42) :delay .07)
  798. (list (make-flashforward-state map :was-dialogue 't)))))
  799. (defun flashback-base ()
  800. (list
  801. :title '(:eo "ANTAŬLUDO III" :en "PROLOGUE III")
  802. :subtitle '(:eo "Antaŭ du monatoj..." :en "Two months ago...")
  803. :side-bar '(:eo "-- Li blokas vin sur la vojo. Kiel vi reagos al tio? -- Eee, mi afable ĉirkaŭmarŝos lin?"
  804. :en "-- He’s blocking your path. What are you gonna do about it? -- Um, politely walk around him?")
  805. :dialogue (flashback-base-dialogue *flashback-base-map*)
  806. :map *flashback-base-map*))
  807. ;;; ———————————————————————————————————
  808. ;;; Factory!
  809. ;;; ———————————————————————————————————
  810. (defun factory-window-interact (&optional map interactee-id)
  811. (make-dialogue-state
  812. map
  813. (start-dialogue
  814. (💬:face 'player "` `" "`o`")
  815. (💬:mumble 'player :eo "(Al ĉi tiu fenesto tute mankas vitro!)"
  816. :en "(This window's got no pane at all!)")
  817. (💬:mumble 'player :eo "(Mi kredeble povus grimpi tien, fakte...)"
  818. :en "(I could probably fit my way in there, actually...)")
  819. (💬:mumble 'player :eo "(... sed ĉu vere farindas?)"
  820. :en "(... but should I?)"
  821. :face "`o`"))))
  822. ;;; ———————————————————————————————————
  823. ;;; Casino!
  824. ;;; ———————————————————————————————————
  825. (defun boozy-lady-dialogue-ring ()
  826. (start-dialogue
  827. (💬:say 'boozy-lady :eo "Vi volas edzinigi min, belulo?"
  828. :en "Ya wanna marry me, hot stuff?")
  829. (💬:say 'boozy-lady :eo "Booone, niiru tuj!"
  830. :en "Shuree, lez go now!")
  831. (💬:say 'boozy-friend :eo "Vi NE iros tuj."
  832. :en "You \"shure\" as hell WON'T.")))
  833. (defun boozy-lady-dialogue-wallet ()
  834. (start-dialogue
  835. (💬:say 'boozy-lady :eo "...? Monujo?"
  836. :en "...? Wallet?")
  837. (💬:say 'boozy-lady :eo "Monujo, mono! Mono, biero!!"
  838. :en "Wallet, money! Money, booze!")
  839. (💬:say 'boozy-friend :eo "... kaj vi certe ne bezonas pli da TIO."
  840. :en "You don't need any more of THAT, hon.")))
  841. (defun boozy-lady-dialogue-bracelet ()
  842. (start-dialogue
  843. (💬:face 'player "^_^" "^o^")
  844. (💬:say 'boozy-lady :eo "Ooo, brile! Ĝi belasss"
  845. :en "Ooo, shiny! It's prettyy")
  846. (💬:say 'boozy-lady :eo "Ĉu por mji?"
  847. :en "Is it for mi?")
  848. (💬:say 'player :eo "Estos via, se vi ĵuras ne plu drinki ĉi-nokte."
  849. :en "It's yours, if you promise to slow your roll a bit.")
  850. (💬:say 'boozy-lady :eo "Jeŝ! Ne pluuu!"
  851. :en "Okieeee!"
  852. :face "= w =")
  853. (💬:say 'boozy-lady :eo "[MAJA prenas ĈIRKAŬMANON de vi.]"
  854. :en "[MAJA takes BRACELET from you.]"
  855. :face "= w =")
  856. (💬:face 'player ">_<" ">o<")
  857. (💬:say 'boozy-lady :eo "Plia biero por mi, sinjoro!!"
  858. :en "Jkjk. One more for me, barkeep!!")
  859. (💬:say 'casino-bartender
  860. :eo "Bone, momenton!!"
  861. :en "Sure thing, lady!"
  862. :face "xD ")))
  863. (defun boozy-lady-use (map item-plist &optional entity-id)
  864. (let ((item-id (…:string->symbol (getf item-plist :id))))
  865. (cond ((eq item-id 'ring)
  866. (make-dialogue-state
  867. map
  868. (boozy-lady-dialogue-ring)))
  869. ((eq item-id 'bracelet)
  870. (make-dialogue-state
  871. map
  872. (boozy-lady-dialogue-bracelet)))
  873. ((eq item-id 'wallet)
  874. (make-dialogue-state
  875. map
  876. (boozy-lady-dialogue-wallet)))
  877. ('t
  878. (refusal-use map item-plist entity-id)))))
  879. ;;; ———————————————————————————————————
  880. ;;; Destitute Gambler arc
  881. ;;; ———————————————————————————————————
  882. (defun bad-gambler-greetings (map)
  883. (…:incf-0 (getf-act map :gambler-greetings))
  884. (let ((gambler 'bad-gambler))
  885. (case (getf-act map :gambler-greetings)
  886. (0
  887. (start-dialogue
  888. (💬:face gambler "xD ")
  889. (💬:mumble gambler :en "Hahaha... haha.")
  890. (💬:say gambler :eo "Kia spektalo! Hahaha!"
  891. :en "Good one! Hahaha!"
  892. :face "xDD")
  893. (💬:say gambler :en "Hahahaha! Hahahahaha!"
  894. :face "x'D")
  895. (💬:face 'player "^^'")
  896. (💬:face gambler ">V<" ">O<")
  897. (💬:say gambler :eo "Tiom amuze! Bona ŝerco!"
  898. :en "Shit that's funny!"
  899. :face ">V<")
  900. (💬:face 'player "^^\"")
  901. (💬:say gambler :eo "Mi tute ruinigis mian vivon! MDR!"
  902. :en "I totally fucked my life! LMAO!"
  903. :face ">V<")
  904. (💬:face 'player "o-o" "ouo")
  905. (💬:say gambler :en "HAHAHAHAHAHAHAHAHAHAAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAAHAHAHAHAHAHAHAHAHAHAHAHA")
  906. (💬:face gambler "=w=" "=w=")
  907. (💬:mumble gambler :en "...")
  908. (💬:mumble gambler :eo "Fek'."
  909. :en "Fuck.")))
  910. (1
  911. (start-dialogue
  912. (💬:say 'player :eo "Ĉu... ĉio enordas, samideano?"
  913. :en "Everything alright, man..?")
  914. (💬:say gambler :eo "Jes! Tutorde! Bonas!"
  915. :en "Yup! For sure! All good!")
  916. (💬:say gambler :eo "Mi simple trafis iujn monproblemojn, ne problemas."
  917. :en "I've just hit a slight snag financially, it's no problem.")
  918. (💬:say gambler :eo "Nur povas ne repagi monprunton."
  919. :en "I just can't repay my mortgage.")
  920. (💬:say gambler :eo "... kiun mi pruntis por repagi alian monprunton."
  921. :en "... that I took out to pay back a loan.")
  922. (💬:say gambler :eo "... kiun mi pruntis por subteni la kompanion de mia frato."
  923. :en "... that I borrowed to support my bro's company.")
  924. (💬:say gambler :eo "... kiu estas senpaga lernejo por handikapuloj."
  925. :en "... that's a non-profit school for disabled kids.")
  926. (💬:say gambler :eo "... danke al kiu mia filino povas edukiĝi bone."
  927. :en "... thanks to which my daughter can receive a good education.")
  928. (💬:say gambler :eo "Kial mi forĵetis la monon tie ĉi?! FEK'!!"
  929. :en "Why'd I waste it all here?! FUCK!!"
  930. :face ">O<")))
  931. (2
  932. (start-dialogue
  933. (💬:say gambler :eo "Nu, ĉio enordas! Ni simple perdos la domon, jen ĉio."
  934. :en "Anyways, all good! We'll just lose the house, that's all.")
  935. (💬:say gambler :eo "Kompreneble, perdinte la domon, mia edzino lasos min, kunprenante la gefilojn..."
  936. :en "Obviously, after losing the house, my wife'll take leave with the kids...")
  937. (💬:say gambler :eo "Dommastrino sen domo ja ne sencas, do!"
  938. :en "A house-mistress without a house is no mistress at all, of course!")
  939. (💬:say gambler :eo "Kaj kromvirino sen edzino ja ne sencas, do lasos min ankaŭ ŝi..."
  940. :en "And a side-piece without a 'main-piece' is no side-piece at all, so she'll leave me too...")
  941. (💬:say gambler :eo "Neniu mono, neniu domo, neniu filo, neniu edzino, neniu kromvirino!"
  942. :en "No money, no house, no children, no wife, no mistress!")
  943. (💬:say gambler :eo "Neniu vivo!"
  944. :en "No life!")))
  945. (3
  946. (start-dialogue
  947. (💬:say gambler :eo "Mi cedu al la vakuo. Tre komfortas ĉe la fundo, kara."
  948. :en "I'm giving into the void. It's quite peaceful down here, buddy.")
  949. (💬:say gambler :eo "Mi lasu min falu entute, ĉu ne, kara amiko? Ĉu neee?"
  950. :en "I should let go, right, pal? Righttt?")
  951. (💬:face 'player ";w;" ";o;")
  952. (💬:say 'player :eo "Ne tro senesperu -- sinjoro, restas al vi fuĝvojo, sendube!"
  953. :en "Guy, there's still hope for you, somewhere!")
  954. (💬:face gambler "=v=" "=v=")
  955. (💬:say gambler :eo "Mi ideas IAN fuĝvojon..."
  956. :en "Five feet under, maybe..."))))))
  957. (defun bad-gambler-partings (&optional map)
  958. (let ((messages
  959. '((:eo "... kaj ŝiaj mamoj tiom belis..."
  960. :en "... her titties were so nice, too...")
  961. (:eo "... vakuo, nenio, detruo..."
  962. :en "... emptiness, nothing, destruction...")
  963. (:eo "... vivo, bruo. morto, paco..."
  964. :en "... life, noise. death, peace...")
  965. (:eo "... laco, kaco, maĉo-veneno..."
  966. :en "... tired, weary, dreary...")
  967. (:eo "... tempo, tik-tok, malfruo..."
  968. :en "... time, tick-tock, too late...")
  969. (:eo "... finiĝo, ĉesiĝo, paciĝo..."
  970. :en "... endings, partings, peace-ings..."))))
  971. (start-dialogue
  972. (apply #'say (append '(bad-gambler)
  973. (nth (random (length messages)) messages))))))
  974. (defun bad-gambler-dialogue (map)
  975. (let ((greetings (getf-act map :gambler-greetings)))
  976. (cond ((or (not greetings)
  977. (< greetings 3))
  978. (bad-gambler-greetings map))
  979. ('t
  980. (bad-gambler-partings)))))
  981. (defun bad-gambler-interact (map &optional interactee-id)
  982. (make-dialogue-state map (bad-gambler-dialogue map)))
  983. ;;; ———————————————————————————————————
  984. ;;; Casino prologue: Bad gambler!
  985. ;;; ———————————————————————————————————
  986. (defun flashback-casino ()
  987. (list
  988. :title '(:eo "ANTAŬLUDO II" :en "PROLOGUE II")
  989. :subtitle '(:eo "Antaŭ du jaroj..." :en "Two years ago...")
  990. :side-bar '(:eo "anyway whatever bruh" :en "sldkajsldkja")
  991. :map *flashback-casino-map*))
  992. (defun flashback-bad-gambler-dialogue ()
  993. (let ((gambler 'flashback-bad-gambler))
  994. (start-dialogue
  995. (💬:say gambler :eo "Kia spektalo! Hahaha!"
  996. :en "How nice! Hahaha!")
  997. (💬:face gambler ">v<" ">u<")
  998. (💬:face 'player "o-o")
  999. (💬:say gambler :en "HAHAHAHAHAHAHAHAHAHAHAHA!")
  1000. (💬:face 'player "=w='")
  1001. (💬:say gambler :eo "Hehe-Heŭreka! Ĉi-nokte, Sorto estas mia kromvirino!"
  1002. :en "Haha-Hot damn, lady luck's my mistress tonight!")
  1003. (💬:face gambler "^#^" "^O^")
  1004. (💬:say gambler :eo "ĉu vi sciis, kara?"
  1005. :en "Guess what, buddy?")
  1006. (💬:say gambler :eo "Por tiu ĉi ludo mi havas feke legendan vetaĵon!"
  1007. :en "I've got one hell of a chip for this game!")
  1008. (💬:face 'player "^_^" "^o^"))))
  1009. (defun flashback-bad-gambler-interact (map &optional interactee-id)
  1010. (make-dialogue-state map (flashback-bad-gambler-dialogue)))
  1011. (defun flashback-casino-dialogue-intro ()
  1012. (let ((father 'flashback-casino-father)
  1013. (mother 'flashback-casino-mother)
  1014. (dealer 'flashback-casino-dealer)
  1015. (geezer 'flashback-casino-geezer)
  1016. (gambler 'flashback-bad-gambler))
  1017. (start-dialogue
  1018. (💬:say dealer :eo "Ĉu ĉiu pretas?"
  1019. :en "Everyone ready?")
  1020. (💬:say geezer :eo "Pretis jam antaŭ vi eĉ naskiĝis!"
  1021. :en "I've been ready since before you were born!")
  1022. (💬:say gambler :eo "Ĉu necesas demandi?"
  1023. :en "Need you ask?")
  1024. (💬:say father :eo "Ni pretas, ankaŭ!"
  1025. :en "We're ready, too!")
  1026. (💬:say 'player :en "Eee...!"
  1027. :face ";w:")
  1028. (💬:say father :eo "Ho, jes, vi ne scipovas ludi."
  1029. :en "Oh, right, you still don't know how to play.")
  1030. (💬:say father :eo "Atendu momente, ĉiu, mi klarigos rapide!"
  1031. :en "Hold on, everyone, we'll be quick!")
  1032. (💬:say father :eo "Bone: Vikĉjo, atentu! Mi ne min ripetos!"
  1033. :eo "Alright, Vic! Listen up, 'cuz I'm not gonna repeat myself!")
  1034. (💬:say father :eo "La ludestro disdonas kartojn hazardkaŝe. La kartvaloro sekvas la numerojn, krom se estas kolora karto. Se estas kolora karto, la valoro sekvas la Epokon de la ludo. La unua Epoko estas Antaŭhistorio, kaj kompreneble plej valoras tiam la..."
  1035. :en "The dealer hands out cards randomly and discretely. The cards' value is based on their number, unless they're a coloured card, in which case the value is based on the Era of the game. The first Era is Pre-history, and of course the most imporant card in Pre-history is...")
  1036. (💬:face 'player "=w='" "=o='")
  1037. (💬:say 'player :eo "(Mi ĝojas festi kun ĉiu, sed ĉi tiu ludo sonas jam tro malsimpla por mi...)"
  1038. :en "(I'm glad to party like this with my folks, but this game sounds a bit complicated...)")
  1039. (💬:say 'player :eo "(Ĉu ne ni povus simple ludi Hanafudan?)"
  1040. :en "(Why can't we just play Hanafuda?)"
  1041. :face "=w='")
  1042. (💬:say father :eo "... kaj tiel oni venkas la markizon.")
  1043. (💬:say father :eo "Bone, jen ĉio!")
  1044. (💬:say gambler :eo "Finfine!!"))))
  1045. (defun flashback-casino-dialogue-bet (map)
  1046. (let ((father 'flashback-casino-father)
  1047. (mother 'flashback-casino-mother)
  1048. (dealer 'flashback-casino-dealer)
  1049. (geezer 'flashback-casino-geezer)
  1050. (gambler 'flashback-bad-gambler))
  1051. (append
  1052. (start-dialogue
  1053. (💬:say gambler :eo "Jen, mi vetas ĉi tion!"
  1054. :en "Now, I'm putting this down!")
  1055. (💬:say gambler :eo "Momenton..."
  1056. :en "Wait..."
  1057. :face "`o`")
  1058. (💬:say gambler :eo "He?! Mi perdis la geeziĝan ringon?!"
  1059. :en "Wait... what?! I lost my wedding ring?!"
  1060. :face "O_O"))
  1061. (if (aget-item map 'ring)
  1062. (start-dialogue
  1063. (💬:face 'player "^_^" "^o^")
  1064. (💬:say 'player :eo "Ho! jen!"
  1065. :en "Ĉu estas tia ĉi?")
  1066. (💬:mumble 'player :eo "[Vi donas RINGON al HAZARDLUDEMULO]"
  1067. :en "[You give RING to GAMBLER]")
  1068. (💬:face gambler "=w=" "=w=")
  1069. (💬:say gambler :eo "..."
  1070. :en "...")
  1071. (💬:face gambler ":W:" ":O:")
  1072. (💬:say gambler :eo "Je dio!! Dankegon, kara!!"
  1073. :en "God damn!! Thank you, buddy!!")
  1074. (💬:say gambler :eo "Mi preskaŭ tiom senesperis!"
  1075. :en "I almost gave into despair!")
  1076. (💬:face gambler "^#^" "^O^")
  1077. (💬:say gambler :eo "NUN mi pretas ludi."
  1078. :en "NOW I'm ready to play.")
  1079. (💬:mumble gambler :eo "[HAZARDLUDEMULO donas GEEDZIĜAN RINGON al TABLO]"
  1080. :en "[GAMBLER gives WEDDING RING to TABLE")
  1081. (💬:say 'player :eo "Ĉu vere?! Kio misas je vi!?!"
  1082. :en "Seriously?! What's wrong with you!?!"
  1083. :face ">O<")
  1084. (💬:face 'player ":w:'")
  1085. (💬:say gambler :en "Live fast die hard, brother!"
  1086. :eo "Vivu akre mortu frue!"
  1087. :face "B-)")
  1088. (💬:say mother :eo "Vi provis, Vikĉjo..."
  1089. :en "You tried, Vic..."))
  1090. (start-dialogue
  1091. (💬:say gambler :eo "... bone do, tio ĉi sufiĉos."
  1092. :en "... fine then, this'll have to do."
  1093. :face "<v<")
  1094. (💬:mumble gambler :eo "[HAZARDLUDEMULO donas BIENPOSEDON al TABLO]"
  1095. :en "[GAMBLER gives LAND OWNERSHIP to TABLE]")
  1096. (💬:face 'player ":w:" ":0:")
  1097. (💬:say 'player :eo "Ĉu vi frenezas?! Ne tion faru!!"
  1098. :en "Are you crazy?! Don't do that!!")
  1099. (💬:say mother :eo "Lasu lin, Vikĉjo."
  1100. :en "Leave him, Vic.")
  1101. (💬:say mother :eo "La fonto de amuzo estas senzorga risko!"
  1102. :en "The root of all of joy is careless, unthinking risk!")
  1103. (💬:say father :eo "Tielas la animokerno de la kartoj."
  1104. :en "Such is the nature of the cards."))))))
  1105. (defun flashback-casino-outro (map)
  1106. (start-dialogue
  1107. (💬:say 'flashback-casino-dealer
  1108. :eo "Nu, ĉiu krom li, metu viajn vetaĵojn. Ni komencos je la Nula Epoko!"
  1109. :en "As for the rest of you, place your bets. It's time for the Zeroth Era!")
  1110. (list (make-flashforward-state map))))
  1111. (defun flashback-casino-dialogue (map)
  1112. (append (flashback-casino-dialogue-intro)
  1113. (flashback-casino-dialogue-bet map)
  1114. (flashback-casino-outro map)))
  1115. (defun flashback-casino-seat-trigger (map &optional trigger-plist)
  1116. (make-dialogue-state
  1117. map
  1118. (flashback-casino-dialogue map)))
  1119. ;;; ———————————————————————————————————
  1120. ;;; Flashbacks, generally
  1121. ;;; ———————————————————————————————————
  1122. (defun flashbacks ()
  1123. (list (flashback-school) (flashback-casino) (flashback-base)))
  1124. (defparameter *numerology-excerpts*
  1125. '((:en "No. 1: \"VEGETATION: Azalea, Iris, Lilac. [...] Activate today's energetic, independent mood by choosing to wear a red tie or dress. Above all, do not be lazy.\""
  1126. :eo "N-ro 1: \"KRESKAĴOJ: Azaleo, irido, siringo. [...] Konduku vian tagon al energia kaj sendependa etoso per ruĝa kravato aŭ robo. Plej grave, ne maldiligentu.\"")))
  1127. (defun make-flashback-state (flashback)
  1128. "Given a FLASHBACK-plist, return a state plist suitable for use with STATE-LOOP.
  1129. The plist should have :TITLE, :SUBTITLE, and :SIDE-TEXT strings, alongside :MAP.
  1130. If you don’t want the player to be walking around (non-interactive flashback),
  1131. you can add :DIALOGUE with a dialogue-list for use with a dialogue state."
  1132. (🎭:make-intermission-state
  1133. (getf flashback :title)
  1134. (getf flashback :subtitle)
  1135. (getf flashback :side-text)
  1136. (list :drop 1
  1137. :function
  1138. (if (getf flashback :dialogue)
  1139. (💬:make-dialogue-function (getf flashback :map) (getf flashback :dialogue))
  1140. (🌍:make-overworld-function (getf flashback :map))))))
  1141. (defun make-flashforward-state (map &key (was-dialogue nil))
  1142. "Make a state-plist for use with STATE-LOOP that will give the player a smooth
  1143. transition from a flashback MAP into the *OUTDOORS-MAP*.
  1144. If the flashback was non-interactive (dialogue-only), WAS-DIALOGUE should be
  1145. set."
  1146. (🎭:make-intermission-state
  1147. '(:eo "NUNA TEMPO, NUNA DATO" :en "PRESENT DAY, PRESENT TIME")
  1148. '(:eo "La 3a de junio, 2006" :en "June 3rd, 2006")
  1149. (car *numerology-excerpts*)
  1150. (list :drop 1
  1151. :function (when was-dialogue (🌍:make-overworld-function *outdoors-map*))
  1152. :parameters (list :map (merge-maps map *outdoors-map*)))))
  1153. ;;; ———————————————————————————————————
  1154. ;;; Main-menu data
  1155. ;;; ———————————————————————————————————
  1156. (defun start-game-function ()
  1157. "Returns a nameless function for use as a state function.
  1158. Initializes the current instance of the game, and such."
  1159. ;; We’ve gotta make fresh copies of the maps, in case the user’s restarted the game.
  1160. ;; metacopy, I love you <3 <3 <3
  1161. (lambda (matrix)
  1162. (defparameter *base-map* (🌍:plist->map (metacopy:copy-thing *base-map-plist*)))
  1163. (defparameter *casino-map* (🌍:plist->map (metacopy:copy-thing *casino-map-plist*)))
  1164. (defparameter *factory-map* (🌍:plist->map (metacopy:copy-thing *factory-map-plist*)))
  1165. (defparameter *flashback-base-map* (🌍:plist->map (metacopy:copy-thing *flashback-base-map-plist*)))
  1166. (defparameter *flashback-casino-map* (🌍:plist->map (metacopy:copy-thing *flashback-casino-map-plist*)))
  1167. (defparameter *flashback-school-map* (🌍:plist->map (metacopy:copy-thing *flashback-school-map-plist*)))
  1168. (defparameter *outdoors-map* (🌍:plist->map (metacopy:copy-thing *outdoors-map-plist*)))
  1169. (make-flashback-state (alexandria:random-elt (flashbacks)))))
  1170. (defun main-menu ()
  1171. `((:en "Play" :eo "Ekludi"
  1172. :selection 50 :selected t
  1173. :function ,(start-game-function))
  1174. (:en "Settings" :eo "Agordoj" :row 1
  1175. :function ,(🔧:make-settings-menu-function))
  1176. (:en "Give in" :eo "Cedi" :row 2
  1177. :drop 1)))
  1178. ;;; ———————————————————————————————————
  1179. ;;; Invocation station! Choo-choo! 🚆
  1180. ;;; ———————————————————————————————————
  1181. (defun main ()
  1182. "A pathetic fascimile of a main loop. What does it do? WHAST DOES TI DODOO?
  1183. What a mysteryyy! You’ll have to check out the engine to uncover it.
  1184. engine.lisp, that is. Cheers! :D"
  1185. (⚙:main (list (📋:make-menu-function (main-menu)))))
  1186. ;; *Knock-knock*
  1187. ;; — Who’s there?
  1188. ;; — Yo momma!
  1189. ;; — “Yo momma” who?
  1190. ;; — Yo momma’s a sweet lady, and I’d like to take her out for coffee sometime!