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:
parent
a8863cf687
commit
f50e713179
9 changed files with 55 additions and 16 deletions
|
|
@ -94,13 +94,21 @@ namespace boss {
|
|||
|
||||
void System::combat(BattleResult& action, std::shared_ptr<DinkyECS::World> world, DinkyECS::Entity boss_id, int attack_id) {
|
||||
|
||||
fmt::println("COMBAT >>> enemy={}, wants_to={}, cost={}, host_state={}",
|
||||
int(action.enemy.entity), action.wants_to, action.cost, int(action.host_state));
|
||||
|
||||
auto& level = GameDB::current_level();
|
||||
auto& player_combat = world->get<Combat>(level.player);
|
||||
auto& boss_combat = world->get<Combat>(boss_id);
|
||||
|
||||
auto& [enemy, wants_to, cost, host_state] = action;
|
||||
|
||||
components::CombatResult result{};
|
||||
components::CombatResult result {
|
||||
.attacker=enemy.entity,
|
||||
.host_state=host_state,
|
||||
.player_did=0,
|
||||
.enemy_did=0
|
||||
};
|
||||
|
||||
switch(host_state) {
|
||||
case BattleHostState::agree:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue