mirror of
https://bitbucket.org/grumdrig/pq-web.git
synced 2026-09-29 00:34:00 -06:00
Pass lint
This commit is contained in:
@@ -35,7 +35,7 @@ function Alea() {
|
||||
var s2 = 0;
|
||||
var c = 1;
|
||||
|
||||
if (args.length == 0) {
|
||||
if (!args.length) {
|
||||
args = [+new Date];
|
||||
}
|
||||
var mash = Mash();
|
||||
@@ -80,14 +80,13 @@ function Alea() {
|
||||
s1 = newstate[1];
|
||||
s2 = newstate[2];
|
||||
c = newstate[3];
|
||||
} else {
|
||||
return [s0,s1,s2,c];
|
||||
}
|
||||
return [s0,s1,s2,c];
|
||||
};
|
||||
return random;
|
||||
|
||||
} (Array.prototype.slice.call(arguments)));
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
var seed = new Alea();
|
||||
@@ -127,7 +126,7 @@ function loadRoster() {
|
||||
try {
|
||||
return JSON.parse(r);
|
||||
} catch (err) {
|
||||
return {}
|
||||
return {};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#
|
||||
#!/usr/bin/env jsl -conf
|
||||
# Configuration File for JavaScript Lint 0.3.0
|
||||
# Developed by Matthias Miller (http://www.JavaScriptLint.com)
|
||||
#
|
||||
|
||||
@@ -1173,10 +1173,11 @@ function HotOrNot() {
|
||||
// Figure out which spell is best
|
||||
var flat = 1; // Flattening constant
|
||||
var best = 0, i;
|
||||
for (i = 1; i < Spells.length(); ++i)
|
||||
for (i = 1; i < Spells.length(); ++i) {
|
||||
if ((i+flat) * toArabic(Get(Spells,i)) >
|
||||
(best+flat) * toArabic(Get(Spells,best)))
|
||||
best = i;
|
||||
}
|
||||
game.Spells.best = Spells.label(best) + ' ' + Get(Spells, best);
|
||||
|
||||
/// And which stat is best?
|
||||
|
||||
@@ -142,7 +142,7 @@ function sold() {
|
||||
name: $("#Name").val(),
|
||||
race: $("input:radio[name=Race]:checked").val(),
|
||||
'class': $("input:radio[name=Class]:checked").val(),
|
||||
seed: stats.seed,
|
||||
seed: stats.seed
|
||||
};
|
||||
$.each('STR,CON,DEX,INT,WIS,CHA'.split(','), function (index,value) {
|
||||
newguy[value] = stats[value];
|
||||
|
||||
@@ -6,7 +6,7 @@ $(document).ready(function () {
|
||||
var roster = $("#roster");
|
||||
roster.empty();
|
||||
|
||||
games = loadRoster()
|
||||
games = loadRoster();
|
||||
if (!games) {
|
||||
roster.text("Err...no local storage");
|
||||
return;
|
||||
@@ -16,7 +16,7 @@ $(document).ready(function () {
|
||||
|
||||
var br = brag(c);
|
||||
roster.append(br);
|
||||
br.find("a").attr("href", "main.html#" + name)
|
||||
br.find("a").attr("href", "main.html#" + name);
|
||||
|
||||
br.find("button").click(function () {
|
||||
if (confirm("Terminate " + Pick(["faithful","noble","loyal","brave"])+
|
||||
@@ -60,6 +60,7 @@ $(document).ready(function () {
|
||||
$.each(p1.split("."), function (i,v) {
|
||||
if (!dict) return true;
|
||||
dict = dict[v];
|
||||
return null;
|
||||
});
|
||||
return dict || '';
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user