Add in doubleTime capabilities

Add hyper / classic to menu
This commit is contained in:
Travis Weston
2015-02-06 22:35:53 -05:00
committed by Blake Grotewold
parent 5fcdf29601
commit 6e044292ae
8 changed files with 59 additions and 34 deletions
+8 -8
View File
@@ -115,7 +115,7 @@ var Events = {
}
// Set up the enemy attack timer
Events._enemyAttackTimer = setTimeout(Events.enemyAttack, scene.attackDelay * 1000);
Events._enemyAttackTimer = Engine.setTimeout(Events.enemyAttack, scene.attackDelay * 1000);
},
createEatMeatButton: function(cooldown) {
@@ -356,7 +356,7 @@ var Events = {
if(dmg == 'stun') {
msg = _('stunned');
enemy.data('stunned', true);
setTimeout(function() {
Engine.setTimeout(function() {
enemy.data('stunned', false);
}, Events.STUN_DURATION);
}
@@ -401,7 +401,7 @@ var Events = {
if(dmg == 'stun') {
msg = _('stunned');
enemy.data('stunned', true);
setTimeout(function() {
Engine.setTimeout(function() {
enemy.data('stunned', false);
}, Events.STUN_DURATION);
}
@@ -440,14 +440,14 @@ var Events = {
});
}
Events._enemyAttackTimer = setTimeout(Events.enemyAttack, scene.attackDelay * 1000);
Events._enemyAttackTimer = Engine.setTimeout(Events.enemyAttack, scene.attackDelay * 1000);
},
winFight: function() {
Events.won = true;
clearTimeout(Events._enemyAttackTimer);
$('#enemy').animate({opacity: 0}, 300, 'linear', function() {
setTimeout(function() {
Engine.setTimeout(function() {
try {
var scene = Events.activeEvent().scenes[Events.activeScene];
var desc = $('#description', Events.eventPanel());
@@ -484,7 +484,7 @@ var Events = {
} catch(e) {
// It is possible to die and win if the timing is perfect. Just let it fail.
}
}, 1000);
}, 1000, true);
});
},
@@ -744,7 +744,7 @@ var Events = {
// every 3 seconds change title to '*** EVENT ***', then 1.5 seconds later, change it back to the original title.
Events.BLINK_INTERVAL = setInterval(function() {
document.title = _('*** EVENT ***');
setTimeout(function() {document.title = title;}, 1500);
Engine.setTimeout(function() {document.title = title;}, 1500, true);
}, 3000);
},
@@ -826,7 +826,7 @@ var Events = {
var nextEvent = Math.floor(Math.random()*(Events._EVENT_TIME_RANGE[1] - Events._EVENT_TIME_RANGE[0])) + Events._EVENT_TIME_RANGE[0];
if(scale > 0) { nextEvent *= scale; }
Engine.log('next event scheduled in ' + nextEvent + ' minutes');
Events._eventTimeout = setTimeout(Events.triggerEvent, nextEvent * 60 * 1000);
Events._eventTimeout = Engine.setTimeout(Events.triggerEvent, nextEvent * 60 * 1000);
},
endEvent: function() {