health items
This commit is contained in:
parent
cb3513bd99
commit
62b2b9feca
17 changed files with 611 additions and 141 deletions
|
|
@ -55,6 +55,24 @@ test('bots play the copy-rule variants without breaking a rule', () => {
|
|||
}
|
||||
});
|
||||
|
||||
test('bots play with the health rule off (one-roll combats) without breaking a rule', () => {
|
||||
const rules = withRule(DEFAULT_RULES, 'health.on=false');
|
||||
for (let seed = 1; seed <= 25; seed++) {
|
||||
assert.ok(playGame({ pool, bots: [randomBot, randomBot], seed, rules, check: true }).over);
|
||||
assert.ok(playGame({ pool, bots: [() => greedyBot(), () => greedyBot()], seed, rules, check: true }).over);
|
||||
}
|
||||
});
|
||||
|
||||
test('bots play the health rule without recall, and with Health 8, without breaking a rule', () => {
|
||||
for (const spec of ['health.recall=false', 'health.override=8']) {
|
||||
const rules = withRule(DEFAULT_RULES, spec);
|
||||
for (let seed = 1; seed <= 15; seed++) {
|
||||
assert.ok(playGame({ pool, bots: [randomBot, randomBot], seed, rules, check: true }).over);
|
||||
assert.ok(playGame({ pool, bots: [() => greedyBot(), () => greedyBot()], seed, rules, check: true }).over);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('bots play the command rule without breaking a rule', () => {
|
||||
const rules = withRule(DEFAULT_RULES, 'commands.on=true');
|
||||
for (let seed = 1; seed <= 25; seed++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue