0
0
Fork 0
mirror of https://gitlab.com/Oreolek/salet-module.git synced 2024-05-24 11:58:21 +03:00

Fixed the diceString method in RNG.

This commit is contained in:
Alexander Yakovlev 2016-09-16 17:06:40 +07:00
parent eb1f8df89a
commit 0a259527e4
2 changed files with 3 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "salet",
"version": "1.4.12",
"version": "1.4.13",
"description": "A general client-side framework for cybertext interactive fiction games.",
"keywords": ["ifiction", "interactive fiction", "games", "coffee-script", "text", "menu"],
"homepage": "http://salet.oreolek.ru",

View file

@ -43,11 +43,10 @@ class Random
@rand(upper)
# Returns the result of rolling *n* dice with *dx* sides, and adding *plus*.
dice: (n, dx, plus) ->
dice: (n = 1, dx, plus = 0) ->
result = 0
for i in [0..n]
console.log i
result += 1 + @randRange(1,dx)
result = 1 + Math.floor(@randf() * dx)
if (plus)
result += plus
result