Zilon_Roguelike
Zilon_Roguelike copied to clipboard
Recoverable sources of consumables
Problem
The player person can get food, water and currently most useful med-kids from:
- Monsters by killing. In the start of the game it is very risky way. Because the player person has no way to restore health after 2 or 3 fights.
- Boxes. They are fast exhaustible.
Totally the player person must fight to get resources. And the player person must reserve some resources to fight. We need to introduce some other way to get consumable resources and restore stats like health, hydration and satiety.
Solution
Introduce recoverable static objects which can get food, water and met-kids.
To do is, you can start from IStaticObstaclesGenerator.Generate()
. This service generate all static objects in sector level. You can add some new static objects with new module to recover resources.
Next you need to add new implementation of IStaticObjectModule
. New module named RecoverResourcesModule
(or better name) will depend from IStoreModule
and IMineModule
. You can mine static object if recover module drop cooldown and generate new resources.
Recoverable static objects must have counter of recover cycle. If couter is out object will be destroyed. Counter is about 100.
Alternatives If static objects is to hard you can try to generate resources in random map cell from counter. This must be in sector with no actors. Actors are storing in Sector.ActorManager.
Additional context This is step to craft.