diff options
| author | Michele Bini <michele.bini@gmail.com> | 2014-12-14 15:32:43 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2014-12-15 05:34:42 (GMT) |
| commit | 9d13e13e62dc5eed24104040c6e4ca3d5c9c9e93 (patch) | |
| tree | 18066b9b43b2840df92c2b5ef6962ca3d50ccd9b /SunkenMoon.html.coffee | |
| parent | 9ef0d6dcefd61e6f641e831d43049bb6fc72a762 (diff) | |
Tweak Stilla encounters
Diffstat (limited to 'SunkenMoon.html.coffee')
| -rw-r--r-- | SunkenMoon.html.coffee | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/SunkenMoon.html.coffee b/SunkenMoon.html.coffee index 3ad1a42..072cab4 100644 --- a/SunkenMoon.html.coffee +++ b/SunkenMoon.html.coffee @@ -4,7 +4,7 @@ # This program is available under the terms of the MIT License -version = "0.2.198" +version = "0.2.208" { htmlcup } = require 'htmlcup' @@ -457,11 +457,14 @@ genPage = -> c = m.p(depth) * width * height # c = 0 c = @poissonSample(c) - # c = 0 # if c > 1000 - # c-- if random() > 0.15 - while c-- > 0 - m.add?( game, left + ((random() * width)|0), top + ((random() * height)|0) ) - 1 + if c is 1 + m.add?( game, left + ((random() * width)|0), top + ((random() * height)|0) ) + else + # c = 0 # if c > 1000 + # c-- if random() > 0.15 + while c-- > 0 + m.add?( game, left + ((random() * width)|0), top + ((random() * height)|0) ) + 1 if vx * vx >= width * width for k,v of @catalogue genRect(v, left, top, width, height) @@ -509,7 +512,7 @@ genPage = -> vy: -8 stilla: __proto__: encounter - p: (depth)@> 1/40000 + p: (depth)@> depth < 0.01 then 1 else (1-depth)/100000 add: (game, x, y)@> game.addStilla(x, y) touchInput: tx: 0 |
