<commit_before># teptour.py
#
# The tEp virtual house tour!
# (c) 2011 tEp, Xi chapter
#
# Authors: <NAME>

execfile("textadv/basicsetup.py")

world[Global("release_number")] = "0.0 (July 10, 2011)"

world[Global("game_title")] = "The tEp Virtual House Tour"
world[Global("game_headline")] = "A factual fantasy"
world[Global("game_author")] = "tEp, Xi chapter"
world[Global("game_description")] = """
<i><b>Note:</b> This is the development version of the house tour.
Please talk to Kyle if you have any suggestions, stories, or puzzles
to include.  If you come across any error messages, please e-mail them
to him.  Thanks.</i>[newline]

You've heard stories about tEp: the purple palace, a.k.a. the last stronghold
of the knights of the lambda calculus.  You've been meaning to get
over there to see what it's all about.

[newline]But, you are lazy.  Instead, you went to the tEp website and
opted for the <i>virtual</i> house tour.  We understand.

[newline]For your tour, we are providing you with [ob <Irving
Q. Tep>], the spirit of the house.  He'll be giving you the
descriptions and stories you will read during your tour.

[newline]Without further ado, we present"""

world.activity.put_in("player", "253 Commonwealth Ave.")

parser.understand("upstairs", "up", dest="direction")
parser.understand("downstairs", "down", dest="direction")

quickdef(world, "Irving Q. Tep", "person", {
        Gender: "male",
        Description : """It's Irving Q. Tep, spirit of the house.  He
        is giving you stories and such <i>telepathically</i> using
        images and text.  Quite amazing.

        [newline]You can ask Irving Q. Tep about various concepts. For
        instance "[action <ask about stupidball>]" (which is shorthand
        for "[action <ask Irving about stupidball>]")."""
        },
         make_part_of="player")
# See section "Consulting Irving Q. Tep..." for adding things one can
# ask him about

####################
### The basement ###
####################

quickdef(world, "Basement", "room", {
        Description : """This is the basement of tEp.  You can go back
        [dir up] the stairs, [dir southwest] into the kitchen, or [dir
        northwest] into the bike room."""
        })
world.activity.connect_rooms("Basement", "southwest", "Kitchen")
world.activity.connect_rooms("Basement", "northwest", "Bike Room")

quickdef(world, "Kitchen", "room", {
        Description : """This is a commercial-grade kitchen.  You can
        go [dir northeast] back to the basement."""
        })

quickdef(world, "Bike Room", "room")

###################
### First floor ###
###################

###
### In front of tep (253 Commonwealth Ave.)
###

quickdef(world, "253 Commonwealth Ave.", "room", {
        Description : """You are standing outside the illustrious Tau
        Epsilon Phi (Xi chapter), the veritable purple palace.  It is
        a hundred-year-old brownstone in the middle of Boston's Back
        Bay.  Outside the building is a [ob <purple tree>] and a [ob
        <park bench>].  To the [dir north] is the [ob door] to enter
        tEp."""
        })

quickdef(world, "purple tree", "thing", {
        Scenery : True,
        Description : """Looking both ways, you see that this is the
        only purple tree along the entire avenue.  It's very
        purple."""
        },
         put_in="253 Commonwealth Ave.")

quickdef(world, "park bench", "supporter", {
        Scenery : True,
        IsEnterable : True,
        Description : """It's a handmade park bench wrought from
        steel, built by a previous tEp.  After a few years of use,
        it's been bent quite out of whack."""
        },
         put_in="253 Commonwealth Ave.")
parser.understand("sit on [object park bench]", Entering(actor, "park bench"))

@report(Entering(actor, "park bench"))
def report_sitting_on_park_bench(actor, ctxt) :
    ctxt.write("You sit on [ob <park bench>], and the metal creaks and bends under your weight.")
    raise ActionHandled()

quickdef(world, "front door", "door", {
        Reported : False,
        Lockable : True,
        IsLocked : True,
        Description : """It's a big, old door.  Through the glass, you
        can see blinking LED lights hanging from the stairwell."""
        })
