Note: Gameplay will go through iterations, and start off very simple.
Combat should not be restricted to a combat function. GameData holds a vector of all currently loaded entities (Entity *), and if an entity is in that vector and is hostile to player, they should have the opportunity to attack after player takes a turn.
Combat will start as being player vs a single entity. Combat will take turns, player going first. Make sure to check if entity has perished before allowing their turn. For now just add a simple damage value to actor. May add defense if you like. Need a function to create an Actor (child class of Entity) directly.
Combat actions should be reported to the ActionLog.
Ex: Player hits enemy, enemy hits player, X damage dealt, Enemy has been defeated, etc
Later on, entity generation will be extended to reading from files. For now, please add a random chance to spawn an enemy in a room when player enters a new room, and display enemy name/health to player. Combat log will be a separately listed issue.
Note: Gameplay will go through iterations, and start off very simple.
Combat should not be restricted to a combat function. GameData holds a vector of all currently loaded entities (Entity *), and if an entity is in that vector and is hostile to player, they should have the opportunity to attack after player takes a turn.
Combat will start as being player vs a single entity. Combat will take turns, player going first. Make sure to check if entity has perished before allowing their turn. For now just add a simple damage value to actor. May add defense if you like. Need a function to create an Actor (child class of Entity) directly.
Combat actions should be reported to the ActionLog. Ex: Player hits enemy, enemy hits player, X damage dealt, Enemy has been defeated, etc
Later on, entity generation will be extended to reading from files. For now, please add a random chance to spawn an enemy in a room when player enters a new room, and display enemy name/health to player. Combat log will be a separately listed issue.