Very basic attack system.
This commit is contained in:
parent
6bca6d021e
commit
abd843d5ec
5 changed files with 40 additions and 11 deletions
|
@ -235,7 +235,10 @@ void WorldBuilder::randomize_entities(DinkyECS::World &world, GameConfig &config
|
|||
int rand_entity = Random::uniform<int>(0, keys.size() - 1);
|
||||
std::string key = keys[rand_entity];
|
||||
// BUG: this may crash if PLAYER_TILE isn't first
|
||||
if(key == "PLAYER_TITLE") key = keys[rand_entity + 1];
|
||||
if(key == "PLAYER_TITLE") {
|
||||
key = keys[rand_entity + 1];
|
||||
fmt::println("SKIPPING PLAYER and using {} instead", key);
|
||||
}
|
||||
auto entity_data = entity_db[key];
|
||||
|
||||
// pass that to the config as it'll be a generic json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue