Child's Play

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

Section 3 - Watson Mason

Watson is a playmate. Watson is male. The description is "Watson Mason has this big round face that is perfect for commercials and baby food labels, only his face is always tear-streaked so maybe he is not cut out for show-biz. Maybe he is sad because he is dressed [if Watson is wearing the bat costume]in this costume that is supposed to be a scary bat but instead is like a sad dumpy bat[otherwise]like a teeny tiny engineer in his polo onesie with a collar and because he smells like baby powder[end if][if Watson is carrying something]. He is clutching [a list of things carried by Watson][end if]." The base act percentage is 20. The act percentage is 20. The act increment is 10. Understand "Mason" or "baby" as Watson.

Check smelling Watson: instead say "He's all baby powder."

Watson wears a polo onesie. The description of the polo onesie is "White with this collar that says 'some day I will be middle management.'" The polo onesie is small.

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

Rule for pre-writing a paragraph about Watson when Watson is wearing the bat costume:
    say "Watson is gloomy in his sad homemade bat costume. [run paragraph on]";

Rule for pre-writing a paragraph about Watson when Watson is carrying something (called the item):
    say "Watson is holding [the item][if 1 out of 3] like it is all dangerous or something[end if]. [run paragraph on]";

Rule for pre-writing a paragraph about Watson when Watson is upset:
    say "Watson sits on the floor and his face is all screwed up and red. [run paragraph on]";

Rule for pre-writing a paragraph about Watson:
    say "Watson sits all sad and dumpy on the floor. [run paragraph on]";

[When the player first sees Watson and Jemison, have Watson take the rattly car so Jemison becomes fixated and the player sees how that works.]
After visiting the South End of Loveseat for the first time: try Watson taking the rattly car; now Watson is active; now Jemison is active.

This is the WM taking report rule:
    say "Watson [if 3 out of 4]gingerly [end if][one of]picks up[or]takes[purely at random] [the noun][note randomness-sux]. [run paragraph on]";

This is the WM dropping report rule:
    say "Watson puts [one of]down [the noun][or][the noun] down[purely at random][note randomness-sux]. [run paragraph on]"

This is the WM going report rule:
    if Watson is present, say "[Watson possibly making noise when moving]Watson wanders in from [the opposite of the direction tried of Watson]. [run paragraph on]";
    if Watson was recently present, say "[Watson possibly making noise when moving]Watson [if the just-released item is not nothing]lets go of [the just-released item] and [end if]wanders off to [the direction tried of Watson]. [run paragraph on]".

[Watson reacting to other people]
To say Watson flinches: say "That makes Watson [one of]flinch[or]be all flinchy[or]give a little cry and cover his eyes[purely at random][note reacting-to-others].";

After someone (called sitter) sitting down:
    if the sitter is Watson, continue the action;
    if Watson and the sitter are not co-located, continue the action;
    if the sitter is present and not running silently begin;
        if the sitter announces a report in the Table of Sitting Down Report Rules begin;
            if 1 out of 6, say Watson flinches;
            otherwise say paragraph break;
        otherwise;
            report bug "Missing sitting report when Watson reacting.";
        end if;
    end if.

After sitting down when Watson is present:
    if 1 out of 6, say "When you sit, Watson [one of]flinches[or]is all flinchy[or]gives a little cry and covers his eyes[purely at random][note reacting-to-others].";
    otherwise consider the standard report sitting down rule.

After Cassie dropping something when Watson and Cassie are co-located and not running silently (this is the Watson flinching at Cassie dropping rule):
    if Cassie is present and 1 out of 6 begin;
        if Cassie announces a report in the Table of Dropping Report Rules, say Watson flinches;
        otherwise report bug "Missing Cassie dropping report when Watson flinching.";
    otherwise;
        continue the action;
    end if.

Instead of showing or giving something to Watson:
    say "You show [the noun] to Watson and he kinda flinches and looks away."

WM hint-giving rules is a rulebook.

A WM hint-giving rule when Watson is carrying anything (this is the Watson sluffs off stuff in preparation rule):
    try Watson dropping a random thing carried by Watson;
    [Speed Watson up for this next bit]
    change the base act percentage of Watson to 100;
    change the act percentage of Watson to 100;
    rule succeeds.

A WM hint-giving rule (this is the Watson pulls up on a parent rule):
    let position be the location of Watson;
    if a parent person is in position begin;
        if Watson is present begin;
            let target be a random parent person in position;
            try Watson upstanding using target;
            change (machine corresponding to a baby name of Watson in the Table of Baby State Machines) to WM State Rules;
            change the base act percentage of Watson to 20;
            change the act percentage of Watson to 20;
        end if;
    otherwise;
        report bug "Watson isn't in the same room as a parent like he should be.";
    end if;
    rule succeeds.

WM state rules is a rulebook.

A WM state rule when Watson is carrying anything (this is the Watson plays with his inventory rule):
    if 1 out of 2 begin;
        if Watson is present begin;
            let target be a random thing carried by Watson;
            let switch-value be a random number from 1 to 4;
            if switch-value is 1, say "Watson [one of]gives [the target] a hug[or]hugs [the target][purely at random][if 1 out of 4], he is such a wuss[end if]";
            if switch-value is 2, say "Watson [one of]fiddles[or]plays[purely at random] with [the target]";
            if switch-value is 3, say "Watson tugs at [the target] as if he wants to take [it-them] apart";
            if switch-value is 4, say "Watson holds [the target] at arm's length as if it might bite him";
            say "[note randomness-sux].";
        end if;
    otherwise;
        try Watson dropping a random thing carried by Watson;
    end if;
    rule succeeds;

