Exemplo n.º 1
0
 def loadgame(self):
     game.showtext("WARNING, save and load is not fully tested yet. ")
     root = TK.Tk()
     path = TK.filedialog.askopenfilename(initialdir = "/", title = "Load game", filetypes = (("Untitled adventuregame savegame", "*.uagsave"),("all files", "*.*")))
     root.withdraw()
     if path == "" or not os.path.isfile(path):
         if game.yesno("The game was not loaded. Try again?"):
             return self.loadgame()
         else:
             return False
     
     f = open(path, "r")
     ldata = json.load(f)
     lversion = ldata["version"]
     #comparing version
     major  = lversion[0] - self.version[0]
     minor  = lversion[1] - self.version[1]
     #hotfix = lversion[2] - self.version[2]
     if major == 0:
         if minor == 0:
             #not worth comparing a hotfix
             pass
         elif minor > 0:
             game.showtext("Warning: This save was made with a newer version of the game. This may cause problems.")
         else:
             game.showtext("Warning: This save was made with a older version of the game. This should be fine, but could cause issues.")
     elif major > 0:
         game.showtext("WARNING! This save is FROM THE FUTURE! You should run a newer version of the game instead.")
     else:
         game.showtext("WARNING! The save is OLD! The game may not run correctly with this savefile.")
     
     self.data = ldata
     return True
Exemplo n.º 2
0
 def core():
     game.showtext(
         "The ladder-shaft ends in a roof-hatch, you open it and stare into the huge spherical room above"
     )
     #        game.rolltext("""
     #You open the hatch, and beholds the spinning room.
     #In the light gravity you push off upwards into the core.
     #        """)
     goto("core")
def elevator(save):
    #region elevator
    room = save.getdata("room")

    coredesc = """The evevator appears as large cyllinder that smoothly sticks out of the inner sphere of the core.
    The walls sloping inwards to give way to the elevator doors. You float your way over to have a closer look."""
    corridesc = """The elevators breaks up the corridor, as the corridor splits to around a large round column you learn is the elevator shaft,
the walls around bending outwards giving way for the path around the shaft until they hit flat outer walls."""
    if room == "outer":
        buttonsets = "up"
    elif room == "core":
        buttonsets = "down"
    else:
        buttonsets = "up, down"
    game.rolltext("""
{0}
You find six elevator doors in pairs of two around the large cylinder.
You also locate a set of call-buttons for {1} and cargo, whatever that last one means.
    """.format(coredesc if room == "core" else corridesc, buttonsets))
    

    
    if room == "middle" or room == "inner":
        choices = (("UP", "Press UP call button"), ("DOWN","Press DOWN call button"), ("CARGO","Press CARGO call button"), ("EXIT","Leave"))
    elif room == "core":
        choices = (("DOWN","Press DOWN call button"), ("CARGO","Press CARGO call button"), ("EXIT","Leave"))
    elif room == "outer":
        choices = (("UP", "Press UP call button"), ("CARGO","Press CARGO call button"), ("EXIT","Leave"))

    _,choice = game.choose2(choices, "Press a button?")
    if choice != "EXIT":
        if(save.getdata("WheelC_elevator") == "dead"):
            text = """
You press the button.
...
Nothing happened.
            """
        else:
            text = """
You press the button.
The button flashes.
...
You hear an odd clang
...         """
            if choice == "CARGO":
                text += "\nTwo of the elevator doors open in a very slight crack."
            else:
                text += "\nOne of the elevator doors open in a very slight crack."
            text += "\nThen you hear a fizzeling sound, and everything stops working"
            save.setdata("WheelC_elevator", "dead")
        game.rolltext(text)
    else:
        game.showtext("You left the elevators alone")
    #endregion elevator
    def sink():
        #region Sink()
        if (save.getdata("apartment:sink")):
            game.showtext("The mirror is still broken.")
        else:
            save.setdata("apartment:sink", True)
            game.rolltext("""
You walk to the sink.
You see glass shards in the sink.
The mirror is broken.
What little of yourself you can see looks like a mess.
You might want to find a proper bathroom and freshen up a bit.
            """)
Exemplo n.º 5
0
    def savegame(self):
        game.showtext("WARNING, save and load is not fully tested yet. ")
        root = TK.Tk()
        path = TK.filedialog.asksaveasfilename(initialdir = "/", title = "Save game", filetypes = (("Untitled adventuregame savegame", "*.uagsave"),("all files", "*.*")))
        root.withdraw()
        saveOK = True
        if path == "":
            saveOK = False
        elif os.path.isfile(path):
            messagebox.askokcancel("Untitled adventure game","Override existing savefile?")
            saveOK = False
        if ".uagsave" not in path:
            path = path + ".uagsave"

        if saveOK:
            self.setdata("version", self.version)
            f = open (path, "w+")
            json.dump(self.data, f)#, True, True, True, True, None, (', ', ': '), "UTF-8", False)
            f.close()
        elif game.yesno("The game was not saved. Try again?"):
            return self.savegame()
Exemplo n.º 6
0
    def game_loop():
        while True:
            roomReq = save.getdata("room")
            if(roomReq == None): #newgame location
                roomReq = "apartment"
            #space to check for special conditions
            game_over = game.getGameover(save)
            if(game_over):
                game.showtext("""
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾\\_GAME_OVER_/‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
{0}
_________________________________________________
                """.format(game_over))
                break
            #general rule
            room = None
            try:
                room = world[roomReq]
            except:
                room = None
            if(room):
                room(save)
                game_over = game.getGameover(save)
            else:
                game.showtext("""
|---------------------- !!! ----------------------|
|    Sorry, something went wrong.                 |
|    The game could not find {0}                  |
|    The game will now end.                       |
|    Do you wish to save the game first?          |
|---------------------- !!! ----------------------|
                """.format(roomReq))
                if(game.yesno("Save game?")):
                    save.savegame()
                break
            if not game_over:
                if(game.yesno("Open game menu?")):
                    game.gameMenu(save)
