|
|
2 years ago | |
|---|---|---|
| src | 2 years ago | |
| .gitignore | 2 years ago | |
| LICENSE | 2 years ago | |
| README.org | 2 years ago | |
| package.json | 2 years ago | |
README.org
About
This package is a core api for GateRunner card game. It is written as an exercise in functional programming with fp-ts library and domain modelling.
Package contains game logic only without any rendering engine.
Gameplay
During game player should go through levels thats consist of lines of doors. Every line have three doors and player free to open any of them to skip line. When player interacts with the door it turn into event.
Every interaction take some move points of player. Amount of move points necessary passing a door depends on ground.
Player pass the level if it skip all lines with move points and health greater than zero.
Player can skip line if he can pass at least one open door with move points > 0.
Event can be ether of:
- empty
- item
- trap
- enemy
Empty event
Player just pass whole line when interacts with event. More difficult level is, less empty events it have.
Item event
Item can increase player's attributes once or permanent Item that increase attribute once if poition, permanently is artifact
Poitions works increase only on health and move points Artifacts can increase attack defence health max move max
Player can use potion only before open a door
Trap event
Trap works like negative item thats decrease parameters once or permanent.
Enemy event
Enemy is negative player. To pass the enemy we need to compare attack, defence and health until health of player or enemy will be equal or less than zero.
Skipping a line from start to finish is on turn. It consist of phases.
Plan
TODO Describe domain
Turn ,——————-.
| Turn |
|---|
| phases: phase[] |
| isComplete: boolean |
`——————-'