コード例 #1
0
ファイル: MAIN.py プロジェクト: Xunnamius/pyGuess
 elif(i == 1):
     # Display all the available class choices
     Display.gameMsg('After all the classes are exposed below, you will be prompted to choose');
     Display.gameMsg('your character\'s class (press enter to proceed):\n');
     
     Display.indent();
     
     Display.gameMsg(' -- Assassin -- ');
     Display.gameMsg("As an Assassin you'll become the ultimate man-slayer, delivering");
     Display.gameMsg("deadly blows to your enemy before melting back into the crowd...");
     Display.gameMsg("all in the blink of an eye.");
     Display.gameMsg("Nothing is True; Everything is permitted. A creed.\n");
     Display.gameMsg(" -- Quote: \"That's thirty minutes away. I'll be there in ten.\"");
     Display.gameMsg(" -- Specialty: Turn Slayer");
     
     Display.pause();
     
     Display.gameMsg(Display.newline+' -- Doctor -- ');
     Display.gameMsg("As the Doctor you'll hold the lives of thousands in your hands. If you");
     Display.gameMsg("decide to cure or crush those lives, however, is up to you.\n");
     Display.gameMsg(" -- Quote: \"ha... Maha... Muaha... Muahaha!... BWHAHAHAHAHHAHAA!\"");
     Display.gameMsg(" -- Specialty: Turn Gainer");
     
     Display.pause();
     
     Display.gameMsg(Display.newline+' -- Priest -- ');
     Display.gameMsg("The path of the righteous man is beset on all sides by the iniquities");
     Display.gameMsg("of the selfish and the tyranny of evil men. Blessed is he, who in the");
     Display.gameMsg("name of charity and good will, shepherds the weak through the valley");
     Display.gameMsg("of darkness, for he is truly his brother's keeper and the finder of ");
     Display.gameMsg("lost children. And I will strike down upon thee with great vengeance");
コード例 #2
0
ファイル: MAIN.py プロジェクト: Xunnamius/pyGuess
def MAR_exit(status=0):
    if(status == 0): Display.gameMsg('Program Terminated.');
    else: Display.errorMsg('Program Terminated Unexpectedly ('+str(status)+')!');
    Display.evnMsg('(C) Copyright 2010 - Dark Gray. All Rights Reserved.');
    Display.pause();
    os._exit(status);
コード例 #3
0
                        # Based on the distance from the answer, print a different result (to the same line)
                        if fdist <= length * modifiers[0] / 100:
                            print "slightly off."
                        elif dist > 0:
                            if fdist <= length * modifiers[1] / 100:
                                print "too low."
                            else:
                                print "WAY too low!"
                        else:
                            if fdist <= length * modifiers[1] / 100:
                                print "too high."
                            else:
                                print "WAY too high!"
                else:
                    Display.errorMsg("That's not a letter,", name + ". You've lost two turns for that!")
                    maxTries = maxTries - 2
                report = maxTries - (tries + 1)
                Display.gameMsg("You have", (report if report > 0 else "no"), "tries remaining.")
                tries = tries + 1
            if answer == -1:
                Display.playerMsg("Good job!")
            else:
                Display.errorMsg("You failed", name + ".\nThe correct answer was " + answer + ".")
            state = Display.cooked_input("Try again? (y/n) ")
    Display.evnMsg("(C) Copyright 2010 - Dark Gray. All Rights Reserved.")
except KeyboardInterrupt:
    pass
Display.errorMsg("Program Terminated.")
Display.pause()