home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Special: Spiele Hits
/
Hits-CD.iso
/
aminet
/
spiele
/
ammud1_1.lha
/
AmigaMUD
/
Src
/
Proving
/
chasm.m
< prev
next >
Wrap
Text File
|
1997-06-22
|
22KB
|
631 lines
/*
* Amiga MUD
*
* Copyright (c) 1997 by Chris Gray
*/
/*
* chasm.m - the chasm rooms area.
*/
/* the vertical chimney */
define tp_proving tp_chasm CreateTable()$
use tp_chasm
define tp_chasm r_chimneyTop CreateThing(r_provingCave)$
SetupRoomP(r_chimneyTop, "at the top of a circular ramp",
"The ramp slopes steeply but negotiably around a 20 foot diameter "
"vertical chimney in the stone. The chimney ends not far overhead, but "
"extends downward out of sight. A narrow passage heads east.")$
Connect(r_sewerCaveA2, r_chimneyTop, D_WEST)$
Scenery(r_chimneyTop, "chimney;20,foot,diameter,vertical.ramp.passage")$
define tp_chasm proc chimneyDrop(thing th)status:
thing me, here;
string name;
me := Me();
name := FormatName(th@p_oName);
if th@p_oCarryer ~= nil and th@p_oCreator = me then
here := Here();
Print("You drop the " + name + " which slides off the ramp and "
"disappears down the chimney.\n");
if not me@p_pHidden and CanSee(here, me) then
OPrint(Capitalize(CharacterNameG(me)) +
AAn(" drops", name) +
" which slides off the ramp and disappears down the "
"chimney.\n");
fi;
ZapObject(th);
DelElement(me@p_pCarrying, th);
succeed
else
Print("You'd better not drop the " + name + " here!\n");
fail
fi
corp;
AddRoomDropChecker(r_chimneyTop, chimneyDrop, false)$
r_chimneyTop@p_oListenString :=
"It is very quiet here, and no sound can be heard from the chimney."$
r_chimneyTop@p_oSmellString :=
"The air is perhaps a bit less stale than normal here - there might be "
"a very slight breeze coming up out of the chimney."$
define tp_chasm r_chimneyMiddle CreateThing(r_provingCave)$
SetupRoomP(r_chimneyMiddle, "on a ramp in a vertical chimney",
"The chimney ends just within sight overhead, but extends downward out of "
"sight. A tunnel heads west.")$
Connect(r_chimneyTop, r_chimneyMiddle, D_DOWN)$
Scenery(r_chimneyMiddle, "chimney;vertical.ramp.tunnel")$
AddRoomDropChecker(r_chimneyMiddle, chimneyDrop, false)$
r_chimneyMiddle@p_oSmellString :=
"The slight breeze seems to be coming from the tunnel."$
define tp_chasm r_chimneyBottom CreateThing(r_provingCave)$
SetupRoomP(r_chimneyBottom, "on a ramp in a vertical chimney",
"The chimney extends up and down out of sight.")$
Scenery(r_chimneyBottom, "chimney;vertical.ramp")$
AddRoomDropChecker(r_chimneyBottom, chimneyDrop, false)$
Connect(r_chimneyMiddle, r_chimneyBottom, D_DOWN)$
define tp_chasm p_pChimneyDepth CreateIntProp()$
define tp_chasm r_chimney CreateThing(r_tunnel)$
SetupRoomDP(r_chimney, "on a ramp in a vertical chimney",
"The chimney extends up and down out of sight.")$
Scenery(r_chimney, "chimney;vertical.ramp")$
AddRoomDropChecker(r_chimney, chimneyDrop, false)$
Connect(r_chimneyBottom, r_chimney, D_DOWN)$
UniConnect(r_chimney, r_chimney, D_DOWN)$
r_chimney@p_rNoMachines := true$
define tp_chasm proc chimneyDown()status:
thing me;
me := Me();
me@p_pChimneyDepth := me@p_pChimneyDepth + 1;
LeaveRoomStuff(r_chimney, D_DOWN, MOVE_SPECIAL);
EnterRoomStuff(r_chimney, D_UP, MOVE_SPECIAL);
fail
corp;
AddDownChecker(r_chimneyBottom, chimneyDown, false)$
AddDownChecker(r_chimney, chimneyDown, false)$
define tp_chasm proc chimneyUp()status:
thing me;
int depth;
me := Me();
depth := me@p_pChimneyDepth - 1;
if depth = 0 then
me -- p_pChimneyDepth;
LeaveRoomStuff(r_chimneyBottom, D_UP, MOVE_SPECIAL);
EnterRoomStuff(r_chimneyBottom, D_DOWN, MOVE_SPECIAL);
continue
else
me@p_pChimneyDepth := depth;
LeaveRoomStuff(r_chimney, D_UP, MOVE_SPECIAL);
EnterRoomStuff(r_chimney, D_DOWN, MOVE_SPECIAL);
fail
fi
corp;
AddUpChecker(r_chimney, chimneyUp, false)$
define tp_chasm r_tunnelX1 CreateThing(r_provingCave)$
SetupRoomP(r_tunnelX1, "in an east-west tunnel", "")$
Connect(r_chimneyMiddle, r_tunnelX1, D_WEST)$
define tp_chasm r_tunnelX2 CreateThing(r_provingCave)$
SetupRoomP(r_tunnelX2, "in an east-west tunnel",
"There is a faint greenish light coming from the west.")$
Connect(r_tunnelX1, r_tunnelX2, D_WEST)$
define tp_chasm r_tunnelX3 CreateThing(r_provingCave)$
SetupRoomP(r_tunnelX3, "in an east-west tunnel",
"There is a steady greenish light coming from the west.")$
Connect(r_tunnelX2, r_tunnelX3, D_WEST)$
/* the chasm area */
define tp_chasm o_chasm CreateThing(nil)$
FakeObject(o_chasm, nil, "chasm;deep",
"The chasm is a deep crack in the earth. It is so deep that you cannot "
"see the bottom, only blackness. The chasm is far too wide to jump "
"across.")$
define tp_chasm PR_CHASM1_ID NextEffectId()$
define tp_chasm proc drawChasm1()void:
if not KnowsEffect(nil, PR_CHASM1_ID) then
DefineEffect(nil, PR_CHASM1_ID);
GSetImage(nil, "Proving/chasm1");
IfFound(nil);
ShowCurrentImage();
Else(nil);
GSetPen(nil, C_DARK_GREY);
GAMove(nil, 0.0, 0.0);
GRectangle(nil, 0.5, 1.0, true);
GSetPen(nil, C_LIGHT_GREY);
GPolygonStart(nil);
GAMove(nil, 0.499, 0.65);
GADraw(nil, 0.25, 0.65);
GADraw(nil, 0.0, 0.75);
GADraw(nil, 0.0, 0.45);
GADraw(nil, 0.219, 0.35);
GADraw(nil, 0.234, 0.0);
GADraw(nil, 0.266, 0.0);
GADraw(nil, 0.281, 0.35);
GADraw(nil, 0.484, 0.35);
GADraw(nil, 0.484, 0.555);
GADraw(nil, 0.499, 0.555);
GPolygonEnd(nil);
GSetPen(nil, C_BLACK);
GPolygonStart(nil);
GAMove(nil, 0.484, 0.55);
GADraw(nil, 0.25, 0.55);
GADraw(nil, 0.0, 0.65);
GADraw(nil, 0.0, 0.55);
GADraw(nil, 0.25, 0.45);
GADraw(nil, 0.484, 0.45);
GPolygonEnd(nil);
Fi(nil);
EndEffect();
fi;
CallEffect(nil, PR_CHASM1_ID);
corp;
define tp_chasm CHASM1_MAP_GROUP NextMapGroup()$
define tp_chasm r_chasmModel1 CreateThing(r_tunnel)$
r_chasmModel1@p_rName := "on a ledge overlooking a chasm"$
r_chasmModel1@p_rName1 := "Chasm"$
r_chasmModel1@p_MapGroup := CHASM1_MAP_GROUP$
r_chasmModel1@p_rDrawAction := drawChasm1$
r_chasmModel1@p_rEnterRoomDraw := EnterRoomDraw$
r_chasmModel1@p_rLeaveRoomDraw := LeaveRoomDraw$
r_chasmModel1@p_oListenString :=
"You can hear water sounds coming up from the depths of the chasm, "
"but there is no way to tell what they are."$
r_chasmModel1@p_oSmellString :=
"The large size of this chamber, in combination with the slight "
"airflow through it, combine to make it reasonably fresh."$
Scenery(r_chasmModel1, "minerals;glowing.ledge.glow;green")$
monsterSet4(r_chasmModel1)$
SetThingStatus(r_chasmModel1, ts_readonly)$
define tp_chasm proc makeChasm1(string desc; fixed x, y)thing:
thing chasm;
chasm := CreateThing(r_chasmModel1);
if desc ~= "" then
chasm@p_rDesc := desc;
fi;
chasm@p_rContents := CreateThingList();
chasm@p_rExits := CreateIntList();
chasm@p_rCursorX := x;
chasm@p_rCursorY := y;
AddTail(chasm@p_rContents, o_chasm);
SetThingStatus(chasm, ts_wizard);
chasm
corp;
define tp_chasm r_chasm1 makeChasm1(
"You are at the east end of a large, narrow cave which is dominated by a "
"deep chasm running down the center. Glowing minerals in the ceiling of "
"the cave provide ample light. Narrow ledges on both sides of the chasm "
"give room for passage. You are on the south side of the chasm and there "
"is no visible way to get to the north side. The ledge continues to the "
"west, and a tunnel heads east.", 0.478, 0.6)$
Connect(r_tunnelX3, r_chasm1, D_WEST)$
Connect(r_tunnelX3, r_chasm1, D_EXIT)$
Scenery(r_chasm1, "tunnel")$
define tp_chasm r_chasm2 makeChasm1(
"The cave bends slightly here, with the west end angling slightly to the "
"south. Across the chasm, you can see a deep crack leading north from the "
"ledge on that side.", 0.259, 0.6)$
Connect(r_chasm1, r_chasm2, D_WEST)$
Scenery(r_chasm2, "crack;deep")$
define tp_chasm r_chasm3 makeChasm1("", 0.019, 0.7)$
Connect(r_chasm2, r_chasm3, D_WEST)$
define tp_chasm r_chasm4 makeChasm1(
"The ledge on this side of the chasm comes to an end here.", 0.471, 0.4)$
define tp_chasm r_chasm5 makeChasm1(
"A deep crack heads north from here.", 0.25, 0.4)$
Connect(r_chasm4, r_chasm5, D_WEST)$
Scenery(r_chasm5, "crack;deep")$
define tp_provi