Child's Play

An interactive fiction by Stephen Granade (2007) - the Inform 7 source text

Section 4 - Jemison Thorsby

Jemison is a playmate. Jemison is male. The description is "Jemison Thorsby's name is not one you would want, that is for sure. He is [if Jemison is wearing the bumblebee costume]wearing this bumblebee costume though he is not flying around or anything[otherwise]stylish in his blue onesie[end if] and he has a small mouth and these big eyes that are watching, always watching, it is kinda creepy[if Jemison is carrying something]. He is carrying [a list of things carried by Jemison][end if][if Jemison is fixated]. He is clearly all interested in [focus of Jemison][end if]." The base act percentage is 10. The act percentage is 10. The act increment is 10. Understand "Thorsby" or "baby" as Jemison.

Check smelling Jemison: instead say "Jemison smells like zinc oxide."

Jemison can be susceptible to fixation or impervious to fixation. Jemison is susceptible to fixation.

Jemison wears a blue onesie. The description of the blue onesie is "It is the color of the endless sky." The blue onesie is small.

Some velcro jangly balls are a small wearable thing. The description is "They are all silver and jangly with velcro on the end of them[if someone has the velcro jangly balls and the player does not have the jangly balls] and they dangle off of [a random jangly person][end if]." The velcro jangly balls are ambiguously plural. Understand "silver" or "ball" as the velcro jangly balls.

Instead of waving the velcro jangly balls, say "They go jangle jangle jangle."

A report going rule when the player has the velcro jangly balls:
    say "You [one of]are all jangle jangle jangle as you leave[or]jangle your way out of the room[purely at random]."

To say (youngster - a person) possibly making noise when moving:
    if youngster has the velcro jangly balls begin;
        if youngster is present, say "You hear this jangle jangle jangle and then [run paragraph on]";
        if youngster was recently present, say "There is this jangle jangle jangle and [run paragraph on]";
    end if.

Definition: a playmate is jangly if it has the velcro jangly balls.

After taking off the velcro jangly balls when the player is overburdened:
    silently try dropping the velcro jangly balls;
    if the player is gnawing the velcro jangly balls, now the velcro jangly balls are gnawed by nothing;
    continue the action.

After taking off the velcro jangly balls:
    say "The bells go rrrrrrrrip and pull off[if the velcro jangly balls are not held] and you let them fall to the floor[end if].";
    if the player is gnawing the velcro jangly balls, now the velcro jangly balls are gnawed by nothing.

After someone (called ripper) taking off the velcro jangly balls:
    if the ripper and the player are co-located, instead say "[The ripper] pulls on the jangly balls until they come off."

Instead of taking the velcro jangly balls when the velcro jangly balls are worn by someone (called jangler) (this is the taking the balls rule):
    abide by the can't take small things when burdened rule;
    consider the carry out taking rulebook;
    say "You tug on the velcro jangly balls and you tug some more and they come off of [the jangler] with a rrrrrrrip sound";
    if jangler is Jemison and Jemison is fixated on the velcro jangly balls, say " and Jemison looks at you with sad sad eyes and then stares at the velcro balls[note Jemisons-bells]";
    say ".";
    if someone is gnawing the velcro jangly balls, now the velcro jangly balls are gnawed by nothing.

Instead of removing the velcro jangly balls from someone, try taking the velcro jangly balls.

[Make sure all of our "instead" rules for taking are consulted before the "taking the balls" rule]
The taking the balls rule is listed after the can't take large things rule in the instead rulebook.

Instead of putting the velcro jangly balls on the player, try wearing the velcro jangly balls.

Instead of putting the velcro jangly balls on something worn by someone (called target), try putting the velcro jangly balls on target.

Making Zoe jingle-jangle is a one-time deal.

Instead of putting the velcro jangly balls on a playmate (called target):
    abide by the can't put what's not held rule;
    say "You shove the velcro end of the balls against [the target] high on [its-their of target] back [if the target is not Jemison]where [it-they] can't reach [end if]and the velcro sticks!";
    move the velcro jangly balls to target;
    now the velcro jangly balls are worn by the target;
    if someone is gnawing the velcro jangly balls, now the velcro jangly balls are gnawed by nothing;
    if target is Zoe and making Zoe jingle-jangle has not occurred, record 5 points for "putting Jemison's velcro jangly balls on Zoe".

