[BREAKING] Battle system now runs the turn based combat better, and lots of interesting things like if you don't choose an action the host AI rebels and does it for you.
This commit is contained in:
parent
9739441a9c
commit
986b2612d4
9 changed files with 100 additions and 32 deletions
|
|
@ -20,8 +20,10 @@ namespace boss {
|
|||
auto ai_goal = ai::load_state(config.ai_goal_name);
|
||||
|
||||
ai::EntityAI boss_ai(config.ai_script, ai_start, ai_goal);
|
||||
boss_ai.set_state("enemy_found", true);
|
||||
boss_ai.set_state("in_combat", true);
|
||||
boss_ai.set_state("tough_personality", true);
|
||||
boss_ai.set_state("detect_enemy", true);
|
||||
boss_ai.set_state("health_good", true);
|
||||
|
||||
world.set<ai::EntityAI>(entity_id, boss_ai);
|
||||
}
|
||||
|
|
@ -97,15 +99,17 @@ namespace boss {
|
|||
|
||||
switch(host_state) {
|
||||
case BattleHostState::agree:
|
||||
dbc::log("host_agrees");
|
||||
// BUG: this is hard coding only one boss, how to select targets?
|
||||
if(wants_to == "kill_enemy") {
|
||||
result.player_did = player_combat.attack(boss_combat);
|
||||
}
|
||||
break;
|
||||
case BattleHostState::disagree:
|
||||
dbc::log("host_DISagrees");
|
||||
fmt::println("HOST DISAGREES! {}", wants_to);
|
||||
|
||||
if(wants_to == "kill_enemy") {
|
||||
result.player_did = player_combat.attack(boss_combat);
|
||||
}
|
||||
break;
|
||||
case BattleHostState::not_host:
|
||||
dbc::log("kill_enemy");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue