From 1582c6f0feb605aea66aed6966f7c83490e12f63 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 6 Dec 2018 20:47:13 +0000 Subject: Don't null punishment multiplier on unavailable punishment. --- scripts/toy.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/toy.groovy') 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); -- cgit v1.2.3