health items
This commit is contained in:
parent
cb3513bd99
commit
62b2b9feca
17 changed files with 611 additions and 141 deletions
|
|
@ -29,18 +29,20 @@ export interface Side {
|
|||
export class Table {
|
||||
s: GameState;
|
||||
|
||||
constructor(o: { south?: Side; north?: Side; first?: PlayerId; seed?: number } = {}) {
|
||||
constructor(o: { south?: Side; north?: Side; first?: PlayerId; seed?: number; health?: boolean } = {}) {
|
||||
const side = (x: Side = {}) => ({
|
||||
avatars: x.avatars ?? DEFAULT_AVATARS,
|
||||
servers: [...(x.servers ?? []), ...Array(12).fill(PLAIN_SERVER)],
|
||||
main: [...(x.main ?? []), ...Array(12).fill(FILLER)],
|
||||
});
|
||||
const decks = [side(o.south), side(o.north)] as const;
|
||||
// Classic turns (one turn each, every Avatar acts), which the card tests are written for. The
|
||||
// command rule has its own tests in engine.test.ts.
|
||||
// Classic turns (one turn each, every Avatar acts) and one-roll combats, which the card tests
|
||||
// are written for. The command rule has its own tests in engine.test.ts, the health rule in
|
||||
// health.test.ts (`health: true`).
|
||||
const rules: RulesConfig = {
|
||||
...DEFAULT_RULES,
|
||||
commands: { ...DEFAULT_RULES.commands, on: false },
|
||||
health: { ...DEFAULT_RULES.health, on: o.health ?? false },
|
||||
openingHand: 0,
|
||||
deck: { avatars: 4, servers: decks[0].servers.length, main: decks[0].main.length, maxCopies: 99 },
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue