Checkpoint current interactive fiction state

This commit is contained in:
2026-05-14 21:17:43 +02:00
parent c745efd1d2
commit 873049f7e6
183 changed files with 13755 additions and 1459 deletions
+16
View File
@@ -0,0 +1,16 @@
# title: Das Herrenhaus
# author: Georg Tomitsch
VAR location = 0
INCLUDE Stats.ink
-> Herrenhaus
=== Herrenhaus ===
~ location = Herrenhaus
Du stehst vor einem Herrenhaus.
* Aktion 1 # 1
* Aktion 2 # 2
* Aktion 3 # 3
- -> END
+79
View File
@@ -0,0 +1,79 @@
// Quest tracking functions as described by Jon Ingold in his GDC 2017 talk.
// Every state implies the states before.
=== function state_reached(state) ===
~ return
// The state is never rolled back. If a lower or the same state is moved to nothing happens.
=== function move_to_state(state) ===
~ return
// Often the state is checked as a range (excluding first and last state)
=== function state_between(first_state, last_state) ===
~ return
// Implementation of ChoiceScript's Fairmath system
// Adjust the variable by adding amount percent of the current value
=== function set(ref variable, amount) ===
~ variable = MIN(100, variable + variable * amount / 100)
~ return variable
// Implementation of relative opposed pair stats
=== function opposed(positive, negative) ===
~ return positive / negative * 100 // TODO Check if this calculation is correct
// Inkle's default number writing function
=== function print_num(x)
{
- x >= 1000:
{print_num(x / 1000)} thousand { x mod 1000 > 0:{print_num(x mod 1000)}}
- x >= 100:
{print_num(x / 100)} hundred { x mod 100 > 0:and {print_num(x mod 100)}}
- x == 0:
zero
- else:
{ x >= 20:
{ x / 10:
- 2: twenty
- 3: thirty
- 4: forty
- 5: fifty
- 6: sixty
- 7: seventy
- 8: eighty
- 9: ninety
}
{ x mod 10 > 0:
<>-<>
}
}
{ x < 10 || x > 20:
{ x mod 10:
- 1: one
- 2: two
- 3: three
- 4: four
- 5: five
- 6: six
- 7: seven
- 8: eight
- 9: nine
}
- else:
{ x:
- 10: ten
- 11: eleven
- 12: twelve
- 13: thirteen
- 14: fourteen
- 15: fifteen
- 16: sixteen
- 17: seventeen
- 18: eighteen
- 19: nineteen
}
}
}