summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--info/cards.html11
-rw-r--r--play.css8
-rw-r--r--play.js48
-rw-r--r--rules.js140
4 files changed, 157 insertions, 50 deletions
diff --git a/info/cards.html b/info/cards.html
index 955be11..dc5275c 100644
--- a/info/cards.html
+++ b/info/cards.html
@@ -77,6 +77,8 @@ h2 {
.card.influence_s2x{background-image:url(../cards.1x/influence_s2x.jpg)}
.card.influence_s3x{background-image:url(../cards.1x/influence_s3x.jpg)}
.card.influence_s4x{background-image:url(../cards.1x/influence_s4x.jpg)}
+.card.influence_s3_v2{background-image:url(../cards.1x/influence_s3_v2.jpg)}
+.card.influence_p4x_v2{background-image:url(../cards.1x/influence_p4x_v2.jpg)}
@media (min-resolution:97dpi) {
.card.event_back{background-image:url(../cards.2x/event_back.jpg)}
@@ -122,6 +124,8 @@ h2 {
.card.influence_s2x{background-image:url(../cards.2x/influence_s2x.jpg)}
.card.influence_s3x{background-image:url(../cards.2x/influence_s3x.jpg)}
.card.influence_s4x{background-image:url(../cards.2x/influence_s4x.jpg)}
+.card.influence_s3_v2{background-image:url(../cards.2x/influence_s3_v2.jpg)}
+.card.influence_p4x_v2{background-image:url(../cards.2x/influence_p4x_v2.jpg)}
}
</style>
@@ -168,6 +172,13 @@ h2 {
<div class="card influence influence_p4x"></div>
</div>
+<h2>Deluxe Influence Cards</h2>
+
+<div class="list">
+<div class="card influence influence_s3_v2"></div>
+<div class="card influence influence_p4x_v2"></div>
+</div>
+
<h2>Event Cards</h2>
<div class="list">
diff --git a/play.css b/play.css
index 7c0835c..5c17ea0 100644
--- a/play.css
+++ b/play.css
@@ -452,6 +452,10 @@ body.tint .militia.selected,
.amphitheater { background-image: url(images/improvement_amphitheater.png) }
.basilica { background-image: url(images/improvement_basilica.png) }
.limes { background-image: url(images/improvement_limes.png) }
+.market { background-image: url(images/improvement_market.png) }
+.monument { background-image: url(images/improvement_monument.png) }
+.port { background-image: url(images/improvement_port.png) }
+.temple { background-image: url(images/improvement_temple.png) }
.militia { background-image: url(images/militia.png) }
.alamanni { background-image: url(images/alamanni_active.png) }
.franks { background-image: url(images/franks_active.png) }
@@ -622,6 +626,7 @@ body.tint .legion.reduced {
.card.influence_s1{background-image:url(cards.1x/influence_s1.jpg)}
.card.influence_s2{background-image:url(cards.1x/influence_s2.jpg)}
.card.influence_s3{background-image:url(cards.1x/influence_s3.jpg)}
+.card.influence_s3_v2{background-image:url(cards.1x/influence_s3_v2.jpg)}
.card.influence_s4{background-image:url(cards.1x/influence_s4.jpg)}
.card.influence_s4_v2{background-image:url(cards.1x/influence_s4_v2.jpg)}
.card.influence_m2x{background-image:url(cards.1x/influence_m2x.jpg)}
@@ -630,6 +635,7 @@ body.tint .legion.reduced {
.card.influence_p2x{background-image:url(cards.1x/influence_p2x.jpg)}
.card.influence_p3x{background-image:url(cards.1x/influence_p3x.jpg)}
.card.influence_p4x{background-image:url(cards.1x/influence_p4x.jpg)}
+.card.influence_p4x_v2{background-image:url(cards.1x/influence_p4x_v2.jpg)}
.card.influence_s2x{background-image:url(cards.1x/influence_s2x.jpg)}
.card.influence_s3x{background-image:url(cards.1x/influence_s3x.jpg)}
.card.influence_s4x{background-image:url(cards.1x/influence_s4x.jpg)}
@@ -663,6 +669,7 @@ body.tint .legion.reduced {
.card.influence_s1{background-image:url(cards.2x/influence_s1.jpg)}
.card.influence_s2{background-image:url(cards.2x/influence_s2.jpg)}
.card.influence_s3{background-image:url(cards.2x/influence_s3.jpg)}
+.card.influence_s3_v2{background-image:url(cards.2x/influence_s3_v2.jpg)}
.card.influence_s4{background-image:url(cards.2x/influence_s4.jpg)}
.card.influence_s4_v2{background-image:url(cards.2x/influence_s4_v2.jpg)}
.card.influence_m2x{background-image:url(cards.2x/influence_m2x.jpg)}
@@ -671,6 +678,7 @@ body.tint .legion.reduced {
.card.influence_p2x{background-image:url(cards.2x/influence_p2x.jpg)}
.card.influence_p3x{background-image:url(cards.2x/influence_p3x.jpg)}
.card.influence_p4x{background-image:url(cards.2x/influence_p4x.jpg)}
+.card.influence_p4x_v2{background-image:url(cards.2x/influence_p4x_v2.jpg)}
.card.influence_s2x{background-image:url(cards.2x/influence_s2x.jpg)}
.card.influence_s3x{background-image:url(cards.2x/influence_s3x.jpg)}
.card.influence_s4x{background-image:url(cards.2x/influence_s4x.jpg)}
diff --git a/play.js b/play.js
index 8afb8ad..4bb85d2 100644
--- a/play.js
+++ b/play.js
@@ -82,6 +82,8 @@ const CARD_P4 = [ 156, 161 ]
const CARD_M4X = [ 162, 167 ]
const CARD_S4X = [ 168, 173 ]
const CARD_P4X = [ 174, 179 ]
+const CARD_S3_V2 = [ 180, 188 ] // updated foederati
+const CARD_P4X_V2 = [ 189, 194 ] // updated demagogue
const CARD_INDEX = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3,
@@ -90,6 +92,8 @@ const CARD_INDEX = [
11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15,
15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 20, 20,
20, 20, 20, 20, 21, 21, 21, 21, 21, 21,
+ 22, 22, 22, 22, 22, 22, 22, 22,
+ 23, 23, 23, 23, 23, 23,
]
const CARD_CLASS = [
@@ -115,6 +119,8 @@ const CARD_CLASS = [
"influence_m4x",
"influence_s4x",
"influence_p4x",
+ "influence_s3_v2",
+ "influence_p4x_v2",
]
const CARD_MAP = [
@@ -140,6 +146,8 @@ const CARD_MAP = [
"M4(Spiculum)",
"S4(Triumph)",
"P4(Demagogue)",
+ "S3(Foederati)",
+ "P4(Demagogue)",
]
@@ -242,6 +250,10 @@ const BIT_MILITIA = 1 << 11
const BIT_BREAKAWAY = 1 << 12
const BIT_SEAT_OF_POWER = 1 << 13
const BIT_MILITIA_CASTRA = 1 << 14
+const BIT_MARKET = 1 << 15
+const BIT_MONUMENT = 1 << 16
+const BIT_PORT = 1 << 17
+const BIT_TEMPLE = 1 << 18
function get_support(where) { return view.provinces[where] & 15 }
function get_mobs(where) { return (view.provinces[where] >> 4) & 7 }
@@ -250,6 +262,10 @@ function has_militia(where) { return view.provinces[where] & BIT_MILITIA }
function has_amphitheater(where) { return view.provinces[where] & BIT_AMPHITHEATER }
function has_basilica(where) { return view.provinces[where] & BIT_BASILICA }
function has_limes(where) { return view.provinces[where] & BIT_LIMES }
+function has_market(where) { return view.provinces[where] & BIT_MARKET }
+function has_monument(where) { return view.provinces[where] & BIT_MONUMENT }
+function has_port(where) { return view.provinces[where] & BIT_PORT }
+function has_temple(where) { return view.provinces[where] & BIT_TEMPLE }
function is_breakaway(where) { return view.provinces[where] & BIT_BREAKAWAY }
function is_seat_of_power(where) { return view.provinces[where] & BIT_SEAT_OF_POWER }
function has_militia_castra(where) { return view.provinces[where] & BIT_MILITIA_CASTRA }
@@ -763,6 +779,10 @@ let ui = {
imp_amphitheater: [],
imp_basilica: [],
imp_limes: [],
+ imp_market: [],
+ imp_monument: [],
+ imp_port: [],
+ imp_temple: [],
crisis: document.getElementById("crisis_highlight"),
dice: [
document.getElementById("crisis_die_1"),
@@ -949,6 +969,10 @@ function on_init() {
ui.imp_amphitheater[region] = create_building(region, "improvement amphitheater hide")
ui.imp_basilica[region] = create_building(region, "improvement basilica hide")
ui.imp_limes[region] = create_building(region, "improvement limes hide")
+ ui.imp_market[region] = create_building(region, "improvement market hide")
+ ui.imp_monument[region] = create_building(region, "improvement monument hide")
+ ui.imp_port[region] = create_building(region, "improvement port hide")
+ ui.imp_temple[region] = create_building(region, "improvement temple hide")
register_action(ui.capital[region], "capital", region)
register_action(ui.regions[region], "region", region)
@@ -1242,6 +1266,25 @@ function on_update() {
else
hide(ui.imp_limes[region])
+ if (has_market(region))
+ show_improvement(ui.imp_market[region], ++imp_off)
+ else
+ hide(ui.imp_market[region])
+
+ if (has_monument(region))
+ show_improvement(ui.imp_monument[region], ++imp_off)
+ else
+ hide(ui.imp_monument[region])
+
+ if (has_port(region))
+ show_improvement(ui.imp_port[region], ++imp_off)
+ else
+ hide(ui.imp_port[region])
+
+ if (has_temple(region))
+ show_improvement(ui.imp_temple[region], ++imp_off)
+ else
+ hide(ui.imp_temple[region])
}
for (let i = 0; i < LEGION_COUNT; ++i) {
@@ -1577,6 +1620,11 @@ function on_update() {
action_button("amphitheater", "Amphitheater")
action_button("basilica", "Basilica")
action_button("limes", "Limes")
+ action_button("market", "Market")
+ action_button("monument", "Monument")
+ action_button("port", "Port")
+ action_button("temple", "Temple")
+
action_button("disperse_mob", "Disperse Mob")
action_button("train_legions", "Train Legions")
action_button("add_legion_to_army", "Add Legion to Army")
diff --git a/rules.js b/rules.js
index 20b3abe..e3b6471 100644
--- a/rules.js
+++ b/rules.js
@@ -316,11 +316,13 @@ const CARD_S3X = [ 122, 129 ]
const CARD_P3X = [ 130, 137 ]
const CARD_M4 = [ 138, 143 ]
const CARD_S4 = [ 144, 149 ]
-const CARD_S4B = [ 150, 155 ]
+const CARD_S4_V2 = [ 150, 155 ] // updated damnatio
const CARD_P4 = [ 156, 161 ]
const CARD_M4X = [ 162, 167 ]
const CARD_S4X = [ 168, 173 ]
const CARD_P4X = [ 174, 179 ]
+const CARD_S3_V2 = [ 180, 188 ] // updated foederati
+const CARD_P4X_V2 = [ 189, 194 ] // updated demagogue
const CARD_INDEX = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3,
@@ -329,6 +331,8 @@ const CARD_INDEX = [
11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15,
15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 20, 20,
20, 20, 20, 20, 21, 21, 21, 21, 21, 21,
+ 22, 22, 22, 22, 22, 22, 22, 22,
+ 23, 23, 23, 23, 23, 23,
]
const CARD_INFO = [
@@ -354,6 +358,8 @@ const CARD_INFO = [
{ name: "M4(Spiculum)", type: 0, value: 4, event: "Spiculum" },
{ name: "S4(Triumph)", type: 1, value: 4, event: "Triumph" },
{ name: "P4(Demagogue)", type: 2, value: 4, event: "Demagogue" },
+ { name: "S3(Foederati)", type: 1, value: 3, event: "Foederati" },
+ { name: "P4(Demagogue)", type: 2, value: 4, event: "Demagogue" },
]
function card_name(c) {
@@ -483,6 +489,10 @@ const BIT_MILITIA = 1 << 11
const BIT_BREAKAWAY = 1 << 12
const BIT_SEAT_OF_POWER = 1 << 13
const BIT_MILITIA_CASTRA = 1 << 14
+const BIT_MARKET = 1 << 15
+const BIT_MONUMENT = 1 << 16
+const BIT_PORT = 1 << 17
+const BIT_TEMPLE = 1 << 18
function is_no_place_governor(where) {
return where >= game.provinces.length
@@ -517,9 +527,20 @@ function remove_militia(where) { game.provinces[where] &= ~BIT_MILITIA }
function has_amphitheater(where) { return game.provinces[where] & BIT_AMPHITHEATER }
function has_basilica(where) { return game.provinces[where] & BIT_BASILICA }
function has_limes(where) { return game.provinces[where] & BIT_LIMES }
+function has_market(where) { return game.provinces[where] & BIT_MARKET }
+function has_monument(where) { return game.provinces[where] & BIT_MONUMENT }
+function has_port(where) { return game.provinces[where] & BIT_PORT }
+function has_temple(where) { return game.provinces[where] & BIT_TEMPLE }
+
function add_amphitheater(where) { game.provinces[where] |= BIT_AMPHITHEATER }
function add_basilica(where) { game.provinces[where] |= BIT_BASILICA }
function add_limes(where) { game.provinces[where] |= BIT_LIMES }
+function add_market(where) { game.provinces[where] |= BIT_MARKET }
+function add_monument(where) { game.provinces[where] |= BIT_MONUMENT }
+function add_port(where) { game.provinces[where] |= BIT_PORT }
+function add_temple(where) { game.provinces[where] |= BIT_TEMPLE }
+
+function remove_monument(where) { game.provinces[where] &= ~BIT_MONUMENT }
function is_breakaway(where) { return game.provinces[where] & BIT_BREAKAWAY }
function add_breakaway(where) { game.provinces[where] |= BIT_BREAKAWAY }
@@ -2641,7 +2662,7 @@ function goto_place_governor_success() {
place_governor(game.where, game.selected_governor)
- if (old_emperor >= 0 && !was_senate_emperor && (has_card_event(CARD_S4) || has_card_event(CARD_S4B))) {
+ if (old_emperor >= 0 && !was_senate_emperor && (has_card_event(CARD_S4) || has_card_event(CARD_S4_V2))) {
game.count = (old_emperor << 3) | old_support
game.state = "damnatio_memoriae"
} else {
@@ -2712,7 +2733,7 @@ states.damnatio_memoriae = {
prompt() {
prompt("Place Governor: You may play Damnatio Memoriae.")
gen_card_event(CARD_S4)
- gen_card_event(CARD_S4B)
+ gen_card_event(CARD_S4_V2)
view.actions.pass = 1
},
card(c) {
@@ -3759,7 +3780,7 @@ function play_triumph() {
// TODO: skip players who have no turn left (auto-select worst card?)
function can_play_demagogue() {
- return !used_card_event(CARD_P4X)
+ return !used_card_event(CARD_P4X) && !used_card_event(CARD_P4X_V2)
}
function play_demagogue() {
@@ -5462,7 +5483,11 @@ function setup_market_pile(cards) {
let pile = []
for (let c = cards[0]; c <= cards[1]; ++c)
pile.push(c)
- return pile
+ game.market.push(pile)
+}
+
+function setup_market_pile_random(cards1, cards2) {
+ setup_market_pile(random(2) ? cards1 : cards2)
}
function setup_barbarians(tribe, home) {
@@ -5546,59 +5571,74 @@ exports.setup = function (seed, scenario, options) {
game.emperor = NEUTRAL_EMPEROR
}
+ game.market = []
+
switch (scenario) {
default:
case "Standard":
- game.market = [
- setup_market_pile(CARD_M2),
- setup_market_pile(CARD_S2),
- setup_market_pile(CARD_P2),
- setup_market_pile(CARD_M3),
- setup_market_pile(CARD_S3),
- setup_market_pile(CARD_P3),
- setup_market_pile(CARD_M4),
- setup_market_pile(CARD_S4),
- setup_market_pile(CARD_P4),
- ]
+ setup_market_pile(CARD_M2)
+ setup_market_pile(CARD_S2)
+ setup_market_pile(CARD_P2)
+ setup_market_pile(CARD_M3)
+ if (is_classic())
+ setup_market_pile(CARD_S3)
+ else
+ setup_market_pile(CARD_S3_V2)
+ setup_market_pile(CARD_P3)
+ setup_market_pile(CARD_M4)
+ setup_market_pile(CARD_S4)
+ setup_market_pile(CARD_P4)
break
+
case "Expansion - Fixed":
- game.market = [
- setup_market_pile(CARD_M2),
- setup_market_pile(CARD_S2),
- setup_market_pile(CARD_P2),
- setup_market_pile(CARD_M2X),
- setup_market_pile(CARD_S2X),
- setup_market_pile(CARD_P2X),
- setup_market_pile(CARD_M3),
- setup_market_pile(CARD_S3),
- setup_market_pile(CARD_P3),
- setup_market_pile(CARD_M3X),
- setup_market_pile(CARD_S3X),
- setup_market_pile(CARD_P3X),
- setup_market_pile(CARD_M4),
- setup_market_pile(CARD_S4B),
- setup_market_pile(CARD_P4),
- setup_market_pile(CARD_M4X),
- setup_market_pile(CARD_S4X),
- ]
- if (!options.no_demagogue)
- game.market.push(setup_market_pile(CARD_P4X))
+ setup_market_pile(CARD_M2)
+ setup_market_pile(CARD_S2)
+ setup_market_pile(CARD_P2)
+ setup_market_pile(CARD_M2X)
+ setup_market_pile(CARD_S2X)
+ setup_market_pile(CARD_P2X)
+ setup_market_pile(CARD_M3)
+ if (is_classic())
+ setup_market_pile(CARD_S3)
+ else
+ setup_market_pile(CARD_S3_V2)
+ setup_market_pile(CARD_P3)
+ setup_market_pile(CARD_M3X)
+ setup_market_pile(CARD_S3X)
+ setup_market_pile(CARD_P3X)
+ setup_market_pile(CARD_M4)
+ setup_market_pile(CARD_S4_V2)
+ setup_market_pile(CARD_P4)
+ setup_market_pile(CARD_M4X)
+ setup_market_pile(CARD_S4X)
+ if (!options.no_demagogue) {
+ if (is_classic())
+ setup_market_pile(CARD_P4X)
+ else
+ setup_market_pile(CARD_P4X_V2)
+ }
break
+
case "Expansion - Random":
- game.market = [
- setup_market_pile(random(2) ? CARD_M2 : CARD_M2X),
- setup_market_pile(random(2) ? CARD_S2 : CARD_S2X),
- setup_market_pile(random(2) ? CARD_P2 : CARD_P2X),
- setup_market_pile(random(2) ? CARD_M3 : CARD_M3X),
- setup_market_pile(random(2) ? CARD_S3 : CARD_S3X),
- setup_market_pile(random(2) ? CARD_P3 : CARD_P3X),
- setup_market_pile(random(2) ? CARD_M4 : CARD_M4X),
- setup_market_pile(random(2) ? CARD_S4B : CARD_S4X),
- ]
- if (!options.no_demagogue)
- game.market.push(setup_market_pile(random(2) ? CARD_P4 : CARD_P4X))
+ setup_market_pile_random(CARD_M2, CARD_M2X)
+ setup_market_pile_random(CARD_S2, CARD_S2X)
+ setup_market_pile_random(CARD_P2, CARD_P2X)
+ setup_market_pile_random(CARD_M3, CARD_M3X)
+ if (is_classic())
+ setup_market_pile_random(CARD_S3, CARD_S3X)
else
- game.market.push(setup_market_pile(CARD_P4))
+ setup_market_pile_random(CARD_S3_V2, CARD_S3X)
+ setup_market_pile_random(CARD_P3, CARD_P3X)
+ setup_market_pile_random(CARD_M4, CARD_M4X)
+ setup_market_pile_random(CARD_S4_V2, CARD_S4X)
+ if (!options.no_demagogue) {
+ if (is_classic())
+ setup_market_pile_random(CARD_P4, CARD_P4X)
+ else
+ setup_market_pile_random(CARD_P4, CARD_P4X_V2)
+ } else {
+ setup_market_pile(CARD_P4)
+ }
break
}