#!/usr/bin/perl ############################################################################### # chapter1.pl # ############################################################################### # Chapter 1 of Artemis Fowl # # =========================================================================== # # This is a Perl game of the first Artemis Fowl book. This first part is # # the first chapter. # # =========================================================================== # # Version: 1.1.1 # # Released: January 6, 2007 # # Programed by: Gus (gussiki@gmail.com) # # =========================================================================== # # Disclaimer: # # This game is based on the book series Artemis Fowl by Eoin Colfer. No # # profit is being made from this and all is done purely for the sake of # # entertainment. No claim is being made to the ownership of Artemis Fowl. # # The rights to this series and all fictional elements associated with it go # # to Eoin Colfer, Puffin Books, Penguin Books, Hyperion and Miramax Books. # # No infringement of any international copyright law is intended here. # # # # The ASCII art in the game was obtained from an Internet ASCII generator # # (http://www.network-science.de/ascii/) based on FIGlet. # # HTML-Frontend (c) 1996-2004 by Jörg Seyfferth # # FIGlet (http://www.figlet.org/) # # (c) 1991, 1993, 1994 Glenn Chappell and Ian Chai # # Credits for the 140-150 fonts are listed in the font database # # (http://www.figlet.org/fontdb.cgi) # # =========================================================================== # # This work is licensed under the # # Creative Commons Attribution-NonCommercial-NoDerivs2.5 License. # # To view a copy of this license, visit # # http://creativecommons.org/licenses/by-nc-nd/2.5/ # # or send a letter to Creative Commons, 543 Howard Street, # # 5th Floor, San Francisco, California, 94105, USA. # # =========================================================================== # # Thanks to: # # The White Lily for alpha testing and her hard work to help me. # # Kitty Rainbow, Matt, Juliet, Foaly, LEPrecon, hello, Scamp, Diana, Hoonah*, # # and nindra of AFC, and Brightness, FairyHunter, Anordir, Annoying Schizoid # # and MichaelM for beta testing. # ############################################################################### use strict; use Text::Wrap qw(wrap $columns $huge); my $columns = 80; my $huge = "wrap"; ### The actual program starts here. ### begin: # Declare the variables here my (@chars, $password, $data, $seed, $key, $temp, $file, @file, $save, $load, $place, %ascii, $help, $book, $wine, $goggles, $rand2, $rand, $output, $quit, $invalid, $toothpick, $cup, $choice, $count, $restart, $pebble, $thirst, $email); # Define the variables $toothpick = 0; $cup = 0; $count = 0; $pebble = 0; $email = 0; $thirst = 0; $goggles = 0; $wine = 0; $book = 0; $invalid = "\nSorry, but that is an invalid option.\n"; ### Subroutines ### # The "put" subroutine, stealing a command from Turing sub put { $output = $_[0]; $output =~ s/( ){3,}//g; $output =~ s/\t//g; print wrap("", "", $output); } # The "obfusticate" subroutine. Obfusticates the save variables sub obfus { $temp = $_[0]; $temp = ($temp + $seed - 7) * $seed; } # The "deobfusticate" subroutine. Obfusticates the save variables sub deobfus { $temp = $_[0]; $temp = $temp / $seed - $seed + 7; } # The "scramble" subroutine. Scrambles the seed sub scramble { @chars = ( "A" .. "Z", "a" .. "z", 0 .. 9, qw(! @ $ % ^ & *) ); $password = join("", @chars[ map { rand @chars } ( 1 .. $_[0] ) ]); } # The "descramble" subroutine. Scrambles the seed sub descramble { @chars = split(//, $_[0]); } # The "save" subroutine. Save variables to chapter1.sav sub save { $seed = int(rand 15) + 1; if (-e "chapter1.sav") { save: &put("\nSave file already exists! Are you sure you want to overwrite it? Y/N > "); $save = ; chomp($save); if ($save =~ /^(y|yes)$/i) { my @file = (); $data = ""; $file[0] = &scramble("$seed"); $file[1] = &obfus("$place"); $file[2] = &obfus("$book"); $file[3] = &obfus("$wine"); $file[4] = &obfus("$goggles"); $file[5] = &obfus("$toothpick"); $file[6] = &obfus("$cup"); $file[7] = &obfus("$count"); $file[8] = &obfus("$pebble"); $file[9] = &obfus("$thirst"); $file[10] = &obfus("$email"); foreach $key (@file) { $data .= "$key," } open(FILE, ">chapter1.sav"); print FILE $data; close(FILE); &put("Progress saved. ===Please Hit Enter to Continue===\n"); ; } elsif ($save =~ /^(n|no)$/i) { &put("You have chosen to continue playing. ===Please Hit Enter to Continue===\n"); ; } else { print $invalid; $save = ""; goto save; } } else { my @file = (); $data = ""; $file[0] = &scramble("$seed"); $file[1] = &obfus("$place"); $file[2] = &obfus("$book"); $file[3] = &obfus("$wine"); $file[4] = &obfus("$goggles"); $file[5] = &obfus("$toothpick"); $file[6] = &obfus("$cup"); $file[7] = &obfus("$count"); $file[8] = &obfus("$pebble"); $file[9] = &obfus("$thirst"); $file[10] = &obfus("$email"); foreach $key (@file) { $data .= "$key," } open(FILE, ">chapter1.sav"); print FILE $data; close(FILE); &put("Progress saved. ===Please Hit Enter to Continue===\n"); ; } } # The "load" subroutine. Loads data from chapter1.sav sub load { if (-e "chapter1.sav") { load: &put("\nAre you sure you want to load the game? Y/N > "); $load = ; chomp($load); if ($load =~ /^(y|yes)$/i) { my @file = (); open(FILE, "chapter1.sav"); $file = ; close(FILE); @file = split(/,/, $file); $seed = &descramble("$file[0]"); $place = &deobfus("$file[1]"); $book = &deobfus("$file[2]"); $wine = &deobfus("$file[3]"); $goggles = &deobfus("$file[4]"); $toothpick = &deobfus("$file[5]"); $cup = &deobfus("$file[6]"); $count = &deobfus("$file[7]"); $pebble = &deobfus("$file[8]"); $thirst = &deobfus("$file[9]"); $email = &deobfus("$file[10]"); &put("Save file loaded. ===Please Hit Enter to Continue===\n"); ; if ($place == 1) { goto saigon; } if ($place == 2) { &put("\nA waiter arrives at your table, and asks: \"More tea, sirs?\""); goto waiter; } if ($place == 3) { goto nguyen; } if ($place == 4) { goto explain; } if ($place == 5) { goto nguyenrun; } if ($place == 6) { goto alley; } if ($place == 7) { goto outsidehealer; } if ($place == 8) { goto sprite; } if ($place == 9) { goto goggles; } if ($place == 10) { goto wine; } if ($place == 11) { goto offerwine; } if ($place == 12) { goto payhim; } if ($place == 13) { goto makedeal; } if ($place == 14) { goto vial; } if ($place == 15) { goto camera; } if ($place == 16) { goto takepictures; } if ($place == 17) { goto toothpick; } if ($place == 18) { goto leave; } } elsif ($load =~ /^(n|no)$/i) { &put("You have chosen to continue playing. ===Please Hit Enter to Continue===\n"); ; } else { print $invalid; $load = ""; goto load; } } else { &put("\nSave file doesn't exist! ====Please Hit Enter to Continue===\n"); ; } } # The "quit" subroutine sub quit { quit: &put("\nAre you sure you want to exit? Y/N > "); $quit = ; chomp($quit); if ($quit =~ /^(y|yes)$/i) { die "\nThanks for playing!\n"; } elsif ($quit =~ /^(n|no)$/i) { &put("You have chosen to continue playing. ===Please Hit Enter to Continue===\n"); ; } else { print $invalid; $quit = ""; goto quit; } } # The "help" subroutine sub help { $help = " === Help Screen Page 1 of 2=== The object of this game is to complete this chapter. In this case, you have to be able to obtain a copy of the Book and successfully bring it back to Fowl Manor. In this chapter, you are playing the character of Artemis Fowl II. This game has deviated from the original text of the book for creativity and a greater challenge. If you get stuck, start again and record your steps. It is also a good idea to read everything carefully. Please note that there is no way to save your progress. To obtain this screen again, type \"help\". ===Please Hit Enter to Continue==\n"; $help =~ s/( ){3,}//g; print wrap("", "", $help); ; $help = " === Help Screen Page 2 of 2=== Here are some basic commands. Please note that there are more options not listed here. wait = Wait a turn look = Shows information about your surroundings i/inv/inventory = Shows your inventory who/whoami = Tells you which character you're currently playing as talk/talk to = Talk to a person for advice or clues examine/look at = Examine an object for clues get/take = Get an object to use later on in the game help = Access this screen restart = Restart game save = Save the game load = Load the game exit/quit = Exit the game ===Please Hit Enter to Continue==\n"; $help =~ s/( ){3,}//g; print wrap("", "", $help); ; } # The "restart" subroutine sub restart { restart: print "\nWould you like to restart? Y/N\n> "; $restart = ; chomp($restart); if ($restart =~ /^(y|yes)$/i) { goto begin; } elsif ($restart =~ /^(n|no)$/i) { &put("\n\nThanks for staying! ===Please Hit Enter to Continue===\n"); ; } else { print $invalid; goto restart; } } # The "choice" subroutine sub choice { &put("\n\nWhat would you like to do? > "); $choice = ; chomp($choice); } # Random ASCII art! sub ascii { $rand2 = int(rand 30) + 1; %ascii = ( 1 => q? GGGGGG AA MMM MMM EEEEEE OOOOOO VV VV EEEEEE RRRRR GG AA AA MM M M MM EE OO OO VV VV EE RR RR GG GG AAAAAA MM M M MM EEEEEE OO OO VV VV EEEEEE RRRRR GG GG AA AA MM M MM EE OO OO VV VV EE RR RR GGGGGG AA AA MM MM EEEEEE OOOOOO VV EEEEEE RR RR?, 2 => q? ******** ** **** **** ******** **//////** **** /**/** **/** /**///// ** // **//** /**//** ** /** /** /** ** //** /** //*** /** /******* /** ***** ********** /** //* /** /**//// //** ////** /**//////** /** / /** /** //******** /** /** /** /** /******** //////// // // // // //////// ******* ** ** ******** ******* **/////** /** /** /**///// /**////** ** //** /** /** /** /** /** /** /** //** ** /******* /******* /** /** //** ** /**//// /**///** //** ** //**** /** /** //** //******* //** /******** /** //** /////// // //////// // // ?, 3 => q? :'######::::::'###::::'##::::'##:'########: '##... ##::::'## ##::: ###::'###: ##.....:: ##:::..::::'##:. ##:: ####'####: ##::::::: ##::'####:'##:::. ##: ## ### ##: ######::: ##::: ##:: #########: ##. #: ##: ##...:::: ##::: ##:: ##.... ##: ##:.:: ##: ##::::::: . ######::: ##:::: ##: ##:::: ##: ########: :......::::..:::::..::..:::::..::........:: :'#######::'##::::'##:'########:'########:: '##.... ##: ##:::: ##: ##.....:: ##.... ##: ##:::: ##: ##:::: ##: ##::::::: ##:::: ##: ##:::: ##: ##:::: ##: ######::: ########:: ##:::: ##:. ##:: ##:: ##...:::: ##.. ##::: ##:::: ##::. ## ##::: ##::::::: ##::. ##:: . #######::::. ###:::: ########: ##:::. ##: :.......::::::...:::::........::..:::::..::?, 4 => q? ###### ### ## ## ######## ## ## ## ## ### ### ## ## ## ## #### #### ## ## #### ## ## ## ### ## ###### ## ## ######### ## ## ## ## ## ## ## ## ## ## ###### ## ## ## ## ######## ####### ## ## ######## ######## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ###### ######## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ####### ### ######## ## ## ?, 5 => q? d888b .d8b. .88b d88. d88888b .d88b. db db d88888b d8888b. 88' Y8b d8' `8b 88'YbdP`88 88' .8P Y8. 88 88 88' 88 `8D 88 88ooo88 88 88 88 88ooooo 88 88 Y8 8P 88ooooo 88oobY' 88 ooo 88~~~88 88 88 88 88~~~~~ 88 88 `8b d8' 88~~~~~ 88`8b 88. ~8~ 88 88 88 88 88 88. `8b d8' `8bd8' 88. 88 `88. Y888P YP YP YP YP YP Y88888P `Y88P' YP Y88888P 88 YD ?, 6 => q? _____ __ __ ______ ______ ________ _____ / ____| /\ | \/ | ____| / __ \ \ / / ____| __ \ | | __ / \ | \ / | |__ | | | \ \ / /| |__ | |__) | | | |_ | / /\ \ | |\/| | __| | | | |\ \/ / | __| | _ / | |__| |/ ____ \| | | | |____ | |__| | \ / | |____| | \ \ \_____/_/ \_\_| |_|______| \____/ \/ |______|_| \_?, 7 => q? _______ _______ _______ _______ _______ ___ ___ _______ ______ | __| _ | | | ___| | | | | ___| __ \ | | | | | ___| | - | | | ___| < |_______|___|___|__|_|__|_______| |_______|\_____/|_______|___|__|?, 8 => q? .d8888b. d8888 888b d888 8888888888 d88P Y88b d88888 8888b d8888 888 888 888 d88P888 88888b.d88888 888 888 d88P 888 888Y88888P888 8888888 888 88888 d88P 888 888 Y888P 888 888 888 888 d88P 888 888 Y8P 888 888 Y88b d88P d8888888888 888 " 888 888 "Y8888P88 d88P 888 888 888 8888888888 .d88888b. 888 888 8888888888 8888888b. d88P" "Y88b 888 888 888 888 Y88b 888 888 888 888 888 888 888 888 888 Y88b d88P 8888888 888 d88P 888 888 Y88b d88P 888 8888888P" 888 888 Y88o88P 888 888 T88b Y88b. .d88P Y888P 888 888 T88b "Y88888P" Y8P 8888888888 888 T88b ?, 9 => q? ..%%%%....%%%%...%%...%%..%%%%%%...........%%%%...%%..%%..%%%%%%..%%%%%.. .%%......%%..%%..%%%.%%%..%%..............%%..%%..%%..%%..%%......%%..%%. .%%.%%%..%%%%%%..%%.%.%%..%%%%............%%..%%..%%..%%..%%%%....%%%%%.. .%%..%%..%%..%%..%%...%%..%%..............%%..%%...%%%%...%%......%%..%%. ..%%%%...%%..%%..%%...%%..%%%%%%...........%%%%.....%%....%%%%%%..%%..%%. .........................................................................?, 10 => q? ______ _______ _______ _______ _____ _ _ _______ ______ | ____ |_____| | | | |______ | | \ / |______ |_____/ |_____| | | | | | |______ |_____| \/ |______ | \_?, 11 => q? ____ ____ _ _ ____ ____ _ _ ____ ____ | __ |__| |\/| |___ | | | | |___ |__/ |__] | | | | |___ |__| \/ |___ | \ ?, 12 => q? _ _ _ _ _ _ _ _ _ _ _ _ (_)(_)(_) _ _(_)_ (_) _ _ (_) (_)(_)(_)(_)(_) (_) (_) _(_) (_)_ (_)(_) (_)(_) (_) (_) _ _ _ _(_) (_)_ (_) (_)_(_) (_) (_) _ _ (_) (_)(_)(_) (_) _ _ _ (_) (_) (_) (_) (_)(_)(_) (_) (_) (_)(_)(_)(_)(_) (_) (_) (_) (_) _ _ _ (_) (_) (_) (_) (_) (_) _ _ _ _ (_)(_)(_)(_) (_) (_) (_) (_) (_)(_)(_)(_)(_) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _(_)(_)(_)(_)_ (_) (_) (_)(_)(_)(_)(_) (_)(_)(_)(_) _ (_) (_) (_) (_) (_) (_) (_) (_) (_) (_)_ _(_) (_) _ _ (_) _ _ _ (_) (_) (_) (_) (_) (_)(_)(_) (_)(_)(_)(_) (_) (_) (_) (_) (_) (_) (_) _ (_)_ _ _ _(_) (_)_(_) (_) _ _ _ _ (_) (_) _ (_)(_)(_)(_) (_) (_)(_)(_)(_)(_) (_) (_) ?, 13 => q? .--. .--. .-..-. .--. .--. .-..-. .--. .---. : .--': .; :: `' :: .--' : ,. :: :: :: .--': .; : : : _ : :: .. :: `; : :: :: :: :: `; : .' : :; :: :: :: :; :: :__ : :; :: `' ;: :__ : :.`. `.__.':_;:_;:_;:_;`.__.' `.__.' `.,' `.__.':_;:_;?, 14 => q? ___ ___ ___ ___ /\ \ /\ \ /\__\ /\ \ /::\ \ /::\ \ /::| | /::\ \ /:/\:\ \ /:/\:\ \ /:|:| | /:/\:\ \ /:/ \:\ \ /::\~\:\ \ /:/|:|__|__ /::\~\:\ \ /:/__/_\:\__\ /:/\:\ \:\__\ /:/ |::::\__\ /:/\:\ \:\__\ \:\ /\ \/__/ \/__\:\/:/ / \/__/~~/:/ / \:\~\:\ \/__/ \:\ \:\__\ \::/ / /:/ / \:\ \:\__\ \:\/:/ / /:/ / /:/ / \:\ \/__/ \::/ / /:/ / /:/ / \:\__\ \/__/ \/__/ \/__/ \/__/ ___ ___ ___ ___ /\ \ /\__\ /\ \ /\ \ /::\ \ /:/ / /::\ \ /::\ \ /:/\:\ \ /:/ / /:/\:\ \ /:/\:\ \ /:/ \:\ \ /:/__/ ___ /::\~\:\ \ /::\~\:\ \ /:/__/ \:\__\ |:| | /\__\ /:/\:\ \:\__\ /:/\:\ \:\__\ \:\ \ /:/ / |:| |/:/ / \:\~\:\ \/__/ \/_|::\/:/ / \:\ /:/ / |:|__/:/ / \:\ \:\__\ |:|::/ / \:\/:/ / \::::/__/ \:\ \/__/ |:|\/__/ \::/ / ~~~~ \:\__\ |:| | \/__/ \/__/ \|__| ?, 15 => q? ..|'''.| | '|| ||' '||''''| .|' ' ||| ||| ||| || . || .... | || |'|..'|| ||''| '|. || .''''|. | '|' || || ''|...'| .|. .||. .|. | .||. .||.....| ..|''|| '||' '|' '||''''| '||''|. .|' || '|. .' || . || || || || || | ||''| ||''|' '|. || ||| || || |. ''|...|' | .||.....| .||. '|' ?, 16 => q? ___ ___ ___ ___ ___ ___ | | | |\ /| | | | | / | | | | +- |-+-| | + | |-+- | | | + |-+- |-+- | | | | | | | | | |/ | | \ --- --- --- --- ?, 17 => q? _/_/_/ _/_/ _/ _/ _/_/_/_/ _/ _/ _/ _/_/ _/_/ _/ _/ _/_/ _/_/_/_/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ _/_/_/_/ _/_/ _/ _/ _/_/_/_/ _/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/_/_/_/ _/ _/ ?, 18 => q? .:::: .: .:: .:: .:::::::: .: .:: .: :: .: .:: .::: .:: .:: .: .:: .:: .:: . .:: .:: .:: .:: .:: .:: .:: .:: .:::::: .:: .:::: .:::::: .:: .:: .: .:: .:: .:: .: .:: .:: .:: .:: .:: .::::: .:: .:: .:: .:: .:::::::: .:::: .:: .:: .:::::::: .::::::: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:::::: .: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:::: .:: .:: .:: .:::: .:: .:::::::: .:: .::?, 19 => q? /~~\ /\ |\ /||~~ /~~\| ||~~|~~\ | __ /__\ | \/ ||-- | |\ / |--|__/ \__// \| ||__ \__/ \/ |__| ?, 20 => q? MM'"""""`MM MMP"""""""MM M"""""`'"""`YM MM""""""""`M M' .mmm. `M M' .mmmm MM M mm. mm. M MM mmmmmmmM M MMMMMMMM M `M M MMM MMM M M` MMMM M MMM `M M MMMMM MM M MMM MMM M MM MMMMMMMM M. `MMM' .M M MMMMM MM M MMM MMM M MM MMMMMMMM MM. .MM M MMMMM MM M MMM MMM M MM .M MMMMMMMMMMM MMMMMMMMMMMM MMMMMMMMMMMMMM MMMMMMMMMMMM MMP"""""YMM M""MMMMM""M MM""""""""`M MM"""""""`MM M' .mmm. `M M MMMMM M MM mmmmmmmM MM mmmm, M M MMMMM M M MMMMP M M` MMMM M' .M M MMMMM M M MMMM' .M MM MMMMMMMM MM MMMb. "M M. `MMM' .M M MMP' .MM MM MMMMMMMM MM MMMMM M MMb dMM M .dMMM MM .M MM MMMMM M MMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMMM MMMMMMMMMMMM ?, 21 => q? .88888. .d888888 8888ba.88ba 88888888b d8' `88 d8' 88 88 `8b `8b 88 88 88aaaaa88a 88 88 88 a88aaaa 88 YP88 88 88 88 88 88 88 Y8. .88 88 88 88 88 88 88 `88888' 88 88 dP dP dP 88888888P .88888. dP dP 88888888b 888888ba d8' `8b 88 88 88 88 `8b 88 88 88 .8P a88aaaa a88aaaa8P' 88 88 88 d8' 88 88 `8b. Y8. .8P 88 .d8P 88 88 88 `8888P' 888888' 88888888P dP dP ?, 22 => q? ooooooo8 o oooo oooo ooooooooooo o888 88 888 8888o 888 888 88 888 oooo 8 88 88 888o8 88 888ooo8 888o 88 8oooo88 88 888 88 888 oo 888ooo888 o88o o888o o88o 8 o88o o888ooo8888 ooooooo ooooo oooo ooooooooooo oooooooooo o888 888o 888 88 888 88 888 888 888 888 888 88 888ooo8 888oooo88 888o o888 88888 888 oo 888 88o 88ooo88 888 o888ooo8888 o888o 88o8 ?, 23 => q? .oOOOo. Oo Oo oO o.OOoOoo .O o o O O O o o O o O o o o O O o O oOooOoOo O Oo O ooOO O .oOOo o O O o O o. O O o o O o O. oO o O o O O `OooO' O. O O o ooOooOoO .oOOOo. o 'O o.OOoOoo `OooOOo. .O o. O o O o `o O o o O o O O o O o o ooOO o .O O o O O' O OOooOO' o O `o o o o o `o O' `o O O O O `OoooO' `o' ooOooOoO O o ?, 24 => q? @@@@@@@@ @@@@@@ @@@@@@@@@@ @@@@@@@@ @@@@@@@@@ @@@@@@@@ @@@@@@@@@@@ @@@@@@@@ !@@ @@! @@@ @@! @@! @@! @@! !@! !@! @!@ !@! !@! !@! !@! !@! @!@!@ @!@!@!@! @!! !!@ @!@ @!!!:! !!! !!@!! !!!@!!!! !@! ! !@! !!!!!: :!! !!: !!: !!! !!: !!: !!: :!: !:: :!: !:! :!: :!: :!: ::: :::: :: ::: ::: :: :: :::: :: :: : : : : : : : :: :: @@@@@@ @@@ @@@ @@@@@@@@ @@@@@@@ @@@@@@@@ @@@ @@@ @@@@@@@@ @@@@@@@@ @@! @@@ @@! @@@ @@! @@! @@@ !@! @!@ !@! @!@ !@! !@! @!@ @!@ !@! @!@ !@! @!!!:! @!@!!@! !@! !!! !@! !!! !!!!!: !!@!@! !!: !!! :!: !!: !!: !!: :!! :!: !:! ::!!:! :!: :!: !:! ::::: :: :::: :: :::: :: ::: : : : : : :: :: : : : ?, 25 => q? ========================================= == ====== ===== ===== == = = == ==== ==== === == ======= = ==== === == === = = == ======= = ======== ==== == == == == ======= = ======== ==== == ===== == === = === == == ===== == ======= = ==== == ==== == ===== == ======= = == == ==== == ===== == ======= == === ==== == ===== == = ========================================= ======================================== === ==== ==== == == == == == === ==== == ======== ==== = = ==== == ==== == ======== ==== = = ==== == ==== == ======== === = = ==== == == == ==== === = ==== === == === ======== ==== = = ==== === == === ======== ==== = == == ===== ==== ======== ==== = === ======= ===== == ==== = ========================================?, 26 => q? .oooooo. .o. ooo ooooo oooooooooooo d8P' \`Y8b .888. \`88. .888' \`888' \`8 888 .8"888. 888b d'888 888 888 .8' \`888. 8 Y88. .P 888 888oooo8 888 ooooo .88ooo8888. 8 \`888' 888 888 " \`88. .88' .8' \`888. 8 Y 888 888 o \`Y8bood8P' o88o o8888o o8o o888o o888ooooood8 .oooooo. oooooo oooo oooooooooooo ooooooooo. d8P' \`Y8b \`888. .8' \`888' \`8 \`888 \`Y88. 888 888 \`888. .8' 888 888 .d88' 888 888 \`888. .8' 888oooo8 888ooo88P' 888 888 \`888.8' 888 " 888\`88b. \`88b d88' \`888' 888 o 888 \`88b. \`Y8bood8P' \`8' o888ooooood8 o888o o888o ?, 27 => q? __ __ __ __ __ / _ /\ |\/||_ / \\ /|_ |__) \__)/--\| ||__ \__/ \/ |__| \ ?, 28 => q? ,---.,---.,-.-.,---. ,---.. ,,---.,---. | _.|---|| | ||--- | || ||--- |---' | || || | || | | \ / | | \ `---'` '` ' '`---' `---' `' `---'` `?, 29 => q? o-o O o o o--o o-o o o o--o o--o o / \ |\ /| | o o | | | | | | -o o---o| O | O-o | | o o O-o O-Oo o | | || | | o o \ / | | \ o-o o oo o o--o o-o o o--o o o ?, 30 => q? ,ad8888ba, db 88b d88 88888888888 d8"' `"8b d88b 888b d888 88 d8' d8'`8b 88`8b d8'88 88 88 d8' `8b 88 `8b d8' 88 88aaaaa 88 88888 d8YaaaaY8b 88 `8b d8' 88 88""""" Y8, 88 d8""""""""8b 88 `8b d8' 88 88 Y8a. .a88 d8' `8b 88 `888' 88 88 `"Y88888P" d8' `8b 88 `8' 88 88888888888 ,ad8888ba, 8b d8 '8888888888 88888888ba d8"' `"8b `8b d8' 88 88 "8b d8' `8b `8b d8' 88 88 ,8P 88 88 `8b d8' 88aaaaa 88aaaaaa8P' 88 88 `8b d8' 88""""" 88""""88' Y8, ,8P `8b d8' 88 88 `8b Y8a. .a8P `888' 88 88 `8b `"Y8888Y"' `8' '8888888888 88 `8b ?, ); print $ascii{$rand2}; print "\n"; } # The "gameover" subroutine sub gameover { print "\n\n===Please Hit Enter to Continue===\n"; ; &ascii; gameover: if (-e "chapter1.sav") { print "\nWould you like to load a game? Y/N\n> "; $restart = ; chomp($restart); if ($restart =~ /^(y|yes)$/i) { &load; } elsif ($restart =~ /^(n|no)$/i) { # Jump out of here } else { print $invalid; goto gameover; } } print "\nWould you like to restart? Y/N\n> "; $restart = ; chomp($restart); if ($restart =~ /^(y|yes)$/i) { goto begin; } elsif ($restart =~ /^(n|no)$/i) { die "\nThanks for playing!\n"; } else { print $invalid; goto gameover; } } # The "inventory" subroutine sub inventory { print "\nYou have:\n"; if ($cup) { print "\nCup of tea (not Earl Grey)"; } if ($toothpick) { print "\nSturdy toothpick"; } if ($pebble) { print "\nA pebble"; } if ($thirst) { print "\nThirst"; } if ($goggles) { print "\nGoggles"; } if ($wine) { print "\nHalf a pint of Irish whiskey"; } if ($book) { print "\nThe sprite's Book"; } if (!$thirst && !$cup && !$toothpick && !$pebble && !$goggles && !$wine && !$book) { print "\nNothing"; } } # Common commands sub common { if ($choice =~ /\bhelp\b/i) { &help; } elsif ($choice =~ /^i(nv)?(entory)?\b/i) { &inventory; } elsif ($choice =~ /^restart\b/i) { &restart; } elsif ($choice =~ /^save\b/i) { &save; } elsif ($choice =~ /^load\b/i) { &load; } elsif ($choice =~ /^(who|whoami)\b/i) { print "\nYou are Artemis Fowl II."; } elsif ($choice =~ /^(examine|look at)$/i) { &put("\n\L\u$1\E what?"); $count++; } elsif ($choice =~ /^(get|take)$/i) { &put("\n\L\u$1\E what?"); $count++; } elsif ($choice =~ /\bdie\b/i) { &put("\nHow stupid. You simply lose the will to live and die."); &gameover; } elsif ($choice =~ /\bkill\b/i) { &put("\nYou really shouldn't be getting homicidal urges. We wouldn't want you to become a serial killer, would we?"); $count++; } elsif ($choice =~ /^(go to|visit) (crim|(the )?orion( awards)?)$/i) { &put("\nYou don't want to go there. The fangirls would rip you apart. Not even Butler could save you."); $count++; } elsif ($choice =~ /^rent (a )?gondola$/i) { &put("\nGondolas are not in Ho Chi Minh City. They're in Venice, ski resorts, and your fandom."); $count++; } elsif ($choice =~ /\bcheat\b/i) { &put("\nThat's unsportsmanlike conduct."); $count++; } elsif ($choice =~ /\bdance\b/i) { &put("\nYou start dancing. Butler looks at you as if you have lost your mind (which you have) and you stop."); $count++; } elsif ($choice =~ /\bkiss\b/i) { &put("\nAren't you a bit too mature to fall into pointless infatuations? Aren't you a bit too young for romance?"); $count++; } elsif ($choice =~ /\bwin\b/i) { &put("\nLife's not that easy, boy."); $count++; } elsif ($choice =~ /\blaugh\b/i) { &put("\nYou suddenly let out a burst of laughter, drawing attention."); $count++; } elsif ($choice =~ /\bcackle\b/i) { &put("\nIgnoring the fact that you are a dignified genius mastermind, you cackle like a witch, earning stares from innocent bystanders."); $count++; } elsif ($choice =~ /\bgiggle\b/i) { &put("\nYou start giggling insanely. I never knew your insanity stretched this far..."); $count++; } elsif ($choice =~ /\b((put|pull) on|wear) (tlp|tight leather pants)\b/i) { &put("\nPlease. You've got enough drooling fangirls after you. Unless you want to drown in fangirl!drool, I advise you to put your tight leather pants away."); $count++; } elsif ($choice =~ /^simon says (.*)$/i) { &put("\nYou $1. Don't act so surprised. First of all, your name isn't Simon. And second of all, you don't order me around."); $count++; } elsif ($choice =~ /\b(gus|gussiki)\b/i) { &put("Gus is the programmer. He's unavailable at the moment. No, he will not give you hints or tips. And no, he won't take a message."); $count++; } elsif ($choice =~ /\b(lily|whilily|(the )?white lily)\b/i) { &put("The White Lily is the alpha tester. Give her thanks for putting in her time to test this game. Don't even think about asking her to help you beat this game."); $count++; } else { $rand = int(rand 20) + 1; if ($rand == 1) { &put("\nIs this supposed to be some underlying motive in an overall large scheme to dominate the world?"); } elsif ($rand == 6) { &put("\nOnce upon a time, there was a little, arrogant (and possibly somewhat intelligent) boy named Artemis Fowl II. On a mission to obtain a copy of the Book, he got rather confused and passed an invalid command to me. I never really understood what Artemis Fowl was talking about, and treated him to a tale of his stupidity. The moral of this story? Use. Proper. Commands."); } elsif ($rand == 11) { &put("\n\"$choice\"? What in the name of Pathologically Eclectic Rubbish Lists are you talking about? Next time you want to do something, try a valid command."); } elsif ($rand == 16) { &put("\nIs this supposed to be a new swear word in a language you're inventing?"); } elsif ($rand == 20) { &put("\nIf a drunken gnome can't understand that, how am I supposed to?"); } else { print $invalid; } } } ### Yay! Now the game actually starts! ### print " _____ _ _ _____ _ | _ |___| |_ ___ _____|_|___ | __|___ _ _ _| | | | _| _| -_| | |_ -| | __| . | | | | | |__|__|_| |_| |___|_|_|_|_|___| |__| |___|_____|_| _____ _ _ ___ | | |_ ___ ___| |_ ___ ___ |_ | | --| | .'| . | _| -_| _| _| |_ |_____|_|_|__,| _|_| |___|_| |_____| |_| Programmed by Gus ===Please Hit Enter to Continue===\n"; ; print " # =========================================================================== # # Disclaimer: # # This game is based on the book series Artemis Fowl by Eoin Colfer. No # # profit is being made from this and all is done purely for the sake of # # entertainment. No claim is being made to the ownership of Artemis Fowl. # # The rights to this series and all fictional elements associated with it go # # to Eoin Colfer, Puffin Books, Penguin Books, Hyperion and Miramax Books. # # No infringement of any international copyright law is intended here. # # # # The ASCII art in the game was obtained from an Internet ASCII generator # # (http://www.network-science.de/ascii/) based on FIGlet. # # HTML-Frontend (c) 1996-2004 by Jörg Seyfferth # # FIGlet (http://www.figlet.org/) # # (c) 1991, 1993, 1994 Glenn Chappell and Ian Chai # # Credits for the 140-150 fonts are listed in the font database # # (http://www.figlet.org/fontdb.cgi) # # =========================================================================== # ===Please Hit Enter to Continue==="; ; print " # =========================================================================== # # This work is licensed under the # # Creative Commons Attribution-NonCommercial-NoDerivs2.5 License. # # # # To view a copy of this license, visit # # http://creativecommons.org/licenses/by-nc-nd/2.5/ # # or send a letter to Creative Commons, 543 Howard Street, # # 5th Floor, San Francisco, California, 94105, USA. # # =========================================================================== # ===Please Hit Enter to Begin===\n"; ; &help; # Print help screen at the begining. ## Prompt 1 # Waiting for Nguyen Xuan ## $place = 1; saigon: &put("\nYou are in Ho Chi Minh City, Vietnam with your bodyguard Butler. Your mission is to obtain a copy of the Book, a \"Bible\" of the fairies. You are sitting outside a cafe, waiting for your informant Nguyen Xuan."); if (!$toothpick && !$cup) { &put("\nOn the table, there is a toothpick and a cup of tea."); } elsif (!$toothpick) { &put("\nOn the table, there is a toothpick."); } elsif (!$cup) { &put("\nOn the table, there is a cup of tea."); } else { &put("\nThere is nothing on the table."); } until ($count == 5) { &choice; if ($choice =~ /^look$/i) { goto saigon; } elsif ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^eat toothpick$/i) { &put("\nIs this supposed to be some underlying motive in an overall large scheme to dominate the world?"); $count++; } elsif ($choice =~ /^(examine|look|look at)/i) { if ($choice =~ /((cup of)? tea|cup)$/i) { &put("\nIt is a cup of tea. It is most definitely not Earl Grey, but it is tolerable."); $count++; } elsif ($choice =~ /toothpick$/i) { &put("\nA very blunt toothpick. It won't hurt anybody. But it's quite sturdy, for a toothpick."); $count++; } elsif ($choice =~ /((ho chi minh )?city|saigon)$/i) { &put("\nHo Chi Minh City. Also known as Saigon. Capital of Vietnam. You should already know this, being a criminal mastermind. Stop wasting time."); $count++; } elsif ($choice =~ /(bodyguard|butler)$/i) { &put("\nYeah, the big guy sitting beside you is Butler. Your bodyguard. He's been your bodyguard since you've been born. You should remember, unless your memory is fading. Such a shame, memory loss at this age."); $count++; } elsif ($choice =~ /cafe$/i) { &put("\nA pathetic cafe. Out in the sun. Their parasols don't even provide shade."); $count++; } else { &put("\nI don't see one to \L$1\E."); $count++; } } elsif ($choice =~ /^(get|take)/i) { if ($choice =~ /toothpick$/i) { if ($toothpick == 0) { $toothpick = 1; $count++; &put("\nYou take the toothpick."); } else { &put("\nAre you blind? You already have the toothpick!"); $count++; } } elsif ($choice =~ /((cup of )?tea|cup)$/i) { if ($cup == 0) { $cup = 1; $count++; &put("\nYou take the $1."); } else { &put("\nAre you blind? You already have the $1!"); $count++; } } elsif ($choice =~ /((ho chi minh )?city|saigon)$/i) { &put("\nGenius as you are, it would be impossible to steal the city. Nice try."); $count++; } elsif ($choice =~ /cafe$/i) { &put("\nI'd like to see you try."); $count++; } elsif ($choice =~ /(umbrella|parasol)$/i) { &put("\nWhy? It's large and bulky, and useless."); $count++; } else { &put("\nAre you blind? That's not on the table!"); $count++; } } elsif ($choice =~ /^use toothpick\b/i) { if ($toothpick) { &put("\nWhat? Afraid that you've got three week old spinach stuck between your perfect white teeth?"); $count++; } else { &put("\nYou don't even have a toothpick!"); $count++; } } elsif ($choice =~ /^drink tea\b/i) { if ($cup) { &put("\nIt isn't Earl Grey. It may be tolerable, but why tolerate that concoction when you don't even need to drink it?"); $count++; } else { &put("\nYou don't even have tea to drink."); $count++; } } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"Nguyen Xuan should be arriving soon,\" Butler says to you."); $count++; } elsif ($choice =~ /(table|cafe|city|toothpick|umbrella|parasol|(cup of )?tea|cup)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself? Just sit down and wait. Patience is a virtue."); $count++; } } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; goto saigon; } else { &common; } } ## Prompt 2 # Mysterious waiter arrives ## $place = 2; &put("\nA waiter arrives at your table, and asks: \"More tea, sirs?\""); $count = 0; waiter: until ($count == 3) { &choice; if ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^look$/i) { &put("\nA waiter is asking if you want more tea."); } elsif ($choice =~ /^(examine|look at)$/i) { &put("\n\L\u$1\E what?"); $count++; } elsif ($choice =~ /^(get|take)/i) { if ($choice =~ /toothpick$/i) { if ($toothpick == 0) { $toothpick = 1; $count++; &put("\nYou take the toothpick."); } else { &put("\nAre you blind? You already have the toothpick!"); $count++; } } elsif ($choice =~ /((cup of )?tea|cup)$/i) { if ($cup == 0) { $cup = 1; $count++; &put("\nYou take the $1."); } else { &put("\nAre you blind? You already have the $1!"); $count++; } } elsif ($choice =~ /((ho chi minh )?city|saigon)$/i) { &put("\nGenius as you are, it would be impossible to steal the city. Nice try."); $count++; } elsif ($choice =~ /cafe$/i) { &put("\nI'd like to see you try."); $count++; } elsif ($choice =~ /(umbrella|parasol)$/i) { &put("\nWhy? It's large and bulky, and useless."); $count++; } else { &put("\nAre you blind? That's not on the table!"); $count++; } } elsif ($choice =~ /^(examine|look|look at)/i) { if ($choice =~ /waiter$/i) { &put("\nThe waiter is wearing handmade loafers, a silk shirt, and three gold signet rings. His English has a tinge of Oxford about it, and his nails have the soft sheen of the recently manicured."); $count++; } else { &put("\nI don't see one to \L$1\E."); $count++; } } elsif ($choice =~ /^((ignore( him|( the)? waiter)?)|no( tea| thanks)?)$/i) { &put("\nThe waiter goes away. You get impatient and call off the mission. You go back to Fowl Manor."); &gameover; } elsif ($choice =~ /^((yes|tea|more( tea)?)?( please)?)$/i) { &put("\nThe waiter goes away for a while. He comes back, and sees Butler's guns. He immediately calls the police. You and Butler are escorted to a police station."); &gameover; } elsif ($choice =~ /^(((say )?(tell (waiter|him) to )?sit( down)?)|(.*)(disguise|not( a)? waiter|nguyen( xuan)?|xuan( nguyen)?)(.*))$/i) { goto nguyen; } elsif ($choice =~ /^eat waiter$/i) { &put("\nAre you hungry enough to resort to cannabilism?"); $count++; } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"Unless I am very mistaken, that is not a waiter,\" Butler mutters to you."); $count++; } elsif ($choice =~ /waiter$/i) { &put("\n\"Would you like some tea, young master?\" the waiter asks you."); $count++; } elsif ($choice =~ /(table|cafe|city|toothpick|umbrella|parasol|(cup of )?tea|cup)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nA waiter is asking if you want more tea."); } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } else { &common; } } &put("\nThe waiter goes away. You get impatient and call off the mission. You go back to Fowl Manor."); &gameover; ## Prompt 3 # Nguyen Xuan gives you a Polaroid ## $place = 3; nguyen: &put("\nIt is quite obvious that it is your contact, Nguyen Xuan, pretending to be a waiter. Nguyen Xuan turns to Butler. He opens his mouth to speak, but you cut him off. You tell him how pathetic his disguise, and exactly how easily you penetrated it. You also fill him in on the weapons status, listing a large number of weapons that Butler is carrying, and also state how dangerous Butler is, even without his weapons. You ask Nguyen Xuan what information he has for you, and whether he has proof. Nguyen pulls out a Polaroid from his wallet and pushes it across the table."); $count = 0; until ($count == 4) { &choice; if ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^look$/i) { &put("\nThe Polaroid is on the table. Nguyen Xuan looks at you nervously."); } elsif ($choice =~ /^(examine|look|look at)/i) { if ($choice =~ /(polaroid|picture|photo)$/i) { goto explain; } else { &put("\nI don't see one to \L$1\E."); $count++; } } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nThe Polaroid is on the table. Nguyen Xuan looks at you nervously."); } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"Take a look at it. It's why we came here,\" Butler says to you."); $count++; } elsif ($choice =~ /(table|cafe|city|toothpick|umbrella|polaroid|picture|photograph|parasol|(cup of )?tea|cup)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\n\"Go on,\" Nguyen urges you. \"Take a look.\"."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^(get|take)/i) { if ($choice =~ /toothpick$/i) { if ($toothpick == 0) { $toothpick = 1; $count++; &put("\nYou take the toothpick."); } else { &put("\nAre you blind? You already have the toothpick!"); $count++; } } elsif ($choice =~ /((cup of )?tea|cup)$/i) { if ($cup == 0) { $cup = 1; $count++; &put("\nYou take the $1."); } else { &put("\nAre you blind? You already have the $1!"); $count++; } } elsif ($choice =~ /((ho chi minh )?city|saigon)$/i) { &put("\nGenius as you are, it would be impossible to steal the city. Nice try."); $count++; } elsif ($choice =~ /cafe$/i) { &put("\nI'd like to see you try."); $count++; } elsif ($choice =~ /(umbrella|parasol)$/i) { &put("\nWhy? It's large and bulky, and useless."); $count++; } else { &put("\nAre you blind? That's not on the table!"); $count++; } } elsif ($choice =~ /^eat (polaroid|picture)$/i) { &put("\nUnder an insane impulse, you snatch up the Polaroid and stuff it down your throat before Butler can react. You suffocate and lose conciousness."); &gameover; } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^(tear|destroy|rip( up)? (polaroid|picture))$/i) { &put("\nYou are so arrogant and stuck up that you believe Nguyen is not worth your time. Ignoring his cries of protest, you rip the Polaroid to shreds. You haven't even noticed what is on it. You have failed your mission."); &gameover; } else { &common; } } &put("\nNguyen Xuan gets fed up. He picks up the Polaroid and leaves."); &gameover; ## Prompt 4 # What are we waiting for? He tries to run ## $place = 4; explain: &put("\nIt's a Polaroid. It shows a hand in the midst of shadows. A green hand. Of course, it could be fake. Nguyen explains. He says that the woman is a drunken healer, who works for wine. You notice a lot of sweat on Nguyen's forehead, even though he is used to the climate. He looks around nervously, almost as if he wants to run away."); $count = 0; until ($count == 2) { &choice; if ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^look$/i) { &put("\nNguyen Xuan is sweating, even though he is used to the climate. He looks around nervously."); } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nNguyen Xuan is sweating, even though he is used to the climate. He looks around nervously."); } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"He's uneasy, nervous,\" Butler says to you."); $count++; } elsif ($choice =~ /(table|cafe|city|toothpick|umbrella|parasol|(cup of )?tea|cup)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\n\"I hope my information has been satisfactory...\" Nguyen mumbles."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^eat (polaroid|picture)$/i) { &put("\nUnder an insane impulse, you snatch up the Polaroid and stuff it down your throat before Butler can react. You suffocate and lose conciousness."); &gameover; } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^(tear|destroy|rip( up)? (polaroid|picture))$/i) { &put("\nYou are so arrogant and stuck up that you believe Nguyen is not worth your time. Ignoring his cries of protest, you rip the Polaroid to shreds. He is offended, gets up, and walks away."); &gameover; } else { &common; } } ## Prompt 5 # He runs away ## $place = 5; nguyenrun: &put("\nSuddenly, Nguyen Xuan gets out of his chair and runs away."); $count = 0; until ($count == 8) { &choice; if ($choice =~ /^(wait|talk( to)?|eat|tear|destroy|rip)/i) { &put("\nNguyen Xuan is gone. You do not know where the healer is. The mission is now worthless. You leave for the airport."); &gameover; } elsif ($choice =~ /^look$/i) { &put("\nNguyen Xuan is running away. You may still be able to stop him."); } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nNguyen Xuan is running away. You may still be able to stop him."); } elsif ($choice =~ /^((prevent escape|chase|get|run after|find|capture|block|stop|come back|stay|halt)( (him|nguyen( xuan)?|xuan( nguyen)?)?( butler)?)?|butler)$/i) { last; # Break out of the loop } else { &common; } } ## Prompt 6 # Butler stops him and we go into the Jeep ## $place = 6; $thirst = 1; # Now that you're in the alley, you're thirsty. alley: &put("\nQuick as a flash, Butler lashes out and pulls in the protesting informant. \"Our business is not concluded yet, Mister Xuan,\" you say. \"You will now take us to the healer.\" The three of you go to the rented vehicle and go to Tu Do Street, where the healer lives.\n"); if (!$pebble && $thirst) { &put("\nEventually the streets grow too narrow for the car. Your party gets out and decides to walk the rest of the way. There is a pebble on the ground. You start to get thirsty from the heat."); } elsif ($pebble && $thirst) { &put("\nEventually the streets grow too narrow for the car. Your party gets out and decides to walk the rest of the way. You start to get thirsty from the heat."); }elsif (!$pebble && !$thirst) { &put("\nEventually the streets grow too narrow for the car. Your party gets out and decides to walk the rest of the way. There is a pebble on the ground."); } elsif ($pebble && !$thirst) { &put("\nEventually the streets grow too narrow for the car. Your party gets out and decides to walk the rest of the way."); } $count = 0; until ($count == 7) { &choice; if ($choice =~ /^look$/i) { if (!$pebble && $thirst) { &put("\nYou are in a narrow, but crowded alley. There is a pebble on the ground. You start to get thirsty from the heat."); } elsif ($pebble && !$thirst) { &put("\nYou are in a narrow, but crowded alley."); } elsif (!$pebble && !$thirst) { &put("\nYou are in a narrow, but crowded alley. There is a pebble on the ground."); } elsif ($pebble && $thirst) { &put("\nYou are in a narrow, but crowded alley. You start to get thirsty from the heat."); } } elsif ($choice =~ /^wait\b/i) { &put("\nYou stop walking and stand still in the alley. \nButler calls to you: \"Master Artemis, are you coming?\""); $count++; } elsif ($choice =~ /^(walk|keep walking|follow)$/) { &put("\nYou continue walking.\n"); if ($count == 3) { &put("\nA pickpocket tries to steal Butler's wallet. Butler breaks the pickpocket's fingers without looking.\n"); } elsif ($count == 4) { &put("\nNguyen Xuan looks around, as if he wants to run away. One glance from Butler makes him cower and abandon the idea.\n"); } elsif ($count == 5) { &put("\nYou can see a fire escape at the end of the alley."); } if (!$pebble && $thirst) { &put("\nThere is a pebble on the ground. You start to get thirsty from the heat."); } elsif ($pebble && !$thirst) { } elsif (!$pebble && !$thirst) { &put("\nThere is a pebble on the ground."); } elsif ($pebble && $thirst) { &put("\nYou start to get thirsty from the heat."); } $count++; } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"Be careful you don't get dehydrated,\" Butler warns."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\nNguyen is too scared to talk."); } elsif ($choice =~ /(toothpick|(cup of )?tea|cup|pebble|alley|thirst)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^eat/i) { if ($choice =~ /toothpick$/i) { if ($toothpick) { &put("\nYou stuff the toothpick down your throat, ignoring the pain. It's quite tasty, actually."); $toothpick = 0; $count++; } else { &put("\nWhy would you eat a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /pebble$/i) { &put("\nIs this supposed to be some underlying motive in an overall large scheme to dominate the world?"); $count++; } else { &put("\nAre you hungry?"); } } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^(examine|look|look at)/i) { if ($choice =~ /pebble$/i) { &put("\nIt's a pebble. Small and hard. Might be a good way to get somebody's attention..."); $count++; } elsif ($choice =~ /alley$/i) { &put("\nIt's crowded. And hot."); $count++; } else { &put("\nI don't see one to \L$1\E."); $count++; } } elsif ($choice =~ /^(get|take)/i) { if ($choice =~ /pebble$/i) { &put("\nYou take the pebble."); $pebble = 1; $count++; } else { &put("\nAre you blind? You can't $1 that?."); } } elsif ($choice =~ /^drink tea$/i) { if (!$cup) { &put("\nYou don't have any tea to drink, but you wish you did."); } elsif ($cup && $thirst) { &put("\nYou are very thirsty, and don't care if it's not Earl Grey. You drink the tea, and your thirst is quenched."); $thirst = 0; # Thirst is quenched $cup = 0; # You don't have the tea, you drank it } elsif (!$thirst) { &put("\nWhat tea? You already drank it."); } $count++; } elsif ($choice =~ /^drop/i) { if ($choice =~ /((cup of )?tea|cup)$/i) { &put("\nYou smash the $1 onto the ground."); $cup = 0; $count++; } elsif ($choice =~ /pebble$/i) { if ($pebble) { &put("\nYou drop the pebble onto the ground."); $pebble = 0; $count++; } elsif (!$pebble) { &put("\nYou don't have a pebble to drop."); $count++; } } } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; if (!$pebble) { &put("\nYou are in a narrow, but crowded alley. There is a pebble on the ground. You start to get thirsty from the heat."); } elsif ($pebble) { &put("\nYou are in a narrow, but crowded alley. You start to get thirsty from the heat."); } } else { &common; } } if ($thirst) { &put("\nBy now, you are severely dehydrated. The heat beats down on you, and you feel faint. \"Butler,\" you call out weakly. Butler identifies your condition. He gives you his water bottle, and rushes you to the hospital."); &gameover; } ## Prompt 7 # How to attract the healer's attention? ## $place = 7; outsidehealer: &put("\nNguyen points to the shadows under a fire escape. \"She's in there. She doesn't come out,\" he says."); $count = 0; until ($count == 4) { &choice; if ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^look$/i) { &put("\nThe healer is somewhere under the fire escape. You need to get her attention..."); } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^(examine|look|look at)\b/i) { if ($choice =~ /pebble$/i) { &put("\nIt's a pebble. Small and hard. Might be a good way to get somebody's attention..."); $count++; } elsif ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nDark. You can't see anything in there."); $count++; } elsif ($choice =~ /(darkness|shadows)$/i) { &put("\nIt's dark. Are you scared of the dark?"); $count++; } else { &put("\nI don't see one to \L$1\E."); } } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"You need some way to get her attention,\" Butler advises."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\nNguyen is too scared to talk. He just points at the fire escape."); $count++; } elsif ($choice =~ /(toothpick|pebble|shadows|darkness|fire escape)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } elsif ($choice =~ /(fairy|healer|sprite)$/i) { &put("\nYou yell into the fire escape, but all you hear are echoes of your voice."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^eat/i) { if ($choice =~ /toothpick$/i) { if ($toothpick) { &put("\nYou stuff the toothpick down your throat, ignoring the pain. It's quite tasty, actually."); $toothpick = 0; $count++; } else { &put("\nWhy would you eat a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /pebble$/i) { if ($pebble) { &put("\nYou stuff the pebble down your throat, for some odd reason."); $count++; } else { &put("\nWhy would you want to do that, even if you had a pebble?"); $count++; } } elsif ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nHow are you going to do that?"); $count++; } else { &put("\nAre you hungry?"); } } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nThe healer is somewhere under the fire escape. You need to get her attention..."); } elsif ($choice =~ /^(get( healer's)? attention)$/i) { &put("\nHow are you going to do that?"); $count++; } elsif ($choice =~ /^use pebble$/i) { if (!$pebble) { &put("\nYou do not have a pebble!"); } elsif ($pebble) { &put("\nHow are you going to use it?"); } $count++; } elsif ($choice =~ /^(throw|toss) pebble$/i) { if (!$pebble) { &put("\nYou do not have a pebble!"); } elsif ($pebble) { $pebble = 0; goto sprite; } } elsif ($choice =~ /^(leave|walk away)$/i) { &put("\nYou decide to call off the mission. You \L$1."); &gameover; } elsif ($choice =~ /^((night( |-)vision )?goggles|(butler )?hand me the (night( |-)vision )?goggles( butler)?)$/i) { &put("\nWhy? You haven't gotten the healer's attention yet."); $count++; } elsif ($choice =~ /^(((butler )?hand me the )?(wine|whiskey)( butler)?)$/i) { &put("\nWhy? You haven't gotten the healer's attention yet."); $count++; } elsif ($choice =~ /^(offer|dangle|show|give|wave) (wine|whiskey|bottle|holy water)( to (healer|sprite|fairy))?$/i) { &put("\nWhy? You haven't gotten the healer's attention yet. Besides, you don't even have wine."); $count++; } else { &common; } } &put("\nNothing happens. Nguyen Xuan quietly walks away. You get impatient and call off the mission. You go back to Fowl Manor."); &gameover; ## Prompt 8 # Ah! Toss a pebble! How to see? ## $place = 8; sprite: &put("\nYou toss the pebble into the shadows. It makes a loud clanging noise. A voice drawls out: \"Wine.\" It's too dark to see anything."); $count = 0; until ($count == 4) { &choice; if ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^look$/i) { &put("\nThe healer is somewhere under the fire escape. It's too dark to see her. Some night-vision goggles would come in handy..."); } elsif ($choice =~ /^(examine|look|look at)/i) { if ($choice =~ /darkness$/i) { &put("\nIt's darkness. There's no light. Never seen darkness before?"); $count++; } elsif ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nDark. You can't see anything in there."); $count++; } elsif ($choice =~ /(sprite|healer|fairy)/i) { &put("\nYou can't see her."); $count++; } elsif ($choice =~ /(darkness|shadows)$/i) { &put("\nIt's dark. Are you scared of the dark?"); $count++; } else { &put("\nThere isn't one to \L$1\E!"); } } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"Do you need the night-vision goggles?\" Butler asks."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\nNguyen is too scared to talk. He seems afraid of the healer and wants to run, but he's more afraid of Butler."); $count++; } elsif ($choice =~ /(fairy|healer|sprite)$/i) { &put("\n\"Wine,\" the \L$1 demands."); $count++; } elsif ($choice =~ /(toothpick|shadows|darkness|fire escape)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^eat/i) { if ($choice =~ /toothpick$/i) { if ($toothpick) { &put("\nYou stuff the toothpick down your throat, ignoring the pain. It's quite tasty, actually."); $toothpick = 0; $count++; } else { &put("\nWhy would you eat a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nHow are you going to do that?"); $count++; } else { &put("\nAre you hungry?"); } } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nThe helear is somewhere under the fire escape. It's too dark to see her. Some night-vision goggles would come in handy..."); } elsif ($choice =~ /^(leave|walk away)$/i) { &put("\nYou decide to call off the mission. You \L$1."); &gameover; } elsif ($choice =~ /^(butler|(night( |-)vision )?goggles|(butler )?(hand me the |accept |take |grab |use |obtain )(night( |-)vision )?goggles( butler)?)$/i) { $goggles = 1; goto goggles; } elsif ($choice =~ /^(((butler )?hand me the )?(wine|whiskey)( butler)?)$/i) { &put("\nWhy? You can't even see the healer."); $count++; } elsif ($choice =~ /^(offer|dangle|show|give|wave) (wine|whiskey|bottle|holy water)( to (healer|sprite|fairy))?$/i) { &put("\nWhy? You can't even see the healer. Besides, you don't even have wine."); $count++; } else { &common; } } &put("\nNothing happens. Nguyen Xuan quietly walks away. You get impatient and call off the mission. You go back to Fowl Manor."); &gameover; ## Prompt 9 # Now we need to offer the ho- wine ## $place = 9; goggles: &put("\nButler hands a pair of night-vision goggles to you. You put them on and set into the shadows. After adjusting the goggles, you see a small figure wrapped in a filthy shawl. Her skin is green, like everything else you see. \"Wine first, then talk,\" the healer mutters to you."); $count = 0; until ($count == 4) { &choice; if ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"I have some Irish whiskey, if you need some,\" Butler advises."); $count++; } elsif ($choice =~ /((night( |-)vision )?goggles|toothpick|shadows|darkness|fire escape)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\nNguyen is too scared to talk. He seems afraid of the healer and wants to run, but he's more afraid of Butler."); $count++; } elsif ($choice =~ /(fairy|healer|sprite)$/i) { &put("\n\"Wine,\" the \L$1 demands."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^eat/i) { if ($choice =~ /toothpick$/i) { if ($toothpick) { &put("\nYou stuff the toothpick down your throat, ignoring the pain. It's quite tasty, actually."); $toothpick = 0; $count++; } else { &put("\nWhy would you eat a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nHow are you going to do that?"); $count++; } else { &put("\nAre you hungry?"); } } elsif ($choice =~ /^look$/i) { &put("\nThe healer wants wine from you."); } elsif ($choice =~ /^(examine|look|look at)/i) { if ($choice =~ /healer$/i) { &put("\nIt's a healer. She's abnormally small. And she's demanding wine from you."); $count++; } elsif ($choice =~ /(darkness|shadows)$/i) { &put("\nIt's dark. Are you scared of the dark?"); $count++; } else { &put("\nThere isn't one to \L$1\E!"); } } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nThe healer wants wine from you."); } elsif ($choice =~ /^(butler|((butler )?(accept |grab |use |obtain |hand me the |give me the ))?(wine|whiskey)( butler)?)$/i) { $wine = 1; goto wine; } elsif ($choice =~ /^(leave|walk away)$/i) { &put("\nYou decide to call off the mission. You \L$1."); &gameover; } elsif ($choice =~ /^(offer|dangle|show|give|wave) (wine|whiskey|bottle|holy water)( to (healer|sprite|fairy))?$/i) { &put("\nWhy? You don't even have wine!"); $count++; } elsif ($choice =~ /^((night( |-)vision )?goggles|(butler )?hand me the (night( |-)vision )?goggles( butler)?)$/i) { &put("\nYou already have the goggles! The ages kids start getting faulty memories..."); $count++; } else { &common; } } &put("\nNothing happens. Nguyen Xuan quietly walks away. You get impatient and call off the mission. You go back to Fowl Manor."); &gameover; ## Prompt 10 # Butler gives you the hol- whiskey ## $place = 10; wine: &put("\nButler hands you a bottle of a half pint of Irish whiskey."); $count = 0; until ($count == 4) { &choice; if ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^look$/i) { &put("\nThe healer wants wine from you. You have half a pint of Irish whiskey in your hands."); } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^(examine|look|look at)/i) { if ($choice =~ /healer$/i) { &put("\nIt's a healer. She's abnormally small. And she's demanding wine from you."); $count++; } elsif ($choice =~ /(darkness|shadows)$/i) { &put("\nIt's dark. Are you scared of the dark?"); $count++; } elsif ($choice =~ /(wine|(irish )?whiskey)$/i) { &put("\nIt's a pint of Irish whiskey. Really."); $count++; } elsif ($choice =~ /holy water$/i) { &put("\nWhat holy water?"); $count++; } else { &put("\nThere isn't one to \L$1\E!"); $count++; } } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"Are you going to offer the whiskey to her?\" Butler asks."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\nNguyen is too scared to talk. He seems afraid of the healer and wants to run, but he's more afraid of Butler."); $count++; } elsif ($choice =~ /(bottle|wine|(irish )?whiskey|(night( |-)vision )?goggles|toothpick|shadows|darkness|fire escape)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } elsif ($choice =~ /(fairy|healer|sprite)$/i) { &put("\n\"Wine,\" the \L$1 demands. And you have a bottle of wine."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^eat/i) { if ($choice =~ /toothpick$/i) { if ($toothpick) { &put("\nYou stuff the toothpick down your throat, ignoring the pain. It's quite tasty, actually."); $toothpick = 0; $count++; } else { &put("\nWhy would you eat a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nHow are you going to do that?"); $count++; } elsif ($choice =~ /(bottle( of (wine|whiskey)?))$/i) { &put("\nYou stuff the bottle down your throat and choke. You lose consciousness."); &gameover; } else { &put("\nAre you hungry?"); } } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nThe healer wants wine from you. You have half a pint of Irish whiskey in your hands."); } elsif ($choice =~ /^(drink (wine|whiskey|bottle( of (wine|whiskey)?)))\b/i) { &put("\nYou decide to conduct some scientific research into the effects of intoxication via single-malt Irish whiskey. Not surprisingly, you get so drunk that you have to abandon the mission."); &gameover; } elsif ($choice =~ /^(leave|walk away)$/i) { &put("\nYou decide to call off the mission. You \L$1."); &gameover; } elsif ($choice =~ /^(offer|dangle|show|give|wave) (wine|whiskey|bottle|holy water)( to (healer|sprite|fairy))?$/i) { goto offerwine; } elsif ($choice =~ /^((night( |-)vision )?goggles|(butler )?hand me the (night( |-)vision )?goggles( butler)?)$/i) { &put("\nYou already have the goggles! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(((butler )?hand me the )?(wine|whiskey)( butler)?)$/i) { &put("\nYou already have the whiskey! The ages kids start getting faulty memories..."); $count++; } else { &common; } } &put("\nNothing happens. Nguyen Xuan quietly walks away. You get impatient and call off the mission. You go back to Fowl Manor."); &gameover; ## Prompt 11 # Remove your goggles quick! ## $place = 11; offerwine: &put("\nYou hold the bottle just beyond the shadows, and tell the healer to get it."); $count = 0; until ($count == 8) { &choice; if ($choice =~ /^(wait|examine|look at|talk( to)?|eat)/i) { &put("\nThe healer's hand darts out and takes the whiskey. You have no idea whether the healer is a fairy or not, and you have just blown your chances. Fed up, you go back to the airport."); &gameover; } elsif ($choice =~ /^look$/i) { &put("\nYou're offering the wine to the healer."); } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nYou're offering the wine to the healer."); } elsif ($choice =~ /^(remove|take off) (night( |-)vision )?goggles$/i) { $wine = 0; last; # Break out of loop } elsif ($choice =~ /^(drink (wine|whiskey|bottle( of (wine|whiskey)?)))\b/i) { &put("\nThe healer's hand darts out and takes the whiskey. You have no idea whether the healer is a fairy or not, and you have just blown your chances. Fed up, you go back to the airport."); &gameover; } elsif ($choice =~ /^(leave|walk away)$/i) { &put("\nYou decide to call off the mission. You \L$1."); &gameover; } elsif ($choice =~ /^((night( |-)vision )?goggles|(butler )?hand me the (night( |-)vision )?goggles( butler)?)$/i) { &put("\nThe healer's hand darts out and takes the whiskey. You have no idea whether the healer is a fairy or not, and you have just blown your chances. Fed up, you go back to the airport."); &gameover; } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^(((butler )?hand me the )?(wine|whiskey)( butler)?)$/i) { &put("\nThe healer's hand darts out and takes the whiskey. You have no idea whether the healer is a fairy or not, and you have just blown your chances. Fed up, you go back to the airport."); &gameover; } elsif ($choice =~ /^(offer|dangle|show|give|wave) (wine|whiskey|bottle|holy water)( to (healer|sprite|fairy))?$/i) { &put("\nThe healer's hand darts out and takes the whiskey. You have no idea whether the healer is a fairy or not, and you have just blown your chances. Fed up, you go back to the airport."); &gameover; } else { &common; } } ## Prompt 12 # Pay Nguyen. He deserves it ## $place = 12; payhim: &put("\nYou quickly whip your goggles off. Just in time to see the healer's green hand grab the whiskey. You tell Butler to pay Nguyen. After ensuring that Nguyen will remain silent, Butler hands over \$20,000 USD in cash. Nguyen skips away happily. You replace your goggles and turn to the healer. She asks you what you want healed, and you subtly turn the conversation to books. Her Book, in fact, for she is a fairy. A sprite, to be specific. \"You know about the Book? Then you know about my magic,\" the fairy says.\n"); $count = 0; until ($count == 4) { if ($count == 0) { &put("\n\"Do you doubt me? Just let me enslave your will. It will be trivial.\""); } elsif ($count == 1) { &put("\nThe fairy continues. \"Do you want to become pig droppings? I can do it easily...\""); } elsif ($count == 2) { &put("\nYou wonder when the fairy will stop. \"Listen to me!\" she says. \"You do not know what you are dealing with, human!\""); } elsif ($count == 3) { &put("\n\"You are a fool,\" the healer says, \"to meddle with magic.\""); } elsif ($count == 4) { &put("\n\"I will kill you!\" the fairy roars, spraying her alcohol-laced spit everywhere."); } &choice; if ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^look$/i) { $count++ } elsif ($choice =~ /^(examine|look|look at)/i) { if ($choice =~ /healer$/i) { &put("\nIt's a healer. She's abnormally small. And she's threatening you."); $count++; } elsif ($choice =~ /(darkness|shadows)$/i) { &put("\nIt's dark. Are you scared of the dark?"); $count++; } else { &put("\nThere isn't one to \L$1\E!"); $count++; } } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"She'll give up soon,\" Butler comments."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\nHe's gone. You just paid him."); $count++; } elsif ($choice =~ /(toothpick|shadows|darkness|fire escape)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } elsif ($choice =~ /(fairy|healer|sprite)$/i) { $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^eat/i) { if ($choice =~ /toothpick$/i) { if ($toothpick) { &put("\nYou stuff the toothpick down your throat, ignoring the pain. It's quite tasty, actually."); $toothpick = 0; $count++; } else { &put("\nWhy would you eat a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nHow are you going to do that?"); $count++; } else { &put("\nAre you hungry?"); } } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; } elsif ($choice =~ /^(offer|dangle|show|give|wave) (wine|whiskey|bottle|holy water)( to (healer|sprite|fairy))?$/i) { &put("\nYou've already given her the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^((night( |-)vision )?goggles|(butler )?hand me the (night( |-)vision )?goggles( butler)?)$/i) { &put("\nYou already have the goggles! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(((butler )?hand me the )?(wine|whiskey)( butler)?)$/i) { &put("\nYou already gave the healer the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(leave|walk away)$/i) { &put("\nYou are easily intimidated by the healer, and run away. You go back to Fowl Manor."); &gameover; } else { &common; } } ## Prompt 13 # Let's make a deal! ## $place = 13; makedeal: &put("\nYou know the threats are empty. You tell the sprite how pathetic she is, how the alcohol is killing her. She has no magic. You offer to save her, but she has to give you the Book. Almost casually, you mention how the healer has just drank half a pint of holy water. You offer her a chance to live, and a way to regain her magic. But only if she lends you the book for thirty minutes. You will counteract the holy water with some water drawn from the hill of Tara. You will then give her a shot of human technology. A \"virus\" which will flush out all the alcohol from the sprite, and restore her health. The sprite accepts."); $count = 0; until ($count == 3) { &choice; if ($choice =~ /^look$/i) { &put("\nThe healer has made a deal with you. You'll counteract the holy water you gave her, she'll show you the Book, and you'll return her magic."); } elsif ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nThe healer has made a deal with you. You'll counteract the holy water you gave her, she'll show you the Book, and you'll return her magic."); } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^(examine|look|look at)\b/i) { if ($choice =~ /(healer|sprite|fairy)$/i) { &put("\nIt's a healer. She's abnormally small. And she's waiting for you to counteract the holy water you tricked her into drinking."); $count++; } elsif ($choice =~ /(darkness|shadows)$/i) { &put("\nIt's dark. Are you scared of the dark?"); $count++; } else { &put("\nThere isn't one to \L$1\E!"); $count++; } } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"If we don't save her now she'll die,\" Butler comments."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\nHe's gone. Don't you remember?"); $count++; } elsif ($choice =~ /(toothpick|shadows|darkness|fire escape)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } elsif ($choice =~ /(fairy|healer|sprite)$/i) { &put("\n\"Are you going to help me?\" the sprite demands."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^eat/i) { if ($choice =~ /toothpick$/i) { if ($toothpick) { &put("\nYou stuff the toothpick down your throat, ignoring the pain. It's quite tasty, actually."); $toothpick = 0; $count++; } else { &put("\nWhy would you eat a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nHow are you going to do that?"); $count++; } else { &put("\nAre you hungry?"); } } elsif ($choice =~ /^((night( |-)vision )?goggles|(butler )?hand me the (night( |-)vision )?goggles( butler)?)$/i) { &put("\nYou already have the goggles! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(((butler )?hand me the )?(wine|whiskey)( butler)?)$/i) { &put("\nYou already gave the healer the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(leave|walk away)$/i) { &put("\nYou decide to abandon the mission. You go back to Fowl Manor."); &gameover; } elsif ($choice =~ /^(butler|heal (fairy|healer|sprite))|(((butler )?the|(give|offer) )?(vial|antidote|tara water|injection|virus)( butler)?)$/i) { $book = 1; goto vial; } else { &common; } } &put("\nToo late. The sprite falls over. The pain from the holy water must have been too much. Your chance of getting the Book has been blown. You go back to the airport."); &gameover; ## Prompt 14 # Don't steal the Book! ## $place = 14; vial: &put("\nButler loads the vial into a syringe gun. He shoots it into the sprite's arm. The sprite is instantly relieved. After searching through her robes, she holds out a gold book the size of a matchbox. She comments how it's written in the old tongue, and how you won't understand it."); $count = 0; until ($count == 3) { &choice; if ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^look$/i) { &put("\nThe sprite is holding out the Book for you to take."); } elsif ($choice =~ /^(examine|look|look at)\b/i) { if ($choice =~ /(healer|sprite|fairy)$/i) { &put("\nIt's a healer. She's abnormally small. And she's holding out the Book for you to take."); $count++; } elsif ($choice =~ /(darkness|shadows)$/i) { &put("\nIt's dark. Are you scared of the dark?"); $count++; } elsif ($choice =~ /book$/i) { &put("\nIt's gold. It's small. It's in the sprite's hand. And time is running out."); $count++; } else { &put("\nThere isn't one to \L$1\E!"); $count++; } } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^(get|take)/i) { if ($choice =~ /book$/i) { $goggles = 0; goto camera; } else { &put("\nThere isn't one to \L$1\E!"); $count++; } } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"Are you going to take it?\" Butler asks."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\nHe's gone."); $count++; } elsif ($choice =~ /(toothpick|book|shadows|darkness|fire escape)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } elsif ($choice =~ /(fairy|healer|sprite)$/i) { &put("\n\"Here's the book,\" she says."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^eat/i) { if ($choice =~ /toothpick$/i) { if ($toothpick) { &put("\nYou stuff the toothpick down your throat, ignoring the pain. It's quite tasty, actually."); $toothpick = 0; $count++; } else { &put("\nWhy would you eat a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nHow are you going to do that?"); $count++; } elsif ($choice =~ /book$/i) { &put("\nYou take the Book and stuff it down your throat. It combusts, burning your throat. You choke and Butler rushes you to hospital."); &gameover; } else { &put("\nAre you hungry?"); } } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nThe sprite is holding out the Book for you to take."); } elsif ($choice =~ /^(offer|dangle|show|give|wave) (wine|whiskey|bottle|holy water)( to (healer|sprite|fairy))?$/i) { &put("\nYou've already given her the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^((night( |-)vision )?goggles|(butler )?hand me the (night( |-)vision )?goggles( butler)?)$/i) { &put("\nYou already have the goggles! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(((butler )?hand me the )?(wine|whiskey)( butler)?)$/i) { &put("\nYou already gave the healer the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(leave|walk away)$/i) { &put("\nYou give up on the mission. You go back to Fowl Manor."); &gameover; } else { &common; } } &put("\n\"You're not going to take it?\" the sprite asks. \"Very well.\" She puts her Book away. Your chance is gone."); &gameover; ## Prompt 15 # You can't take the Book away, so you'll have to improvise ## $place = 15; camera: &put("\nYou take the Book and hand it to Butler. You also hand him your goggles, as they have served their use."); $count = 0; until ($count == 20) { &choice; if ($choice =~ /^look$/i) { &put("\nButler (looking somewhat confused) is holding the Book."); } elsif ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^(examine|look|look at)\b/i) { if ($choice =~ /book$/i) { &put("\nIt's gold. It's small. It's in Butler's hand. And time is running out."); $count++; } else { &put("\nThere isn't one to \L$1\E!"); $count++; } } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nButler (looking somewhat confused) is holding the Book."); } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^(butler|(butler )?(photograph|take pictures of) book( butler)?)$/i) { goto takepictures; } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"What do you want me to do?\" Butler asks."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\nHe's gone."); $count++; } elsif ($choice =~ /(toothpick|book|shadows|darkness|fire escape)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } elsif ($choice =~ /(fairy|healer|sprite)$/i) { &put("\n\"Hurry up, time's running out,\" she says."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^eat/i) { if ($choice =~ /toothpick$/i) { if ($toothpick) { &put("\nYou stuff the toothpick down your throat, ignoring the pain. It's quite tasty, actually."); $toothpick = 0; $count++; } else { &put("\nWhy would you eat a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nHow are you going to do that?"); $count++; } elsif ($choice =~ /book$/i) { &put("\nYou take the Book and stuff it down your throat. It combusts, burning your throat. You choke and Butler rushes you to hospital."); &gameover; } else { &put("\nAre you hungry?"); } } elsif ($choice =~ /^(offer|dangle|show|give|wave) (wine|whiskey|bottle|holy water)( to (healer|sprite|fairy))?$/i) { &put("\nYou've already given her the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^((night( |-)vision )?goggles|(butler )?hand me the (night( |-)vision )?goggles( butler)?)$/i) { &put("\nYou already have the goggles! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(((butler )?hand me the )?(wine|whiskey)( butler)?)$/i) { &put("\nYou already gave the healer the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(leave|walk away)$/i) { &put("\nUnfortunately, you are not allowed to do that. You were only allowed to look at the Book for half an hour. The Book combusts, burning Butler's hand. You have failed to obtain a copy of the Book."); &gameover; } else { &common; } } &put("\n\"Time's up,\" the sprite says. You reluctantly hand the Book back to her. Your chance is gone."); &gameover; ## Prompt 16 # Oh no, the camera doesn't work! ## $place = 16; takepictures: &put("\n\"Sir,\" Butler says to you. \"There's a problem with the camera. I've just installed new batteries, and the camera needs to be reset. I need something small, something thin to press the button. A pen, or a pencil, maybe?\""); until ($count == 20) { &choice; if ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^look$/i) { &put("\nButler (looking somewhat confused) is holding the Book. He needs something small and thin to reset the camera."); } elsif ($choice =~ /^(examine|look|look at)\b/i) { if ($choice =~ /book$/i) { &put("\nIt's gold. It's small. It's in Butler's hand. And time is running out."); $count++; } elsif ($choice =~ /(darkness|shadows)$/i) { &put("\nIt's dark. Are you scared of the dark?"); $count++; } elsif ($choice =~ /camera$/i) { &put("\nIt needs to be reset. The button cannot be pressed without a pen."); $count++; } else { &put("\nThere isn't one to \L$1\E!"); $count++; } } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"The camera doesn't work,\" Butler says."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\nHe's gone."); $count++; } elsif ($choice =~ /(toothpick|camera|book|shadows|darkness|fire escape)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } elsif ($choice =~ /(fairy|healer|sprite)$/i) { &put("\n\"Why are you talking to me? Do you have some other idea to blackmail me?\" she asks."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nButler (looking somewhat confused) is holding the Book. He needs something small and thin to reset the camera."); } elsif ($choice =~ /^((use|offer|give|produce|reveal|show) pen( to butler)?)$/i) { &put("\nThat would be great, if you had a pen. Do you have a pen? No? I didn't think so."); $count++; } elsif ($choice =~ /^eat/i) { if ($choice =~ /toothpick$/i) { if ($toothpick) { &put("\nYou stuff the toothpick down your throat, ignoring the pain. It's quite tasty, actually."); $toothpick = 0; $count++; } else { &put("\nWhy would you eat a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nHow are you going to do that?"); $count++; } elsif ($choice =~ /book$/i) { &put("\nYou take the Book and stuff it down your throat. It combusts, burning your throat. You choke and Butler rushes you to hospital."); &gameover; } elsif ($choice =~ /camera$/i) { &put("\nYou stuff the camera down your throat. You choke and Butler rushes you to hospital."); &gameover; } else { &put("\nAre you hungry?"); } } elsif ($choice =~ /^(offer|dangle|show|give|wave) (wine|whiskey|bottle|holy water)( to (healer|sprite|fairy))?$/i) { &put("\nYou've already given her the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^((night( |-)vision )?goggles|(butler )?hand me the (night( |-)vision )?goggles( butler)?)$/i) { &put("\nYou already have the goggles! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(((butler )?hand me the )?(wine|whiskey)( butler)?)$/i) { &put("\nYou already gave the healer the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^((use|offer|give|produce|reveal|show) toothpick( to butler)?)$/i) { if (!$toothpick) { &put("\nThat would be a great idea, if you had a toothpick."); $count++; } elsif ($toothpick) { $toothpick = 0; goto toothpick; } } elsif ($choice =~ /^(leave|walk away)$/i) { &put("\nUnfortunately, you are not allowed to do that. You were only allowed to look at the Book for half an hour. The Book combusts, burning Butler's hand. You have failed to obtain a copy of the Book."); &gameover; } else { &common; } } &put("\n\"Time's up,\" the sprite says. You reluctantly hand the Book back to her. Your chance is gone."); &gameover; ## Prompt 17 # The camera works now ## $place = 17; toothpick: &put("\nYou give the toothpick to Butler. He resets the camera. Butler photographs each page of the Book. The entire contents of the Book are now stored on a chip."); until ($count == 20) { &choice; if ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^look$/i) { &put("\nButler (looking somewhat confused) is holding the Book. He has just taken pictures of every page of the Book."); } elsif ($choice =~ /^(examine|look|look at)\b/i) { if ($choice =~ /book$/i) { &put("\nIt's gold. It's small. It's in Butler's hand. You have its contents on the camera chip. And time is running out."); $count++; } elsif ($choice =~ /(darkness|shadows)$/i) { &put("\nIt's dark. Are you scared of the dark?"); $count++; } else { &put("\nThere isn't one to \L$1\E!"); $count++; } } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"I'm done. Now what?\" Butler asks."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\nHe's gone."); $count++; } elsif ($choice =~ /(camera|book|shadows|darkness|fire escape)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } elsif ($choice =~ /(fairy|healer|sprite)$/i) { &put("\n\"Why are you talking to me? Do you have some other idea to blackmail me?\" she asks."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^eat/i) { if ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nHow are you going to do that?"); $count++; } elsif ($choice =~ /book$/i) { &put("\nYou take the Book and stuff it down your throat. It combusts, burning your throat. You choke and Butler rushes you to hospital."); &gameover; } else { &put("\nAre you hungry?"); } } elsif ($choice =~ /^(offer|dangle|show|give|wave) (wine|whiskey|bottle|holy water)( to (healer|sprite|fairy))?$/i) { &put("\nYou've already given her the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^((night( |-)vision )?goggles|(butler )?hand me the (night( |-)vision )?goggles( butler)?)$/i) { &put("\nYou already have the goggles! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(((butler )?hand me the )?(wine|whiskey)( butler)?)$/i) { &put("\nYou already gave the healer the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^((use|offer|give|produce|reveal|show) toothpick( to butler)?)$/i) { &put("\nThe camera already works! In fact, you've already taken the pictures! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nButler (looking somewhat confused) is holding the Book. He has just taken pictures of every page of the Book."); } elsif ($choice =~ /^(leave|walk away)$/i) { &put("\nUnfortunately, you are not allowed to do that. You were only allowed to look at the Book for half an hour. The Book combusts, burning Butler's hand. You have failed to obtain a copy of the Book."); &gameover; } elsif ($choice =~ /^((e(-)?mail|upload|send|backup|load|save) (book|pictures|chip|photos|photographs|pics|files)( to (server|fowl manor))?)$/i) { $email = 1; $book = 0; last; # Break out of loop } elsif ($choice =~ /^return book( to (healer|sprite|fairy))?$/i) { $book = 0; last; # Break out of loop } else { &common; } } ## Prompt 18 # Did you email the files? ## $place = 18; leave: if ($email) { &put("\nIn case airport security erases the Book, you instruct Butler to use your mobile phone to email the files to Fowl Manor. Butler carries out your instructions, and hands the Book back to the sprite.\n"); } elsif (!$email) { &put("\nButler returns the Book back to the sprite.\n"); } &put("\nThe sprite asks for the second potion, the one which would restore her magic. Butler loads the second vial, and shoots it into the sprite's carotid artery. The sprite collapses. You decide to leave before the sprite's body expels all the alcohol in her system."); $count = 0; until ($count == 3) { &choice; if ($choice =~ /^wait\b/i) { $count++; } elsif ($choice =~ /^look$/i) { &put("\nThe sprite is on the ground. You should leave before all the alcohol is violently expelled from the sprite."); } elsif ($choice =~ /^(examine|look|look at)\b/i) { if ($choice =~ /(sprite|fairy|healer)$/i) { &put("\nThe sprite is on the ground. You should leave before all the alcohol is violently expelled from the sprite."); $count++; } elsif ($choice =~ /(darkness|shadows)$/i) { &put("\nIt's dark. Are you scared of the dark?"); $count++; } else { &put("\nThere isn't one to \L$1\E!"); $count++; } } elsif ($choice =~ /^talk( to)?/i) { if ($choice =~ /butler$/i) { &put("\n\"Maybe we should leave,\" Butler suggests."); $count++; } elsif ($choice =~ /(nguyen|xuan|nguyen xuan)$/i) { &put("\nHe's gone."); $count++; } elsif ($choice =~ /(toothpick|shadows|darkness|fire escape)$/i) { &put("\nWow. I always knew that genii were insane, but I never knew it happened at this age."); $count++; } elsif ($choice =~ /(fairy|healer|sprite)$/i) { &put("\nShe's in no condition to talk."); $count++; } else { &put("\nWhy waste time to talk and further dehydrate yourself?"); $count++; } } elsif ($choice =~ /^eat/i) { if ($choice =~ /(fire escape|shadow(s)?)$/i) { &put("\nHow are you going to do that?"); $count++; } else { &put("\nAre you hungry?"); } } elsif ($choice =~ /^poke butler with toothpick$/i) { if ($toothpick) { &put("\nYou poke Butler with a toothpick. In one swift movement, he whips out and breaks the toothpick, before realizing you were the one poking him."); $toothpick = 0; $count++; } else { &put("\nWhy would you poke Butler with a toothpick, even if you had one?"); $count++; } } elsif ($choice =~ /^(offer|dangle|show|give|wave) (wine|whiskey|bottle|holy water)( to (healer|sprite|fairy))?$/i) { &put("\nYou've already given her the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^((night( |-)vision )?goggles|(butler )?hand me the (night( |-)vision )?goggles( butler)?)$/i) { &put("\nYou already have the goggles! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^(((butler )?hand me the )?(wine|whiskey)( butler)?)$/i) { &put("\nYou already gave the healer the whiskey! The ages kids start getting faulty memories..."); $count++; } elsif ($choice =~ /^((use|offer|give|produce|reveal|show) toothpick( to butler)?)$/i) { &put("\nOld news. You've done that and more."); $count++; } elsif ($choice =~ /^(quit|exit)\b/i) { &quit; &put("\nThe sprite is on the ground. You should leave before all the alcohol is violently expelled from the sprite."); } elsif ($choice =~ /^(leave|walk away|go to the airport)$/i) { last; # Break out of loop } else { &common; } } &put("\nYou go to the airport. On the way to the airport, you explain to Butler how it was necessary to give the second injection to the sprite. You had mixed an amnesiac into it, just in case the sprite plans to alert the fairies."); if (!$email) { &put("\nYou pass through the airport. You decide to start decoding the Book, and retrieve the camera chip. Unfortunately, the data has been wiped by the airport security. All your hard work and planning, foiled by a few metal detectors."); &gameover; } ## Final Screen ## &put("\nYou have succeded! You are now in Fowl Manor, and a copy of the Book is sitting on the hard drive of a computer. ===Please Hit Enter to Continue===\n"); ; &put("\nCongratulations. You have beaten the level. The adventure continues... ===Please Hit Enter to Exit===\n"); ;