From 4a3d059599d88ddfea44c9d57f0db5aeba1e3780 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 18 Dec 2023 16:41:43 +0100 Subject: Use (5/6) instead of (5)/(6) --- rules.js | 40 ++++++++++++++++++++-------------------- tools/gendata.js | 2 ++ 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/rules.js b/rules.js index fbbec3f..2267dc9 100644 --- a/rules.js +++ b/rules.js @@ -906,20 +906,20 @@ const place_dice_once = { "(4)": true, "(5)": true, "(6)": true, - "(1)/(2)": true, + "(1/2)": true, "(1-3)": true, "(1-4)": true, "(1-5)": true, - "(2)/(3)": true, + "(2/3)": true, "(2-4)": true, "(2-5)": true, "(2-6)": true, - "(3)/(4)": true, + "(3/4)": true, "(3-5)": true, "(3-6)": true, - "(4)/(5)": true, + "(4/5)": true, "(4-6)": true, - "(5)/(6)": true, + "(5/6)": true, } const place_dice_check = { @@ -959,20 +959,20 @@ const place_dice_check = { "4-6": (c) => check_range(c, 4, 6), "4/5/6": (c) => check_range(c, 4, 6), "5/6": (c) => check_range(c, 5, 6), - "(1)/(2)": (c) => check_range(c, 1, 2), + "(1/2)": (c) => check_range(c, 1, 2), "(1-3)": (c) => check_range(c, 1, 3), "(1-4)": (c) => check_range(c, 1, 4), "(1-5)": (c) => check_range(c, 1, 5), - "(2)/(3)": (c) => check_range(c, 2, 2), + "(2/3)": (c) => check_range(c, 2, 2), "(2-4)": (c) => check_range(c, 2, 4), "(2-5)": (c) => check_range(c, 2, 5), "(2-6)": (c) => check_range(c, 2, 6), - "(3)/(4)": (c) => check_range(c, 3, 4), + "(3/4)": (c) => check_range(c, 3, 4), "(3-5)": (c) => check_range(c, 3, 5), "(3-6)": (c) => check_range(c, 3, 6), - "(4)/(5)": (c) => check_range(c, 4, 5), + "(4/5)": (c) => check_range(c, 4, 5), "(4-6)": (c) => check_range(c, 4, 6), - "(5)/(6)": (c) => check_range(c, 5, 6), + "(5/6)": (c) => check_range(c, 5, 6), } const place_dice_gen = { @@ -1013,20 +1013,20 @@ const place_dice_gen = { "4-6": (c) => gen_range(c, 4, 6), "4/5/6": (c) => gen_range(c, 4, 6), "5/6": (c) => gen_range(c, 5, 6), - "(1)/(2)": (c) => gen_range(c, 1, 2), + "(1/2)": (c) => gen_range(c, 1, 2), "(1-3)": (c) => gen_range(c, 1, 3), "(1-4)": (c) => gen_range(c, 1, 4), "(1-5)": (c) => gen_range(c, 1, 5), - "(2)/(3)": (c) => gen_range(c, 2, 2), + "(2/3)": (c) => gen_range(c, 2, 2), "(2-4)": (c) => gen_range(c, 2, 4), "(2-5)": (c) => gen_range(c, 2, 5), "(2-6)": (c) => gen_range(c, 2, 6), - "(3)/(4)": (c) => gen_range(c, 3, 4), + "(3/4)": (c) => gen_range(c, 3, 4), "(3-5)": (c) => gen_range(c, 3, 5), "(3-6)": (c) => gen_range(c, 3, 6), - "(4)/(5)": (c) => gen_range(c, 4, 5), + "(4/5)": (c) => gen_range(c, 4, 5), "(4-6)": (c) => gen_range(c, 4, 6), - "(5)/(6)": (c) => gen_range(c, 5, 6), + "(5/6)": (c) => gen_range(c, 5, 6), } const place_dice_take = { @@ -1067,20 +1067,20 @@ const place_dice_take = { "4-6": (c, d) => take_single(c, d), "4/5/6": (c, d) => take_single(c, d), "5/6": (c, d) => take_single(c, d), - "(1)/(2)": (c, d) => take_single(c, d), + "(1/2)": (c, d) => take_single(c, d), "(1-3)": (c, d) => take_single(c, d), "(1-4)": (c, d) => take_single(c, d), "(1-5)": (c, d) => take_single(c, d), - "(2)/(3)": (c, d) => take_single(c, d), + "(2/3)": (c, d) => take_single(c, d), "(2-4)": (c, d) => take_single(c, d), "(2-5)": (c, d) => take_single(c, d), "(2-6)": (c, d) => take_single(c, d), - "(3)/(4)": (c, d) => take_single(c, d), + "(3/4)": (c, d) => take_single(c, d), "(3-5)": (c, d) => take_single(c, d), "(3-6)": (c, d) => take_single(c, d), - "(4)/(5)": (c, d) => take_single(c, d), + "(4/5)": (c, d) => take_single(c, d), "(4-6)": (c, d) => take_single(c, d), - "(5)/(6)": (c, d) => take_single(c, d), + "(5/6)": (c, d) => take_single(c, d), } function can_place_dice(c) { diff --git a/tools/gendata.js b/tools/gendata.js index b529fc0..6940249 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -124,6 +124,8 @@ for (let c of card_records) { if (!c.name) continue + c.dice = c.dice.replace(")/(", "/") + let card = { scenario: parseInt(c.scenario), number: c.number, -- cgit v1.2.3