IE<8 Fixes: Removed trailing commas in string literals and renamed variable char to chara

This commit is contained in:
Steve Hayes
2013-07-23 23:50:17 -04:00
parent 1b1088db4f
commit 253f946dbd
5 changed files with 67 additions and 67 deletions
+4 -4
View File
@@ -74,7 +74,7 @@ var Events = {
Events.createFighterDiv('@', World.health, World.getMaxHealth()).attr('id', 'wanderer').appendTo(desc); Events.createFighterDiv('@', World.health, World.getMaxHealth()).attr('id', 'wanderer').appendTo(desc);
// Draw the enemy // Draw the enemy
Events.createFighterDiv(scene.char, scene.health, scene.health).attr('id', 'enemy').appendTo(desc); Events.createFighterDiv(scene.chara, scene.health, scene.health).attr('id', 'enemy').appendTo(desc);
// Draw the action buttons // Draw the action buttons
var btns = $('#buttons', Events.eventPanel()); var btns = $('#buttons', Events.eventPanel());
@@ -592,8 +592,8 @@ var Events = {
} }
}, },
createFighterDiv: function(char, hp, maxhp) { createFighterDiv: function(chara, hp, maxhp) {
var fighter = $('<div>').addClass('fighter').text(char).data('hp', hp).data('maxHp', maxhp); var fighter = $('<div>').addClass('fighter').text(chara).data('hp', hp).data('maxHp', maxhp);
$('<div>').addClass('hp').text(hp+'/'+maxhp).appendTo(fighter); $('<div>').addClass('hp').text(hp+'/'+maxhp).appendTo(fighter);
return fighter; return fighter;
}, },
@@ -804,4 +804,4 @@ var Events = {
$('body').focus(); $('body').focus();
}); });
} }
}; };
+12 -12
View File
@@ -12,7 +12,7 @@ Events.Encounters = [
'start': { 'start': {
combat: true, combat: true,
enemy: 'snarling beast', enemy: 'snarling beast',
char: 'B', chara: 'B',
damage: 1, damage: 1,
hit: 0.8, hit: 0.8,
attackDelay: 1, attackDelay: 1,
@@ -47,7 +47,7 @@ Events.Encounters = [
'start': { 'start': {
combat: true, combat: true,
enemy: 'gaunt man', enemy: 'gaunt man',
char: 'G', chara: 'G',
damage: 2, damage: 2,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -82,7 +82,7 @@ Events.Encounters = [
'start': { 'start': {
combat: true, combat: true,
enemy: 'strange bird', enemy: 'strange bird',
char: 'B', chara: 'B',
damage: 3, damage: 3,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -118,7 +118,7 @@ Events.Encounters = [
'start': { 'start': {
combat: true, combat: true,
enemy: 'shivering man', enemy: 'shivering man',
char: 'S', chara: 'S',
damage: 5, damage: 5,
hit: 0.5, hit: 0.5,
attackDelay: 1, attackDelay: 1,
@@ -158,7 +158,7 @@ Events.Encounters = [
'start': { 'start': {
combat: true, combat: true,
enemy: 'man-eater', enemy: 'man-eater',
char: 'E', chara: 'E',
damage: 3, damage: 3,
hit: 0.8, hit: 0.8,
attackDelay: 1, attackDelay: 1,
@@ -193,7 +193,7 @@ Events.Encounters = [
'start': { 'start': {
combat: true, combat: true,
enemy: 'scavenger', enemy: 'scavenger',
char: 'S', chara: 'S',
damage: 4, damage: 4,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -233,7 +233,7 @@ Events.Encounters = [
'start': { 'start': {
combat: true, combat: true,
enemy: 'lizard', enemy: 'lizard',
char: 'L', chara: 'L',
damage: 5, damage: 5,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -269,7 +269,7 @@ Events.Encounters = [
'start': { 'start': {
combat: true, combat: true,
enemy: 'feral terror', enemy: 'feral terror',
char: 'F', chara: 'F',
damage: 6, damage: 6,
hit: 0.8, hit: 0.8,
attackDelay: 1, attackDelay: 1,
@@ -305,7 +305,7 @@ Events.Encounters = [
combat: true, combat: true,
enemy: 'soldier', enemy: 'soldier',
ranged: true, ranged: true,
char: 'D', chara: 'D',
damage: 8, damage: 8,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -345,7 +345,7 @@ Events.Encounters = [
'start': { 'start': {
combat: true, combat: true,
enemy: 'sniper', enemy: 'sniper',
char: 'S', chara: 'S',
damage: 15, damage: 15,
hit: 0.8, hit: 0.8,
attackDelay: 4, attackDelay: 4,
@@ -376,5 +376,5 @@ Events.Encounters = [
notification: 'a shot rings out, from somewhere in the long grass' notification: 'a shot rings out, from somewhere in the long grass'
} }
} }
}, }
]; ];
+5 -5
View File
@@ -285,7 +285,7 @@ Events.Room = [
}, },
'100wood': { '100wood': {
text: [ text: [
'the wanderer leaves, cart loaded with wood', 'the wanderer leaves, cart loaded with wood'
], ],
onLoad: function() { onLoad: function() {
if(Math.random() < 0.5) { if(Math.random() < 0.5) {
@@ -304,7 +304,7 @@ Events.Room = [
}, },
'500wood': { '500wood': {
text: [ text: [
'the wanderer leaves, cart loaded with wood', 'the wanderer leaves, cart loaded with wood'
], ],
onLoad: function() { onLoad: function() {
if(Math.random() < 0.3) { if(Math.random() < 0.3) {
@@ -355,7 +355,7 @@ Events.Room = [
}, },
'100fur': { '100fur': {
text: [ text: [
'the wanderer leaves, cart loaded with furs', 'the wanderer leaves, cart loaded with furs'
], ],
onLoad: function() { onLoad: function() {
if(Math.random() < 0.5) { if(Math.random() < 0.5) {
@@ -374,7 +374,7 @@ Events.Room = [
}, },
'500fur': { '500fur': {
text: [ text: [
'the wanderer leaves, cart loaded with furs', 'the wanderer leaves, cart loaded with furs'
], ],
onLoad: function() { onLoad: function() {
if(Math.random() < 0.3) { if(Math.random() < 0.3) {
@@ -590,4 +590,4 @@ Events.Room = [
} }
} }
} }
]; ];
+44 -44
View File
@@ -111,7 +111,7 @@ Events.Setpieces = {
'a1': { 'a1': {
combat: true, combat: true,
enemy: 'beast', enemy: 'beast',
char: 'B', chara: 'B',
damage: 1, damage: 1,
hit: 0.8, hit: 0.8,
attackDelay: 1, attackDelay: 1,
@@ -249,7 +249,7 @@ Events.Setpieces = {
'b3': { 'b3': {
combat: true, combat: true,
enemy: 'beast', enemy: 'beast',
char: 'B', chara: 'B',
damage: 1, damage: 1,
hit: 0.8, hit: 0.8,
attackDelay: 1, attackDelay: 1,
@@ -281,7 +281,7 @@ Events.Setpieces = {
'b4': { 'b4': {
combat: true, combat: true,
enemy: 'cave lizard', enemy: 'cave lizard',
char: 'L', chara: 'L',
damage: 3, damage: 3,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -313,7 +313,7 @@ Events.Setpieces = {
'c1': { 'c1': {
combat: true, combat: true,
enemy: 'beast', enemy: 'beast',
char: 'B', chara: 'B',
damage: 3, damage: 3,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -345,7 +345,7 @@ Events.Setpieces = {
'c2': { 'c2': {
combat: true, combat: true,
enemy: 'lizard', enemy: 'lizard',
char: 'L', chara: 'L',
damage: 4, damage: 4,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -541,7 +541,7 @@ Events.Setpieces = {
'a2': { 'a2': {
combat: true, combat: true,
enemy: 'thug', enemy: 'thug',
char: 'T', chara: 'T',
damage: 4, damage: 4,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -632,7 +632,7 @@ Events.Setpieces = {
'b2': { 'b2': {
combat: true, combat: true,
enemy: 'scavenger', enemy: 'scavenger',
char: 'S', chara: 'S',
damage: 4, damage: 4,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -669,7 +669,7 @@ Events.Setpieces = {
'b3': { 'b3': {
combat: true, combat: true,
enemy: 'beast', enemy: 'beast',
char: 'B', chara: 'B',
damage: 3, damage: 3,
hit: 0.8, hit: 0.8,
attackDelay: 1, attackDelay: 1,
@@ -739,7 +739,7 @@ Events.Setpieces = {
'b5': { 'b5': {
combat: true, combat: true,
enemy: 'madman', enemy: 'madman',
char: 'M', chara: 'M',
damage: 6, damage: 6,
hit: 0.3, hit: 0.3,
attackDelay: 1, attackDelay: 1,
@@ -776,7 +776,7 @@ Events.Setpieces = {
'c1': { 'c1': {
combat: true, combat: true,
enemy: 'thug', enemy: 'thug',
char: 'T', chara: 'T',
damage: 4, damage: 4,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -813,7 +813,7 @@ Events.Setpieces = {
'c2': { 'c2': {
combat: true, combat: true,
enemy: 'beast', enemy: 'beast',
char: 'B', chara: 'B',
damage: 3, damage: 3,
hit: 0.8, hit: 0.8,
attackDelay: 1, attackDelay: 1,
@@ -862,7 +862,7 @@ Events.Setpieces = {
'c4': { 'c4': {
combat: true, combat: true,
enemy: 'beast', enemy: 'beast',
char: 'B', chara: 'B',
damage: 4, damage: 4,
hit: 0.8, hit: 0.8,
attackDelay: 1, attackDelay: 1,
@@ -933,7 +933,7 @@ Events.Setpieces = {
'd1': { 'd1': {
combat: true, combat: true,
enemy: 'scavenger', enemy: 'scavenger',
char: 'S', chara: 'S',
damage: 5, damage: 5,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -970,7 +970,7 @@ Events.Setpieces = {
'd2': { 'd2': {
combat: true, combat: true,
enemy: 'vigilante', enemy: 'vigilante',
char: 'V', chara: 'V',
damage: 6, damage: 6,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -1242,7 +1242,7 @@ Events.Setpieces = {
'a3': { 'a3': {
text: [ text: [
'a large shanty town sprawls across the streets.', 'a large shanty town sprawls across the streets.',
'faces, darkened by soot and blood, stare out from crooked huts.', 'faces, darkened by soot and blood, stare out from crooked huts.'
], ],
buttons: { buttons: {
'continue': { 'continue': {
@@ -1292,7 +1292,7 @@ Events.Setpieces = {
combat: true, combat: true,
notification: 'a huge lizard scrambles up out of the darkness of an old metro station.', notification: 'a huge lizard scrambles up out of the darkness of an old metro station.',
enemy: 'lizard', enemy: 'lizard',
char: 'L', chara: 'L',
damage: 5, damage: 5,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -1329,7 +1329,7 @@ Events.Setpieces = {
notification: 'the shot echoes in the empty street.', notification: 'the shot echoes in the empty street.',
combat: true, combat: true,
enemy: 'sniper', enemy: 'sniper',
char: 'S', chara: 'S',
damage: 15, damage: 15,
hit: 0.8, hit: 0.8,
attackDelay: 4, attackDelay: 4,
@@ -1368,7 +1368,7 @@ Events.Setpieces = {
combat: true, combat: true,
enemy: 'soldier', enemy: 'soldier',
ranged: true, ranged: true,
char: 'D', chara: 'D',
damage: 8, damage: 8,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -1405,7 +1405,7 @@ Events.Setpieces = {
notification: 'a frail man stands defiantly, blocking the path.', notification: 'a frail man stands defiantly, blocking the path.',
combat: true, combat: true,
enemy: 'frail man', enemy: 'frail man',
char: 'M', chara: 'M',
damage: 1, damage: 1,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -1479,7 +1479,7 @@ Events.Setpieces = {
notification: 'an old man bursts through a door, wielding a scalpel.', notification: 'an old man bursts through a door, wielding a scalpel.',
combat: true, combat: true,
enemy: 'old man', enemy: 'old man',
char: 'M', chara: 'M',
damage: 3, damage: 3,
hit: 0.5, hit: 0.5,
attackDelay: 2, attackDelay: 2,
@@ -1516,7 +1516,7 @@ Events.Setpieces = {
notification: 'a thug is waiting on the other side of the wall.', notification: 'a thug is waiting on the other side of the wall.',
combat: true, combat: true,
enemy: 'thug', enemy: 'thug',
char: 'T', chara: 'T',
damage: 3, damage: 3,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -1554,7 +1554,7 @@ Events.Setpieces = {
notification: 'a snarling beast jumps out from behind a car.', notification: 'a snarling beast jumps out from behind a car.',
combat: true, combat: true,
enemy: 'beast', enemy: 'beast',
char: 'B', chara: 'B',
damage: 2, damage: 2,
hit: 0.8, hit: 0.8,
attackDelay: 1, attackDelay: 1,
@@ -1765,7 +1765,7 @@ Events.Setpieces = {
combat: true, combat: true,
enemy: 'squatters', enemy: 'squatters',
plural: true, plural: true,
char: 'SSS', chara: 'SSS',
damage: 2, damage: 2,
hit: 0.7, hit: 0.7,
attackDelay: 0.5, attackDelay: 0.5,
@@ -1804,7 +1804,7 @@ Events.Setpieces = {
combat: true, combat: true,
enemy: 'lizards', enemy: 'lizards',
plural: true, plural: true,
char: 'LLL', chara: 'LLL',
damage: 4, damage: 4,
hit: 0.7, hit: 0.7,
attackDelay: 0.7, attackDelay: 0.7,
@@ -1865,7 +1865,7 @@ Events.Setpieces = {
notification: 'a large bird nests at the top of the stairs.', notification: 'a large bird nests at the top of the stairs.',
combat: true, combat: true,
enemy: 'bird', enemy: 'bird',
char: 'B', chara: 'B',
damage: 5, damage: 5,
hit: 0.7, hit: 0.7,
attackDelay: 1, attackDelay: 1,
@@ -1933,7 +1933,7 @@ Events.Setpieces = {
combat: true, combat: true,
enemy: 'rats', enemy: 'rats',
plural: true, plural: true,
char: 'RRR', chara: 'RRR',
damage: 1, damage: 1,
hit: 0.8, hit: 0.8,
attackDelay: 0.25, attackDelay: 0.25,
@@ -1966,7 +1966,7 @@ Events.Setpieces = {
notification: 'a large man attacks, waving a bayonet.', notification: 'a large man attacks, waving a bayonet.',
combat: true, combat: true,
enemy: 'veteran', enemy: 'veteran',
char: 'V', chara: 'V',
damage: 3, damage: 3,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -2000,7 +2000,7 @@ Events.Setpieces = {
combat: true, combat: true,
enemy: 'soldier', enemy: 'soldier',
ranged: true, ranged: true,
char: 'D', chara: 'D',
damage: 8, damage: 8,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -2038,7 +2038,7 @@ Events.Setpieces = {
notification: 'a masked soldier rounds the corner, gun drawn', notification: 'a masked soldier rounds the corner, gun drawn',
combat: true, combat: true,
enemy: 'commando', enemy: 'commando',
char: 'C', chara: 'C',
ranged: true, ranged: true,
damage: 3, damage: 3,
hit: 0.9, hit: 0.9,
@@ -2078,7 +2078,7 @@ Events.Setpieces = {
combat: true, combat: true,
enemy: 'squatters', enemy: 'squatters',
plural: true, plural: true,
char: 'SSS', chara: 'SSS',
damage: 2, damage: 2,
hit: 0.7, hit: 0.7,
attackDelay: 0.5, attackDelay: 0.5,
@@ -2111,7 +2111,7 @@ Events.Setpieces = {
notification: 'a youth lashes out with a tree branch.', notification: 'a youth lashes out with a tree branch.',
combat: true, combat: true,
enemy: 'youth', enemy: 'youth',
char: 'Y', chara: 'Y',
damage: 2, damage: 2,
hit: 0.7, hit: 0.7,
attackDelay: 1, attackDelay: 1,
@@ -2144,7 +2144,7 @@ Events.Setpieces = {
notification: 'a squatter stands firmly in the doorway of a small hut.', notification: 'a squatter stands firmly in the doorway of a small hut.',
combat: true, combat: true,
enemy: 'squatter', enemy: 'squatter',
char: 'S', chara: 'S',
damage: 3, damage: 3,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -2177,7 +2177,7 @@ Events.Setpieces = {
notification: 'behind the door, a deformed figure awakes and attacks.', notification: 'behind the door, a deformed figure awakes and attacks.',
combat: true, combat: true,
enemy: 'deformed', enemy: 'deformed',
char: 'D', chara: 'D',
damage: 8, damage: 8,
hit: 0.6, hit: 0.6,
attackDelay: 2, attackDelay: 2,
@@ -2217,7 +2217,7 @@ Events.Setpieces = {
combat: true, combat: true,
enemy: 'tentacles', enemy: 'tentacles',
plural: true, plural: true,
char: 'TTT', chara: 'TTT',
damage: 2, damage: 2,
hit: 0.6, hit: 0.6,
attackDelay: 0.5, attackDelay: 0.5,
@@ -2817,7 +2817,7 @@ Events.Setpieces = {
nextScene: 'end' nextScene: 'end'
} }
} }
}, }
} }
}, },
"house": { /* Abandoned House */ "house": { /* Abandoned House */
@@ -2838,7 +2838,7 @@ Events.Setpieces = {
text: 'leave', text: 'leave',
nextScene: 'end' nextScene: 'end'
} }
}, }
}, },
'supplies': { 'supplies': {
text: [ text: [
@@ -2899,7 +2899,7 @@ Events.Setpieces = {
'occupied': { 'occupied': {
combat: true, combat: true,
enemy: 'squatter', enemy: 'squatter',
char: 'S', chara: 'S',
damage: 3, damage: 3,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -3061,7 +3061,7 @@ Events.Setpieces = {
combat: true, combat: true,
enemy: 'soldier', enemy: 'soldier',
ranged: true, ranged: true,
char: 'D', chara: 'D',
damage: 8, damage: 8,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -3099,7 +3099,7 @@ Events.Setpieces = {
combat: true, combat: true,
enemy: 'soldier', enemy: 'soldier',
ranged: true, ranged: true,
char: 'D', chara: 'D',
damage: 8, damage: 8,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -3136,7 +3136,7 @@ Events.Setpieces = {
'a3': { 'a3': {
combat: true, combat: true,
enemy: 'veteran', enemy: 'veteran',
char: 'V', chara: 'V',
damage: 10, damage: 10,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -3204,7 +3204,7 @@ Events.Setpieces = {
'a1': { 'a1': {
combat: true, combat: true,
enemy: 'man', enemy: 'man',
char: 'M', chara: 'M',
damage: 3, damage: 3,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -3236,7 +3236,7 @@ Events.Setpieces = {
'a2': { 'a2': {
combat: true, combat: true,
enemy: 'man', enemy: 'man',
char: 'M', chara: 'M',
damage: 3, damage: 3,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -3268,7 +3268,7 @@ Events.Setpieces = {
'a3': { 'a3': {
combat: true, combat: true,
enemy: 'chief', enemy: 'chief',
char: 'C', chara: 'C',
damage: 5, damage: 5,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
@@ -3343,7 +3343,7 @@ Events.Setpieces = {
'enter': { 'enter': {
combat: true, combat: true,
enemy: 'beastly matriarch', enemy: 'beastly matriarch',
char: 'M', chara: 'M',
damage: 4, damage: 4,
hit: 0.8, hit: 0.8,
attackDelay: 2, attackDelay: 2,
+2 -2
View File
@@ -216,7 +216,7 @@ var Space = {
Space.ship.css({ Space.ship.css({
left: x + 'px', left: x + 'px',
top: y + 'px', top: y + 'px'
}); });
Space.lastMove = Date.now(); Space.lastMove = Date.now();
@@ -446,4 +446,4 @@ var Space = {
break; break;
} }
} }
}; };