Exemplo n.º 7
0
def start():
    world = build_world() # areas the player may visit.
    save = savadata(VERSION)

    def game_loop():
        while True:
            roomReq = save.getdata("room")
            if(roomReq == None): #newgame location
                roomReq = "apartment"
            #space to check for special conditions
            game_over = game.getGameover(save)
            if(game_over):
                game.showtext("""
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾\\_GAME_OVER_/‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
{0}
_________________________________________________
                """.format(game_over))
                break
            #general rule
            room = None
            try:
                room = world[roomReq]
            except:
                room = None
            if(room):
                room(save)
                game_over = game.getGameover(save)
            else:
                game.showtext("""
|---------------------- !!! ----------------------|
|    Sorry, something went wrong.                 |
|    The game could not find {0}                  |
|    The game will now end.                       |
|    Do you wish to save the game first?          |
|---------------------- !!! ----------------------|
                """.format(roomReq))
                if(game.yesno("Save game?")):
                    save.savegame()
                break
            if not game_over:
                if(game.yesno("Open game menu?")):
                    game.gameMenu(save)
        #end game loop
    #end game loop function

    game.showtext("Welcome to")
    f = open("title.txt", 'r', encoding="utf-8")
    titlecard = f.read()
    game.rolltext(titlecard, 0.05)
    f.close()
    time.sleep(1)
    game.showtext()
    while(True):
        game.showtext("Untitled! The adventure game")
        game.showtext("MAIN MENU")
        choices = ["New Game", "Load Game", "About", "End game"]
        choice = game.choose(choices)
        if(choice == 0):
            save = savadata(VERSION)
            try:
                game_loop()
            except SystemExit as _:
                return
            continue
        if(choice == 1):
            if not save.loadgame():
                continue
            try:
                game_loop()
            except SystemExit as _:
                return
            continue
        if(choice == 2):
            game.RunGeneral(save,"about")#starts credits roll
            continue
        if(choice == 3):
            return
Exemplo n.º 8
0
 def outer():
     game.showtext("You open the hatch for the outer ring")
     goto("outer")
Exemplo n.º 9
0
#import time
import game_utilities as game


def main():
    f = open("title.txt", 'r', encoding="utf-8")
    titlecard = f.read()
    game.rolltext(titlecard, 0.05)
    f.close()
    f = open("credits.txt", 'r', encoding="utf-8")
    creditsText = f.read()
    game.rolltext(creditsText, 0.1)
    f.close()
    #time.sleep(1)


if __name__ == "__main__":
    game.showtext("PLEASE RUN GAME FROM main.py INSTEAD!")
    pass  #testing-code
    ]
    end = False
    while not end:
        game.showtext("You are sitting on the side of the bed")
        choice = game.choose(choices)
        if choice == 0:
            window()
        elif choice == 1:
            table()
        elif choice == 2:
            sink()
        elif choice == 3:
            if (door()):
                return save.goto("middle")
            pass
        elif choice == 4:
            if (game.gameMenu(save)):
                break
        #if room is revisited after the reactor counter has been enabled,
        #you will be wasting time here.
        status = game.updateCounter(save, "reactorC", -1)
        if status == "death":
            end = True


if __name__ == "__main__":
    #testers, feel free to enter your testcode here.
    #if your only change is in this code-block, feel free to commit.
    game.showtext(
        "Testcode for this room is not written yet.\nPlease run from main.py instead."
    )
