summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-12-06 20:47:13 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2018-12-06 20:47:13 +0000
commit1582c6f0feb605aea66aed6966f7c83490e12f63 (patch)
tree3629007099810b7bdfa68c5fa28540a14997e03e /scripts
parentFix typo (diff)
downloadtoy-1582c6f0feb605aea66aed6966f7c83490e12f63.zip
Don't null punishment multiplier on unavailable punishment.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/toy.groovy4
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);