From cb086101a4f7cb597707f0c75bff63db29feb94f Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Mon, 27 Oct 2014 08:17:00 -0700 Subject: [PATCH] an idea for how the card game might go. --- .../advent/screens/rooms/inside_castle.clj | 31 ++++++++++++++++--- desktop/src-common/advent/screens/scene.clj | 2 +- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/desktop/src-common/advent/screens/rooms/inside_castle.clj b/desktop/src-common/advent/screens/rooms/inside_castle.clj index e0619015..8124042b 100644 --- a/desktop/src-common/advent/screens/rooms/inside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/inside_castle.clj @@ -1,6 +1,7 @@ (ns advent.screens.rooms.inside-castle (:require [advent.screens.rooms :as rooms] [advent.actions :as actions] + [advent.screens.items :as items] [advent.utils :as utils] [clojure.zip :as zip] [play-clj.core :refer :all] @@ -8,6 +9,21 @@ [play-clj.utils :refer :all] [play-clj.g2d :refer :all])) +(defn play-warlocks-castle [entities] + (let [scenarios [#(actions/do-dialogue entities + :game-player "As you approach the lair of the cave beast, a foul odor fills your nostrils." + :game-player "To your horror, you realize that the stench is from the corpses of less wise wizards." + :game-player "The cave is eerie and dark. What do you do?") + #(actions/do-dialogue entities + :game-player "As you move forward in your quest, you come upon an abandoned library." + :game-player "Still, something doesn't feel right about the place." + :game-player "It's quiet." + :game-player "A little too quiet.") + #(actions/do-dialogue entities + :game-player "The treacherous stair lies before you.")]] + (doseq [scenario (take 2 (shuffle scenarios))] + (scenario)))) + (defn do-game-player-dialogue [entities] (actions/do-dialogue entities :ego "You there!" :game-player "... Yes?") (actions/present-choices entities @@ -36,11 +52,16 @@ :game-player "It's not for little kids like you." :game-player "Even wise wizards like Mr. Fangald can't beat me!") :choices ["Can I play with you?" - {:run #(actions/respond entities % - :game-player "You think YOU have what it takes to climb the stairs of treachery?" - :game-player "Or solve the riddle in the library of mystery?" - :game-player "Or break the curse that has entrapped the cave beast for 1000 years?" - :game-player "Very well.")} + {:run #(do (actions/respond entities % + :game-player "You think YOU have what it takes to climb the stairs of treachery?" + :game-player "Or solve the riddle in the library of mystery?" + :game-player "Or break the curse that has entrapped the cave beast for 1000 years?" + :game-player "Very well. Here are your cards.") + (actions/give entities items/cards) + (actions/talk entities :game-player "Are you ready to play?")) + :choices ["You bet!" {:run (fn [_] (play-warlocks-castle entities))} + "Hang on a sec." {:choices ["Hey look! A real warlock!" {:choices actions/previous-choices} + "Ok, ready." {:run (fn [_] (play-warlocks-castle entities))}]}]} "That sounds pretty dumb." {:run #(actions/respond entities % :game-player "That's exactly what I'd expect a dummy like you to say." diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index bcf22505..bc2daa6a 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -164,7 +164,7 @@ {:rooms rooms :state {:object nil :active? true - :inventory [items/cheat-deck items/cards]} + :inventory []} :actions {:object nil :channel (chan) :current nil