Improve AI garrisons, player recovery and mission administration
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user