Exemplo n.º 11
0
    def auxcom_repair():
        #grabbing some data from save
        #redwhiteblue = save.getdata("auxcom:redwhiteinblue")
        cargoConnected = save.getdata("auxcom:cargo")
        blueinblue = save.getdata("auxcom:blueinblue")
        tblueinwhite = save.getdata("auxcom:thickblueinwhite")
        yellowtasted = save.getdata("auxcom:yellowtasted")
        systemStatus = save.getdata("auxcom:systemstatus", "BROKEN")
        #region auxcom repair
        game.rolltext("""
You find a large panel with a screen on wall next to you.
It has the following text painted and engraved under it
        |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|
        |   AUXILLARY COMS      |
        |                       |
        | FOR AUTHORIZED USE    |
        |          ONLY         |
        |_______________________|
Under that you find a smaller panel that seem to invite you to push it.
        """)
        if not game.yesno("Push the lower panel?"):
            game.showtext("You leave the auxillary communications panel alone")
            return
        if (cargoConnected):
            return dialoges.auxcom_cargo(
                save)  #auxcom_cargo: contact the folks in cargo.
        if (systemStatus == "OK"):
            game.rolltext("""
You push the panel. The panel lowers as a latch to reveal a keyboard.
The screen turns on and displays the text
        ' AUXILLARY COMS ONLINE. DO YOU WISH TO PLACE A CALL?'
            """)
            return dialoges.auxcom_contact(
                save)  #auxcom_contact: finding someone to talk to
        # auxcom main: fix the system
        if (systemStatus == "SHUTDOWN"):
            game.rolltext("""
You push the panel.  The panel lowers as a latch to reveal a keyboard.
The screen remains off for a while. Then you hear a beep.
            """)
            if tblueinwhite:
                systemStatus = "OK"
                game.rolltext("""
The screen turns on and displays the text
        'CONNECTION RE-ESTABLISHED! DO YOU WISH TO PLACE A CALL?'
                """)
                save.setdata("auxcom:systemstatus", systemStatus)
                return dialoges.auxcom_contact(save)
        else:
            game.showtext(
                "You push the panel. The panel lowers as a latch to reveal a keyboard."
            )
        game.rolltext("""
The screen turns on, but displays static.
Unseen speakers make some sort of repeated beeping pattern that
seems oddly familiar, but you cannot quite place it.

You notice a handle on the side of the panel the screen is on.
            """)
        if not game.yesno("open the panel?"):
            game.showtext(
                "You decide it is not worth bothering with, close the lower panel, and turn to leave."
            )
            return
        """
Opening the panel you find a mess of vires, some of them lose.
Unfortunetly, none of them are labled, and all have the same port shape.
The only diffrence is the thinkness and color of the cables.

You take a moment to brainstorm ideas on what do with with the cables.
...
..
.
You made a list of things you could try.
        """
        #NOTE: the general idea I have is to have a larger puzzle where options are added and removed as you try things.
        #       For now, there is only a single set of options, where the bad options are removed as they are attempted.
        #       Uses game.choose2 to allow for options to be added and removed
        choices = []
        choices.append(
            ("THICK BLACK IN WHITE",
             "Disconnect thick black cable and plug it into white socket"
             ))  #a speaker explodes
        choices.append(
            ("BLUE IN BLUE", "Plug blue cable into blue socket")
        )  # nothing happens. if left this way, one speaker will later have a (harmless) feedback
        choices.append(
            ("REDWHITE IN WHITE",
             "disconnect red/white striped cable and plug it in white socket")
        )  # screen comes to life, displaying an audiovawe of your panting.
        choices.append(
            ("REDWHITE IN BLUE",
             "disconnect red/white striped cable and plug it in blue socket")
        )  # screen remains static, but what looks like flags seems to faintly fly in the background.
        choices.append(
            ("THICK BLUE IN WHITE",
             "Disconnect thick Blue cable and plug it into white socket"
             ))  #nothing happens (key to make it work)
        choices.append(
            ("TASTE BLACK",
             "disconnect thick black cable and taste it."))  # yeah.. death.
        choices.append(
            ("YELLOW IN BLACK",
             "plug yellow cable into black socket"))  #com system shuts down
        choices.append(
            ("TASTE YELLOW", "taste yellow cable"
             ))  #this acually works... after you plug blue into white
        random.shuffle(choices)
        choices.append(("EXIT", "close panel"))

        cableLoop = True

        while cableLoop:
            text = ""
            i, a = game.choose2(choices, "What will you try next?")
            if a == "EXIT":
                cableLoop = False
                break  #redundant?
            #endof exit
            elif a == "TASTE YELLOW":
                text = ""
                if yellowtasted:
                    text += """
You decide to try and lick the yellow cable again.
...
Yup, still tingley
                    """
                else:
                    yellowtasted = True
                    text += """
On a whim you decided to lick the end of the yellow cable.
It had kind of a tingely taste to it."""
                if tblueinwhite:
                    text += """
As you lick, you notice the system {0}boot, and a robotic voice comes the the speakers.
"<<CONNECTION RE-ESTABLISHED! DO YOU WISH TO PLACE A CALL?>>"
                    """.format("re" if systemStatus != "SHUTDOWN" else "")
                    systemStatus = "OK"
                elif systemStatus == "SHUTDOWN":
                    text += """
As you lick the cable, the com-system suddenly comes back to life!
Though it is back to just beeps and static
                    """
                    systemStatus = "BROKEN"
                else:
                    text += """
The system blinks and reboots.
Nothing seems to have changed though, still just beeps and static.
                    """
            #endof taste yellow
            elif a == "THICK BLACK IN WHITE":
                text = "You disconnect the think black cable, and plug it into the white socket."
                if systemStatus == "SHUTDOWN":
                    text += "\nAt first, this seems to work, as the system seemed to turn back to life. Alas it were not to last."
                text += """
            
Suddenly there was some sparks in the area aroud the white socket.
You hear a faint hum.
Then hum then turns into a screeching sound that increase in frequency and volume.
Then a speaker explodes, and the system goes black{0}.
You quickly disconnect the black cable, and put it back to where it was.
You decide not to try that again.
                """.format(" again" if systemStatus != "SHUTDOWN" else "")
                systemStatus = "SHUTDOWN"
                choices.pop(i)
            #endof thick black in yellow
            elif a == "BLUE IN BLUE":
                blueinblue = True
                text = """
You insert the blue cable in the blue socket.
...
*blip*
....
..
Nothing...
Other than a faint blip, nothing happened. You scratch this off the list.
                """
                choices.pop(i)
            #endof blue in blue
            elif a == "REDWHITE IN WHITE":
                text = "You plug the red-white striped cable in the white socket."
                if systemStatus == "SHUTDOWN":
                    text += "\nBut nothing happened, and the system is still shut down."
                else:
                    text += """
The beeps stop, and you notice the screen stops playing static.
You check the screen
....
'What th..'
you are about to say when all you saw was a flat blue line.
But then you noticed it made a wave as you talked.
Well, that's very 'useful'
                    """
                text += "\nYou disconnect the red-white striped cable.\nThat was a blind end."
                choices.pop(i)
            #end of redwhite in white
            elif a == "REDWHITE IN BLUE":
                text = "You plug the red-white striped cable in the blue socket."
                if systemStatus == "SHUTDOWN":
                    text += "\nBut nothing happened, and the system is still shut down."
                else:
                    text += """
You hear an extra beep as you plug in the cable, but nothing else.
The screen blinks, but seems to be back to show ing static.
You check the screen, and you notice the screen now shows something behind the static.
....
'What the..'
you say as you notice a number of red white and blue flags burned into the background of the static.
Well, that's.. colorful...
                    """
                text += "\nYou disconnect the red-white striped cable.\nThat was a blind end."
                choices.pop(i)
            #endof redwhite in blue
            elif a == "THICK BLUE IN WHITE":
                text = ""
                if systemStatus == "SHUTDOWN":
                    if tblueinwhite:
                        text += "\nYou unplug the thick blue cable, and plug it back in."
                    else:
                        text += "\nYou plug the thick blue cable in the white slot"
                    text += "\nBut nothing happened. The system is still shut down."
                    text += "\nYou decide to leave the cable connected."
                else:
                    if tblueinwhite:
                        text += "\nYou unplug the thick blue cable, and plug it back in."
                        text += "\nThe screen blinks with brief static, but once again displays black screen with the text 'ERROR - PLEASE REBOOT'."
                    else:
                        text += """
You plug the thick blue cable in the white slot
You notise the screen suddenly stopped displaying static.
You check the screen, and find it now displays a black background with a text in white
        'ERROR - PLEASE REBOOT'
                        """
                tblueinwhite = True
            elif a == "TASTE BLACK":
                text = """
You unplug the big thick black cable, and stuck out your tongue to lick it.
You're not sure why you just did that.
As you somehow put the cable in your mouth, the world goes black.
                """
                game.setGameover(
                    save,
                    "You put a live power-cable in your mouth. Yeah, you are dead."
                )
                nav.running = False  #escape outer room loop
                cableLoop = False  #escape inner loop
            elif a == "YELLOW IN BLACK":
                pass
                if systemStatus == "SHUTDOWN":
                    text = """
You unplug the cable in the black slot, and plug in the yellow.
Nothing happened, and the system is still shut down.
You decide to undo it, plugging the black cable back in.
                    """
                else:
                    text = """
You unplug the cable in the black slot, and plug in the yellow.
As you plug in the yellow cable, there was a breif spark, then system shuts down.
You decide to undo it, and never try that again, putting the black cable back in.
                    """
                    choices.pop(i)
                systemStatus = "SHUTDOWN"
            game.rolltext(text)

        #saving data..
        #save.setdata("auxcom:redwhiteinblue", redwhiteblue)
        save.setdata("auxcom:blueinblue", blueinblue)
        save.setdata("auxcom:thickblueinwhite", tblueinwhite)
        save.setdata("auxcom:yellowtasted", yellowtasted)
        save.setdata("auxcom:systemstatus", systemStatus)
        if (systemStatus == "OK"):
            return dialoges.auxcom_contact(save)
        elif not game.getGameover(save):
            game.showtext("You leave the AUX com alone.")
Exemplo n.º 12
0
 def cafeteria():
     game.showtext("The Cafeteria is closed!")
Exemplo n.º 13
0
 def door_2A68():
     game.showtext("You open the door to your apartment and go inside.")
     goto("apartment")
