(*Imports* from . import Species, Items from .. import Node, Utl, Ifc, g *) (*Definition*BoilerRoom* special_symbol = '%'; color = Ifc.BRIGHT_RED; name = "Boiler Room"; description = """This boiler room is the heart of the steam tunnels. The maze extends outward from this firey core."""; unique = True; tunnel = False; *) (*Definition*CoffeeShop* special_symbol = 'S'; color = Ifc.BRIGHT_YELLOW; name = 'Coffee House'; description = "It's simply a modern coffee house frequented by the more artsy students."; tunnel = False; *) (*Functions*CoffeeShop* def xmake(self): for x in xrange(Utl.d(1, 5)): self.add(Species.artsie.make()) self.add(Utl.rn_seq(Items.coffee_items).make()) self.add(Species.beatnik.make()) *** *) (*Definition*Entrance* special_symbol = '#'; color = Ifc.BRIGHT_BLUE; name = "Entrance Vault"; description = """Above you, a single shaft of sunlight penetrates the abyss you now stand in. Before you lie the steam tunnels. There is no turning back now."""; unique = True; tunnel = False; *) (*Functions*Entrance* def check_trap(self, mon, origin): if mon is g.player and g.artifact in g.player.inventory: Ifc.msg("At last, your quest can now be completed.") if Ifc.yn("Would you like to leave the tunnels and win? "): g.do_win = 1 else: Ifc.msg("Re-enter this room with your %s when you are ready." % g.artifact.kind.name) return 1 *** *) (*Definition*ChampionHall* special_symbol = 'H'; color = Ifc.BRIGHT_YELLOW; name = "Hall of Champions"; description = "Statues of great warriors line the walls of this room."; unique = True; locked = True; tunnel = False; *) (*Functions*ChampionHall* def xmake(self): self.add(Species.champion.make()) *** *) (*Definition*ProgrammerTower* special_symbol = 'T'; color = Ifc.BRIGHT_CYAN; name = "Programmer's Tower"; description = "This strange room contains all kinds of strange machines."; unique = True; tunnel = False; *) (*Functions*ProgrammerTower* def xmake(self): self.add(Species.programmer.make()) *** *) (*Definition*CubeLair* special_symbol = 'C'; color = Ifc.CYAN; name = "Ooze Lair"; description = "This is the lair of several gelatinous cubes."; tunnel = False; *) (*Functions*CubeLair* def xmake(self): for x in xrange(Utl.d(1, 4)): self.add(Species.gelatinous_cube.make()) self.add(Utl.rn_seq(Items.all_items).make()) *** *) (*Definition*PikachuNest* special_symbol = 'P'; color = Ifc.YELLOW; name = "Pikachu Nest"; description = "This filty warren is a Pikachu spawning ground!"; tunnel = False; *) (*Functions*PikachuNest* def xmake(self): for x in xrange(Utl.d(1, 6)): self.add(Species.pikachu.make()) if Utl.rn(): self.add(Utl.rn_seq(Items.corpses).make()) if Utl.rn(3) == 0: self.add(Items.pikachu_egg.make()) *** *) (*Definition*DankCesspool* special_symbol = 'D'; color = Ifc.BLUE; name = "Dank Cesspool"; description = "The smell of death is strong here."; tunnel = False; *) (*Functions*DankCesspool* def xmake(self): for x in xrange(Utl.d(1, 6)): self.add(Utl.rn_seq(Species.cesspool_critters).make()) if Utl.rn(): self.add(Utl.rn_seq(Items.cesspool_items).make(tainted=True)) for x in xrange(Utl.d(1, 3)): self.add(Items.filth.make()) *** *) (*Definition*InternetCafe* special_symbol = 'I'; color = Ifc.GREEN; name = 'Internet Cafe'; description = "There is a clandestine internet cafe hidden here!"; tunnel = False; *) (*Functions*InternetCafe* def xmake(self): for x in xrange(Utl.d(2, 4)): self.add(Species.nerd.make()) if Utl.rn(): self.add(Species.code_monkey.make()) self.add(Utl.rn_seq(Items.cafe_items).make()) *** *) (*Definition*HamsterNest* special_symbol = 'N'; color = Ifc.BLUE; name = 'Hamster Nest'; description = "This is a hamster nest!"; tunnel = False; *) (*Functions*HamsterNest* def xmake(self): for x in xrange(Utl.d(2, 6)): self.add(Species.hamster.make()) self.add(Utl.rn_seq(Items.nest_items).make()) if Utl.rn(): self.add(Species.pikachu.make()) self.add(Species.giant_hamster.make()) *** *) (*Definition*LockerRoom* special_symbol = 'R'; color = Ifc.RED; name = 'Locker Room'; description = "This locker room has many lockers and some benches and showers."; tunnel = False; *) (*Functions*LockerRoom* def xmake(self): for x in xrange(Utl.d(1, 6)): self.add(Species.jock.make()) self.add(Utl.rn_seq(Items.locker_items).make()) self.add(Species.coach.make()) *** *) (*Definition*GnomeHive* special_symbol = 'G'; color = Ifc.MAGENTA; name = 'Gnome Hive'; description = "This is a gnome hive, filled with gnome nests and gnomish items."; tunnel = False; *) (*Functions*GnomeHive* def xmake(self): for x in xrange(Utl.d(1, 8)): self.add(Species.gnome.make()) self.add(Utl.rn_seq(Items.hive_items).make()) *** *) (*Definition*Laboratory* special_symbol = 'L'; color = Ifc.YELLOW; name = 'Laboratory'; tunnel = False; *) (*Functions*Laboratory* def xmake(self): if Utl.rn(): self.description = "You are in a chemistry laboratory.\nThere are fume-hoods and arcane apparata of various sorts."; for x in xrange(Utl.rn(2)): self.add(Species.madsci.make(rabid=False)) for x in xrange(Utl.d(2, 4)): self.add(Species.nerd.make()) else: self.description = "This chemistry laboratory has been trashed by pyrex elves!"; for x in xrange(Utl.d(2, 4)): self.add(Species.pyrex_elf.make()) for x in xrange(Utl.d(1, 4)): self.add(Items.human_corpse.make()) self.add(Items.glass.make()) for x in xrange(Utl.d(1, 6)): self.add(Utl.rn_seq(Items.lab_items).make()) *** *) (*List*random_names* "Doug", "Jeremy", "Stephen", "Ken", "John", "Lauren", "Catherine", "Katz", "Yuko", "Hosea", "Upinder", "Schroeder", "Jason", "Schroeder", "Syda", "Gallagher", "Jorden", "Alexia", "Kevin", "Andrew", "Josh", "J Kennedy", "M Tohya", "J L Picard", "Foothark McGee", "Arizona Amy", "Columbia Jones", "J Koizumi", "Clinton", "Bush", "Carter", "Kofi Annan", "Seijik", "Bart", "S Mario", "Luigi", "S Hedgehog" *) (*List*rsize_adjectives* "tiny", "cramped", "bitty", "big", "average-sized", "huge", "large", "small", "spacious" *) (*List*radjectives* "strange-smelling", "odorous", "happy", "unhappy", "clean", "dirty", "filthy", "dusty", "sterile", "boring", "interesting", "awesome", "yet another stupid", "totally elite", "narrow", "long", "machine", "unused", "abandoned", "messy", "barren" *) (*List*rtips_true* "Stupid people should not play with hats.", "Even weak creatures are dangerous if they have Rubber Wands.", "They say that the yolk of a Pikachu's egg can have strange effects on items.", "It is said that vegetarians get bonus points.", "Rumor has it that there is a cavern made of chocolate in the tunnels.", "Lesson from Physics 4B: You can recharge a wand by rubbing it with the right material.", "Be careful not to overcharge wands.", "Cookies are good for you.", "They say that the Programmer may help you, if you're a good person.", "Science Fiction Convention Today!", "Lab coats can protect you from chemical spills.", "They say that the universe runs on hobos and Vectors, mostly hobos.", "Some people say that the galvanic currents in a pikachu egg can raise the dead.", "This statement is false.", "Rumor has it that some people wearing costumes have been lurking in the tunnels.", "If you have pointed ears like Mr. Spock, no-one will think that you're a jock.", "Reading books can make you smarter.", "Sometimes walls will lie to you.", "A big book can pack a whallop!", "Fetid blobs often contain items in their slimy goo.", "Good deeds are often rewarded." *) (*List*rtips_false* "Eating a spider corpse will cure lost DX.", "They say that wearing a top hat makes you immune to a mind-flayer's attacks.", "Rumor has it that there is a bonus for killing all hamsters.", "It's said that a parrot corpse is the ultimate weapon.", "They say that blue gum totally restores a person's HP.", "Pets aren't harmed by tainted corpses.", "Eating toads builds character.", "Suzie is not really evil.", "This statement is false.", "Eating Suzie gives extra points.", "It is said that graffiti is always true.", "According to rumor, polymorphing into a hamster is the ultimate strategy!", "The random number generator hates all that live.", "They say that gnomes are totally harmless, even if you attack them.", "The book ``Java in a Nutshell'' is good, accessible reading.", "Food found in cesspools tastes the best.", "The most powerful enemies will die instantly if you attack them with a stick." *) (*List*rgraffiti* "I know what you did last semester", "I'll get you, and your little pikachu too! - Suzie", "I hope you die - The RNG", "I write, therefore I am", "Arm yourself before the gerbils get you!", "GNOMES: WE ARE THE FOUNT OF AWESOME", "Won't someone think of the children?", "(C) 1956 Omniwall, inc. All rights reserved.", "Wall of Blocking +3", "This is not a wall", "I am a wall. I hate you.", "I was murdered by --", "This wall contains no lead.", *) (*Functions*PlainNode* def xmake(self): desc_t = Utl.rn(10) roomtype = 'tunnel' if self.tunnel else 'room' if desc_t == 0: desc = 'This %s is %s. ' % (roomtype, Utl.rn_seq(rsize_adjectives)) elif desc_t == 1: desc = 'This %s is rather %s.' % (roomtype, Utl.rn_seq(rsize_adjectives)) elif desc_t == 2: desc = 'The %s is %s.' % (roomtype, Utl.rn_seq(radjectives)) elif desc_t == 3: graffiti_t = Utl.rn(8) if graffiti_t == 0: graffiti = "%s %02d/%d" % ( Utl.rn_seq(random_names), Utl.rn(1, 12), Utl.rn(75, 99)) elif graffiti_t == 1: graffiti = "???? ???" elif graffiti_t == 2: graffiti = "call %s @%d-%04d" % ( Utl.rn_seq(random_names), Utl.rn(111, 999), Utl.rn(10000)) elif graffiti_t == 3: graffiti = Utl.rn_seq(rtips_true) elif graffiti_t == 4: graffiti = Utl.rn_seq(rtips_false) elif graffiti_t == 5: graffiti = "%s was here!" % Utl.rn_seq(random_names) else: graffiti = Utl.rn_seq(rgraffiti) desc = 'There is some graffiti on the wall: "%s"' % graffiti else: desc = "This is a %s like many others." % roomtype self.description = desc *** *) (*Postlist*non_unique_special_nodes* CoffeeShop, CubeLair, PikachuNest, DankCesspool, InternetCafe, HamsterNest, LockerRoom, GnomeHive, Laboratory *)