summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-01-01 01:37:05 +0100
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:19:39 +0100
commit5e7f5119713c6c770e082a455f0a84f36744d953 (patch)
tree2644fd4fb473288c8a65f0d64df07bad21bea870
parentce2b49de2c55f491aead98285cca43d077ebb62d (diff)
downloadcrusader-rex-5e7f5119713c6c770e082a455f0a84f36744d953.tar.gz
Split into separate module.
-rw-r--r--README5
-rw-r--r--about.html3
-rw-r--r--blocks.css63
-rw-r--r--blocks/index.html89
-rw-r--r--info/blocks.html64
-rw-r--r--play.css20
-rw-r--r--play.html4
-rw-r--r--play.js28
-rw-r--r--title.sql3
9 files changed, 103 insertions, 176 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..be9214b
--- /dev/null
+++ b/README
@@ -0,0 +1,5 @@
+This game is implemented with the generous permission of Columbia Games.
+
+Rules and art assets are Copyright 2005-2011 Columbia Games and Jerry Taylor.
+
+Source code to this digital implementation is Copyright 2021-2022 Tor Andersson.
diff --git a/about.html b/about.html
index a567ea5..ea007f4 100644
--- a/about.html
+++ b/about.html
@@ -10,7 +10,8 @@ Designer: Jerry Taylor and Tom Dalgliesh.
<p>
Copyright &copy; 2005-2011
-<a href="https://columbiagames.com/cgi-bin/query/cfg/zoom.cfg?product_id=3151">Columbia Games</a>.
+<a href="https://columbiagames.com/cgi-bin/query/cfg/zoom.cfg?product_id=3151">Columbia Games</a>
+and Jerry Taylor.
<ul>
<li><a href="/crusader-rex/info/rules.html">Rulebook</a>
diff --git a/blocks.css b/blocks.css
deleted file mode 100644
index 771ad39..0000000
--- a/blocks.css
+++ /dev/null
@@ -1,63 +0,0 @@
-.block_11{background-image:url(blocks/block_11.png)}
-.block_12{background-image:url(blocks/block_12.png)}
-.block_13{background-image:url(blocks/block_13.png)}
-.block_14{background-image:url(blocks/block_14.png)}
-.block_15{background-image:url(blocks/block_15.png)}
-.block_16{background-image:url(blocks/block_16.png)}
-.block_17{background-image:url(blocks/block_17.png)}
-.block_21{background-image:url(blocks/block_21.png)}
-.block_22{background-image:url(blocks/block_22.png)}
-.block_23{background-image:url(blocks/block_23.png)}
-.block_24{background-image:url(blocks/block_24.png)}
-.block_25{background-image:url(blocks/block_25.png)}
-.block_26{background-image:url(blocks/block_26.png)}
-.block_27{background-image:url(blocks/block_27.png)}
-.block_31{background-image:url(blocks/block_31.png)}
-.block_32{background-image:url(blocks/block_32.png)}
-.block_33{background-image:url(blocks/block_33.png)}
-.block_34{background-image:url(blocks/block_34.png)}
-.block_35{background-image:url(blocks/block_35.png)}
-.block_36{background-image:url(blocks/block_36.png)}
-.block_37{background-image:url(blocks/block_37.png)}
-.block_41{background-image:url(blocks/block_41.png)}
-.block_42{background-image:url(blocks/block_42.png)}
-.block_43{background-image:url(blocks/block_43.png)}
-.block_44{background-image:url(blocks/block_44.png)}
-.block_45{background-image:url(blocks/block_45.png)}
-.block_46{background-image:url(blocks/block_46.png)}
-.block_47{background-image:url(blocks/block_47.png)}
-.block_51{background-image:url(blocks/block_51.png)}
-.block_52{background-image:url(blocks/block_52.png)}
-.block_53{background-image:url(blocks/block_53.png)}
-.block_54{background-image:url(blocks/block_54.png)}
-.block_55{background-image:url(blocks/block_55.png)}
-.block_56{background-image:url(blocks/block_56.png)}
-.block_57{background-image:url(blocks/block_57.png)}
-.block_61{background-image:url(blocks/block_61.png)}
-.block_62{background-image:url(blocks/block_62.png)}
-.block_63{background-image:url(blocks/block_63.png)}
-.block_64{background-image:url(blocks/block_64.png)}
-.block_65{background-image:url(blocks/block_65.png)}
-.block_66{background-image:url(blocks/block_66.png)}
-.block_67{background-image:url(blocks/block_67.png)}
-.block_71{background-image:url(blocks/block_71.png)}
-.block_72{background-image:url(blocks/block_72.png)}
-.block_73{background-image:url(blocks/block_73.png)}
-.block_74{background-image:url(blocks/block_74.png)}
-.block_75{background-image:url(blocks/block_75.png)}
-.block_76{background-image:url(blocks/block_76.png)}
-.block_77{background-image:url(blocks/block_77.png)}
-.block_81{background-image:url(blocks/block_81.png)}
-.block_82{background-image:url(blocks/block_82.png)}
-.block_83{background-image:url(blocks/block_83.png)}
-.block_84{background-image:url(blocks/block_84.png)}
-.block_85{background-image:url(blocks/block_85.png)}
-.block_86{background-image:url(blocks/block_86.png)}
-.block_87{background-image:url(blocks/block_87.png)}
-.block_91{background-image:url(blocks/block_91.png)}
-.block_92{background-image:url(blocks/block_92.png)}
-.block_93{background-image:url(blocks/block_93.png)}
-.block_94{background-image:url(blocks/block_94.png)}
-.block_95{background-image:url(blocks/block_95.png)}
-.block_96{background-image:url(blocks/block_96.png)}
-.block_97{background-image:url(blocks/block_97.png)}
diff --git a/blocks/index.html b/blocks/index.html
deleted file mode 100644
index 2205856..0000000
--- a/blocks/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<html>
-<title>Crusader Rex - Blocks</title>
-<link rel="stylesheet" href="../blocks.css">
-<style>
-body {
- margin: 80px;
- background-color: slategray;
- display: flex;
- flex-wrap: wrap;
-}
-div.block {
- width: 55px;
- height: 55px;
- margin: 15px;
- background-size: cover;
- box-shadow: 0 0 6px 4px black;
-}
-div.block:hover {
- transform: scale(2);
- box-shadow: 0 0 3px 4px black;
-}
-div.frank { outline: 4px solid orange; }
-div.saracen { outline: 4px solid green; }
-div.assassin { outline: 4px solid purple; }
-</style>
-<body>
-<div class="frank block block_11"></div>
-<div class="frank block block_12"></div>
-<div class="frank block block_13"></div>
-<div class="frank block block_14"></div>
-<div class="frank block block_15"></div>
-<div class="frank block block_16"></div>
-<div class="frank block block_17"></div>
-<div class="frank block block_21"></div>
-<div class="frank block block_22"></div>
-<div class="frank block block_23"></div>
-<div class="frank block block_24"></div>
-<div class="frank block block_25"></div>
-<div class="frank block block_26"></div>
-<div class="frank block block_27"></div>
-<div class="frank block block_31"></div>
-<div class="frank block block_32"></div>
-<div class="frank block block_33"></div>
-<div class="frank block block_34"></div>
-<div class="frank block block_35"></div>
-<div class="frank block block_36"></div>
-<div class="frank block block_37"></div>
-<div class="frank block block_41"></div>
-<div class="frank block block_42"></div>
-<div class="frank block block_43"></div>
-<div class="frank block block_44"></div>
-<div class="frank block block_45"></div>
-<div class="frank block block_46"></div>
-<div class="frank block block_47"></div>
-<div class="frank block block_51"></div>
-<div class="frank block block_52"></div>
-<div class="frank block block_53"></div>
-<div class="assassin block block_54"></div>
-<div class="saracen block block_55"></div>
-<div class="saracen block block_56"></div>
-<div class="saracen block block_57"></div>
-<div class="saracen block block_61"></div>
-<div class="saracen block block_62"></div>
-<div class="saracen block block_63"></div>
-<div class="saracen block block_64"></div>
-<div class="saracen block block_65"></div>
-<div class="saracen block block_66"></div>
-<div class="saracen block block_67"></div>
-<div class="saracen block block_71"></div>
-<div class="saracen block block_72"></div>
-<div class="saracen block block_73"></div>
-<div class="saracen block block_74"></div>
-<div class="saracen block block_75"></div>
-<div class="saracen block block_76"></div>
-<div class="saracen block block_77"></div>
-<div class="saracen block block_81"></div>
-<div class="saracen block block_82"></div>
-<div class="saracen block block_83"></div>
-<div class="saracen block block_84"></div>
-<div class="saracen block block_85"></div>
-<div class="saracen block block_86"></div>
-<div class="saracen block block_87"></div>
-<div class="saracen block block_91"></div>
-<div class="saracen block block_92"></div>
-<div class="saracen block block_93"></div>
-<div class="saracen block block_94"></div>
-<div class="saracen block block_95"></div>
-<div class="saracen block block_96"></div>
-<div class="saracen block block_97"></div>
diff --git a/info/blocks.html b/info/blocks.html
index f93ec2c..972b95c 100644
--- a/info/blocks.html
+++ b/info/blocks.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<html>
<title>Crusader Rex - Blocks</title>
-<link rel="stylesheet" href="../blocks.css">
<style>
body {
margin: 40px;
@@ -26,6 +25,69 @@ div.frank { border: 3px solid darkkhaki; }
div.saracen { border: 3px solid seagreen; }
div.assassins { border: 3px solid rebeccapurple; }
div.block:hover { transform: scale(2); }
+.block_11{background-image:url(blocks/block_11.png)}
+.block_12{background-image:url(blocks/block_12.png)}
+.block_13{background-image:url(blocks/block_13.png)}
+.block_14{background-image:url(blocks/block_14.png)}
+.block_15{background-image:url(blocks/block_15.png)}
+.block_16{background-image:url(blocks/block_16.png)}
+.block_17{background-image:url(blocks/block_17.png)}
+.block_21{background-image:url(blocks/block_21.png)}
+.block_22{background-image:url(blocks/block_22.png)}
+.block_23{background-image:url(blocks/block_23.png)}
+.block_24{background-image:url(blocks/block_24.png)}
+.block_25{background-image:url(blocks/block_25.png)}
+.block_26{background-image:url(blocks/block_26.png)}
+.block_27{background-image:url(blocks/block_27.png)}
+.block_31{background-image:url(blocks/block_31.png)}
+.block_32{background-image:url(blocks/block_32.png)}
+.block_33{background-image:url(blocks/block_33.png)}
+.block_34{background-image:url(blocks/block_34.png)}
+.block_35{background-image:url(blocks/block_35.png)}
+.block_36{background-image:url(blocks/block_36.png)}
+.block_37{background-image:url(blocks/block_37.png)}
+.block_41{background-image:url(blocks/block_41.png)}
+.block_42{background-image:url(blocks/block_42.png)}
+.block_43{background-image:url(blocks/block_43.png)}
+.block_44{background-image:url(blocks/block_44.png)}
+.block_45{background-image:url(blocks/block_45.png)}
+.block_46{background-image:url(blocks/block_46.png)}
+.block_47{background-image:url(blocks/block_47.png)}
+.block_51{background-image:url(blocks/block_51.png)}
+.block_52{background-image:url(blocks/block_52.png)}
+.block_53{background-image:url(blocks/block_53.png)}
+.block_54{background-image:url(blocks/block_54.png)}
+.block_55{background-image:url(blocks/block_55.png)}
+.block_56{background-image:url(blocks/block_56.png)}
+.block_57{background-image:url(blocks/block_57.png)}
+.block_61{background-image:url(blocks/block_61.png)}
+.block_62{background-image:url(blocks/block_62.png)}
+.block_63{background-image:url(blocks/block_63.png)}
+.block_64{background-image:url(blocks/block_64.png)}
+.block_65{background-image:url(blocks/block_65.png)}
+.block_66{background-image:url(blocks/block_66.png)}
+.block_67{background-image:url(blocks/block_67.png)}
+.block_71{background-image:url(blocks/block_71.png)}
+.block_72{background-image:url(blocks/block_72.png)}
+.block_73{background-image:url(blocks/block_73.png)}
+.block_74{background-image:url(blocks/block_74.png)}
+.block_75{background-image:url(blocks/block_75.png)}
+.block_76{background-image:url(blocks/block_76.png)}
+.block_77{background-image:url(blocks/block_77.png)}
+.block_81{background-image:url(blocks/block_81.png)}
+.block_82{background-image:url(blocks/block_82.png)}
+.block_83{background-image:url(blocks/block_83.png)}
+.block_84{background-image:url(blocks/block_84.png)}
+.block_85{background-image:url(blocks/block_85.png)}
+.block_86{background-image:url(blocks/block_86.png)}
+.block_87{background-image:url(blocks/block_87.png)}
+.block_91{background-image:url(blocks/block_91.png)}
+.block_92{background-image:url(blocks/block_92.png)}
+.block_93{background-image:url(blocks/block_93.png)}
+.block_94{background-image:url(blocks/block_94.png)}
+.block_95{background-image:url(blocks/block_95.png)}
+.block_96{background-image:url(blocks/block_96.png)}
+.block_97{background-image:url(blocks/block_97.png)}
</style>
<body>
<h1>
diff --git a/play.css b/play.css
index 175a87e..1d12a87 100644
--- a/play.css
+++ b/play.css
@@ -41,28 +41,36 @@ body.Saracens header.your_turn { background-color: lightgreen; }
width: 225px;
height: 350px;
border-radius: 15px;
+ box-shadow: 1px 1px 5px rgba(0,0,0,0.5);
+ transition: 100ms;
+ display: none;
+}
+
+.card.show {
+ display: block;
}
.card.enabled:hover {
transform: scale(1.1);
}
-.small_card.prior {
+.role_info .card.prior {
filter: grayscale(100%) contrast(70%) brightness(120%);
}
.role_info { padding: 15px; }
-.small_card { width: 90px; height: 140px; border-radius: 5px; }
-.small_card:hover { width: 180px; height: 280px; border-radius: 10px; }
+.role_info .card { margin: 0 auto; }
+.role_info .card { width: 90px; height: 140px; border-radius: 5px; }
+.role_info .card:hover { width: 180px; height: 280px; border-radius: 10px; }
@media (max-height: 800px) {
.role_info { padding: 15px 0 0 0; }
- .small_card { width: 180px; height: 80px; border-radius: 10px 10px 0 0; }
- .small_card:hover { width: 180px; height: 280px; border-radius: 10px; margin-bottom: 15px; }
+ .role_info .card { width: 180px; height: 80px; border-radius: 10px 10px 0 0; }
+ .role_info .card:hover { width: 180px; height: 280px; border-radius: 10px; margin-bottom: 15px; }
}
@media (min-height: 1200px) {
- .small_card { width: 180px; height: 280px; border-radius: 10px; }
+ .role_info .card { width: 180px; height: 280px; border-radius: 10px; }
}
/* MAP */
diff --git a/play.html b/play.html
index 56e7c31..13ad305 100644
--- a/play.html
+++ b/play.html
@@ -61,7 +61,7 @@
<div class="role_vp" id="frank_vp">VP</div>
<div class="role_user">-</div>
</div>
- <div class="role_info"><div class="small_card card_back" id="frank_card"></div></div>
+ <div class="role_info"><div class="show card card_back" id="frank_card"></div></div>
</div>
<div class="role two">
<div class="role_name">
@@ -69,7 +69,7 @@
<div class="role_vp" id="saracen_vp">VP</div>
<div class="role_user">-</div>
</div>
- <div class="role_info"><div class="small_card card_back" id="saracen_card"></div></div>
+ <div class="role_info"><div class="show card card_back" id="saracen_card"></div></div>
</div>
<div id="turn_info">-</div>
</div>
diff --git a/play.js b/play.js
index 70a7f19..9de5a81 100644
--- a/play.js
+++ b/play.js
@@ -589,11 +589,11 @@ function update_map() {
function update_card_display(element, card, prior_card) {
if (!card && !prior_card) {
- element.className = "small_card card_back";
+ element.className = "show card card_back";
} else if (prior_card) {
- element.className = "small_card prior " + CARDS[prior_card].image;
+ element.className = "show card prior " + CARDS[prior_card].image;
} else {
- element.className = "small_card " + CARDS[card].image;
+ element.className = "show card " + CARDS[card].image;
}
}
@@ -759,17 +759,17 @@ function start_flash() {
}
function on_update() {
- action_button("eliminate_button", "Eliminate");
- action_button("winter_campaign_button", "Winter campaign");
- action_button("sea_move_button", "Sea move");
- action_button("end_sea_move_button", "End sea move");
- action_button("group_move_button", "Group move");
- action_button("end_group_move_button", "End group move");
- action_button("muster_button", "Muster");
- action_button("end_muster_button", "End muster");
- action_button("end_retreat_button", "End retreat");
- action_button("end_regroup_button", "End regroup");
- action_button("end_move_phase_button", "End move phase");
+ action_button("eliminate", "Eliminate");
+ action_button("winter_campaign", "Winter campaign");
+ action_button("sea_move", "Sea move");
+ action_button("end_sea_move", "End sea move");
+ action_button("group_move", "Group move");
+ action_button("end_group_move", "End group move");
+ action_button("muster", "Muster");
+ action_button("end_muster", "End muster");
+ action_button("end_retreat", "End retreat");
+ action_button("end_regroup", "End regroup");
+ action_button("end_move_phase", "End move phase");
action_button("pass", "Pass");
action_button("next", "Next");
action_button("undo", "Undo");
diff --git a/title.sql b/title.sql
new file mode 100644
index 0000000..75b6da7
--- /dev/null
+++ b/title.sql
@@ -0,0 +1,3 @@
+insert or ignore into titles ( title_id, title_name, bgg ) values ( 'crusader-rex', 'Crusader Rex', 8481 );
+insert or ignore into roles values ( 'crusader-rex', 'Franks' );
+insert or ignore into roles values ( 'crusader-rex', 'Saracens' );