Instead of putting the velcro jangly balls on a parent person, say "That is a good way to get those taken away, you'd better not."

Instead of putting the velcro jangly balls on the diaper, try wearing the velcro jangly balls.

Instead of putting the velcro jangly balls on something worn by someone (called p), try putting the velcro jangly balls on p.

Instead of putting the velcro jangly balls on something, say "The velcro jangly balls are for putting on people."

After pre-writing a paragraph about a jangly playmate (called jangler): say "The velcro jangly balls hang off of [it-them of the jangler]. [run paragraph on]".

[Every time Jemison takes the balls, he wears them.]
After Jemison taking the velcro jangly balls:
    if the velcro jangly balls are carried by Jemison, now the velcro jangly balls are worn by Jemison;
    continue the action.

Rule for pre-writing a paragraph about Jemison during Tabletime: rule succeeds.

Rule for pre-writing a paragraph about Jemison when Jemison is wearing the bumblebee costume:
    say "Jemison is all dressed like a bumblebee. [run paragraph on]".

Rule for pre-writing a paragraph about Jemison when Jemison is pulled up on something (called the support):
    say "Jemison holds on to [the support] tenaciously";
    if something (called the focus) fascinates Jemison begin;
        if the location of Jemison encloses the focus, say " though he keeps staring at [the focus][if the focus is held by the player] that you are all holding";
    end if;
    say ". [run paragraph on]".

Rule for pre-writing a paragraph about Jemison when something (called the focus) fascinates Jemison:
    if the location of Jemison encloses the focus begin;
        say "Jemison is all staring at [the focus]";
        if the focus is carried by someone (called the carrier), say " which [name of carrier is] holding";
        say ". [run paragraph on]".
    otherwise;
        say "Jemison is looking around sadly for [the focus]. [run paragraph on]";
    end if.

Rule for pre-writing a paragraph about Jemison when Jemison is gnawing something (called the mastication):
    say "Jemison is all chewing on [the mastication]. [run paragraph on]";

Rule for pre-writing a paragraph about Jemison when Jemison is carrying something (called the item):
    say "Jemison is [one of]playing[or]toying[purely at random] with [the item]. [run paragraph on]";

Rule for pre-writing a paragraph about Jemison:
    say "Jemison watches you watching him. [run paragraph on]";

Instead of giving something to Jemison when Jemison is fixated:
    if the noun fascinates Jemison begin;
        move the noun to Jemison;
        say "You give [the noun] to Jemison and he grabs [it-them of the noun] out of your hands";
        if the noun is the velcro jangly balls begin;
            say " and sticks them onto his onesie";
            now Jemison wears the noun;
        otherwise;
            now the noun does not fascinate Jemison;
        end if;
        say ".";
    otherwise if Jemison is susceptible to fixation;
        instead try showing the noun to Jemison;
    otherwise;
        continue the action;
    end if.

Instead of someone giving something to Jemison when Jemison is fixated:
    if the noun fascinates Jemison begin;
        if Jemison is present, say "[The person asked] shows [the noun] to Jemison and he grabs [it-them of the noun] without hesitation[if the noun is the velcro jangly balls] and sticks them onto his onesie[end if].";
        move the noun to Jemison;
        if the noun is the velcro jangly balls,
            now Jemison wears the velcro jangly balls;
        otherwise now the noun does not fascinate Jemison;
    otherwise;
        continue the action;
    end if.

Instead of showing something to Jemison when Jemison is fixated:
    if the noun fascinates Jemison begin;
        say "He makes this motion towards [the noun] and you pull [it-them of the noun] away, ha ha, this is like taking candy away from a you.";
    otherwise if Jemison is susceptible to fixation;
        if Jemison clears all inventory begin;
            now the noun fascinates Jemison;
            say "Jemison gets all excited and [if some thing is marked for special listing][drops] [a list of things that are marked for special listing] and [end if]starts watching you and [the noun].";
        otherwise;
            report bug "Jemison should switch fixation to [the noun] but didn't.";
        end if;
        now every thing is unmarked for special listing;
    otherwise;
        continue the action;
    end if.

