1
0
Fork 0
forked from NotAShelf/rogged

various: add speed/cooldown & initiative system

- Goblins act every ~2 turns, skeletons ~1.5, orcs ~1.2
- Enemies accumulate cooldown based on speed, act when <= 0
- Player always acts every turn (speed = 100)"

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Id822579a0326887d91a80bd4ab27a72d6a6a6964
This commit is contained in:
raf 2026-04-03 14:21:05 +03:00
commit db21bdacdd
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
4 changed files with 185 additions and 41 deletions

View file

@ -9,6 +9,9 @@ void enemy_spawn(Enemy enemies[], int *count, Map *map, Player *p, int floor);
// Update all enemy AI
void enemy_update_all(Enemy enemies[], int count, Player *p, Map *map);
// Perform a single action for an enemy (attack if adjacent, otherwise move)
void enemy_act(Enemy *e, Player *p, Map *map, Enemy *all_enemies, int enemy_count);
// Check if position has an enemy
int is_enemy_at(const Enemy *enemies, int count, int x, int y);