Newguy produces a full-fledged char now. Is possible to go st back to roster after creating.

This commit is contained in:
Eric Fredricksen
2010-07-12 19:46:28 -07:00
parent 8cd1b0a173
commit f2b4138e1c
3 changed files with 18 additions and 6 deletions
+10 -1
View File
@@ -23,7 +23,14 @@ function RollEm() {
var Total = $("#Total"); var Total = $("#Total");
stats.seed = randseed(); stats.seed = randseed();
stats.total = 0; stats.total = 0;
$.each(K.PrimeStats, function () { stats.total += Roll(this); }); var best = -1;
$.each(K.PrimeStats, function () {
stats.total += Roll(this);
if (best < stats[this]) {
best = stats[this];
stats.best = this;
}
});
stats['HP Max'] = Random(8) + stats.CON.div(6); stats['HP Max'] = Random(8) + stats.CON.div(6);
stats['MP Max'] = Random(8) + stats.INT.div(6); stats['MP Max'] = Random(8) + stats.INT.div(6);
Total.text(stats.total); Total.text(stats.total);
@@ -150,6 +157,7 @@ function sold() {
birthday: ''+new Date(), birthday: ''+new Date(),
birthstamp: +new Date(), birthstamp: +new Date(),
Stats: stats, Stats: stats,
beststat: stats.best + " " + stats[stats.best],
task: "", task: "",
tasks: 0, tasks: 0,
elapsed: 0, elapsed: 0,
@@ -158,6 +166,7 @@ function sold() {
Inventory: [['Gold', 0]], Inventory: [['Gold', 0]],
Spells: [], Spells: [],
act: 0, act: 0,
bestplot: "Prologue",
Quests: [], Quests: [],
questmonster: "", questmonster: "",
kill: "Loading....", kill: "Loading....",
+3
View File
@@ -15,6 +15,9 @@
margin: 5px; margin: 5px;
border: solid 2px #ccccee; border: solid 2px #ccccee;
} }
.lit {
border: solid 2px #66ccee;
}
.brag td { .brag td {
font-size: 9pt; font-size: 9pt;
font-family: Tahoma, Helvetica, sans-serif; font-family: Tahoma, Helvetica, sans-serif;
+5 -5
View File
@@ -8,14 +8,11 @@ function load() {
roster.html("<b>Hrumph:</b> This browser does not support local storage. You can still play fast and loose: your character will live only as long as the game stays running in your browser."); roster.html("<b>Hrumph:</b> This browser does not support local storage. You can still play fast and loose: your character will live only as long as the game stays running in your browser.");
return; return;
} }
var newone = window.location.href.split('#')[1];
games = loadRoster(); games = loadRoster();
$.each(games, function (key, c) { $.each(games, function (key, c) {
if (!c.Traits) {
delete games[key];
return;
}
var name = c.Traits.Name; var name = c.Traits.Name;
var br = brag(c); var br = brag(c);
@@ -36,6 +33,9 @@ function load() {
// TODO: put in a window or whatev // TODO: put in a window or whatev
}); });
if (name === newone)
br.addClass("lit");
/* /*
var p = $("<p style='font:6pt verdana'/>"); var p = $("<p style='font:6pt verdana'/>");
p.appendTo(roster); p.appendTo(roster);