📄 tess.c
字号:
{
if (cmd.nn==o_coil) /* drop coil, check for plasma as well */
{
if (CarryingObj(o_coil) && CarryingObj(o_plasma))
DropObj( o_plasma );
}
if ( ObjOnPlayer( cmd.nn ))
{
DropObj(cmd.nn);
ok();
}
}
}
/*----------------------------*/
do_throw()
{
char *s;
if (ObjInRoom(cmd.nn))
prints("It's already here.");
else if (cmd.nn==o_improb && curr_loc==16)
{
prints("The improbability's presence warps the fabric of the field.");
room [16].link [east] = 17 - room [16].link [east];
print_room = 1;
DropObj( cmd.nn );
}
else if (cmd.nn==o_cube)
do_roll();
else if (cmd.nn==o_disk)
{
prints("With great skill (i.e. luck) you threw the disk into the next room.");
if (curr_loc==29)
obj [cmd.nn].loc = -7;
else
obj [cmd.nn].loc = room [curr_loc].link [south];
}
else
do_drop();
}
/*----------------------------*/
do_break()
{
if (cmd.nn==o_prism)
{
prints("The prism shatters along the lines and mysteriously");
prints("reorganizes itself into a tetrahedron.");
ReplaceObj( cmd.nn, o_tetra );
}
else if (cmd.nn==o_tetra)
prints("It shatters, but quickly reforms itself.");
else if (cmd.nn==o_zeta)
do_solve();
else if (cmd.nn==o_proj)
{
if (!kp)
{
prints("With a few kicks and blows, both you and the projector felt better.");
kp = 1;
}
else
prints("Better not try that again, or you'll really break it.");
}
else if (cmd.nn==o_bottle)
do_cut();
else
prints("Violence is not necessary, most of the time.");
}
/*----------------------------*/
do_look()
{
if (!cmd.nn)
print_room = 1;
else if (!CanLookObj(cmd.nn))
{
cprintf("Looks like %s.", obj[cmd.nn].name ); nl();
}
else
switch ( cmd.nn )
{
case o_mirror:
prints("You see the reflections of a mirror world.");
break;
case o_crt:
prints("You see the images of a mathematical universe.");
break;
case o_group:
prints("The group consists of converging parallel lines, alef-null,");
prints("the last prime number, 1/0, and uncountably many others.");
break;
case o_hole:
prints("You see the lights of an electromagnetic continuum.");
break;
case o_proj:
prints("You see a wide slot and 5 buttons.");
if (obj[o_disk].loc==-7)
prints("A disk is in the projector.");
case o_buttons:
prints("The buttons are labelled zero to four.");
break;
case o_chaos:
prints("It bears a slight resemblence to the current universe.");
break;
case o_dust:
prints("It look like the remains of an exploded Julia set.");
break;
case o_flake:
prints("It doesn't look like the coastline of Britain.");
break;
case o_mount:
prints("It looks the same at all scales.");
break;
case o_tomb:
prints("The epitaph reads: The Eternal Soul");
mi = mi | 1;
break;
case o_stack:
prints("It's a Space-Time Activated Continuum Key.");
break;
case o_audio:
prints("Looks like 2 speakers connected by a band.");
if (!af)
prints("There is a groove in the band.");
break;
case o_book:
prints("The title is 'Interactive Adventures'.");
break;
case o_bottle:
if (obj[o_liquid].loc==-8)
prints("It is full of some strange liquid.");
else
prints("It is an empty bottle with no inside or outside.");
break;
case o_prism:
prints("You see flashes along deeply etched lines");
if (curr_loc==21)
prints("And embedded, distorted shapes resembling letters");
break;
case o_appa:
prints("Looks like a device used for increasing the dimensions of");
prints("geometric and topological objects.");
break;
case o_improb:
prints("It looks like a heart of gold.");
break;
case o_zeta:
prints("It's a very vicious-looking integral.");
break;
case o_cube:
prints("There are numbers on the sides.");
break;
case o_coil:
prints("The ends of the coil are connected to form a loop.");
break;
case o_sing:
prints("It is shaped like a narrow band.");
break;
case o_disk:
prints("The title is: The Science and Beauty of a Geometric Nature");
break;
case o_supp:
prints("It's an almost obvious fact.");
prints("It is not proven.");
break;
case o_hypo:
prints("It's a complicated statement.");
prints("It is not proven.");
break;
case o_lemma:
prints("It's a rather specialized fact.");
break;
case o_theorem:
prints("It begins: The metaphysical existentialism of reality ...");
prints("The rest is incomprehensible to you.");
break;
case o_axiom:
prints("It's the basis of a complex system.");
break;
case o_post:
prints("It's a basic fact.");
break;
case o_math:
prints("He looks almost asleep.");
break;
case o_tetra:
if (curr_loc==22)
{
prints("Sharp letters form the message: Seeks the Exact");
mi = mi | 2;
}
else
prints("You see colorless letters.");
break;
case o_func:
prints("The function has many sharp points, all of which are at (1/2+bi).");
break;
case o_idea:
prints("The idea is very vague and not fully developed.");
break;
case o_contra:
prints("It is true and false, but neither is correct, and both are right.");
break;
case o_warr:
prints("It has expired.");
break;
default:
cprintf("Looks like %s.", obj[cmd.nn].name ); nl();
}
}
/*----------------------------*/
do_read()
{
if (cmd.nn==o_book)
{
prints("You are now reading an adventure ...");
goto_new_lev( 3 );
print_room = 1;
}
else
do_look();
}
/*----------------------------*/
do_use()
{
switch ( cmd.nn )
{
case o_proj:
prints("Try the buttons.");
break;
case o_stack:
prints("Try push or pop the stack, or scan something with it.");
break;
case o_prism:
do_look();
break;
case o_appa:
prints("Try to _y_ something with it");
break;
case o_improb:
if (curr_loc==16) do_throw(); else how();
break;
case o_func:
prints("");
break;
case o_zeta:
prints("");
break;
default:
how();
break;
}
}
/*----------------------------*/
do_touch()
{
cprintf( "Feels just like a %s.", cmd.noun ); nl();
}
/*----------------------------*/
do_swing()
{
if (cmd.nn==o_coil)
do_spin();
else
not_happen();
}
/*----------------------------*/
do_rub()
{
do_touch();
}
/*----------------------------*/
do_push()
{
int new_room;
if (cmd.nn==o_stack)
{
if (curr_loc>3)
not_happen();
else if (gp)
do_scan();
else
{
prints("You are falling inwards ...");
goto_new_loc( curr_loc+3 );
print_room = 1;
}
}
else if (obj[cmd.nn].loc==-7)
{
if (obj[o_disk].loc!=-7)
not_happen();
else if (!kp)
prints("The projector begins to start, fizzes and grinds, then stops.");
else
{
clrscr();
gotoxy( 1,25 );
prints("The lights dimmed for a while.");
new_room = cmd.nn + 17;
goto_new_loc( new_room );
room [29].link [north] = curr_loc;
print_room = 1;
DropObj( o_proj );
if (new_room==30)
{
prints("The projector ejects the disk.");
DropObj( o_disk );
}
}
}
else
not_happen();
}
/*----------------------------*/
do_pop()
{
char *s;
s = "You are falling outwards ...";
if (gp)
do_scan();
else if (cmd.nn==o_pills)
do_eat();
else if (cmd.nn!=o_stack)
not_poss();
else if (InComplex( curr_loc ))
prints("Can't transcend reality in this adventure.");
else if (InMirrorWorld( curr_loc ))
{
goto_new_loc( 1 );
print_room = 1;
prints( s );
}
else if (InMathWorld( curr_loc ))
{
goto_new_loc( 2 );
print_room = 1;
prints( s );
}
else if (InSpectralWorld( curr_loc ))
{
goto_new_loc( 3 );
print_room = 1;
prints( s );
}
else
not_happen();
}
/*----------------------------*/
do_spin()
{
if (cmd.nn==o_coil)
{
if (curr_loc==18)
{
cc = cc | 2;
ok();
}
else
not_happen();
}
else
not_happen();
}
/*----------------------------*/
do_roll()
{
int n;
if (cmd.nn==o_cube)
{
n = dr % 4;
cprintf("You rolled a ");
if (n<3)
{
if (dc[n]<10)
cprintf(".0%d", dc[n]);
else
cprintf(".%d", dc[n]);
}
else
cprintf("+nnn");
nl();
dr++;
}
else
not_happen();
}
/*----------------------------*/
do_wear()
{
if (WearingObj(cmd.nn))
prints("You're already wearing it.");
else if (cmd.nn==o_audio)
{
WearObj( cmd.nn );
ok();
}
else
not_poss();
}
/*----------------------------*/
do_eat()
{
if (cmd.nn==o_plant)
prints("Don't consume higher lifeforms.");
else if (cmd.nn==o_pills)
{
prints("Gulp! Suddenly you feel a little drowsy.");
ep=1;
JunkObj( cmd.nn );
}
else
prints("Can't eat that.");
}
/*----------------------------*/
do_taste()
{
switch ( cmd.nn )
{
case o_pills:
prints("It tastes like a drug.");
break;
case o_solid:
case o_liquid:
prints("The taste is quite orthogonal.");
break;
default:
prints("Can't taste that.");
break;
}
}
/*----------------------------*/
do_drink()
{
if (cmd.nn==o_fluid)
prints("Too cold.");
else if (cmd.nn==o_liquid)
prints("You're too low dimensioned to drink it.");
else
prints("Can't drink that.");
}
/*----------------------------*/
do_remove()
{
if (!WearingObj(cmd.nn))
prints("You are not wearing it.");
else
{
CarryObj( cmd.nn );
ok();
}
}
/*----------------------------*/
do_water()
{
if ( !ObjIsPresent(o_liquid) &&
(!CarryingObj(o_bottle) || obj[o_liquid].loc!=-8) )
prints("Nothing to water with.");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -