/**************************************************************************** * TREEHOUSE.ZONE * * Core Zone: Author Unknown * * Distribute with full Dyrt distribution only * * Edited by Rex on 5 December 1995 * ****************************************************************************/ #include "undef.h" #include "exits.h" #include "special.h" Zone = treehouse Author = "Unknown" EndZone = treehouse Mobile = elf Name = "The Elf" Location = treehouse_1 Strength = 60 Damage = 10 Aggression = 20 Armor = 0 Desc = "A tall, lean elf steps quietly amid the shadows." Examine = "This is no cutesy Santa's Workshop-type elf." EndMobile = elf Object = amulet Location = IN_ROOM:treehouse_4 OFlags = Destroyed, WearOnNeck, WearBlMagic, MagicLit, Lightable BaseValue = 70 Size = 1 Weight = 1 Desc0 = "An unadorned gold amulet has been put here." Examine = "The amulet is polished gold on a leather strap." EndObject = amulet Object = shield Altname = "small" Location = WORN_BY:elf@treehouse OFlags = Armor, WearOnArms, ExcludeWear Armor = 10 BaseValue = 50 Size = 10 Weight = 6 Desc0 = "A small shield has been left here." Examine = "This is a small shield, but it might help you in a fight." EndObject = shield Object = waybread Altname = "food" Location = IN_ROOM:treehouse_2 OFlags = Food BaseValue = 50 Size = 1 Weight = 1 Desc0 = "Some waybread has been put here." Examine = " The waybread is the traditional feed of elves when traveling. They call it lembas. It is said to refresh the weary traveler greatly." Trap = all @ catch_eat { if (plev(THIS_PLAYER) < LVL_APPREN && cur_player->pretend < 0) { pl1 = (MY_RANDOM() >> 3) % (numchars - 1); if (ststflg(pl1, SFL_OCCUPIED) || pl1 < max_players) { bprintf("There is a sudden feeling of failure...\n"); fail(-1); } polymorph(pl1,25); /* aliased for 25 moves */ } setpstr(THIS_PLAYER, pstr(THIS_PLAYER) + 16); eat(THIS_OBJECT); fail(-1); } @ EndTrap EndObject = waybread Object = way1 Name = "waybread" Altname = "food" Location = IN_ROOM:treehouse_2 OFlags = Food BaseValue = 50 Size = 1 Weight = 1 Desc0 = "Some waybread has been put here." Examine = " The waybread is the traditional feed of elves when traveling. They call it lembas. It is said to refresh the weary traveler greatly." EndObject = way1 Object = bedding Altname = "bed" Location = IN_ROOM:treehouse_4 OFlags = NoGet Examine = " Although it's nice, thick, warm bedding, it's hardly the ideal thing in which to practice honeymoon tactics!" Trap = all @ if (event == E_ONEXAMINE) { if (!odamage (OBJ_TREEHOUSE_AMULET)) { create (OBJ_TREEHOUSE_AMULET); bprintf ("You pull an amulet from the bedding.\n"); osetdamage (OBJ_TREEHOUSE_AMULET, 1); param_s.ret = -1; } } @ EndTrap EndObject = bedding Object = ladder Altname = "rope" Location = IN_ROOM:treehouse_1 OFlags = NoGet Linked = ladder2elf@valley MaxState = 1 Desc0 = "A rope ladder leads down the tree." Desc1 = "A coiled rope is lying here." Trap = all @ catch_untie { int ob; if(pstr(mobile(MOB_TREEHOUSE_ELF)) >= 0) { bprintf("The Elf shouts 'Hey, leave my rope alone!'\n"); fail(-1); } ob = clone_object(OBJ_LIMBO_ROPE, -1, NULL); if(ob >= 0) { bprintf("You untie the rope.\n"); setobjstate(OBJ_VALLEY_LADDER2ELF, 1); osetbit(OBJ_VALLEY_LADDER2ELF,OFL_DESTROYED); osetbit(OBJ_TREEHOUSE_LADDER,OFL_DESTROYED); send_msg(ploc(mynum), MODE_NSFLAG|MS(SFL_BLIND), LVL_MIN, LVL_MAX, mynum, NOBODY, "\001p%s\003 unties the rope.\n", pname(mynum)); setoloc(ob, ploc(mynum), IN_ROOM); fail(-1); } succeed(); } @ EndTrap EndObject = ladder Location = "treehouse_1" West = treehouse_2 Down = ^ladder@treehouse LFlags = RealTime Title = "On The Treehouse Porch" Desc = ^ You stand on the porch of a treehouse. The tree is surrounded by seemingly hundreds of others like it which form a thick forest around you. To the west you can walk between two of the main branches into the center of the house. ^ EndLocation = "treehouse_1" Location = "treehouse_2" North = treehouse_3 East = treehouse_1 South = treehouse_4 LFlags = RealTime Title = "Inside the Treehouse" Desc = ^ You are standing in the center of an elven treehouse. Arched doorways between the branches lead north, east, and south. ^ EndLocation = "treehouse_2" Location = "treehouse_3" South = treehouse_2 LFlags = RealTime Title = "Treehouse North" Desc = ^ You stand at the northern end of the treehouse, looking out across the forest. A single doorway carved into the tree trunk allows access back south. ^ EndLocation = "treehouse_3" Location = "treehouse_4" North = treehouse_2 LFlags = RealTime Title = "Treehouse South" Desc = ^ You are at the southern end of the treehouse, which appears to be used by its occupant as a sleeping area. Large amounts of thick bedding ensure that the occupant will be comfortable even in bad weather. A path to the north has been cut between the branches. ^ EndLocation = "treehouse_4"