Commit b67334a2 authored by pixeldesu's avatar pixeldesu
Browse files

added more events

parent 3007d9dd
...@@ -164,7 +164,7 @@ progressTimer = -> ...@@ -164,7 +164,7 @@ progressTimer = ->
eventTimer = -> eventTimer = ->
currPos = 0 currPos = 0
NProgress.done() NProgress.done()
ev = Math.floor((Math.random() * 10000000) % 8) ev = Math.floor((Math.random() * 10000000) % 10)
console.log "Event #{ev}" console.log "Event #{ev}"
...@@ -242,7 +242,25 @@ eventTimer = -> ...@@ -242,7 +242,25 @@ eventTimer = ->
title = "Nothing happens..." title = "Nothing happens..."
message = "This message is empty." message = "This message is empty."
break break
when 8 # destroyed cattle grids
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."
when 9 # livestock died
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() updateCounters()
NProgress.start() NProgress.start()
$.growl { $.growl {
......
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