Adding units
This commit is contained in:
@@ -14,6 +14,8 @@ Tracks hex locations for the territory map.
|
||||
- `GET /api/locations/visible?depth=3` Override visibility depth for a request.
|
||||
- `PUT /api/locations` Upsert location data (SUPER only).
|
||||
- `GET /api/resources/me` Get the authenticated player's resources.
|
||||
- `GET /api/units/me` Get completed units and active training for the authenticated player.
|
||||
- `POST /api/units/train` Spend gold and start training a unit.
|
||||
|
||||
`claim` and `put` require the same JWT issued by AuthApi.
|
||||
|
||||
@@ -26,3 +28,9 @@ locations are unowned `Open` records until claimed by a player.
|
||||
Player resource state is stored server-side in the `PlayerResources` collection.
|
||||
New players start with 100 gold. A player's headquarters generates 10 gold per
|
||||
minute. Generation is applied lazily when the resource record is read.
|
||||
|
||||
## Units
|
||||
|
||||
Unit training is stored server-side in the `UnitTraining` collection. The first
|
||||
unit type is `Scout`, which costs 50 gold and takes 60 seconds to train.
|
||||
Finished training is completed lazily when unit state is read.
|
||||
|
||||
Reference in New Issue
Block a user