Instead of showing something to Jemison when Jemison is not fixated and Jemison is susceptible to fixation:
    if Jemison clears all inventory begin;
        now the noun fascinates Jemison;
        say "Jemison gets all excited and [if some thing is marked for special listing][drops] [a list of things that are marked for special listing] and [end if]starts watching you and [the noun].";
    otherwise;
        report bug "Jemison should be all interested in [the noun] but isn't.";
    end if;
    now every thing is unmarked for special listing.

To check on Jemison following (youngster - a person):
    if Jemison and the pile of Cheerios are not co-located begin;
        if Jemison is ready to act and Jemison acts with a bonus of 20 begin;
            now Jemison is busy acting;
            try Jemison following youngster;
            now Jemison is done acting;
            now every thing is unmarked for listing;
        end if;
    end if.

Instead of showing something to Jemison when Jemison is not fixated and Jemison is not susceptible to fixation: say "Jemison doesn't really pay attention to [the noun], I guess he has had his fill of being obsessed about stuff."

To decide if Jemison snatches (item - a thing) that (youngster - a person) discarded:
    [If we're running silently, don't have Jemison grab the object.]
    if running silently, decide no;
    if Jemison and the pile of Cheerios are co-located, decide no;
    if Jemison is ready to act and Jemison acts with a bonus of 20 begin;
        now Jemison is busy acting;
        if Jemison is pulled up on something (called the support) begin;
            silently try Jemison sitting down;
            if Jemison is standing, decide no;
        end if;
        if Jemison clears all inventory begin;
            silently try Jemison taking item;
            if Jemison is carrying the item and Jemison is present begin;
                if 1 out of 3, say "Jemison sees [name of youngster] [drop] [the item] and is all excited[if 1 out of 3], at least as excited as he gets,[end if] and ";
                otherwise say "When Jemison sees [name of youngster] [drop] [the item] he ";
                if the just-released item is not nothing, say "lets go of [the just-released item] and ";
                if some thing is marked for special listing, say "[drops] [a list of things that are marked for special listing] and takes [the item] instead";
                otherwise say "takes [it-them of the item]";
                if the item is worn, say " and sticks [it-them of the item] on his onesie";
                say "[note reacting-to-others].";
                [leave this next statement here so we don't double-print the list of dropped items]
                now every thing is unmarked for special listing;
            end if;
        end if;
        if some thing is marked for special listing begin;
            if Jemison is present, say ". Jemison [if the just-released item is not nothing]lets go of [the just-released item] and [end if][drops] [a list of things that are marked for special listing].";
            now every thing is unmarked for special listing;
        otherwise if the just-released item is not nothing and Jemison is present;
            say ". Jemison lets go of [the just-released item] and eases to the floor.";
        end if;
        now Jemison is done acting;
        reset Jemison;
        decide yes;
    end if;
    decide no.

This is the JT taking report rule:
    say "Jemison ";
    if the just-released item is not nothing, say "lets go of [the just-released item] and eases to the floor and ";
    if some thing is marked for special listing begin;
        say "[drops] [a list of things that are marked for special listing] and ";
        now every thing is unmarked for special listing;
    end if;
    say "[if 1 out of 4]carefully [end if]picks up [the noun][if 1 out of 4] and blinks at it[otherwise if 1 out of 4], he is all deliberate about it[end if][if the noun is worn] and then sticks [the noun] onto his onesie[end if]. [run paragraph on]"

After Jemison taking something that fascinates Jemison:
    if not running silently and Jemison is present, say "Jemison suddenly sees that [the noun] is available and he scoops [it-them of the noun] up[if the noun is worn] and sticks [it-them] on his onesie[end if].";
    if the noun is not the velcro jangly balls, now the noun does not fascinate Jemison.

Report Jemison dropping: if Jemison is present, say "Jemison [drops] [the noun][if 1 out of 5] and it is now on the ground[end if][note randomness-sux]."; stop the action.

Report Jemison chewing: if Jemison is present, say "Jemison [one of]puts his mouth all over [the noun][or]chews on [the noun][purely at random][if 1 out of 5]. He looks pretty thoughtful when he does that[end if][note randomness-sux]."; stop the action.

Report Jemison stopping chewing: if Jemison is present, say "Jemison [one of]takes [the noun] that is in his mouth and pulls it[or]pulls [the noun][purely at random] out of his mouth[note randomness-sux]."; stop the action.

Report Jemison going a direction (called goal):
    if Jemison was recently present, say "[Jemison possibly making noise when moving]Jemison [if the just-released item is not nothing]lets go of [the just-released item] and [end if][one of]goes off[or]crawls[purely at random] to [the goal].";
    if Jemison is present, say "[Jemison possibly making noise when moving]Jemison [one of]comes[or]crawls[purely at random] in from [the opposite of the goal].";
    stop the action.

[Jemison reacting to other people]
After dropping a thing (called item) when Jemison is present and Jemison is not fixated:
    if Jemison snatches the item that the player discarded, do nothing;
    otherwise continue the action.

After someone (called dropper) dropping a thing (called item) when Jemison is not fixated:
    if the dropper is Jemison, continue the action;
    if Jemison and the dropper are not co-located, continue the action;
    if the dropper is present and not running silently begin;
        if the dropper announces a report in the table of Dropping Report Rules begin;
            do nothing;
        otherwise;
            change hacky global item to dropper;
            report bug "[The hacky global item] is missing a dropping report rule when Jemison trying to take something someone just dropped.";
        end if;
    end if;
    if Jemison snatches the item that dropper discarded begin;
        do nothing;
    otherwise if the dropper is present and not running silently;
        say paragraph break;
    end if.

After someone (called leader) going a direction (called goal) when Jemison is not fixated:
    if the leader is Jemison, continue the action;
    if the location of Jemison is not the last location of the leader, continue the action;
    if not running silently begin;
        if leader is present or leader was recently present begin;
            if leader announces a report in the table of Going Report Rules begin;
                say paragraph break;
            otherwise;
                change hacky global item to the leader;
                report bug "Missing going report rule when Jemison trying to follow [hacky global item].";
            end if;
        end if;
    end if;
    check on Jemison following leader.

Before Jemison following someone:
    if Jemison clears all inventory begin;
        do nothing;
    otherwise;
        if some thing is marked for special listing begin;
            if Jemison is present, say "Jemison [drops] [a list of things that are marked for special listing].";
            now every thing is unmarked for special listing;
        end if;
        stop the action;
    end if.

After Jemison following someone (called leader) when not running silently:
    if Jemison is present begin;
        say "Jemison comes in after [name of leader]";
        if something (called the focus) fascinates Jemison and the leader carries the focus, say " and settles close by [it-them] and looks pointedly at [the focus]";
        say ".";
    otherwise if Jemison was recently present;
        if some thing is marked for special listing begin;
            say "First Jemison [drops] [a list of things that are marked for special listing]. Then he[run paragraph on]";
            now every thing is unmarked for special listing;
        otherwise;
            say "Jemison[run paragraph on]";
        end if;
        say " [one of]follows[or]trails after[purely at random] [name of leader].";
    end if;
    reset Jemison.

[Jemison being fixated on something rules]
After taking something when Jemison is susceptible to fixation and Jemison is present:
    if the noun is your favorite toy, continue the action;
    if the noun fascinates Jemison, continue the action;
    if Parry encloses Jemison, continue the action;
    if Jemison clears all inventory begin;
        say jemison enspelled by player taking the noun;
        now the noun fascinates Jemison;
    otherwise;
        consider the standard report taking rule;
        if some thing is marked for special listing begin;
            say "Jemison [drops] [a list of things that are marked for special listing].";
        end if;
    end if;
    now every thing is unmarked for special listing;
    reset Jemison;
    now Jemison is done acting.

After someone (called taker) taking when Jemison is susceptible to fixation and Jemison is not fixated:
    let print-flag be 0;
    if the taker is Jemison, continue the action;
    if the taker and Jemison are not co-located, continue the action;
    if the taker is present begin;
        if the taker announces a report in the table of Taking Report Rules begin;
            change print-flag to 1;
        otherwise;
            change hacky global item to the taker;
            report bug "[The hacky global item] is missing an entry in the Table of Taking Report Rules";
        end if;
    end if;
    now Jemison is busy acting;
    if Jemison clears all inventory begin;
        if Jemison is present, say Jemison enspelled by the taker taking the noun;
        now every thing is unmarked for special listing;
        now the noun fascinates Jemison;
    otherwise if some thing is marked for special listing;
        if Jemison is present, say "[if print-flag is 1][paragraph break][end if]Jemison [drops] [a list of things that are marked for special listing].";
        now every thing is unmarked for special listing;
    otherwise if print-flag is 1;
        say paragraph break;
    end if;
    now Jemison is done acting;
    reset Jemison.

After dropping something that fascinates Jemison (this is the Jemison grabbing dropped items that fascinate rule):
    if Jemison is not present, continue the action;
    if Jemison clears all inventory begin;
        silently try Jemison taking the noun; [Jemison taking will reset the fascination.]
        if Jemison is not holding the noun begin;
            abide by the report dropping rulebook;
        otherwise if Jemison is present;
            say "When you drop [the noun] Jemison is all over that and he ";
            if some thing is marked for special listing begin;
                say "[drops] [a list of things that are marked for special listing] and snatches up [the noun].";
            otherwise;
                say "snatches [it-them of the noun] up";
                if the noun is the velcro jangly balls begin;
                    say " and sticks the jangly balls to his onesie";
                    now the noun is worn by Jemison;
                end if;
                say ".";
            end if;
        end if;
        now every thing is unmarked for special listing;
        reset Jemison;
    otherwise;
        report bug "Jemison wasn't able to clear inventory to pick up [the noun].";
    end if.

After someone (called the dropper) dropping something that fascinates Jemison (this is the Jemison grabbing NPC-dropped items that fascinate rule):
    if running silently, continue the action;
    if the dropper encloses the noun, continue the action;
    if the dropper and Jemison are not co-located, continue the action;
    if the dropper is present begin;
        if the dropper announces a report in the table of Dropping Report Rules begin;
            do nothing;
        otherwise;
            change hacky global item to the dropper;
            report bug "[The hacky global item] is missing an entry in the Table of Dropping Report Rules";
        end if;
    end if;
    now Jemison is busy acting;
    if Jemison clears all inventory begin;
        try Jemison taking the noun;
    otherwise if the dropper is present;
        say paragraph break;
    end if;
    now Jemison is done acting;
    reset Jemison.

[Don't let Watson reacting to Cassie interfere with fixation.]
The Watson flinching at Cassie dropping rule is listed after the Jemison grabbing dropped items that fascinate rule in the after rulebook.

After going a direction (called goal) when Jemison is fixated:
    if the location of Jemison is not the last location of the player, continue the action;
    if Jemison is not fixated on the player, continue the action;
    consider the report going rulebook;
    if Snacktime is happening, consider the stalking Zoe rule;
    try Jemison trying following the player;
    reset Jemison.

After someone (called the leader) going a direction (called goal) when Jemison is fixated:
    if the location of Jemison is not the last location of the leader, continue the action;
    if Jemison is not fixated on the leader, continue the action;
    if the leader is present or the leader was recently present begin;
        if the leader announces a report in the table of Going Report Rules begin;
            say paragraph break;
        otherwise;
            change hacky global item to the leader;
            report bug "[The hacky global item] is missing a report in the Table of Going Report Rules.";
        end if;
    end if;
    try Jemison following the leader;
    reset Jemison.

To say Jemison enspelled by (taker - a person) taking (item - a thing):
    say "When Jemison sees [name of taker] [one of]take[or]pick up[purely at random] [the item], ";
    if 3 out of 4, say "he gets all excited and ";
    otherwise say "his eyes light up [if 1 out of 8](metaphorically, it's not like his eyes are flashlights or anything) [end if]and ";
    if something (called the focus) fascinates Jemison, say "he forgets all about [the focus] and ";
    say "he [if some thing is marked for special listing][drops] [a list of things that are marked for special listing] and [end if]starts watching [the item] and thus [the taker][note jemison-fascinated].".

JT state rules is a rulebook.

A JT state rule when the velcro jangly balls fascinate Jemison and Jemison has the velcro jangly balls (this is the Jemison plays with his jangly balls rule):
    if Jemison is present, say "Jemison [one of]jiggles the jangly balls[or]reaches around to the jangly balls and pats at them[or]pats the jangly balls[purely at random] and [one of]they jangle quietly[or]they go jangle jangle jangle[purely at random][if 1 out of 5] and Jemison is all smiles[end if].";
    rule succeeds.

A JT state rule when the velcro jangly balls fascinate Jemison and Jemison does not have the velcro jangly balls and Jemison and the velcro jangly balls are co-located (this is the Jemison plays with someone else's jangly balls rule):
    if 1 out of 3 begin;
        if Jemison is present begin;
            if someone (called p) has the velcro jangly balls and a random jangly person is eighth-height-or-higher, say "Jemison looks sadly at the velcro jangly balls, they are out of his reach.";
            otherwise say "Jemison reaches out and [one of]bats at[or]hits[or]pokes at[purely at random] the velcro jangly balls[if someone has the velcro jangly balls and the player does not have the jangly balls] that are hanging off of [a random jangly person][end if].";
        end if;
        rule succeeds;
    end if.

A JT state rule when something (called the focus) fascinates Jemison (this is the Jemison follows fixated objects rule):
    let origin be the location of Jemison;
    if the location of the focus is not the origin begin;
        let the destination be the location of the focus;
        let aim be the best route from the origin to the destination;
        if aim is a direction, try Jemison going aim;
        rule succeeds;
    end if.

A JT state rule when something (called the focus) fascinates Jemison (this is the Jemison takes fixated objects rule):
    if the focus and Jemison are co-located and the focus is not had by someone begin;
        try Jemison taking the focus;
        rule succeeds;
    end if.

A JT state rule when something (called the focus) fascinates Jemison (this is the Jemison stares at fixated objects rule):
    if Jemison is present and the location of Jemison encloses the focus begin;
        if the focus is had by someone (called the carrier) begin;
            if 2 out of 3, say "Jemison cannot look away from [name of carrier] and [the focus].";
            otherwise say "Jemison stares at [name of carrier] and waits for [it-them] to drop [the focus].";
        otherwise;
            say "Jemison stares at [the focus] with this eerie fixated gaze.";
        end if;
    end if;
    rule succeeds.

A JT state rule when Jemison is carrying anything (this is the Jemison playing with inventory rule):
    if 1 out of 3 begin;
        if Jemison is gnawing anything (called the mastication) begin;
            try Jemison stopping chewing the mastication;
        otherwise;
            try Jemison chewing a random thing carried by Jemison;
        end if;
    otherwise if 1 out of 2;
        if Jemison is present, say "Jemison stares at [a random thing carried by Jemison], he is all fascinated with it[note randomness-sux].";
    otherwise;
        try Jemison dropping a random thing carried by Jemison;
    end if;
    rule succeeds;

A JT state rule (this is the Jemison picking up or chewing on stuff rule):
    if 2 out of 3 begin;
        let position be the location of Jemison;
        [It would be nice if this could be "if...Jemison is in the presence of a chewable thing"]
        if 1 out of 2 and a chewable worth noting thing is in position begin;
            let target be a random chewable worth noting thing in position;
            try Jemison chewing the target;
            rule succeeds;
        [It would be nice if this could be "if Jemison is in the presence of a carryable thing"]
        otherwise if a pickupable thing is in position;
            let target be a random pickupable thing in position;
            try Jemison taking target;
            rule succeeds;
        end if;
    end if;
            
A JT state rule (this is the Jemison wanders rule):
    if Jemison is ready to leave, have Jemison wander;

The source code to Child's Play is licensed under a Creative Commons NonCommercial Sampling Plus 1.0 License.