Exemplo n.º 14
0
    def bathrooms2(subroom):
        gender = None
        visited = save.getdata(
            "bathroom:visited",
            False)  # if the Player Character has visited the bathrooms beofore
        showered = save.getdata("bathroom:showered",
                                False)  # whatever the PC has showered
        relived = save.getdata(
            "bathroom:relived",
            False)  # whatever the PC has had the chance to relive themself
        keepsake = save.getdata(
            "spouse:keepsake", False
        )  # potential use in later chapters. Only unlockable if you have remembered who your spouse is.

        relationKlara = save.getdata(
            "klara", None
        )  #if spouse, unlocks retrival of keepsake in ladies locker-room
        relationJeff = save.getdata(
            "jeff",
            None)  #if spouse, unlocks retrival of keepsake in mens locker-room

        choices = None

        wrongroom = ""  #if the PC enters the wrong bathroom, this extra nerrative is added.
        facedesc = ""  #describes what the PC sees in the mirror (male or female)
        areadesc = ""  #describes the facilities in the room (mens or ladies)

        #This section determines PC's gender if not already set.
        if subroom == "mens":
            gender = save.getdata("gender", "male")
            if gender != "male":
                wrongroom = """
You're not exacly sure why you went into the men's room, and not the ladies' room.
Though you suppose it doesn't really matter. There is nobody here anyways."""
            areadesc = """ a line of toilet stalls, a large urinal, a few changing rooms, a locker room,
showers, couple of them private, and a dispenser of hygine products."""
            choices = (("SINK", "Spash water in your face"),
                       ("TOILET", "Visit a toilet booth"),
                       ("URINAL", "Visit the urinal"),
                       ("HYGINE_MENS", "open the hygine dispenser"),
                       ("SHOWER", "Go the the showers"),
                       ("LOCKERS", "Go to the locker room"), ("EXIT", "leave"))
        elif subroom == "ladies":
            gender = save.getdata("gender", "female")
            if gender != "female":
                wrongroom = """
A man going inside the ladies room would normally be seen as quite perverted.
But as it is, the ladies is as vacant of people as the rest of this place."""
            areadesc = """ a line of toilet stalls, a few changing rooms, a looker room, showers, couple of them private
and a hygine despenser with varius.. products..."""
            choices = (("SINK", "Spash water in your face"),
                       ("TOILET", "Visit a toilet booth"),
                       ("HYGINE_LADIES", "open the hygine dispenser"),
                       ("SHOWER", "Go the the showers"),
                       ("LOCKERS", "Go to the locker room"), ("EXIT", "leave"))
        if gender == "male":
            facedesc = "a rugged man with a stubby beard."
        if gender == "female":
            facedesc = "a tired looking woman with clear bags under they eyes."
        if not visited:
            game.rolltext("""
You enter the {0} room.{1}
Finding yourself in front of the large array of sinks and mirrors.
Some of the mirrors are broken, but you found one that was relativly intact.
You have a look at yourself.
What you see is {2}
You look about as shitty as you feel, yet it does look familiar.
That's a good thing, right?
Looking around, you see {3}
            """.format(subroom, wrongroom, facedesc, areadesc))
        else:
            game.showtext("PLACEHOLDER text for return visit to bathrooms.")
        visited = True
        save.setdata("bathroom:visited", True)
        while True:
            _, choice = game.choose2(choices, "What do you want to do?")
            if choice == "EXIT":
                game.showtext("You leave the {0} room".format(subroom))
                return
            elif choice == "SINK":
                game.showtext(
                    "You splash some water on your face. It feels refreshing.")
            elif choice == "TOILET":
                act = ""
                if (relived
                    ):  #relived = save.getdata("bathroom:relived", False)
                    act = "You sit for a bit, resting. You don't feel the need to 'do' anything."
                else:
                    act = "You relieve yourself right there and then. You must have held it in for a while without thinking about it."
                    save.setdata("bathroom:relived", True)
                    relived = True
                game.rolltext(
                    """You locate a nice toilet booth, and sit down on a porcelain throne.
                Well, ok, not porcelain, these toilets are made of metal.
                {0}
                After a while you decide it is time to get back up""".format(
                        act))
            elif choice == "URINAL":
                if relived:
                    game.showtext(
                        "you stand over by the urinal for a bit, but you don't feel any need to use it."
                    )
                elif gender == "female":
                    game.showtext(
                        "As you approach the urinal, you wondered how it was like for men to use contraptions like this."
                    )
                    if (game.yesno("Try to piss in it?")):
                        game.rolltext("""You awkwardly posision yourself,
and partially relive youself down the urinal.
It was kinda fun.
And you mostly hit the target.
mostly..

Still, having done that, you realize you have 'other' needs to relive youself of."""
                                      )
                        if (game.yesno("Take a dump in the uninal?")):
                            game.showtext(
                                "You did the deed in the urinal. you slowly back off, giggling a bit as your inner girl got her wicked wish."
                            )
                            save.setdata("bathroom:relived", True)
                            relived = True
                    else:
                        game.showtext("You left the uninal alone.")
                else:
                    game.rolltext(
                        """You instinctively unzip and relive youself down the uninal.
 it was quickly done.
 But soon you realize you have 'other' needs to relive youself of.""")
                    if (game.yesno("Take a dump in the uninal?")):
                        game.showtext(
                            "You did the deed in the urinal. you slowly back off, giggling a bit as your inner child got his very childish wish."
                        )
                        save.setdata("bathroom:relived", True)
                        relived = True
            elif choice == "HYGINE_LADIES":
                game.showtext(
                    "You examine the dispenser. You find some soaps, tampons, manual razor blades, a few female condoms. Nothing you really need right now"
                )
            elif choice == "HYGINE_MENS":
                game.showtext(
                    "You examine the dispenser. You find some soaps, condoms, razor blades. Nothing you really need right now."
                )
            elif choice == "SHOWER":
                if showered:
                    game.showtext(
                        "You go over to the showers. But you already feel clean, so you go back."
                    )
                else:
                    game.rolltext("""You enter one of the private show stalls.
You undress, and turn on the shower
You note as all the grime washes off you.
you feel a lot better now.
...
...
you dry up, dress yourself and again, and leave the shower.""")
                    showered = True
                    showered = save.setdata("bathroom:showered", True)
            elif choice == "LOCKERS":
                text = "You take a walk along the lockers."
                if keepsake:
                    text += "\nThere was not much more to see."
                elif subroom == "mens" and relationJeff == "spouse":
                    text += """
You stumble upon a familiar locker. Jeff's locker.
Your hands move on their own, it seems his locker combination is deep in your subconsius.
Inside you find a small box.
It feels important.
You take it with you."""
                    keepsake = True
                elif subroom == "ladies" and relationKlara == "spouse":
                    text += """
You stumble upon a familiar locker. Klara's locker.
Your hands move on their own, it seems her locker combination is deep in your subconsius.
Inside you find a small box.
It feels important.
You take it with you."""
                    keepsake = True
                else:
                    text += "\nThere was not much to see."
                save.setdata("spouse:keepsake", keepsake)
                game.rolltext(text)
            status = game.updateCounter(save, "reactorC", -1)
            if status == "death":  #if reactor counter reach 0, and the game ends.
                break