world[NoLockMessages("front door", "no_open")] = "It's locked.  Perhaps you should ring the [ob doorbell]."
world.activity.connect_rooms("253 Commonwealth Ave.", "north", "front door")
world.activity.connect_rooms("front door", "northwest", "Center Room")

quickdef(world, "doorbell", "thing", {
        Scenery : True,
        Description : """It's a small, black button, and you almost
        didn't notice it.  It turns out the FedEx guy enjoys this
        doorbell."""
        },
         put_in="253 Commonwealth Ave.")
parser.understand("ring [object doorbell]", Pushing(actor, "doorbell"))

@before(Pushing(actor, "doorbell"))
def before_pushing_doorbell(actor, ctxt) :
    raise ActionHandled()
@when(Pushing(actor, "doorbell"))
def when_pushing_doorbell(actor, ctxt) :
    ctxt.write("""You hear a loud subwoofer buzzing at 32 Hz, and,
    after a few moments, footsteps down the stairs.  A young tEp opens
    the door for you and leads you in.  "Ah, I see you're getting the
    virtual house tour from [ob <Irving Q. Tep>]," he says.  "Those
    are really good."  Before running off, he brings you to the...""")
    ctxt.world.activity.put_in(actor, "Center Room")

@before(Going(actor, "north") <= PEquals("253 Commonwealth Ave.", Location(actor)))
def ring_doorbell_instead(actor, ctxt) :
    ctxt.write("The door is locked.  Looking around the door, you find a doorbell, and ring that instead.[newline]")
    raise DoInstead(Pushing(actor, "doorbell"), suppress_message=True)

###
### Center Room
###

quickdef(world, "Center Room", "room", {
        Description : """This is the center room, which is a common
        area at tEp.  Around you are composite photos from the past<commit_msg>cleaned up a little wording in the pre-pre-alpha tep tour<commit_after># teptour.py
#
# The tEp virtual house tour!
# (c) 2011 tEp, Xi chapter
#
# Authors: <NAME>

execfile("textadv/basicsetup.py")

world[Global("release_number")] = "0.0 (July 10, 2011)"

world[Global("game_title")] = "The tEp Virtual House Tour"
world[Global("game_headline")] = "A factual fantasy"
world[Global("game_author")] = "tEp, Xi chapter"
world[Global("game_description")] = """
<i><b>Note:</b> This is the development version of the house tour.
Please talk to Kyle if you have any suggestions, stories, or puzzles
to include.  If you come across any error messages, please e-mail them
to him.  Thanks.</i>[newline]

You've heard stories about tEp: the purple palace, a.k.a. the last stronghold
of the knights of the lambda calculus.  You've been meaning to get
over there to see what it's all about.

[newline]But, you are lazy.  Instead, you went to the tEp website and
opted for the <i>virtual</i> house tour.  We understand.

[newline]For your tour, we are providing you with [ob <Irving
Q. Tep>], the spirit of the house.  He'll be giving you the
descriptions and stories you will read during your tour.

[newline]Without further ado, we present"""

world.activity.put_in("player", "253 Commonwealth Ave.")

parser.understand("upstairs", "up", dest="direction")
parser.understand("downstairs", "down", dest="direction")

quickdef(world, "Irving Q. Tep", "person", {
        Gender: "male",
        Description : """It's Irving Q. Tep, spirit of the house.  He
        is giving you stories and such <i>telepathically</i> using
        images and text.  Quite amazing.

        [newline]You can ask Irving Q. Tep about various concepts. For
        instance "[action <ask about stupidball>]" (which is shorthand
        for "[action <ask Irving about stupidball>]")."""
        },
         make_part_of="player")
# See section "Consulting Irving Q. Tep..." for adding things one can
# ask him about

####################
### The basement ###
####################

quickdef(world, "Basement", "room", {
        Description : """This is the basement of tEp.  You can go back
        [dir up] the stairs, [dir southwest] into the kitchen, or [dir
        northwest] into the bike room."""
        })
world.activity.connect_rooms("Basement", "southwest", "Kitchen")
world.activity.connect_rooms("Basement", "northwest", "Bike Room")

quickdef(world, "Kitchen", "room", {
        Description : """This is a commercial-grade kitchen.  You can
        go [dir northeast] back to the basement."""
        })

quickdef(world, "Bike Room", "room")

###################
### First floor ###
###################

###
### In front of tep (253 Commonwealth Ave.)
###

quickdef(world, "253 Commonwealth Ave.", "room", {
        Description : """You are standing outside the illustrious Tau
        Epsilon Phi (Xi chapter), the veritable purple palace.  It is
        a hundred-year-old brownstone in the middle of Boston's Back
        Bay.  Outside the building is a [ob <purple tree>] and a [ob
        <park bench>].  To the [dir north] is the [ob door] to enter
        tEp."""
        })

quickdef(world, "purple tree", "thing", {
        Scenery : True,
        Description : """Looking both ways, you see that this is the
        only purple tree along the entire avenue.  It's very
        purple."""
        },
         put_in="253 Commonwealth Ave.")

quickdef(world, "park bench", "supporter", {
        Scenery : True,
        IsEnterable : True,
        Description : """It's a handmade park bench wrought from
        steel, built by a previous tEp.  After a few years of use,
        it's been bent quite out of whack."""
        },
         put_in="253 Commonwealth Ave.")
