Now have enough state to show what's going on in the fight, next is to use graphics and stuff to make it better.

This commit is contained in:
Zed A. Shaw 2025-12-23 00:11:31 -05:00
parent a8863cf687
commit f50e713179
9 changed files with 55 additions and 16 deletions

View file

@ -262,10 +262,15 @@ void System::combat(int attack_id) {
while(auto act = battle.next()) {
auto [enemy, enemy_action, cost, host_state] = *act;
// player shouldn't hit theirself
if(host_state != BattleHostState::not_host) continue;
components::CombatResult result {
player_combat.attack(*enemy.combat), 0
.attacker=enemy.entity,
.host_state=host_state,
.player_did=player_combat.attack(*enemy.combat),
.enemy_did=0
};
if(result.player_did > 0) {