Exemplo n.º 15
0
Your hands move on their own, it seems her locker combination is deep in your subconsius.
Inside you find a small box.
It feels important.
You take it with you."""
                    keepsake = True
                else:
                    text += "\nThere was not much to see."
                save.setdata("spouse:keepsake", keepsake)
                game.rolltext(text)
            status = game.updateCounter(save, "reactorC", -1)
            if status == "death":  #if reactor counter reach 0, and the game ends.
                break
        #end of loop

    bathrooms1()  #Starts the room.


if __name__ == "__main__":
    #testers, feel free to enter your testcode here.
    #if your only change is in this code-block, feel free to commit.
    game.showtext(
        "--- Welcome to the middle ring test code. For a regular playthugh, please run main.py instead. ---"
    )
    #testing-code
    from main import savadata
    from main import VERSION
    testsave1 = savadata(VERSION)
    testsave1.setdata("name", "Tester")
    testsave1.goto("middle")

    main(testsave1)
Exemplo n.º 16
0
def auxcom_cargo(save):
    #Note: Whatever the dialoge, it is up to the player what to do afterwards.
    asshole = save.getdata("auxcom:asshole", False)
    reactorFixed = save.getdata("reactorC:fixed", False)
    prevcontact = save.getdata("auxcom:cargo", False)
    thankedForReactor = save.getdata("auxcom:react_thanks", False)
    
    key = save.getdata("auxcom:stasispasskey", False)
    # Only change is the information they are given.
    # From here, or the ladder if the player skips this, a counter is enabled that gives the player 10 'time units' before game over.
    if not reactorFixed and game.getCounter(save, "reactorC")[0]: #counter not enabled
        game.setCounter(save, "reactorC", "onReactorCTime", 10) #sets up a new timer, running onReactorCTime every time it is updated.

    name = game.getName(save)
    gender = game.getGender(save)
    klara =  game.getKlara(save)

    if prevcontact:
        #TODO: alternate contact for returning to auxcom
        if asshole:
            game.rolltext("What? You again? uhm.. sorry, just lost connection!\n(call disconnected!)")
        elif reactorFixed:
            if not thankedForReactor:
                game.rolltext("""
Hey! Good job with the reactor!
The accellerator seems to be running stable for now.
It will not last long, but at least we aren't in a hurry any more.
Looks like we got maybe two hours. Though bestnot wait that long.

Alright, what I need you to do now, is to rescue everyone who is stuck in stasis.
Any questions?
                """)
            else:
                game.rolltext("""
Hello again.
Again, thanks for fixing the reactor. We still got some time.
Did you have more questions?
                """)
            choices = (
                ("CODE", "What was that code again?"),
                ("TRUTH","Exacly what happened?"),
                ("EXIT", "Not right now. Bye.")
            )
            while True:
                _, c = game.choose2(choices, "How do you respond?", "<<{2}")
                if c=="EXIT":
                    game.showtext("Ok then. Hope to see you here soon.")
                    break
                elif c=="CODE":
                    game.rolltext("""
As we said earlier, the code is 0-0-0-0-0.
Again, please don't mock us for not changing the factory settings.
                    """)
                elif c=="TRUTH":
                    game.rolltext("""
Well, that's the thing. We are still investigating.
What we know so far is that there was a glitch in the nav system.
We don't know how that happend, nor why nobody noticed.
Well, this glitch caused us to pass though an asteroidbelt.
We don't know how that happened, nor why nobody noticed.
Well, this glitch caused us to pass through an asteroidbelt.

Our fine pilots got us through the worst. The ship may not be very manuverable,
but there are still kilometers between the rocks, so at least we had a good chance.
But alas we hit one of the smaller rocks that we somehow missed on our LIDAR.
                    """)
                    choices2 = ("Ask for short version", "Continue listening to the entire tale")
                    c2 = game.choose2(choices2, "Interrupt?")
                    if c2 == 0:
                        game.rolltext("""
Um.. sorry? Well, you asked.
Ok. Short version.
We got hit hard by an asteroid. Might be sabotage, unknown.
We started an orderly evacuation, then the reactor got bad, and the hull breached a few places.
Then we woke everyone we could, and ran for the exit.
Sorry to say, but it seems you got left behind and forgotten in the chaos.
                        """)
                    else:
                        game.rolltext("""
The rock bounced off Wheel C, causing massive damage.
Immidiatly we sent repair-bots out to fix the damage to the reactor-ring.
The reactor ring and accellerator survived the impact, but got bent on a few places.
And you're an engineer, you know what happens if we keep sending tacheons though a bent reactor ring.
As expected, the nearby hull-section tore itself apart.
We lost all C-sections to vacuum in the matter of secunds.
So fixing the reactor ring proved quite urgent.

But the bots can't get over the the damage from the outside while the wheel was spinning,
and the AG-thursters got wrecked in the impact, so we coulden't brake the wheel.
So we thought we could send the bots though the section-doors, but lacking internal airlocks in the sections, we would need to vacuum the wheel first.
So we started evacuating, first by waking people by small groups at a time.

Our reports say you were amung the first to be recovered from stasis, unfortunatly, you remained unconscious.
So you were put in your bed untill you woke up.
We thought we had plenty of time to evacuate everyone in an slow and organized way.

Then the reactor started going bad.
The tacheon feedback from the bent accellerator ring hit earlier than eastimated.
So with fixing the reactor no longer being an option, we have to ditch the entire module. The neck, wheel and core. all of it.
And with that, we accellerated the evacuation.
We activated the emergency wake-up system, though some of the pods in the inner ring glitched out.

The People who did wake stumbled out of sleep en masse, heard the alarm, and started to panic.
It was already getting a bit chaotic, but then sectors 1D and 2D suddenly breached!

The already disorderly evacuation turned into an outright stampede.
Just as we got the last group though of paniced folks though, the doors decided to glitch up.
Then you suddenly contacted us. Good thing you did. We were about to edject the module,
using the internal atmosphere as thurst. You would have been sucked out into space had we done that.

Sorry you got left down there.
But the important thing now is to get you and everyone else stuck in the module out before we blow this thing.
                    """)
                game.showtext("Did you have more questions?")
        else:
            game.rolltext("""
Hi?
Look, our systems say the reactor is still in a bad condition!
We don't have time to chat!
Either fix the reactor, or get out of there!
            """)
    else:
        game.showtext("The people on the other side of the call is waiting for you to answer.")
        choices = [
            ("I'm {0}. I'm lost, where am I?".format(name)),
            ("Help, I don't know who or where I am!"),
            ("uhh"),
            ("I.. I think my name is {0}. I find it hard to remember.".format(name))
        ]
        ind, ans = game.choose2(choices, "What do I say?")
        game.showtext(">>"+ans)
        p = "mister" if gender == "male" else "miss"
        if ind == 0 or ind == 3:
            p = name
    
        if(reactorFixed):
            game.rolltext("""
