summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/toy.groovy7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index d8651ff..647a1d7 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -968,11 +968,14 @@ def sessionPlay = {
}
};
def ap = { val ->
- adjustPunish(-val * ph);
+ if (val) {
+ adjustPunish(-val * ph);
+ }
};
def apply = { activitity, use = null ->
+ if (!activitity) return;
def val = (Float)activitity();
- if (val && use) {
+ if (use) {
use(val);
}
};