Skip to content

Instantly share code, notes, and snippets.

@hallelujah
Created March 13, 2016 23:41
Show Gist options
  • Save hallelujah/fc5ca9d8693fc5139922 to your computer and use it in GitHub Desktop.
Save hallelujah/fc5ca9d8693fc5139922 to your computer and use it in GitHub Desktop.
kraken can spawn only once
function Krakener:CanSpawn(ignore_cooldown)
return (self:TimeUntilCanSpawn() <= 0 or ignore_cooldown) and not self.kraken and self.spawn_chance_mod > 0.0
end
--[[
This means that the quacken can sapwn if and only if all those conditions are met:
* cooldown is 0 (you did not spawn the quaken recently)
* there is no quacken in the world
* the chance threshold is positive (spawning a quacken is random)
--]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment