diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-12-18 16:41:43 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-01-08 16:36:48 +0100 |
commit | 4a3d059599d88ddfea44c9d57f0db5aeba1e3780 (patch) | |
tree | 7ee961ea5c365db8e727425fb035adf2c8e1f09b | |
parent | da2308355d3893ab49651aa1985a6b112ef1640c (diff) | |
download | table-battles-4a3d059599d88ddfea44c9d57f0db5aeba1e3780.tar.gz |
Use (5/6) instead of (5)/(6)
-rw-r--r-- | rules.js | 40 | ||||
-rw-r--r-- | tools/gendata.js | 2 |
2 files changed, 22 insertions, 20 deletions
@@ -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, |