diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-12-06 20:47:13 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-12-06 20:47:13 +0000 |
commit | 1582c6f0feb605aea66aed6966f7c83490e12f63 (patch) | |
tree | 3629007099810b7bdfa68c5fa28540a14997e03e | |
parent | Fix typo (diff) | |
download | toy-1582c6f0feb605aea66aed6966f7c83490e12f63.zip |
Don't null punishment multiplier on unavailable punishment.
-rw-r--r-- | scripts/toy.groovy | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy index b01f804..8ddebd6 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -780,7 +780,9 @@ def sessionSummon = { imageSpec -> def sessionPlay = { def ph = (float)1.0; def pm = { val -> - ph *= val; + if (val) { + ph *= val; + } }; def ap = { val -> adjustPunish(-val * ph); |