summaryrefslogtreecommitdiff
path: root/scripts/toy/play.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/toy/play.groovy')
-rw-r--r--scripts/toy/play.groovy124
1 files changed, 6 insertions, 118 deletions
diff --git a/scripts/toy/play.groovy b/scripts/toy/play.groovy
index b892a04..53bf0f8 100644
--- a/scripts/toy/play.groovy
+++ b/scripts/toy/play.groovy
@@ -1,31 +1,4 @@
{ toy ->
- toy.metaClass.stateToyName { state ->
- switch (state) {
- case CUFFED:
- return "cuffs";
- case COLLARED:
- return "collar";
- case CLAMPED:
- return "nipple clamps";
- case GAGGED:
- return "gag";
- }
- return null;
- };
-
- toy.metaClass.removeToy { state, imageSpec ->
- if (!stateIs(state)) return;
- def toyName = stateToyName(state);
- present(imageSpec, [
- ["OK,"],
- ["you may remove your $toyName.", "the $toyName can come off.", "take the $toyName off."]]);
- showButtonG("Thank you, ${dommeTitle()}", "ok");
- pause(5);
- set(state, false);
- removeEvent("$RELEASEFROM-$state");
- showButtonGT("Removed, ${dommeTitle()}", "removed", 20, 1);
- };
-
toy.metaClass.sessionPlay {
if (stateIs(CHASTE)) sessionToys[CHASTITY] = getTime();
def playScope = [
@@ -143,26 +116,13 @@
postChastity();
}
pause(getRandom(10) + 5);
- def toys = TOYTOYS.findAll { t -> stateIs(t) };
- Collections.shuffle(toys);
- if (toys) {
- if (!goodToy) {
- present([DRESSED], [
- ["I should leave you like that.", "I suppose you still want letting free?"],
- ["Maybe.", "Let me ponder on it."]]);
- pause(getRandom(20) + 20);
- }
- toys.each { toyState ->
- if (getRandom(100) > ((goodToy && (getPunish() < 100)) ? 10 : 80)) {
- removeToy(toyState, [DRESSED]);
- }
- else {
- addEvent("$RELEASEFROM-$toyState", getTime() + 100 + getRandom(10 * (getPunish() + 1)),
- RELEASEFROM, toyState);
- adjustPunish(-5);
- }
- };
+ if (!goodToy && anyToys()) {
+ present([DRESSED], [
+ ["I should leave you like that.", "I suppose you still want letting free?"],
+ ["Maybe.", "Let me ponder on it."]]);
+ pause(getRandom(20) + 20);
}
+ removeAllToys([DRESSED], getPunish());
if (stateIs(NAKED)) {
if (goodToy && getRandom(1)) {
present([DRESSED], [
@@ -246,79 +206,7 @@
showLounge();
}
- toy.metaClass.redress { rt ->
- if (!rt || !sessionSummon([DRESSED])) {
- addEvent(REDRESS, getTime() + 300, "redress");
- return;
- }
- present([DRESSED], [
- ["OK, toy,"],
- ["you can put some clothes back on now.", "get yourself covered up."]]);
- pause(getRandom(10) + 15);
- showButtonG("Thank you, ${dommeTitle()}", "ok");
- set(NAKED, false);
- showLounge();
- };
-
- toy.metaClass.releaseFrom { rt, arg, name ->
- if (!rt || !sessionSummon([DRESSED])) {
- addEvent(name, getTime() + 300, RELEASEFROM, arg);
- return;
- }
- removeToy(arg, [DRESSED]);
- showLounge();
- };
-
- toy.metaClass.requestClothes {
- adjustPunish(5);
- present([DRESSED], [
- ["Really?", "Disappointing."],
- ["You want to clothes back on?", "You wish to cover up?"]]);
- if (getBoolean(null)) {
- present([DRESSED], [["Hmm, very well.", "If you must."]]);
- adjustPunish(50);
- set(NAKED, false);
- removeEvent(REDRESS);
- }
- else {
- present([DRESSED], [["Good boy."]]);
- }
- showButtonG("Thank you, ${dommeTitle()}", "ok");
- showLounge();
- };
-
- toy.metaClass.requestRelease { toyState ->
- adjustPunish(5);
- present([DRESSED], [
- ["Really?", "Disappointing."],
- ["You wish to be un-$toyState?"]]);
- if (getBoolean(null)) {
- adjustPunish(10);
- if (getRandom(100) > getPunish()) {
- present([DRESSED], [["No.", "You may not."],
- ["Not yet.", "Not until later."]]);
- }
- else {
- present([DRESSED], [["Hmm, very well.", "If you must."]]);
- set(toyState, false);
- removeEvent("$RELEASEFROM-$toyState");
- }
- }
- else {
- present([DRESSED], [["Good boy."]]);
- }
- showButtonG("Thank you, ${dommeTitle()}", "ok");
- showLounge();
- };
-
toy.addNamedEvent(toy.PLAY, { name, arg, schedTime, rt -> toy.playEvent(rt, arg) });
- toy.addNamedEvent(toy.RELEASEFROM, { name, arg, schedTime, rt -> toy.releaseFrom(rt, arg, name) });
- toy.addNamedEvent(toy.REDRESS, { name, arg, schedTime, rt -> toy.redress(rt) });
- toy.TOYTOYS.each { toyState ->
- toy.addRequestable("un$toyState".toString(), "May I be un-$toyState".toString(),
- { toy.requestRelease(toyState) },
- { toy.stateIs(toyState) })
- };
toy.playSchedule();
return null;
}