A WM state rule (this is the Watson pulls up on parents rule):
    if a parent person (called p) is in the location of Watson and 1 out of 4 begin;
        [Don't let a kid solve the Parry rocking puzzle]
        if p is not Parry or Playtime is not happening begin;
            try Watson upstanding using p;
            rule succeeds;
        end if;
    end if.

A WM state rule (this is the Watson picks up stuff rule):
    let position be the location of Watson;
    [It would be nice if this could be "if Watson is in the presence of a carryable thing"] if a pickupable thing is in position and 2 out of 3 begin;
        let target be a random pickupable thing in position;
        try Watson taking target;
        rule succeeds;
    end if;

A WM state rule (this is the Watson wanders rule):
    if Watson is ready to leave, have Watson wander;

WM fussing rules is a rulebook.

[I'll borrow Fuss Count, a global variable that Zoe uses when she fusses in the first major scene, to keep track of when Watson should be picked up.]

A WM fussing rule (this is the Watson fussing to get in the swing rule):
    if Watson is present, say "Watson [one of]thumps his fists on the floor[or]grimaces horribly[or]holds his breath and his eyes bug out[purely at random] and then he gives a loud cry";
    otherwise say "You hear Watson cry loudly[if 1 out of 3], boy is he angry[end if]";
    [Don't let Watson go to the swing while Parry's tending Cassie (indicated by her being passive)]
    if Cassie is active and a random number from 1 to 10 is less than 2 plus fuss count begin;
        now the baby-swing is in the TV room;
        say ". Then Parry says, 'Farina, I'm going to borrow your swing and see if that calms Watson down.' He [if Parry is present]stands up and strides off[otherwise]goes clomping around[end if] and you can see him come back with a baby swing. He [if the baby-swing is present]comes over to you and Watson and the TV and puts the swing down and picks up Watson. He straps Watson in the swing and turns it on before he goes back[otherwise]goes over by the TV with it and then there is the picking up of Watson and the strapping in of Watson and the swinging of Watson[end if], I hope that makes Watson feel better";
        now Watson is in the baby-swing;
        now the baby-swing is on;
        [Reset Watson's state machine and let him sit passively]
        choose row with a baby name of Watson in the Table of Baby State Machines;
        change machine entry to WM State Rules;
        now Watson is passive;
        now Watson is calm;
        Watson stops swinging in four turns from now;
    otherwise;
        increase fuss count by 2;
    end if;
    say "."

At the time when Watson stops swinging:
    [Don't let Parry do anything with Watson while he's dealing with Cassie (indicated by Cassie being passive)]
    if Cassie is passive begin;
        Watson stops swinging in two turns from now;
    otherwise;
        now Watson is active;
        now the baby-swing is off;
        now Watson is in the TV room;
        if the baby-swing is present, say "A shadow falls on you, it is Parry. He turns off the swing and he unstraps Watson and puts Watson on the floor by you and then Parry goes back to sit down. Watson looks all calm again, that is good.";
        otherwise say "[if Parry is present]A shadow falls on you, it is Parry standing up. He[otherwise]You see Parry stand up and he[end if] goes over to where the TV is and the swing is and he does something that probably involves Watson before he sits down again.";
    end if.

Instead of giving a blox-thing to Watson:
    move the noun to Watson;
    abide by the Watson disassembles a held thing rule.

WM building rules is a rulebook.

A WM building rule when Watson and the brix blox bucket are not co-located:
    let way be the best route from the location of Watson to the location of the brix blox bucket;
    if way is a direction, try Watson going way;
    rule succeeds.

A WM building rule when the brix blox bucket is upright:
    if Watson is present, say "Watson [one of]gazes at the brix blox bucket[or]nudges the brix blox bucket thoughtfully[or]stares at the brix blox bucket[or]tries to look through the brix blox bucket to the brix blox inside it[or]is all lost in thought about the brix blox bucket[purely at random].";
    rule succeeds.

A WM building rule when the booklet is not in the location of the brix blox bucket:
    if Watson is present, say "Watson [one of]pokes at the pile of blox[or]puts a sun yellow blox and a rain forest green blox together but then takes them apart sadly[or]shoves some of the blox around[or]take a blox and chews it and puts it back down[purely at random], he looks like he is not sure what he wants to do.";
    rule succeeds.

A WM building rule when the booklet is not open:
    try Watson opening the booklet;
    rule succeeds.

A WM building rule when a blox-thing (called disassemblee) is held by Watson (this is the Watson disassembles a held thing rule):
    if Watson is present, say "Watson takes [the disassemblee] apart and dumps the brix into the big pile.";
    remove the disassemblee from play;
    rule succeeds.

A WM building rule when a blox-thing (called disassemblee) is in the location of Watson:
    if disassemblee is not held begin;
        if Watson is present, say "Watson picks up [the disassemblee] and takes it apart and dumps the brix into the big pile.";
        remove the disassemblee from play;
        rule succeeds;
    end if.

A WM building rule when a blox-thing is in play:
    if Watson is present, say "Watson tries to build a [page in row page-index of the Table of Instruction Pages] but he doesn't have enough blox[if 1 out of 4], he gets all grunty about that[end if].";
    rule succeeds.

Mentioning larping is a one-time deal.

A WM building rule:
    choose row page-index in the Table of Instruction Pages;
    if Watson is present, say "Watson looks at the instruction booklet and his hands move so fast they are almost blurry and the dayglo blox go together and suddenly Watson has built a [page entry]. He looks at it and then drops it[if 1 out of 3 and mentioning larping has not occurred], he is so going to grow up to be an engineer and like online games and in his spare time I bet he will LARP[end if].";
    move the associated object entry to the location of Watson;
    rule succeeds.

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