Improve AI garrisons, player recovery and mission administration

This commit is contained in:
2026-09-24 22:12:45 +02:00
parent 1b1a8b5173
commit 2551d171b3
115 changed files with 3622 additions and 547 deletions
+5 -1
View File
@@ -1,9 +1,13 @@
from policy_harness import ROOT, body, run
p = ROOT / 'addons/core/Scripts/Game/ERR/00_Core/ERR_RecoveryService.c'
rules = body(p, 'static int SurvivorKind(') + '\n' + body(p, 'static bool NeedsRescuer(')
rules = body(p, 'static int SurvivorKind(') + '\n' + body(p, 'static bool NeedsRescuer(') + '\n' + body(p, 'static bool Stalled(') + '\n' + body(p, 'static bool DefeatDue(')
run('''#include <cassert>
''' + rules + '''
int main() {
assert(Stalled(0,2,0,0,true));
assert(!Stalled(1,2,0,0,true)); assert(!Stalled(0,2,1,0,true));
assert(!Stalled(0,2,0,1,true)); assert(!Stalled(0,0,0,0,true)); assert(!Stalled(0,2,0,0,false));
assert(!DefeatDue(-1,40000)); assert(!DefeatDue(1000,30999)); assert(DefeatDue(1000,31000)); assert(!DefeatDue(1000,999));
for (int flags=0;flags<16;flags++) {
bool alive=flags&1, connected=flags&2, same=flags&4, conscious=flags&8;
int expected=!alive?0:(!connected||!same)?1:conscious?2:3;