From e9f9708a43fa6030a943478f203f08fc37aa28ec Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Sat, 11 Jul 2020 15:37:46 +0200 Subject: ... --- data/examples/the_thief/include/characters.fate | 61 ++++++++++++++++++++++ data/examples/the_thief/include/locations.fate | 2 + .../examples/the_thief/include/type/character.fate | 12 +++++ data/examples/the_thief/include/type/location.fate | 3 ++ data/examples/the_thief/include/type/stat.fate | 3 ++ data/examples/the_thief/main.fate | 47 +++++++++++++++++ 6 files changed, 128 insertions(+) create mode 100644 data/examples/the_thief/include/characters.fate create mode 100644 data/examples/the_thief/include/locations.fate create mode 100644 data/examples/the_thief/include/type/character.fate create mode 100644 data/examples/the_thief/include/type/location.fate create mode 100644 data/examples/the_thief/include/type/stat.fate create mode 100644 data/examples/the_thief/main.fate (limited to 'data/examples/the_thief') diff --git a/data/examples/the_thief/include/characters.fate b/data/examples/the_thief/include/characters.fate new file mode 100644 index 0000000..4c36a8e --- /dev/null +++ b/data/examples/the_thief/include/characters.fate @@ -0,0 +1,61 @@ +(fate_version 1) + +(require include/type/character.fate) + +(declare_variable local character oscar) +(declare_variable local character carla) +(declare_variable local character simon) +(declare_variable local character julie) +(declare_variable local character statue) + +(require include/locations.fate) + +(set_fields + (name Oscar) + (agility 50) + (perception 50) + (money 20) + (location room0) + (variable oscar) +) + +(set_fields + (name Carla) + (agility 75) + (perception 35) + (money 7) + (location room1) + (variable carla) +) + +(set_fields + (name Simon) + (agility 35) + (perception 75) + (money 80) + (location room1) + (variable simon) +) + +(set_fields + (name Julie) + (agility 60) + (perception 60) + (money 90) + (location room2) + (variable julie) +) + +(set_fields + (name ( A oddly human shaped statue, with clothes adorned )) + (agility 0) + (perception 0) + (money 30) + (location corridor) + (variable statue) +) + +;; Alright, but we clearly need to be able to point to variables using a type. +;; like (pointer (variable carla)) -> pointer to variable of type character +;; (a string, really) resolves to (variable carla), but allows characters to be +;; put in a set, for example. diff --git a/data/examples/the_thief/include/locations.fate b/data/examples/the_thief/include/locations.fate new file mode 100644 index 0000000..d7beb18 --- /dev/null +++ b/data/examples/the_thief/include/locations.fate @@ -0,0 +1,2 @@ +(fate_version 1) + diff --git a/data/examples/the_thief/include/type/character.fate b/data/examples/the_thief/include/type/character.fate new file mode 100644 index 0000000..e3b1b7b --- /dev/null +++ b/data/examples/the_thief/include/type/character.fate @@ -0,0 +1,12 @@ +(fate_version 1) + +(require include/type/stat.fate) +(require include/type/location.fate) + +(declare_dict_type character + (string name) + (stat agility) + (stat perception) + (int money) + (location location) +) diff --git a/data/examples/the_thief/include/type/location.fate b/data/examples/the_thief/include/type/location.fate new file mode 100644 index 0000000..faec74a --- /dev/null +++ b/data/examples/the_thief/include/type/location.fate @@ -0,0 +1,3 @@ +(fate_version 1) + +(declare_set_type string location) diff --git a/data/examples/the_thief/include/type/stat.fate b/data/examples/the_thief/include/type/stat.fate new file mode 100644 index 0000000..c2e0feb --- /dev/null +++ b/data/examples/the_thief/include/type/stat.fate @@ -0,0 +1,3 @@ +(fate_version 1) + +(declare_subtype int stat) diff --git a/data/examples/the_thief/main.fate b/data/examples/the_thief/main.fate new file mode 100644 index 0000000..66773c2 --- /dev/null +++ b/data/examples/the_thief/main.fate @@ -0,0 +1,47 @@ +(fate_version 1) + +(require include/text_effects.fate) +(require include/characters.fate) +(require include/chapters.fate) + +(text_effect narrator + As the last lights of the day vanish, you bid farewell to a sun you hope + will not recognize you next morning, for tonight is the time of your + transformation. Tonight, you put an end to the hunger. Tonight, you put an + end to the cold. Tonight, surely, you get to claim the luck you were denied + all this time. + (newline) + As you gaze upon the magnificent Tarmock manor, any trace of hesitation + disappears. The plan is simple: your forged letter of introduction will get + you through the door, and your lifelong skills through their purses. +) + +(sequence standing_before_the_manor) + +(cond + ((= 3 (variable oscar.money)) ...don't...) + ((> 3 (variable carla.agility)) ...might...) + ((> 3 (variable carla.perception)) ...surely...) +) + +(= lol + (cond + ((= 3 (variable oscar.money)) ...don't...) + ((> 3 (variable carla.agility)) ...might...) + ((> 3 (variable carla.perception)) ...surely...) + ) +) +Tonight's the night... (newline) +Tonight, we become rich... (newline) +Tonight, we... + +(player_choice + ( + ( ...get in through the window! ) + (sequence through_the_window) + ) + ( + ( ...knock at the door! ) + (sequence knocking_on_door) + ) +) -- cgit v1.2.3-70-g09d2