Ok, {0}, I need you to stay calm. First off I need to know, was it you who stabilized the reactor?
        """)
            admitfix = game.yesno("Was it?")
            reactorText1 = ""
            reactorText2 = ""
            if(admitfix):
                reactorText1 = "Well, thanks for that, {0}. We were starting to sweat bullets up here."
                reactorText2 = "Thanks for fixing the reactor! Klara told me you were good with machines, {2}. I guess this proves it."
            else:
                reactorText1 =  "No? Well, if there are more of you awake down there {0}, you should get in contact with them as soon as possible.\n"
                reactorText1 += "They would likly be down in the outer ring, right below you."
                reactorText2 =  "It was you who fixed the reactor, wasen't it? Klara warned me you were as good a jokesteer as an engineer, {2}.\n"
                reactorText2 += "Besides, I can tell. Your voice carries some residual effect from someone resently exposed to micro-time loops."
            game.rolltext("""
{3}
They would likly be down in the outer ring, right below you.
Anyways, please hold the line for a bit, I'm gonna get some help.
(The woman you were talking leaves)
...
(A man, an engineer by the looks of his attire, takes her place)
Alright, {0}, I am not gonna lie. You are in a bit of trouble.
But thanks to the temporary fix to the reactor, we got some time.
First of, since we got the time, let me explain what has happened.

You are onboard the UNS Armstrong on route from Sol to Alpha Centauri.
If this seems unfamiliar to you, this may be due stasis-amnesia,
a common condition caused by emergency awakening from stasis.
On the way, there was a glitch i..
(the man is rudely interrupted by a third person)
Hey! I know you. You're Klara's {1} right?
Thanks for fixing the reactor! Klara told me you were good with machines, {2}, I guess this proves it.
{4}
We should probobly have you checked out in the infirmery once you get up here.
But for now, we need your help.

About two hundered people were stuck in stasis during the evacuation.
It is up to you. With the reactor temporarally fixed, we got maybe two hours before we need to detach the module.
I need you to climb up to the outer ring, and awake everyone who is still alive in there.
You will need a securitycode to enter the stasis chambers. The code is 0-0-0-0-0.
Yes, really. just 0-0-0-0-0.

Any questions?
            """.format(p, game.getGenderedTerm(klara, gender), name, reactorText1, reactorText2))
            choices = (
                ("WHY_ME", "Why can't you save them?"),
                ("WEAK_CODE", "Why the simple code?"),
                ("EXIT", "No. I'm on my way")
                )
            c = None
            while (c != 2):
                c, ans = game.choose2(choices, "How do you respond?", "<< {2}")
                if ans == "WHY_ME":
                    game.rolltext("""
There is a problem with the doors up here. Look, it's complicated. sufficed to say, we can't go in, but you and anyone you rescue can come out.
I'm not a door technician, I barely understand the problem myself. Not sure if we got the time for me to properly explain it.
                    """)
                elif ans == "WEAK_CODE":
                    game.rolltext("""
Well.. yeah.. we never expected there to ever be some kind of security issue onboard,
and we kinda still don't, so we never bothered to change the factory settings.
Don't worry about it.
                    """)
                elif ans == "EXIT":
                    game.rolltext("Good luck.\n(Call disconnected)")
                    break
            save.setdata("auxcom:stasispasskey", True)
            save.setdata("auxcom:cargo", True)
            save.setdata("auxcom:react_thanks", True)
        
    # If the reactor is not yet fixed:
        game.rolltext("""
Ok. {0}, I need you to stay calm. I'm gonna get some help
(The woman you were talking leaves)
...
(A man, an engineer by the looks of his attire, takes her place)
Ok, {0}. I am not gonna lie, you are in a bit of touble. We are gonna do what we can to help you.
You are onboard the UNS Armstrong on route from Sol to Alpha Centauri.
If this seems unfamiliar to you, this may be due stasis-amnesia,
a common condition caused by emergency awakening from stasis.
The reactor onboard is about to explode, so were about to detach the module when you contacted us.

Look {0}, I need you to find the emergency ladd..
(the man is rudely interrupted by a third person)
Hey! I know you. You're Klara's {1} right?
You're a engineer, right? Maybe you could try to stabilize the reactor temporarily?
There are still lots of people stuck in stasis in the upper ring!

Look, {2}, I woulden't blame you for just making a run for the ladder to save yourself, but you could save those people!
        """.format(p, game.getGenderedTerm(klara, gender), name))
        choices = [
            ("Screw them! I'm out of here! I'm gonna climb down and get out of here!"), #ignorant idiot option
            ("I.. I am not gonna take that chance. I'm just gonna go meet you up the ladder!"), #reluctant selfishness
            ("Alright, how do I get to the reactor?"),
            ("What exacly happened?")
        ]
        ind, ans = game.choose2(choices, "How do you respond?", "<< {2}")
        if ind == 3:
            game.rolltext("""
I figured you would ask that. We hit an asteroid!
We don't have time to go into details right now!
I need you to either stabilize the reactor so we can save everyone, or get you safely out of there!
            """)
            choices.pop(3)
            ind, ans = game.choose2(choices, "How do you respond?", "<< {2}")
        
        if ind == 0:
            game.rolltext("""
Well, ehm.. that's rude. ..
uh well, sure go DOWN the ladder. Uh, and take your good time too.
Got to go, bye!

(The call has ended)
            """)
            asshole = True
        elif ind == 1:
            game.rolltext("""
I see. Well, the reactor will reach a meltdown in just a few minutes, we need to detach the module before then.
You need to hurry! The escape ladder should be nearby. You need to climb up as fast as you can.
In case you need to pass though a locked security door, the code is 0-0-0-0-0. And, please dont ask.
Again, the code is 0-0-0-0-0!
We will meet you at the airlock in the module core.
Please beware, you will be weightless up here!
See you soon!

(The call has ended)
            """)
            key = True
        elif ind == 2:
            game.rolltext("""
Thanks for doing this!
Ok, there won't be much time, but we will hold off detaching the module as long as we can.
You should find the emergency stairs nearby. You need to climb down to the outermost ring.
The nearest reactor-node will not be far from the ladder.
You need to first initalize the emergency cooling system, then the emergency particle decelerator.
In that order! You will find detailed instructions on how to do this in the reactor-node control room.
Doing this will buy us maybe an hour or two before meltdown.
In case you need to pass though a locked security door, the code is 0-0-0-0-0. And, please dont ask.
Again, the code is 0-0-0-0-0!
You need to hurry! Get back and contact us again once you have done it!

