Begin proper dialogue with Sasha!
This commit is contained in:
parent
4d4b65da9c
commit
346d9d3a9d
|
@ -57,17 +57,19 @@ If not, have some tea on me: I’m paying. =w="
|
||||||
(list :speaker speaker :face face)))
|
(list :speaker speaker :face face)))
|
||||||
|
|
||||||
|
|
||||||
(defun say (speaker &rest text)
|
(defun say (speaker &rest keys)
|
||||||
(list
|
(list
|
||||||
(list :speaker speaker :face 'talking-face :progress 0
|
(list :speaker speaker :progress 0
|
||||||
:text (…:getf-lang text))
|
:face (or (getf keys :face) 'talking-face)
|
||||||
|
:text (…:getf-lang keys))
|
||||||
(car (face speaker 'normal-face))))
|
(car (face speaker 'normal-face))))
|
||||||
|
|
||||||
|
|
||||||
(defun mumble (speaker &rest text)
|
(defun mumble (speaker &rest keys)
|
||||||
(list
|
(list
|
||||||
(list :speaker speaker :progress 0
|
(list :speaker speaker :progress 0
|
||||||
:text (…:getf-lang text))))
|
:text (…:getf-lang keys)
|
||||||
|
:face (getf keys :face))))
|
||||||
|
|
||||||
|
|
||||||
(defun move (speaker world-coords &key (delay .05))
|
(defun move (speaker world-coords &key (delay .05))
|
||||||
|
@ -168,7 +170,7 @@ Returns the state for use with STATE-LOOP, pay attention!"
|
||||||
(did-finish-printing-p (finished-printing-p dialogue))
|
(did-finish-printing-p (finished-printing-p dialogue))
|
||||||
(did-finish-moving-p (progress-movement map dialogue)))
|
(did-finish-moving-p (progress-movement map dialogue)))
|
||||||
;; Only show the cursor when rendering text!
|
;; Only show the cursor when rendering text!
|
||||||
(if did-finish-moving-p
|
(if (or did-finish-moving-p (not did-finish-printing-p))
|
||||||
(✎:show-cursor)
|
(✎:show-cursor)
|
||||||
(✎:hide-cursor))
|
(✎:hide-cursor))
|
||||||
(cond
|
(cond
|
||||||
|
@ -187,9 +189,7 @@ Returns the state for use with STATE-LOOP, pay attention!"
|
||||||
(setf (getf (car dialogue-list) :progress) (length text))
|
(setf (getf (car dialogue-list) :progress) (length text))
|
||||||
(list :dialogue dialogue-list :map map))
|
(list :dialogue dialogue-list :map map))
|
||||||
;; If no input, keep steady!
|
;; If no input, keep steady!
|
||||||
((or (not did-finish-printing-p)
|
('t
|
||||||
(not did-finish-moving-p)
|
|
||||||
(cdr dialogue-list))
|
|
||||||
(list :dialogue dialogue-list :map map)))))
|
(list :dialogue dialogue-list :map map)))))
|
||||||
|
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ A state-function for use with STATE-LOOP."
|
||||||
"Return a state-function for a section of dialogue, for use with STATE-LOOP."
|
"Return a state-function for a section of dialogue, for use with STATE-LOOP."
|
||||||
(lambda (matrix &key (map map) (dialogue dialogue-list))
|
(lambda (matrix &key (map map) (dialogue dialogue-list))
|
||||||
(🌍:overworld-state-draw matrix map)
|
(🌍:overworld-state-draw matrix map)
|
||||||
(dialogue-state matrix :map map :dialogue dialogue-list)))
|
(dialogue-state matrix :map map :dialogue dialogue)))
|
||||||
|
|
||||||
|
|
||||||
;; Split a banana in two, bisection-fruit,
|
;; Split a banana in two, bisection-fruit,
|
||||||
|
|
|
@ -40,19 +40,87 @@
|
||||||
(in-package :flora-search-aurora)
|
(in-package :flora-search-aurora)
|
||||||
|
|
||||||
|
|
||||||
(defparameter *literary-girl-dialogue*
|
(defmacro getf-act (map act)
|
||||||
|
`(getf (gethash :acts ,map) ,act))
|
||||||
|
|
||||||
|
|
||||||
|
(defmacro getf-know (map idea)
|
||||||
|
`(getf (gethash :knows ,map) ,idea))
|
||||||
|
|
||||||
|
|
||||||
|
(defun childhood-friend-greetings (map)
|
||||||
|
(if (getf-act map :sasha-greetings)
|
||||||
|
(incf (getf-act map :sasha-greetings))
|
||||||
|
(setf (getf-act map :sasha-greetings) 0))
|
||||||
|
(let ((sasha "childhood-friend"))
|
||||||
|
(case (getf-act map :sasha-greetings)
|
||||||
|
(0
|
||||||
(💬:start-dialogue
|
(💬:start-dialogue
|
||||||
(💬:mumble "literary-girl" :en "...")
|
(💬:mumble sasha :en "...")
|
||||||
(💬:say "player" :eo "Kielas apud la mar'?"
|
(💬:say "player" :eo "Kielas apud la mar'?"
|
||||||
:en "How's the view?")
|
:en "How's the view?")
|
||||||
(💬:face "player" "<.<")
|
(💬:face "player" "<.<")
|
||||||
(💬:say "literary-girl" :eo "Kielas apud la ruinoj de via viv'?"
|
(💬:say sasha :eo "Kielas apud la ruinoj de via viv'?"
|
||||||
:en "How's your trainwreck of a life?")
|
:en "How's your trainwreck of a life?")
|
||||||
(💬:face "player" '💬:normal-face)))
|
(💬:face "player" '💬:normal-face)))
|
||||||
|
(1
|
||||||
|
(start-dialogue
|
||||||
|
(mumble "player" :en "...")
|
||||||
|
(face "player" "<w<")
|
||||||
|
(say sasha :eo "Kial vi restas? Ĉu tiom solecas ke nur ideas ĝeni min?"
|
||||||
|
:en "Why are you still here? Are you so lonely you've only got me to bother?")
|
||||||
|
(mumble "player" :eo "(Ŝi parolas pri si mem, ĉu ne?)"
|
||||||
|
:en "(She's projecting, isn't she?)"
|
||||||
|
:face ":w:")))
|
||||||
|
(2
|
||||||
|
(start-dialogue
|
||||||
|
(say "player" :eo "Nu... Vi staris tie ĉi senmove dum la pastintaj tri tagoj..."
|
||||||
|
:en "So... You've stood around here for three days already, you've hardly moved..."
|
||||||
|
:face ":o:")
|
||||||
|
(face "player" ":w:")
|
||||||
|
(say sasha :eo "Pŝ! Do?! Mi simple havas multajn pripensindaĵojn! Mi tiom multe okupiĝas!"
|
||||||
|
:en "Pff! So what?! My mind's just busy! I've got a lot going on right now!"
|
||||||
|
:face "vov")
|
||||||
|
(say sasha :eo "Ne ŝajnigu vin supera al mi, dum vi mem senespere sencelas!!"
|
||||||
|
:en "Don't act all haughty when you're such an aimless loser yourself!!"
|
||||||
|
:face ">o<")
|
||||||
|
(mumble "player" :eo "Eee.. pardonu."
|
||||||
|
:en "Well... sorry.")))
|
||||||
|
(3
|
||||||
|
(start-dialogue
|
||||||
|
(say "player" :eo "Nu, vere, mia celo sufiĉe klaras al mi. Jam baldaŭ redungiĝos."
|
||||||
|
:en "I'm not too aimless, actually. I've got good job prospects, right about now."
|
||||||
|
:face "<w<")
|
||||||
|
(say sasha :eo "Mi tute ne prizorgas."
|
||||||
|
:en "I really don't care."))))))
|
||||||
|
|
||||||
|
|
||||||
(defun literary-girl-dialogue (map)
|
(defun childhood-friend-partings ()
|
||||||
(make-dialogue-state map *literary-girl-dialogue*))
|
(let ((partings
|
||||||
|
'((:eo "Nu? Ĝis! Adiaŭ!"
|
||||||
|
:en "Well? Bye! Ta-ta!")
|
||||||
|
(:eo "Ve! Eĉ via rigardo sentas strange!"
|
||||||
|
:en "God! The way you look at me gives me the creeps!")
|
||||||
|
(:eo "Lasu! Min! Sooooola!"
|
||||||
|
:en "Leave me! The hell! Alooooone!")
|
||||||
|
(:eo "Subvermo!"
|
||||||
|
:en "Worm!"))))
|
||||||
|
(start-dialogue
|
||||||
|
(apply #'say (append '("childhood-friend")
|
||||||
|
(nth (random (length partings)) partings))))))
|
||||||
|
|
||||||
|
|
||||||
|
(defun childhood-friend-dialogue (map)
|
||||||
|
(let ((greetings (getf-act map :sasha-greetings)))
|
||||||
|
(cond ((or (not greetings)
|
||||||
|
(< greetings 3))
|
||||||
|
(childhood-friend-greetings map))
|
||||||
|
('t
|
||||||
|
(childhood-friend-partings)))))
|
||||||
|
|
||||||
|
|
||||||
|
(defun childhood-friend-interact (map)
|
||||||
|
(make-dialogue-state map (childhood-friend-dialogue map)))
|
||||||
|
|
||||||
|
|
||||||
(defparameter *submenu* `(((LABEL :en "IDK") (selection . 100) (selected t))
|
(defparameter *submenu* `(((LABEL :en "IDK") (selection . 100) (selected t))
|
||||||
|
|
Ŝarĝante…
Reference in New Issue