1
0
Fork 0
forked from NotAShelf/rogged
rogged/src/enemy.h
NotAShelf db21bdacdd
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
2026-04-03 15:45:14 +03:00

18 lines
539 B
C

#ifndef ENEMY_H
#define ENEMY_H
#include "common.h"
// Spawn enemies for a floor
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);
#endif // ENEMY_H