Commit Graph

7 Commits

Author SHA1 Message Date
2357757b23 Add dialog actions
Rudimentary user input for dialogs has been added.

* Displays must add support for showing dialog options, and receiving
  user input for dialog selections.
* A selected dialog can optionally perform actions, and then directs the
  game into the next dialog state.
* Dialog options may be conditionally shown with variables.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2021-11-28 17:27:05 -08:00
32e8c219a6 Change CheckVarAction default to be != False instead of == True
Like most programs, we like a value to be "not false" instead of
"truthy".

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2021-11-21 11:47:28 -08:00
e868d0e14f Add display abstraction
In case we want to run this on something that isn't an ANSI terminal, we
have the option to implement it however we want.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2021-11-20 19:38:06 -08:00
2f86df2930 Add room entry auto-triggers, player input, and more
* When you teleport to a room, the teleport auto-triggers fire.
* Rooms have auto-triggers. None by default. They are run every time you
  teleport to a room, and when the game starts. Gate behavior behind a
  variable.
* PlayerInputAction waits for player input (and potentially write it
  into a variable)

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2021-11-18 20:32:02 -08:00
d3bf9e68dd Add PrintRoomAction and TeleportAction.announce field
* PrintRoomAction will print a small header and then the room's text.
* TeleportAction now has an announce field (true by default) that will
  print the room's text after moving the player there.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2021-11-18 17:23:14 -08:00
7f86aafc05 Update example game some, update engine some
* Add RevealAction/UnrevealAction for revealing/hiding items in a room
* Add a lot of checks for items being revealed when it's attempted to be
  triggered
* Implement TeleportAction (mostly)
* For all Check* family of actions, the `yes` and `no` values may be
  just be a single action instead of an array of actions
* Change up how room descriptions and stuff work, mostly so that you can
  specify multiple lines in an array so you can preserve paragraph
  breaks when displayed.
* Example game has some more content

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2021-11-18 16:26:16 -08:00
dd2128beb1 Initial commit with a mostly working engine.
Basic commands are being parsed. I think the only weird part is the
'use' command because it needs to possibly target two things. A tiny
test example is provided in __main__, this will probably be broken out
later.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2021-11-18 11:31:21 -08:00