mirror of
https://bitbucket.org/grumdrig/pq-web.git
synced 2026-09-29 16:54:04 -06:00
Go through proper channels with test button
This commit is contained in:
@@ -171,6 +171,8 @@ function addToRoster(newguy) {
|
|||||||
|
|
||||||
var K = {};
|
var K = {};
|
||||||
|
|
||||||
|
K.Stats = ["STR","CON","DEX","INT","WIS","CHA"];
|
||||||
|
|
||||||
K.Spells = [
|
K.Spells = [
|
||||||
"Slime Finger",
|
"Slime Finger",
|
||||||
"Rabbit Punch",
|
"Rabbit Punch",
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
// 1: pq 6.0, some early release I guess;)n't remember
|
// 1: pq 6.0, some early release I guess;)n't remember
|
||||||
var RevString = '&rev=6';
|
var RevString = '&rev=6';
|
||||||
|
|
||||||
var game = {}; // queue: [] };
|
var game = {};
|
||||||
var lasttick, timerid;
|
var lasttick, timerid;
|
||||||
|
|
||||||
function timeGetTime() {
|
function timeGetTime() {
|
||||||
@@ -521,18 +521,14 @@ var AllBars, AllLists;
|
|||||||
|
|
||||||
function InitializeCharacter(sheet) {
|
function InitializeCharacter(sheet) {
|
||||||
game = sheet;
|
game = sheet;
|
||||||
|
randseed(game.seed);
|
||||||
|
|
||||||
Put(Traits, 'Name', sheet.name);
|
Put(Traits, 'Name', sheet.name);
|
||||||
Put(Traits, 'Level', 1);
|
Put(Traits, 'Level', 1);
|
||||||
Put(Traits, 'Race', sheet.race);
|
Put(Traits, 'Race', sheet.race);
|
||||||
Put(Traits, 'Class', sheet['class']);
|
Put(Traits, 'Class', sheet['class']);
|
||||||
|
|
||||||
Put(Stats, 'STR', sheet.STR);
|
$.each(K.Stats, function (i,stat) { Put(Stats, stat, sheet[stat]); });
|
||||||
Put(Stats, 'CON', sheet.CON);
|
|
||||||
Put(Stats, 'DEX', sheet.DEX);
|
|
||||||
Put(Stats, 'INT', sheet.INT);
|
|
||||||
Put(Stats, 'WIS', sheet.WIS);
|
|
||||||
Put(Stats, 'CHA', sheet.CHA);
|
|
||||||
Put(Stats, 'HP Max', Random(8) + sheet.CON.div(6));
|
Put(Stats, 'HP Max', Random(8) + sheet.CON.div(6));
|
||||||
Put(Stats, 'MP Max', Random(8) + sheet.INT.div(6));
|
Put(Stats, 'MP Max', Random(8) + sheet.INT.div(6));
|
||||||
|
|
||||||
@@ -990,6 +986,9 @@ function LoadCharacter() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$("#titlebar span").text("Progress Quest - " + GameSaveName());
|
$("#titlebar span").text("Progress Quest - " + GameSaveName());
|
||||||
|
|
||||||
|
if (window.location.href.indexOf("?quit#") > 0)
|
||||||
|
$("#quit").click(); // TODO: cheesy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,9 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
seed = new Alea();
|
seed = new Alea();
|
||||||
RollEm();
|
RollEm();
|
||||||
|
|
||||||
|
if (window.location.href.indexOf("?sold") > 0)
|
||||||
|
sold(); // TODO: cheesy
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -147,11 +150,15 @@ function sold() {
|
|||||||
birthday: ''+new Date(),
|
birthday: ''+new Date(),
|
||||||
birthstamp: +new Date()
|
birthstamp: +new Date()
|
||||||
};
|
};
|
||||||
$.each('STR,CON,DEX,INT,WIS,CHA'.split(','), function (index,value) {
|
$.each(K.Stats, function (index,value) {
|
||||||
newguy[value] = stats[value];
|
newguy[value] = stats[value];
|
||||||
});
|
});
|
||||||
addToRoster(newguy);
|
addToRoster(newguy);
|
||||||
window.location = "main.html#" + newguy.name;
|
|
||||||
|
// TODO: cheesy
|
||||||
|
var args = (window.location.href.indexOf("?sold") > 0) ? "?quit" : "";
|
||||||
|
|
||||||
|
window.location = "main.html" + args + "#" + newguy.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancel() {
|
function cancel() {
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ body {
|
|||||||
margin-right: 10%;
|
margin-right: 10%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
#roll {
|
|
||||||
}
|
|
||||||
#newc {
|
#newc {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,15 +47,7 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#test").click(function () {
|
$("#test").click(function () {
|
||||||
var n = GenerateName();
|
window.location = "newguy.html?sold";
|
||||||
games[n] = {Traits: {Level: -10,Name:n,Race:GenerateName(),
|
|
||||||
Class:GenerateName()},
|
|
||||||
Stats: {best: "STR 99"},
|
|
||||||
Plots: {last: "Act VII"},
|
|
||||||
Spells: {best: "Bad Schwarma XIV"},
|
|
||||||
Equips: {best: "Cottonwood Sollerets"}};
|
|
||||||
storeRoster(games);
|
|
||||||
load();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function brag(sheet) {
|
function brag(sheet) {
|
||||||
|
|||||||
Reference in New Issue
Block a user