Ground bot intentions in live game knowledge and verify outcomes
Core tests / core (push) Successful in 28s
Core tests / core (push) Successful in 28s
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user