(The call has ended)
            """)
            key = True
    save.setdata("auxcom:asshole", asshole)
    save.setdata("auxcom:stasispasskey", key)
    save.setdata("auxcom:cargo", True)
    save.setdata("auxcom:react_thanks", thankedForReactor)
Exemplo n.º 17
0
 def sectionAdoor():
     game.showtext(
         "You pass through the open door separating the two sectors")
     nav.setSection("A", 2)
Exemplo n.º 18
0
 def inner():
     game.showtext("You open the hatch for the inner ring")
     goto("inner")
def main(save):
    def newgame():
        #region NEW GAME
        save.setdata("room", "apartment")
        save.setdata("prevroom", "apartment")
        game.rolltext("""
Weeeee.. you are flying through the sky!
Below you is a beautiful forest, as green as anything you could ever imagine!
Deep down you know you are dreaming, but you can't quite get yourself to wake up.
suddenly you are in a vintage open cockpit biplane flying over the same lands...
                            **CRASH**

Your eyes shook open! Out the window you see the landscape you pictured in your dream.
It seems so nice, yet something seems off. Everything seems off.
You even struggle to remember your own name.. What.. was.. what was your name?
    """)

        nameExcuses = [
            "or maybe it was",
            "no why would.. that be my name.. no it must be ",
            "no.. ugh.. why can't I remember my name. Maybe it was",
            "no no no no! That can't be right, so it must be",
            "no, I think that's my best friend's name. wait, I got a best friend?? ugh.. what is my name??"
        ]

        inp = ""
        while True:
            inp = input()
            while len(inp) < 1:
                #while no input, silently re-request input
                inp = input()
            print()
            if game.yesno("ugh.. Was it {0}?".format(inp)):
                break
            print(random.choice(nameExcuses))
        save.setdata("name", inp)
        game.rolltext("""
Yes {0} the.. uhh.. something something title titles..
You are sure you'll remember soon enough. Your head is quite foggy.
You think you might have a headache, but you are not sure.
Looking around you see you are in a small room, an apartment maybe? Maybe a hotel room?
You are sitting on the edge of a large bed. Next to the bed is a small table.
On the table there are some small white spheres, a glass of water and two framed pictures face down
At the head end of the bed there is a window.
Towards the end of the room there is a sink with a mirror.
At the end is a door, probably the exit by the looks of it.

        """.format(save.getdata("name")))
        #endregion NEW GAME
    def sink():
        #region Sink()
        if (save.getdata("apartment:sink")):
            game.showtext("The mirror is still broken.")
        else:
            save.setdata("apartment:sink", True)
            game.rolltext("""
You walk to the sink.
You see glass shards in the sink.
The mirror is broken.
What little of yourself you can see looks like a mess.
You might want to find a proper bathroom and freshen up a bit.
            """)
        #endregion Sink
    def window():
        #region window()
        if save.getdata("apartment:window"):
            game.rolltext("""
You enjoy the holographic nature outside the window.
...
...
a holographic deer just walked past.
....
Time to go.
        """)
        else:
            save.setdata("apartment:window", True)
            game.rolltext("""
You look through the window into the lush forest landscape.
...
The nature seems oddly calming, yet somehow uncanny
...
...
As you move your head around to look form different angles, you notice a subtle lag.
...
You recognize this now.
It is a hologram.
Probably a cheap class 3 eye-tracking laser-holo, you suddenly realize.
Not that you remember what that is, or what it means.
Only that you had a class 5 back..
...
back home...
..had.. back home...
so this isn't home then...?
    """)
        #endregion window()
    def table():
        #region table()
        def glassText():
            g = save.getdata("apartment:glass")
            if g == None or g == 2:
                return "a full glass of water"
            elif g == 1:
                return "a half full glass of water"
            else:
                return "an empty glass"
            #end of glass description
        def pillsText():
            if (save.getdata("apartment:pills")):
                return ""
            else:
                return ", some small white pills"

        #end of pills description
        game.rolltext("""
You look at the nightstand table.
You see {0}{1}
and two framed pictures.
One with a cyan frame, one with a golden frame.
        """.format(glassText(), pillsText()))
        a = game.choose([
            "Glass", "Cyan framed picture", "Golden framed picture", "back off"
        ])
        if a == 0:
            g = save.getdata("apartment:glass")
            if g == None or g == 2:
                save.setdata("apartment:glass", 2)
                if (game.yesno("Take the pills?")):
                    game.showtext(
                        "You take the white pills and drink from the glass.")
                    save.setdata("apartment:pills", True)
                    save.setdata("apartment:glass", 1)
                else:
                    game.showtext("You did not take the pills")
            elif g == 1:
                print("The glass is half empty. Or is it half full?")
                if (game.yesno("Drink from the glass?")):
                    game.showtext(
                        "you drank the rest. The glass is now empty.")
                    save.setdata("apartment:glass", 0)
                else:
                    game.showtext("you left the glass alone")
            else:
                game.showtext("The glass is empty")
        elif a == 1:
            j = save.getdata("jeff")
            if (j == None):
                if (save.getdata("klara") == None):
                    j = "spouse"
                else:
                    j = "sibling"
                save.setdata("jeff", j)
                game.rolltext("""
You stare closely at the man in the cyan framed picture.
He looks familiar. Very familiar.
You seem to remember he insisted you did not need some expensive frame for his picture.
You study his features closely.
Suddenly it clicks in your mind.
You recognize him now. It is Jeff, your {0}.
                """.format(game.getGenderedTerm(j, "male")))
            else:
                game.showtext("It is Jeff, your {0}".format(
                    game.getGenderedTerm(j, "male")))
        elif a == 2:
            k = save.getdata("klara")
            if (k == None):
                if (save.getdata("jeff") == None):
                    k = "spouse"
                else:
                    k = "sibling"
                save.setdata("klara", k)
                game.rolltext("""
You stare closely at the lady in the gold framed picture.
You study her close, trying to remember who she is.
As you are looking in her eyes when you realize who she is.
Her name is Klara, you seem to remember.
Klara.. she is your {0}! 'How could you forget that?', you wonder.
                """.format(game.getGenderedTerm(k, "female")))
            else:
                game.showtext("It is Klara, your {0}".format(
                    game.getGenderedTerm(k, "female")))
        else:
            return
        table()  #repeat
        #endregion table()
    def door():
        pills = save.getdata("apartment:pills", False)
        left = save.getdata("apartment:left", False)
        #region door()
        if left:
            return True
        elif pills:
            game.rolltext("""
You walk to the door.
Your head is starting to clear up.
You open the door, and walk out.
            """)
            save.setdata("apartment:left", True)
            return True
        else:
            game.rolltext("""
