package th; /* FORMAT FOR REGIONS: Put the region at the top, followed by all the nodes * that it uses. */ class ScifiRegion extends Region { public static String name = "Noisy Tunnel"; public static String description = "Entering this room, you hear distant sounds of coversation."; public static String color = Ifc.RED; public ScifiRegion (Node start, int region) { super(start, region); } static Class NormalCorridor = Utl.gclass("ScifiRegionCorridor"); static Class ScifiFurry = Utl.gclass("ScifiRegionFurry"); static Class ScifiManga = Utl.gclass("ScifiRegionManga"); static Class ScifiTrek = Utl.gclass("ScifiRegionTrek"); public void generate (Node origin, int region, int direction) { origin.description = description; origin.name = name; origin.color = color; Node old_tmp = origin; Node tmp = null; int length = 2*(Utl.d(4)+1); for (int i = 0; i < length; ++i) { tmp = (Node)Utl.newInstance(NormalCorridor); tmp.region = region; Map.makelink(tmp, old_tmp, direction); old_tmp = tmp; if (i%2 == 0 && region > 0 && i != length) { generate_side(tmp, region, Map.rotate(direction, -1)); generate_side(tmp, region, Map.rotate(direction, 1)); } } tmp = (Node)Utl.newInstance(ScifiFurry); tmp.region = region; Map.makelink(tmp, old_tmp, Map.rotate(direction, -1)); tmp = (Node)Utl.newInstance(ScifiManga); tmp.region = region; Map.makelink(tmp, old_tmp, Map.rotate(direction, 1)); tmp = (Node)Utl.newInstance(ScifiTrek); tmp.region = region; Map.makelink(tmp, old_tmp, direction); } public void generate_side (Node origin, int region, int direction) { Node old_tmp = origin; Node tmp = null; int length = 6; for (int i = 0; i < length; ++i) { tmp = (Node)Utl.newInstance(NormalCorridor); tmp.region = region; Map.makelink(old_tmp, tmp, direction); old_tmp = tmp; } } } class ScifiRegionCorridor extends Node { private static String[] DESCS = { "The tones of nerdly conversation fill the air.", "You hear someone speaking Klingon.", "A nearby sign invites people to a trading-card game tournament.", "A sign advertises role-playing games.", "You see an astonishing variety of interesting-looking people.", "There is a giant statue of some fictional robot here." }; public ScifiRegionCorridor() { super(); color = Ifc.BRIGHT_RED; description = Utl.rn(DESCS); name = "Hidden Science-Fiction Convention"; unique = true; tunnel = true; spawn = Species.scifi_spawn; spawn_chance = 1; int f = Utl.d(5)+1; for (int i = 0; i < f; ++i) add(Utl.rn(Species.scifi_spawn).make()); } } class ScifiRegionTrek extends Node { public ScifiRegionTrek() { super(); color = Ifc.MAJOR_RED; description = "You are in a large convention hall. You smell what you" + "\nassume are Klingon pheremones."; special_symbol = "#"; name = "Convention Auditorium"; unique = true; tunnel = false; spawn = Species.scifi_spawn; spawn_chance = 1; int f = Utl.d(6,6); for (int i = 0; i < f; ++i) add(Species.trekie.make()); add(Species.geek.make()); add(Species.geek.make()); } } class ScifiRegionManga extends Node { public ScifiRegionManga() { super(); color = Ifc.MAJOR_RED; description = "In this hall, a manga artist is signing copies of his" +" work for fans."; special_symbol = "#"; name = "Manga Book Signing"; unique = true; tunnel = false; spawn = Species.scifi_spawn; spawn_chance = 1; int f = Utl.d(2,4); for (int i = 0; i < f; ++i) { add(Species.geek.make()); if (Utl.rn()) add(Species.nerd.make()); } add(Species.manga_artist.make()); add(Species.furry.make()); } } class ScifiRegionFurry extends Node { public ScifiRegionFurry() { super(); color = Ifc.MAJOR_RED; description = "You see unpleasantness."; special_symbol = "#"; name = "Furvert Lair"; unique = true; locked = true; tunnel = false; spawn = Species.scifi_spawn; spawn_chance = 1; int f = 3; Mon tmp; for (int i = 0; i < f; ++i) { tmp =Species.furvert.make(); add(tmp); } tmp = Species.furvert.make(); tmp.name = "King Furvert"; tmp.mhp = tmp.hp = 120; tmp.inventory.add(Items.fox_box.make()); add(Species.furry.make()); add(Species.furry.make()); add(tmp); } }