Ground bot intentions in live game knowledge and verify outcomes
Core tests / core (push) Successful in 28s

This commit is contained in:
Codex
2026-09-25 13:28:03 +08:00
parent 20ccd0fced
commit 502cb1e4fd
17 changed files with 251 additions and 24 deletions
+7
View File
@@ -54,3 +54,10 @@ test('adventuring companions stay within five levels',()=>{
assert.equal(partyDecision(a,b).accepted,false);
b.level=a.level+5;assert.equal(partyDecision(a,b).accepted,true);
});
test('party intentions exclude ghosts and protect unknown party members',()=>{
const {intentCompanions}=require('../.test-build/community.js');const a=bot('A'),b=bot('B'),s={bots:[a,b],community:{partiesEnabled:true}};
assert.deepEqual(intentCompanions(s,a).map(x=>x.name),['B']);
b.world.isGhost=true;assert.equal(intentCompanions(s,a).length,0);b.world.isGhost=false;
a.world.groupId='g';a.world.groupNames=['A','Unknown'];assert.equal(intentCompanions(s,a).length,0);
});