diff --git a/main.html b/main.html
index ce08582..55349fe 100644
--- a/main.html
+++ b/main.html
@@ -1,207 +1,207 @@
-
-
-
-
-
-
-
-Progress Quest
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
Progress Quest
-

-
-
-
-
-
-
-
-
-
-
-
Character Sheet
-
-
-
-
- | Trait |
- Value |
-
-
-
-
- | Name |
- |
-
-
- | Race |
- |
-
-
- | Class |
- |
-
-
- | Level |
- 1 |
-
-
-
-
-
- | Stat |
- Value |
-
-
-
- | STR | |
- | CON | |
- | DEX | |
- | INT | |
- | WIS | |
- | CHA | |
- | HP Max | |
- | MP Max | |
-
-
-
-
Experience
-
-
-
-
Spell Book
-
-
-
-
-
Equipment
-
-
-
- | Weapon | |
- | Shield | |
- | Helm | |
- | Hauberk | |
- | Brassairts | |
- | Vambraces | |
- | Gauntlets | |
- | Gambeson | |
- | Cuisses | |
- | Greaves | |
- | Sollerets | |
-
-
-
-
Inventory
-
-
-
Encumbrance
-
-
-
-
-
-
-
Plot Development
-
-
-
-
-
Quests
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Progress Quest
-
-
An error has occurred.
-
Error:
-
-
In at :
-
-
Press any key to continue...
-
-
-
-
PAUSED
-
-
-
-
-
+
+
+
+
+
+
+
+Progress Quest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
Progress Quest
+

