Commit 381b74c3 authored by pixeldesu's avatar pixeldesu

added compiled javascript

parent b67334a2
......@@ -171,10 +171,10 @@
};
eventTimer = function() {
var ev, f, g, i, message, title, w;
var c, d, ev, f, g, i, message, title, w;
currPos = 0;
NProgress.done();
ev = Math.floor((Math.random() * 10000000) % 8);
ev = Math.floor((Math.random() * 10000000) % 10);
console.log("Event " + ev);
switch (ev) {
case 0:
......@@ -265,6 +265,28 @@
message = "This message is empty.";
break;
}
break;
case 8:
if (window.gameVars.cattleGrid.count <= 0) {
title = "Nothing happens...";
message = "Cows in the distance.";
break;
}
c = Math.floor((Math.random() * 10000000) % (window.gameVars.cattleGrid.count - (window.gameVars.cattleGrid.count / 3))) + 1;
window.gameVars.cattleGrid.count -= c;
title = "Oh noes!";
message = "" + f + " cattle grids were destroyed by rampaging animals, these are not usable anymore.";
break;
case 9:
if (window.gameVars.livestock.count <= 0) {
title = "Nothing happens...";
message = "Your cattle grids are empty";
break;
}
d = Math.floor((Math.random() * 10000000) % (window.gameVars.livestock.count - (window.gameVars.livestock.count / 2))) + 1;
window.gameVars.livestock.count -= d;
title = "Oh noes!";
message = "A flu killed some of your animals.<br /><br />You lost " + w + " livestock.";
}
updateCounters();
NProgress.start();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment