summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2020-07-21 23:03:57 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2020-07-21 23:03:57 +0200
commit7bd910917ac2e9ad6b6db9a1fff5a890ac149b52 (patch)
treebea4970c19b380ae01d722e594cdc0c6b021c989 /data
parent7e38e4512b407500910071120d2ad23a9ec395cf (diff)
New demo. Issue with rule prio.
I can't seem to get the MACRO_KW rule from the instructions to have a higher priority than the MACRO_KW rule from the values.
Diffstat (limited to 'data')
-rw-r--r--data/examples/monster_battle/battle.fate5
-rw-r--r--data/examples/monster_battle/in_your_room.fate92
-rw-r--r--data/examples/monster_battle/include/attacks.fate3
-rw-r--r--data/examples/monster_battle/include/creatures.fate30
-rw-r--r--data/examples/monster_battle/include/events.fate3
-rw-r--r--data/examples/monster_battle/include/items.fate13
-rw-r--r--data/examples/monster_battle/include/player.fate5
-rw-r--r--data/examples/monster_battle/include/progress.fate5
-rw-r--r--data/examples/monster_battle/include/text_effects.fate5
-rw-r--r--data/examples/monster_battle/include/types/attack.fate11
-rw-r--r--data/examples/monster_battle/include/types/creature.fate17
-rw-r--r--data/examples/monster_battle/include/types/element.fate13
-rw-r--r--data/examples/monster_battle/include/types/item.fate9
-rw-r--r--data/examples/monster_battle/include/types/player.fate10
-rw-r--r--data/examples/monster_battle/include/types/tag.fate5
-rw-r--r--data/examples/monster_battle/main.fate25
-rw-r--r--data/examples/the_thief/include/chapters.fate2
-rw-r--r--data/examples/the_thief/include/characters.fate57
-rw-r--r--data/examples/the_thief/include/locations.fate41
-rw-r--r--data/examples/the_thief/include/text_effects.fate3
-rw-r--r--data/examples/the_thief/include/type/character.fate12
-rw-r--r--data/examples/the_thief/include/type/location.fate15
-rw-r--r--data/examples/the_thief/include/type/stat.fate3
-rw-r--r--data/examples/the_thief/main.fate47
24 files changed, 251 insertions, 180 deletions
diff --git a/data/examples/monster_battle/battle.fate b/data/examples/monster_battle/battle.fate
new file mode 100644
index 0000000..cfdce39
--- /dev/null
+++ b/data/examples/monster_battle/battle.fate
@@ -0,0 +1,5 @@
+(fate_version 1)
+
+(define_sequence start_battle
+ nothing yet
+)
diff --git a/data/examples/monster_battle/in_your_room.fate b/data/examples/monster_battle/in_your_room.fate
new file mode 100644
index 0000000..8f30a00
--- /dev/null
+++ b/data/examples/monster_battle/in_your_room.fate
@@ -0,0 +1,92 @@
+(fate_version 1)
+
+(require include/creatures.fate)
+(require include/events.fate)
+(require include/items.fate)
+(require include/player.fate)
+(require include/progress.fate)
+(require include/text_effects.fate)
+
+(require battle.fate)
+
+(define_sequence in_your_room
+ (ifelse
+ (is_member visited_your_room progress)
+ (text_effect narrator
+ You room is still a mess. You don't have time to clean things up,
+ though.
+ )
+ (text_effect narrator
+ You room is a mess. You recall having been through every drawer while
+ preparing your bag yesterday. While still unclear on how you are
+ supposed to pack all the necessary things for what promises to be at
+ least a year-long journey inside a small backpack, you cannot avoid
+ but wasting more time contemplating the piles of items that didn't
+ make the cut.
+ )
+ )
+ (add visited_your_room progress)
+ (player_choice
+ (
+ ( Look for healing items )
+ (sequence look_for_healing_items)
+ )
+ (
+ ( No time! Let's go adventuring! )
+ (sequence leave_your_room)
+ )
+ )
+)
+
+(define_sequence look_for_healing_items
+ (text_effect narrator
+ You anxiously alternate between looking at the clock and looking at piles
+ of mess for healing items.
+ (newline)
+ )
+ (ifelse
+ (=< (rand 0 99) 25)
+ (
+ (text_effect surprise
+ (text_effect narrator
+ Oh! You found something!
+ )
+ )
+ (macro get_item (ref (var potion)))
+ )
+ (text_effect narrator
+ No, you don't find anything.
+ )
+ )
+ (sequence in_your_room)
+)
+
+(define_sequence leave_your_room
+ (text_effect narrator
+ As you rush through the door of your room, you fail to notice the obstacle
+ in your path and trip on something that was clearly meant for you.
+ )
+ (event pause)
+ (text_effect narrator
+ It's a monster-holder! There's a note, too.
+ )
+ (macro generate_random_creature (var player.creature))
+ (event pause)
+ (text_effect note_reading
+ Hey sleepyhead. I couldn't wake you up for your big day, but lucky you,
+ someone noticed that you weren't going to make it in time and got this for
+ you.
+ (newline)
+ Looks like it's a (variable player.creature.name). Good for you! My first
+ creature may not have been as powerful, but I wouldn't trade it for
+ anything.
+ (newline)
+ Now go! Aand don't come back until you've achieved your dreams!
+ )
+ (text_effect narrator
+ Teary eyed, you pick up the monster-holder and leave your house. And
+ immediately get challenged by some grinning kid who clearly knew you
+ haven't had time to train and wants to score an easy victory.
+ )
+ (sequence start_battle)
+)
diff --git a/data/examples/monster_battle/include/attacks.fate b/data/examples/monster_battle/include/attacks.fate
new file mode 100644
index 0000000..8104727
--- /dev/null
+++ b/data/examples/monster_battle/include/attacks.fate
@@ -0,0 +1,3 @@
+(fate_version 1)
+
+(require types/attack.fate)
diff --git a/data/examples/monster_battle/include/creatures.fate b/data/examples/monster_battle/include/creatures.fate
new file mode 100644
index 0000000..2ce30c9
--- /dev/null
+++ b/data/examples/monster_battle/include/creatures.fate
@@ -0,0 +1,30 @@
+(fate_version 1)
+
+(require types/creature.fate)
+
+(declare_variable creature monster_0)
+(declare_variable creature monster_1)
+(declare_variable creature monster_2)
+(declare_variable creature monster_3)
+(declare_variable creature monster_4)
+(declare_variable creature monster_5)
+
+(declare_variable int i)
+
+(define_macro generate_random_creature
+ (
+ (creature creature)
+ )
+
+ (set i (rand 0 5))
+ (set (param creature)
+ (cond
+ ((= (var i) 0) (var monster_0))
+ ((= (var i) 1) (var monster_1))
+ ((= (var i) 2) (var monster_2))
+ ((= (var i) 3) (var monster_3))
+ ((= (var i) 4) (var monster_4))
+ ((= (var i) 5) (var monster_5))
+ )
+ )
+)
diff --git a/data/examples/monster_battle/include/events.fate b/data/examples/monster_battle/include/events.fate
new file mode 100644
index 0000000..3749427
--- /dev/null
+++ b/data/examples/monster_battle/include/events.fate
@@ -0,0 +1,3 @@
+(fate_version 1)
+
+(declare_event_type pause)
diff --git a/data/examples/monster_battle/include/items.fate b/data/examples/monster_battle/include/items.fate
new file mode 100644
index 0000000..3ddca93
--- /dev/null
+++ b/data/examples/monster_battle/include/items.fate
@@ -0,0 +1,13 @@
+(fate_version 1)
+
+(require types/item.fate)
+(require player.fate)
+
+(declare_variable item potion)
+
+(define_macro get_item
+ (
+ (item_ptr item)
+ )
+ (add (param item) player.inventory)
+)
diff --git a/data/examples/monster_battle/include/player.fate b/data/examples/monster_battle/include/player.fate
new file mode 100644
index 0000000..18e46dc
--- /dev/null
+++ b/data/examples/monster_battle/include/player.fate
@@ -0,0 +1,5 @@
+(fate_version 1)
+
+(require types/player.fate)
+
+(define_variable player player)
diff --git a/data/examples/monster_battle/include/progress.fate b/data/examples/monster_battle/include/progress.fate
new file mode 100644
index 0000000..ee08320
--- /dev/null
+++ b/data/examples/monster_battle/include/progress.fate
@@ -0,0 +1,5 @@
+(fate_version 1)
+
+(require types/tag.fate)
+
+(define_variable tag_collection progress)
diff --git a/data/examples/monster_battle/include/text_effects.fate b/data/examples/monster_battle/include/text_effects.fate
new file mode 100644
index 0000000..22ed582
--- /dev/null
+++ b/data/examples/monster_battle/include/text_effects.fate
@@ -0,0 +1,5 @@
+(fate_version 1)
+
+(declare_text_effect narrator)
+(declare_text_effect note_reading)
+(declare_text_effect surprise)
diff --git a/data/examples/monster_battle/include/types/attack.fate b/data/examples/monster_battle/include/types/attack.fate
new file mode 100644
index 0000000..da273ad
--- /dev/null
+++ b/data/examples/monster_battle/include/types/attack.fate
@@ -0,0 +1,11 @@
+(fate_version 1)
+
+(require element.fate)
+
+(declare_dict_type attack
+ (string name)
+ (element_ptr element)
+ (int power)
+)
+
+(declare_ref_type attack attack_ptr)
diff --git a/data/examples/monster_battle/include/types/creature.fate b/data/examples/monster_battle/include/types/creature.fate
new file mode 100644
index 0000000..ad7c957
--- /dev/null
+++ b/data/examples/monster_battle/include/types/creature.fate
@@ -0,0 +1,17 @@
+(fate_version 1)
+
+(require element.fate)
+(require attack.fate)
+
+(declare_dict_type creature
+ (string name)
+ (int current_health)
+ (int max_health)
+ (element_ptr element)
+ (attack_ptr attack_0)
+ (attack_ptr attack_1)
+ (attack_ptr attack_2)
+ (attack_ptr attack_3)
+)
+
+(declare_ref_type creature creature_ptr)
diff --git a/data/examples/monster_battle/include/types/element.fate b/data/examples/monster_battle/include/types/element.fate
new file mode 100644
index 0000000..7500b16
--- /dev/null
+++ b/data/examples/monster_battle/include/types/element.fate
@@ -0,0 +1,13 @@
+(fate_version 1)
+
+(declare_subtype string element_name)
+
+(declare_set_type element_name element_name_set)
+
+(declare_dict_type element
+ (element_name name)
+ (element_name_set strong_against)
+ (element_name_set weak_against)
+)
+
+(declare_ref_type element element_ptr)
diff --git a/data/examples/monster_battle/include/types/item.fate b/data/examples/monster_battle/include/types/item.fate
new file mode 100644
index 0000000..0b50475
--- /dev/null
+++ b/data/examples/monster_battle/include/types/item.fate
@@ -0,0 +1,9 @@
+(fate_version 1)
+
+(declare_dict_type item
+ (string name)
+ (int price)
+)
+
+(declare_ref_type item item_ptr)
+(declare_list_type item_ptr item_ptr_list)
diff --git a/data/examples/monster_battle/include/types/player.fate b/data/examples/monster_battle/include/types/player.fate
new file mode 100644
index 0000000..2573c38
--- /dev/null
+++ b/data/examples/monster_battle/include/types/player.fate
@@ -0,0 +1,10 @@
+(fate_version 1)
+
+(require item.fate)
+(require creature.fate)
+
+(define_dict_type player
+ (creature creature)
+ (item_ptr_list inventory)
+ (int money)
+)
diff --git a/data/examples/monster_battle/include/types/tag.fate b/data/examples/monster_battle/include/types/tag.fate
new file mode 100644
index 0000000..8cca7fe
--- /dev/null
+++ b/data/examples/monster_battle/include/types/tag.fate
@@ -0,0 +1,5 @@
+(fate_version 1)
+
+(define_subtype string tag)
+
+(define_set_type tag tag_collection)
diff --git a/data/examples/monster_battle/main.fate b/data/examples/monster_battle/main.fate
new file mode 100644
index 0000000..e77e734
--- /dev/null
+++ b/data/examples/monster_battle/main.fate
@@ -0,0 +1,25 @@
+(fate_version 1)
+
+(require include/events.fate)
+(require include/text_effects.fate)
+
+(require in_your_room.fate)
+
+(text_effect narrator
+ After failing to sleep because of the anticipation, you overslept.
+ Today was supposed to be glorious! At long last, you were going on your
+ life-defining adventure with a powerful companion.
+)
+(event pause)
+(text_effect narrator
+ ...
+)
+(event pause)
+(text_effect narrator
+ Maybe you should stop daydreaming and see what can be salvaged at this point.
+)
+(event pause)
+(text_effect narrator
+ You stand in your room, having just dressed.
+)
+(sequence in_your_room)
diff --git a/data/examples/the_thief/include/chapters.fate b/data/examples/the_thief/include/chapters.fate
deleted file mode 100644
index d7beb18..0000000
--- a/data/examples/the_thief/include/chapters.fate
+++ /dev/null
@@ -1,2 +0,0 @@
-(fate_version 1)
-
diff --git a/data/examples/the_thief/include/characters.fate b/data/examples/the_thief/include/characters.fate
deleted file mode 100644
index 0bdd797..0000000
--- a/data/examples/the_thief/include/characters.fate
+++ /dev/null
@@ -1,57 +0,0 @@
-(fate_version 1)
-
-(require type/character.fate)
-
-(declare_variable local character oscar)
-(declare_variable character carla)
-(declare_variable local character simon)
-(declare_variable character julie)
-(declare_variable local character statue)
-
-(require include/locations.fate)
-
-(set_fields oscar
-
- (name Oscar)
- (agility 50)
- (perception 50)
- (money 20)
-)
-(add (ref oscar) room0.occupants)
-
-(set_fields carla
-
- (name Carla)
- (agility 75)
- (perception 35)
- (money 7)
-)
-(add (ref carla) room1.occupants)
-
-(set_fields simon
-
- (name Simon)
- (agility 35)
- (perception 75)
- (money 80)
-)
-(add (ref simon) room2.occupants)
-
-(set_fields julie
-
- (name Julie)
- (agility 60)
- (perception 60)
- (money 90)
-)
-(add (ref julie) corridor.occupants)
-
-
-(set_fields statue
-
- (name ( A oddly human shaped statue, with clothes adorned ))
- (agility 0)
- (perception 0)
- (money 30)
-)
-(add (ref statue) corridor.occupants)
diff --git a/data/examples/the_thief/include/locations.fate b/data/examples/the_thief/include/locations.fate
deleted file mode 100644
index e46c504..0000000
--- a/data/examples/the_thief/include/locations.fate
+++ /dev/null
@@ -1,41 +0,0 @@
-(fate_version 1)
-
-(require type/location.fate)
-
-(declare_variable local location room0)
-(declare_variable local location room1)
-(declare_variable local location room2)
-(declare_variable local location corridor)
-
-(set_fields room0
- (name ( Room 0 ))
- (description
- ( An luxurious bedroom, well lit. )
- )
- (luminosity 80)
-)
-
-(set_fields room1
- (name ( Room 1 ))
- (description
- ( An overly large kitchen, unevenly lit. )
- )
- (luminosity 35)
-)
-
-(set_fields room2
- (name ( Room 2 ))
- (description
- ( An tiny and messy study, unlit. )
- )
- (luminosity 0)
-)
-
-(set_fields corridor
- (name Corridor)
- (description
- ( A long corridor, with many decorations, and many hiding places. )
- )
- (luminosity 50)
-)
-
diff --git a/data/examples/the_thief/include/text_effects.fate b/data/examples/the_thief/include/text_effects.fate
deleted file mode 100644
index c8cdd7e..0000000
--- a/data/examples/the_thief/include/text_effects.fate
+++ /dev/null
@@ -1,3 +0,0 @@
-(fate_version 1)
-
-(declare_text_effect narrator)
diff --git a/data/examples/the_thief/include/type/character.fate b/data/examples/the_thief/include/type/character.fate
deleted file mode 100644
index 6278ad9..0000000
--- a/data/examples/the_thief/include/type/character.fate
+++ /dev/null
@@ -1,12 +0,0 @@
-(fate_version 1)
-
-(require stat.fate)
-
-(declare_dict_type character
- (string name)
- (stat agility)
- (stat perception)
- (int money)
-)
-
-(declare_ref_type character character_ptr)
diff --git a/data/examples/the_thief/include/type/location.fate b/data/examples/the_thief/include/type/location.fate
deleted file mode 100644
index 9db494f..0000000
--- a/data/examples/the_thief/include/type/location.fate
+++ /dev/null
@@ -1,15 +0,0 @@
-(fate_version 1)
-
-(require character.fate)
-
-(declare_set_type character_ptr occupants)
-(declare_subtype int luminosity)
-
-(declare_dict_type location
- (string name)
- (string description)
- (luminosity luminosity)
- (occupants occupants)
-)
-
-(declare_ref_type location location_ptr)
diff --git a/data/examples/the_thief/include/type/stat.fate b/data/examples/the_thief/include/type/stat.fate
deleted file mode 100644
index c2e0feb..0000000
--- a/data/examples/the_thief/include/type/stat.fate
+++ /dev/null
@@ -1,3 +0,0 @@
-(fate_version 1)
-
-(declare_subtype int stat)
diff --git a/data/examples/the_thief/main.fate b/data/examples/the_thief/main.fate
deleted file mode 100644
index 66773c2..0000000
--- a/data/examples/the_thief/main.fate
+++ /dev/null
@@ -1,47 +0,0 @@
-(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)
- )
-)