+
+
+
+
+
+
+
+
+
+
+
Character Sheet
+
+
+
+
+ | Trait |
+ Value |
+
+
+
+
+ | Name |
+ |
+
+
+ | Race |
+ |
+
+
+ | Class |
+ |
+
+
+ | Level |
+ 1 |
+
+
+
+
+
+ | Stat |
+ Value |
+
+
+
+ | STR | |
+ | CON | |
+ | DEX | |
+ | INT | |
+ | WIS | |
+ | CHA | |
+ | HP Max | |
+ | MP Max | |
+
+
+
+
Experience
+
+
+
+
Spell Book
+
+
+
+
+
Equipment
+
+
+
+ | Weapon | |
+ | Shield | |
+ | Helm | |
+ | Hauberk | |
+ | Brassairts | |
+ | Vambraces | |
+ | Gauntlets | |
+ | Gambeson | |
+ | Cuisses | |
+ | Greaves | |
+ | Sollerets | |
+
+
+
+
Inventory
+
+
+
Encumbrance
+
+
+
+
+
+
+
Plot Development
+
+
+
+
+
Quests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Progress Quest
+
+
An error has occurred.
+
Error:
+
+
In at :
+
+
Press any key to continue...
+
+
+
+
PAUSED
+
+
+
+
+
diff --git a/newguy.js b/newguy.js
index 39647f4..2193585 100644
--- a/newguy.js
+++ b/newguy.js
@@ -1,209 +1,209 @@
-/* copyright (c)2002-2010 Eric Fredricksen all rights reserved */
-
-
-function Roll(stat) {
- stats[stat] = 3 + Random(6) + Random(6) + Random(6);
- if (document)
- $("#"+stat).text(stats[stat]);
- return stats[stat];
-}
-
-function Choose(n, k) {
- var result = n;
- var d = 1;
- for (var i = 2; i <= k; ++i) {
- result *= (1+n-i);
- d = d * i;
- }
- return result / d;
-}
-
-var stats = {};
-var traits = {};
-var total = 0;
-var seedHistory = [];
-
-function RollEm() {
- stats.seed = randseed();
- total = 0;
- var best = -1;
- $.each(K.PrimeStats, function () {
- total += Roll(this);
- if (best < stats[this]) {
- best = stats[this];
- stats.best = this;
- }
- });
- stats['HP Max'] = Random(8) + stats.CON.div(6);
- stats['MP Max'] = Random(8) + stats.INT.div(6);
-
- var color =
- (total >= (63+18)) ? 'red' :
- (total > (4 * 18)) ? 'yellow' :
- (total <= (63-18)) ? 'grey' :
- (total < (3 * 18)) ? 'silver' :
- 'white';
-
- if (document) {
- var Total = $("#Total");
- Total.text(total);
- Total.css("background-color", color);
-
- $("#Unroll").attr("disabled", !seedHistory.length);
- }
-}
-
-function RerollClick() {
- seedHistory.push(stats.seed);
- RollEm();
-}
-
-
-function UnrollClick() {
- randseed(seedHistory.pop());
- RollEm();
-}
-
-function fill(e, a, n) {
- var def = Random(a.length);
- for (var i = 0; i < a.length; ++i) {
- var v = a[i].split("|")[0];
- var check = (def == i) ? " checked " : " ";
- if (def == i) traits[n] = v;
- if (document) {
- $("").appendTo(e);
- }
- }
-}
-
-function NewGuyFormLoad() {
- seed = new Alea();
- RollEm();
- GenClick();
-
- fill("#races", K.Races, "Race");
- fill("#classes", K.Klasses, "Class");
-
- if (document) {
- $("#Reroll").click(RerollClick);
- $("#Unroll").click(UnrollClick);
- $("#RandomName").click(GenClick);
- $('#Sold').click(sold);
- $('#quit').click(cancel);
-
- //var caption = 'Progress Quest - New Character';
- //if (MainForm.GetHostName != '')
- // caption = caption + ' [' + MainForm.GetHostName + ']';
-
- $("#Name").focus();
- $("#Name").select();
- }
-
- if (window.location.href.indexOf("?sold") > 0)
- sold(); // TODO: cheesy
-}
-
-
-if (document)
- $(document).ready(NewGuyFormLoad);
-
-
-function sold() {
- var newguy = {
- Traits: traits,
- dna: stats.seed,
- seed: stats.seed,
- birthday: ''+new Date(),
- birthstamp: +new Date(),
- Stats: stats,
- beststat: stats.best + " " + stats[stats.best],
- task: "",
- tasks: 0,
- elapsed: 0,
- bestequip: "Sharp Rock",
- Equips: {},
- Inventory: [['Gold', 0]],
- Spells: [],
- act: 0,
- bestplot: "Prologue",
- Quests: [],
- questmonster: "",
- kill: "Loading....",
- ExpBar: { position: 0, max: LevelUpTime(1) },
- EncumBar: { position: 0, max: stats.STR + 10 },
- PlotBar: { position: 0, max: 26 },
- QuestBar: { position: 0, max: 1 },
- TaskBar: { position: 0, max: 2000 },
- queue: [
- 'task|10|Experiencing an enigmatic and foreboding night vision',
- "task|6|Much is revealed about that wise old bastard you'd underestimated",
- 'task|6|A shocking series of events leaves you alone and bewildered, but resolute',
- 'task|4|Drawing upon an unrealized reserve of determination, you set out on a long and dangerous journey',
- 'plot|2|Loading'
- ]
- };
-
- if (document) {
- newguy.Traits.Name = $("#Name").val();
- newguy.Traits.Race = $("input:radio[name=Race]:checked").val();
- newguy.Traits.Class = $("input:radio[name=Class]:checked").val();
- }
- newguy.Traits.Level = 1;
-
- newguy.date = newguy.birthday;
- newguy.stamp = newguy.birthstamp;
-
- $.each(K.Equips, function (i,equip) { newguy.Equips[equip] = ''; });
- newguy.Equips.Weapon = newguy.bestequip;
- newguy.Equips.Hauberk = "-3 Burlap";
-
-
- if ($("#multiplayer:checked").length > 0) {
- newguy.online = {
- realm: "Alpaquil",
- host: "http://progressquest.com/alpaquil.php?",
- // host: "http://localhost:9001/alpaquil.php?",
- }
-
- $("#sold").prop("disabled", true);
- $("body").css("cursor", "progress");
-
- let url = newguy.online.host;
- url += 'cmd=create' +
- '&name=' + UrlEncode(newguy.Traits.Name) +
- '&realm=' + UrlEncode(newguy.online.realm) +
- RevString;
- $.ajax(url)
- .done(body => {
- if (body.split('|')[0].toLowerCase() == 'ok') {
- newguy.online.passkey = parseInt(body.split('|')[1]);
- charIsBorn(newguy);
- } else {
- $("#sold").prop("disabled", false);
- $("body").css("cursor", "default");
- alert(body);
- }
- });
- } else {
- charIsBorn(newguy);
- }
-}
-
-
-function charIsBorn(newguy) {
- storage.addToRoster(newguy, function () {
- window.location.href = "main.html#" + escape(newguy.Traits.Name);
- });
-}
-
-function cancel() {
- window.location.href = "roster.html";
-}
-
-function GenClick() {
- traits.Name = GenerateName();
- if (document)
- $("#Name").attr("value", traits.Name);
-}
-
+/* copyright (c)2002-2010 Eric Fredricksen all rights reserved */
+
+
+function Roll(stat) {
+ stats[stat] = 3 + Random(6) + Random(6) + Random(6);
+ if (document)
+ $("#"+stat).text(stats[stat]);
+ return stats[stat];
+}
+
+function Choose(n, k) {
+ var result = n;
+ var d = 1;
+ for (var i = 2; i <= k; ++i) {
+ result *= (1+n-i);
+ d = d * i;
+ }
+ return result / d;
+}
+
+var stats = {};
+var traits = {};
+var total = 0;
+var seedHistory = [];
+
+function RollEm() {
+ stats.seed = randseed();
+ total = 0;
+ var best = -1;
+ $.each(K.PrimeStats, function () {
+ total += Roll(this);
+ if (best < stats[this]) {
+ best = stats[this];
+ stats.best = this;
+ }
+ });
+ stats['HP Max'] = Random(8) + stats.CON.div(6);
+ stats['MP Max'] = Random(8) + stats.INT.div(6);
+
+ var color =
+ (total >= (63+18)) ? 'red' :
+ (total > (4 * 18)) ? 'yellow' :
+ (total <= (63-18)) ? 'grey' :
+ (total < (3 * 18)) ? 'silver' :
+ 'white';
+
+ if (document) {
+ var Total = $("#Total");
+ Total.text(total);
+ Total.css("background-color", color);
+
+ $("#Unroll").attr("disabled", !seedHistory.length);
+ }
+}
+
+function RerollClick() {
+ seedHistory.push(stats.seed);
+ RollEm();
+}
+
+
+function UnrollClick() {
+ randseed(seedHistory.pop());
+ RollEm();
+}
+
+function fill(e, a, n) {
+ var def = Random(a.length);
+ for (var i = 0; i < a.length; ++i) {
+ var v = a[i].split("|")[0];
+ var check = (def == i) ? " checked " : " ";
+ if (def == i) traits[n] = v;
+ if (document) {
+ $("").appendTo(e);
+ }
+ }
+}
+
+function NewGuyFormLoad() {
+ seed = new Alea();
+ RollEm();
+ GenClick();
+
+ fill("#races", K.Races, "Race");
+ fill("#classes", K.Klasses, "Class");
+
+ if (document) {
+ $("#Reroll").click(RerollClick);
+ $("#Unroll").click(UnrollClick);
+ $("#RandomName").click(GenClick);
+ $('#Sold').click(sold);
+ $('#quit').click(cancel);
+
+ //var caption = 'Progress Quest - New Character';
+ //if (MainForm.GetHostName != '')
+ // caption = caption + ' [' + MainForm.GetHostName + ']';
+
+ $("#Name").focus();
+ $("#Name").select();
+ }
+
+ if (window.location.href.indexOf("?sold") > 0)
+ sold(); // TODO: cheesy
+}
+
+
+if (document)
+ $(document).ready(NewGuyFormLoad);
+
+
+function sold() {
+ var newguy = {
+ Traits: traits,
+ dna: stats.seed,
+ seed: stats.seed,
+ birthday: ''+new Date(),
+ birthstamp: +new Date(),
+ Stats: stats,
+ beststat: stats.best + " " + stats[stats.best],
+ task: "",
+ tasks: 0,
+ elapsed: 0,
+ bestequip: "Sharp Rock",
+ Equips: {},
+ Inventory: [['Gold', 0]],
+ Spells: [],
+ act: 0,
+ bestplot: "Prologue",
+ Quests: [],
+ questmonster: "",
+ kill: "Loading....",
+ ExpBar: { position: 0, max: LevelUpTime(1) },
+ EncumBar: { position: 0, max: stats.STR + 10 },
+ PlotBar: { position: 0, max: 26 },
+ QuestBar: { position: 0, max: 1 },
+ TaskBar: { position: 0, max: 2000 },
+ queue: [
+ 'task|10|Experiencing an enigmatic and foreboding night vision',
+ "task|6|Much is revealed about that wise old bastard you'd underestimated",
+ 'task|6|A shocking series of events leaves you alone and bewildered, but resolute',
+ 'task|4|Drawing upon an unrealized reserve of determination, you set out on a long and dangerous journey',
+ 'plot|2|Loading'
+ ]
+ };
+
+ if (document) {
+ newguy.Traits.Name = $("#Name").val();
+ newguy.Traits.Race = $("input:radio[name=Race]:checked").val();
+ newguy.Traits.Class = $("input:radio[name=Class]:checked").val();
+ }
+ newguy.Traits.Level = 1;
+
+ newguy.date = newguy.birthday;
+ newguy.stamp = newguy.birthstamp;
+
+ $.each(K.Equips, function (i,equip) { newguy.Equips[equip] = ''; });
+ newguy.Equips.Weapon = newguy.bestequip;
+ newguy.Equips.Hauberk = "-3 Burlap";
+
+
+ if ($("#multiplayer:checked").length > 0) {
+ newguy.online = {
+ realm: "Alpaquil",
+ host: "http://progressquest.com/alpaquil.php?",
+ // host: "http://localhost:9001/alpaquil.php?",
+ }
+
+ $("#sold").prop("disabled", true);
+ $("body").css("cursor", "progress");
+
+ let url = newguy.online.host;
+ url += 'cmd=create' +
+ '&name=' + UrlEncode(newguy.Traits.Name) +
+ '&realm=' + UrlEncode(newguy.online.realm) +
+ RevString;
+ $.ajax(url)
+ .done(body => {
+ if (body.split('|')[0].toLowerCase() == 'ok') {
+ newguy.online.passkey = parseInt(body.split('|')[1]);
+ charIsBorn(newguy);
+ } else {
+ $("#sold").prop("disabled", false);
+ $("body").css("cursor", "default");
+ alert(body);
+ }
+ });
+ } else {
+ charIsBorn(newguy);
+ }
+}
+
+
+function charIsBorn(newguy) {
+ storage.addToRoster(newguy, function () {
+ window.location.href = "main.html#" + escape(newguy.Traits.Name);
+ });
+}
+
+function cancel() {
+ window.location.href = "roster.html";
+}
+
+function GenClick() {
+ traits.Name = GenerateName();
+ if (document)
+ $("#Name").attr("value", traits.Name);
+}
+
diff --git a/progros.css b/progros.css
index 1ff6911..6075e82 100644
--- a/progros.css
+++ b/progros.css
@@ -1,133 +1,133 @@
-/* RESET (via Boilerplate via Eric Meyer) */
-
-html, body, div, span, applet, object, iframe, h1, h2, h3, h4,
-h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite,
-code, del, dfn, em, font, img, ins, kbd, q, s, samp, small,
-strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd,
-ol, ul, li, fieldset, form, label, legend, table, caption, tbody,
-tfoot, thead, tr, th, td {
- margin: 0;
- padding: 0;
- border: 0;
- outline: 0;
- font-size: 100%;
- vertical-align: baseline;
- background: transparent;
-}
-body { line-height: 1; }
-ol, ul { list-style: none; }
-blockquote, q { quotes: none; }
-blockquote:before, blockquote:after, q:before, q:after {
- content: ''; content: none;
-}
-:focus { outline: 0; }
-ins { text-decoration: none; }
-del { text-decoration: line-through; }
-table { border-collapse: collapse; border-spacing: 0; }
-
-/* XULish */
-
-.hbox > * {
- vertical-align: middle;
-}
-
-.vbox > * {
- display: block;
-}
-
-
-.hbox > *, .horizontal > *, td > * {
- display: inline-block;
-}
-
-
-.vbox {
- vertical-align: top;
-}
-
-td, th, .label, tr input, #titlebar, div {
- font-family: Tahoma, Helvetica, sans-serif;
- font-size: 8pt;
-}
-
-td, th {
- padding-left: 1ex;
-}
-
-th {
- border-bottom: solid 1px grey;
- text-align: left;
- font-weight: normal;
-}
-
-th:first-child {
- border-right: solid 1px grey;
-}
-
-
-#titlebar {
- background-color: #008;
- color: white;
- font-weight: bold;
- font-size: 9pt;
- padding-bottom: 4px;
- margin-bottom: 1ex;
-}
-
-#titlebar > img {
- vertical-align: bottom;
- margin: 2px 0 0 2px;
-}
-
-#quit {
- float: right;
- background: url(closedown.png);
- text-decoration: none;
- margin: 2px 2px 0 0;
- width: 16px;
- padding: 0;
-}
-
-#quit:active img {
- opacity: 0;
-}
-
-.window {
- background-color: #e7e7e7;
- border: outset 2px silver;
- padding: 2px;
- text-align: left;
- display: inline-block;
-}
-
-
-body {
- background: url(back.jpg) no-repeat;
- background-size: 100% 100%;
- -webkit-background-size: 100% 100%;
- -o-background-size: 100% 100%;
- -moz-background-size: 100% 100%;
- background-attachment: fixed;
- text-align: center;
- margin-top: 1em;
-}
-
-body.bare {
- background: silver;
-}
-
-div.scroll {
- overflow: scroll;
- height: 100px;
- width: 250px;
- overflow-x: hidden;
-}
-
-div.scroll > table {
- width: 234px;
-}
-
-.selected {
- background-color: yellow;
-}
-
+/* RESET (via Boilerplate via Eric Meyer) */
+
+html, body, div, span, applet, object, iframe, h1, h2, h3, h4,
+h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite,
+code, del, dfn, em, font, img, ins, kbd, q, s, samp, small,
+strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd,
+ol, ul, li, fieldset, form, label, legend, table, caption, tbody,
+tfoot, thead, tr, th, td {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: 0;
+ font-size: 100%;
+ vertical-align: baseline;
+ background: transparent;
+}
+body { line-height: 1; }
+ol, ul { list-style: none; }
+blockquote, q { quotes: none; }
+blockquote:before, blockquote:after, q:before, q:after {
+ content: ''; content: none;
+}
+:focus { outline: 0; }
+ins { text-decoration: none; }
+del { text-decoration: line-through; }
+table { border-collapse: collapse; border-spacing: 0; }
+
+/* XULish */
+
+.hbox > * {
+ vertical-align: middle;
+}
+
+.vbox > * {
+ display: block;
+}
+
+
+.hbox > *, .horizontal > *, td > * {
+ display: inline-block;
+}
+
+
+.vbox {
+ vertical-align: top;
+}
+
+td, th, .label, tr input, #titlebar, div {
+ font-family: Tahoma, Helvetica, sans-serif;
+ font-size: 8pt;
+}
+
+td, th {
+ padding-left: 1ex;
+}
+
+th {
+ border-bottom: solid 1px grey;
+ text-align: left;
+ font-weight: normal;
+}
+
+th:first-child {
+ border-right: solid 1px grey;
+}
+
+
+#titlebar {
+ background-color: #008;
+ color: white;
+ font-weight: bold;
+ font-size: 9pt;
+ padding-bottom: 4px;
+ margin-bottom: 1ex;
+}
+
+#titlebar > img {
+ vertical-align: bottom;
+ margin: 2px 0 0 2px;
+}
+
+#quit {
+ float: right;
+ background: url(closedown.png);
+ text-decoration: none;
+ margin: 2px 2px 0 0;
+ width: 16px;
+ padding: 0;
+}
+
+#quit:active img {
+ opacity: 0;
+}
+
+.window {
+ background-color: #e7e7e7;
+ border: outset 2px silver;
+ padding: 2px;
+ text-align: left;
+ display: inline-block;
+}
+
+
+body {
+ background: url(back.jpg) no-repeat;
+ background-size: 100% 100%;
+ -webkit-background-size: 100% 100%;
+ -o-background-size: 100% 100%;
+ -moz-background-size: 100% 100%;
+ background-attachment: fixed;
+ text-align: center;
+ margin-top: 1em;
+}
+
+body.bare {
+ background: silver;
+}
+
+div.scroll {
+ overflow: scroll;
+ height: 100px;
+ width: 250px;
+ overflow-x: hidden;
+}
+
+div.scroll > table {
+ width: 234px;
+}
+
+.selected {
+ background-color: yellow;
+}
+