about summary refs log tree commit diff
path: root/src/Xanthous/Command.hs
AgeCommit message (Collapse)AuthorFilesLines
2019-11-29 Implement a "look" commandGriffin Smith1-1/+5
Implement the PointOnMap prompt type, which allows the player to move the cursor around and select a position on the map, and use this prompt type to implement a "look" command, describing all entities at the selected position.
2019-11-29 Implement saving+loading the gameGriffin Smith1-0/+2
Implement ToJSON and FromJSON for all of the various pieces of the game state, and add a pair of functions saveGame/loadGame implementing a prism to save the game as zlib-compressed JSON. To test this, there's now Arbitrary, CoArbitrary, and Function instances for all the parts of the game state - to get around circular imports with the concrete entities this unfortunately is happening via orphan instances, plus an hs-boot file to break a circular import that was just a little too hard to remove by moving things around. Ugh.
2019-10-06 Allow eating edible itemsGriffin Smith1-0/+2
Add menu support to the prompt system, and an "Eat" command that prompts for an item to eat and eats the item the character specifies, restoring an amount of hitpoints configurable via the item raw type.
2019-09-28 Add debug command to reveal the gameGriffin Smith1-0/+4
Add a (debug) command to reveal all tiles on the game regardless of the character's vision, which'll make it easier to debug creature's behavior while they're not visible.
2019-09-28 Implement the start of creature AIGriffin Smith1-0/+2
Add a Brain class, which determines for an entity the set of moves it makes every step of the game, and begin to implement that for gormlaks. The idea here is that every step of the game, a gormlak will move towards the furthest-away wall it can see.
2019-09-20 Add doors and an open commandGriffin Smith1-15/+24
Add a Door entity and an Open command, which necessitated supporting the direction prompt. Currently nothing actually puts doors on the map, which puts a slight damper on actually testing this out.
2019-09-19 Add items and inventoryGriffin Smith1-1/+4
Add a new "Item" entity, which pulls from the previously-existent ItemType raw, and add a "PickUp" command which takes the (currently *only*) item off the ground and puts it into the inventory.
2019-09-02 Add commands for diagonal movementGriffin Smith1-0/+4
That Was Easy (tm)!
2019-09-02 Add a previous message commandGriffin Smith1-1/+4
Add a "previous message" command, triggered via ctrl+p. I attempted here to get the message area to still take up a row of space post-hiding the message, but failed - should revisit that at some point
2019-08-31 Add entities, and allow walking aroundGriffin Smith1-0/+20
Add support for entities via a port of the EntityMap type, and implement command support starting at basic hjkl.