#include "path.h" inherit "/std/room.c"; object shark; setup() { set_short("Underneath the end of the pier"); set_long("The pier towers above quite unlike anything you have ever seen " +"before, it looks vaguely surreal in the half light that gets " +"down past the pier. You can see some scratches on the rock " +"just above you.\n"); add_item( ({"pier", "jetty", "berth"}), "The berth has been constructed from piles of huge boulders, " +"each weighing many tonnes. \n"); add_item("scratches", "It looks like a message, you take a closer look and "+ "can just make out the words. It says 'Beware of the "+ "shark' and on the next line 'Why not take a swim?'\n"); add_exit("up", HOMECITY+"pierA4", "path"); set_light(20); } init() { ::init(); add_action("do_swim", "swim", 10); } int do_swim() { write("You splash about in the water a bit.\n"); say(this_player()->query_cap_name()+" splashes about a bit.\n"); call_out("call_shark", 2); } int call_shark() { if (this_player()->query_level() > 50) { write("Your splashings have attracted the attention of a large "+ "shark from out at sea, be careful!\n"); say(this_player()->query_cap_name()+"'s splashings have "+ "attracted the attention of a large shark, maybe you "+ "should run away before it gets you!\n"); shark = clone_object(MONSTERS+"shark"); shark->move(this_object()); } else { notify_fail("You sigh with relief, you are obviously too small a "+ "prospective meal for all those hungry sharks you "+ "didn't notice before.\n"); say("You spot some sharks ignoring "+ this_player()->query_cap_name()+". Probably too small "+ "for them to bother wasting energy on.\n"); return 1; } }