parser.understand("sit on [object park bench]", Entering(actor, "park bench"))

@report(Entering(actor, "park bench"))
def report_sitting_on_park_bench(actor, ctxt) :
    ctxt.write("You sit on [ob <park bench>], and the metal creaks and bends under your weight.")
    raise ActionHandled()

quickdef(world, "front door", "door", {
        Reported : False,
        Lockable : True,
        IsLocked : True,
        Description : """It's a big, old door.  Through the glass, you
        can see blinking LED lights hanging from the stairwell."""
        })
world[NoLockMessages("front door", "no_open")] = "It's locked.  Perhaps you should ring the [ob doorbell]."
world.activity.connect_rooms("253 Commonwealth Ave.", "north", "front door")
world.activity.connect_rooms("front door", "northwest", "Center Room")

quickdef(world, "doorbell", "thing", {
        Words : ["@doorbell", "door", "@bell"],
        Scenery : True,
        Description : """It's a small, black button, and you almost
        didn't notice it.  It turns out the FedEx guy enjoys this
        doorbell."""
        },
         put_in="253 Commonwealth Ave.")
parser.understand("ring [object doorbell]", Pushing(actor, "doorbell"))

@before(Pushing(actor, "doorbell"))
def before_pushing_doorbell(actor, ctxt) :
    raise ActionHandled()
@when(Pushing(actor, "doorbell"))
def when_pushing_doorbell(actor, ctxt) :
    ctxt.world.activity.put_in(actor, "Center Room")
@report(Pushing(actor, "doorbell"))
def report_pushing_doorbell(actor, ctxt) :
    ctxt.write("""You hear a loud subwoofer buzzing at 32 Hz, and,
    after a few moments, footsteps down the stairs.  A young tEp opens
    the door for you and leads you in.  "Ah, I see you're getting the
    virtual house tour from [ob <Irving Q. Tep>]," he says.  "Those
    are really good."  Before running off, he brings you to the...""")

@before(Going(actor, "north") <= PEquals("253 Commonwealth Ave.", Location(actor)))
def ring_doorbell_instead(actor, ctxt) :
    ctxt.write("The door is locked.  Looking around the door, you find a doorbell, and you ring that instead.[newline]")
    raise DoInstead(Pushing(actor, "doorbell"), suppress_message=True)

###
### Center Room
###

quickdef(world, "Center Room", "room", {
        Description : """This is the center room, which is a common
        area at tEp.  Around you are composite photos from the past
{'fraction_non_alphanumeric': 0.13564642709624122, 'fraction_numerical': 0.006278397356464271, 'mean_word_length': 3.463864306784661, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3777771', 'n_tokens_mistral': 3719, 'n_tokens_neox': 3526, 'n_words': 1376}