added 'move from group' action/strat/shortcut-action

This commit is contained in:
Fuzz
2024-08-26 22:30:36 +10:00
parent 1aa9145902
commit d29569e9ea
14 changed files with 180 additions and 19 deletions

View File

@@ -42,6 +42,12 @@ bool StayAction::Execute(Event event) { return Stay(); }
bool StayAction::isUseful()
{
// move from group takes priority over stay as it's added and removed automatically
// (without removing/adding stay)
if (botAI->HasStrategy("move from group", BOT_STATE_COMBAT) ||
botAI->HasStrategy("move from group", BOT_STATE_NON_COMBAT))
return false;
// Only useful if the bot is currently moving
return AI_VALUE2(bool, "moving", "self target");
}