summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2021-05-05 21:40:37 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2021-05-05 21:40:37 +0200
commitb22d858c37ec605ad571a92461f36460f62af93f (patch)
treecef6358f3d84dca01cee0508d10d5aab4d9aee31 /data/examples
parenta7003a8b3e00ff36470f1aeb931919f57cac2039 (diff)
Dict -> Struct.
Diffstat (limited to 'data/examples')
-rw-r--r--data/examples/monster_battle/battle.fate2
-rw-r--r--data/examples/monster_battle/in_your_room.fate29
-rw-r--r--data/examples/monster_battle/include/creatures.fate20
-rw-r--r--data/examples/monster_battle/main.fate8
4 files changed, 23 insertions, 36 deletions
diff --git a/data/examples/monster_battle/battle.fate b/data/examples/monster_battle/battle.fate
index 1bc023a..3efd210 100644
--- a/data/examples/monster_battle/battle.fate
+++ b/data/examples/monster_battle/battle.fate
@@ -1,5 +1,5 @@
(fate_version 1)
(define_sequence start_battle ()
- (end)
+ (end!)
)
diff --git a/data/examples/monster_battle/in_your_room.fate b/data/examples/monster_battle/in_your_room.fate
index 5ca456b..85411e1 100644
--- a/data/examples/monster_battle/in_your_room.fate
+++ b/data/examples/monster_battle/in_your_room.fate
@@ -10,8 +10,7 @@
(require battle.fate)
(define_sequence in_your_room ()
- (ifelse
- (is_member visited_your_room progress)
+ (if_else (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.
@@ -25,15 +24,15 @@
make the cut.
)
)
- (add visited_your_room progress)
- (player_choice
- (
+ (add! visited_your_room progress)
+ (player_choice!
+ (option
( Look for healing items )
- (jump_to look_for_healing_items)
+ (jump_to! look_for_healing_items)
)
- (
+ (option
( No time! Let's go adventuring! )
- (jump_to leave_your_room)
+ (jump_to! leave_your_room)
)
)
)
@@ -44,7 +43,7 @@
of mess for healing items.
(newline)
)
- (ifelse
+ (if_else
(=< (rand 0 99) 25)
(
(text_effect surprise
@@ -52,13 +51,13 @@
Oh! You found something!
)
)
- (call get_item (ref (var potion)))
+ (call! get_item (ref (var potion)))
)
(text_effect narrator
No, you don't find anything.
)
)
- (jump_to in_your_room)
+ (jump_to! in_your_room)
)
(define_sequence leave_your_room ()
@@ -66,12 +65,12 @@
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)
+ (event! pause)
(text_effect narrator
It's a monster-holder! There's a note, too.
)
- (set player.creature (eval random_creature))
- (event pause)
+ (set! player.creature (eval random_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
@@ -88,5 +87,5 @@
immediately get challenged by some grinning kid who clearly knew you
haven't had time to train and wants to score an easy victory.
)
- (jump_to start_battle)
+ (jump_to! start_battle)
)
diff --git a/data/examples/monster_battle/include/creatures.fate b/data/examples/monster_battle/include/creatures.fate
index 393473e..1cb8d1d 100644
--- a/data/examples/monster_battle/include/creatures.fate
+++ b/data/examples/monster_battle/include/creatures.fate
@@ -2,24 +2,12 @@
(require types/creature.fate)
-(global creature monster_0)
-(global creature monster_1)
-(global creature monster_2)
-(global creature monster_3)
-(global creature monster_4)
-(global creature monster_5)
+(global (list creature) monster_templates)
(global (lambda creature ()) random_creature)
(set random_creature
- (lambda ()
- (switch (rand 0 5)
- (0 (var monster_0))
- (1 (var monster_0))
- (2 (var monster_0))
- (3 (var monster_0))
- (4 (var monster_0))
- (var monster_5)
- )
- )
+ (lambda () (access (rand 0 (size monster_templates)) monster_templates))
)
+
+(
diff --git a/data/examples/monster_battle/main.fate b/data/examples/monster_battle/main.fate
index a10fd48..89988ae 100644
--- a/data/examples/monster_battle/main.fate
+++ b/data/examples/monster_battle/main.fate
@@ -10,16 +10,16 @@
Today was supposed to be glorious! At long last, you were going on your
life-defining adventure with a powerful companion.
)
-(event pause)
+(event! pause)
(text_effect narrator
...
)
-(event pause)
+(event! pause)
(text_effect narrator
Maybe you should stop daydreaming and see what can be salvaged at this point.
)
-(event pause)
+(event! pause)
(text_effect narrator
You stand in your room, having just dressed.
)
-(jump_to in_your_room)
+(jump_to! in_your_room)