You walk towards the door.
Suddenly there is a sharp spike of pain in your head.
When it is over you are back on the bed, panting.
            """)
        return False
        #endregion door()

    if (save.getdata("name") == None):
        newgame()
    choices = [
        "look out the window", "examine the table", "examine the sink",
        "go to the door", "OPEN GAME MENU"
    ]
    end = False
    while not end:
        game.showtext("You are sitting on the side of the bed")
        choice = game.choose(choices)
        if choice == 0:
            window()
        elif choice == 1:
            table()
        elif choice == 2:
            sink()
        elif choice == 3:
            if (door()):
                return save.goto("middle")
            pass
        elif choice == 4:
            if (game.gameMenu(save)):
                break
        #if room is revisited after the reactor counter has been enabled,
        #you will be wasting time here.
        status = game.updateCounter(save, "reactorC", -1)
        if status == "death":
            end = True
Exemplo n.º 20
0
 def middle():
     game.showtext("You open the hatch for the middle ring")
     goto("middle")
    def table():
        #region table()
        def glassText():
            g = save.getdata("apartment:glass")
            if g == None or g == 2:
                return "a full glass of water"
            elif g == 1:
                return "a half full glass of water"
            else:
                return "an empty glass"
            #end of glass description
        def pillsText():
            if (save.getdata("apartment:pills")):
                return ""
            else:
                return ", some small white pills"

        #end of pills description
        game.rolltext("""
You look at the nightstand table.
You see {0}{1}
and two framed pictures.
One with a cyan frame, one with a golden frame.
        """.format(glassText(), pillsText()))
        a = game.choose([
            "Glass", "Cyan framed picture", "Golden framed picture", "back off"
        ])
        if a == 0:
            g = save.getdata("apartment:glass")
            if g == None or g == 2:
                save.setdata("apartment:glass", 2)
                if (game.yesno("Take the pills?")):
                    game.showtext(
                        "You take the white pills and drink from the glass.")
                    save.setdata("apartment:pills", True)
                    save.setdata("apartment:glass", 1)
                else:
                    game.showtext("You did not take the pills")
            elif g == 1:
                print("The glass is half empty. Or is it half full?")
                if (game.yesno("Drink from the glass?")):
                    game.showtext(
                        "you drank the rest. The glass is now empty.")
                    save.setdata("apartment:glass", 0)
                else:
                    game.showtext("you left the glass alone")
            else:
                game.showtext("The glass is empty")
        elif a == 1:
            j = save.getdata("jeff")
            if (j == None):
                if (save.getdata("klara") == None):
                    j = "spouse"
                else:
                    j = "sibling"
                save.setdata("jeff", j)
                game.rolltext("""
You stare closely at the man in the cyan framed picture.
He looks familiar. Very familiar.
You seem to remember he insisted you did not need some expensive frame for his picture.
You study his features closely.
Suddenly it clicks in your mind.
You recognize him now. It is Jeff, your {0}.
                """.format(game.getGenderedTerm(j, "male")))
            else:
                game.showtext("It is Jeff, your {0}".format(
                    game.getGenderedTerm(j, "male")))
        elif a == 2:
            k = save.getdata("klara")
            if (k == None):
                if (save.getdata("jeff") == None):
                    k = "spouse"
                else:
                    k = "sibling"
                save.setdata("klara", k)
                game.rolltext("""
You stare closely at the lady in the gold framed picture.
You study her close, trying to remember who she is.
As you are looking in her eyes when you realize who she is.
Her name is Klara, you seem to remember.
Klara.. she is your {0}! 'How could you forget that?', you wonder.
                """.format(game.getGenderedTerm(k, "female")))
            else:
                game.showtext("It is Klara, your {0}".format(
                    game.getGenderedTerm(k, "female")))
        else:
            return
        table()  #repeat
Exemplo n.º 22
0
        def chamberRoom():
            key = save.getdata("auxcom:stasispasskey", False)
            visited = save.getdata("inner:stasisroom:" + str(num), False)
            peopleSaved = save.getdata("stasis:peopleSaved", 0)
            if key == False:
                game.rolltext("""
A panel of the door indicates the chamber is closed down by emergency lockdown.
You would need an override key to open it.""")
                game.updateCounter(save, "reactorC", 1)  #refunded time cost.
                return
            elif visited:
                game.showtext("You have already cleared this chamber.")
                game.updateCounter(save, "reactorC", 1)  #refunded time cost.
            else:
                if num == 0:
                    game.rolltext("""
You enter the chamber, checking each of the stasis tubes.
Most of them are empty. But not all.
So many dead people.
Dead..
Empty, empty, dead,
empty, empty..
You were about to give up when one chamber your almost passed as empty had someone inside it.
You activated the emergency defrost, and resuced a small child.
You told the kid to evacuate.
                    """)
                    peopleSaved += 1
                elif num == 1 or num == 7 or num == 11:
                    game.rolltext("""
You enter the chamber, checking each of the stasis tubes.
Only some of them are empty.
So many people are dead.
You found 17 people alive.
As you retrived them, none of them were in any condition to help you out.
You just told them to evacuate as you hurried on with your business.
                    """)
                    peopleSaved += 17
                elif num == 2 or num == 6:
                    game.rolltext("""
You enter the chamber, checking each of the statis tubes.
All of them are empty!
Well, that's good news.
                    """)
                    peopleSaved += 0
                elif num == 3:
                    game.rolltext("""
You enter the chamber, you were about the check the tubes when you stumbed on someone.
A man. He is unconscious, but alive.
You decide to ingore him for now, to check on the stasis tubes.
In this chamber, it seems a number of the people died during the emergency wakeup.
You found 4 people still alive in stasis.
You brought them out. It took a moment, but you them to help the unconscious man to evacuate.
                    """)
                    peopleSaved += 5
                elif num == 4 or num == 9:
                    game.rolltext("""
You enter the chamber, checking each of the chambers.
What you saw almost mad.. scatch that. it did make you puke.
All of them were dead. All of them.
                    """)
                    peopleSaved += 0
                elif num == 5:
                    game.rolltext("""
The room is chamber with smoke! You fight your way though taking longer
than normal to check all the tubes.
It seems the automatic system that was supposed to wake this group shut itself down
due to the smoke. This smoke would likly kill anyone coming out of stasis unasisted.
That might have been a mixed blessing, as you found most of the occupants still alive.

You took care to help everyone out of stasis, and on their way out to evacuate.
                    """)
                status = game.updateCounter(save, "reactorC", -1)
                peopleSaved += 45
                if status == "death":  #if reactor counter reach 0, and the game ends.
                    nav.running = False
                    return
                elif num == 8 or num == 10:
                    game.rolltext("""
You enter the chamber checking each tube.
A found a uneasy number of dead people.
But 12 people were still alive to be revived from stasis.
                    """)
                    peopleSaved += 12

            save.setdata("inner:stasisroom:" + str(num), True)
            save.setdata("stasis:peopleSaved", peopleSaved)