⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tess.c

📁 焰火演示
💻 C
📖 第 1 页 / 共 4 页
字号:

  else if (cmd.nn!=o_plant)
    prints("Can't water that.");

  else
  {
    prints("Dendrites appear from hyperspace and absorbed the liquid.");
    prints("The being thanks you.");
    wa = 1;
    JunkObj( o_liquid );
  }
}

/*----------------------------*/
do_fill()
{
  if (cmd.nn==o_bottle)
  {
    if (curr_loc==obj[o_liquid].loc)
    {
      obj[o_liquid].loc = -8;
      ok();
    }
    else if (curr_loc==obj[o_fluid].loc)
      prints("The fluid flows in and then flows out by itself");
    else
      not_yet();
  }

  else
    how();
}

/*----------------------------*/
do_pour()
{
  if (cmd.nn==o_bottle || cmd.nn==o_liquid)
  {
    if (obj[o_liquid].loc!=-8)
      prints("Nothing to pour.");

    else if (curr_loc==obj[o_plant].loc)
    {
      cmd.nn=o_plant;
      do_water();
    }

    else
    {
      DropObj( o_liquid );
      ok();
    }
  }

  else
    not_work();
}

/*----------------------------*/
do_freeze()
{
  if (curr_loc!=obj[o_fluid].loc)
    not_yet();

  else if (cmd.nn==o_coil)
  {
    cc = cc | 1;
    ok();
  }

  else
    prints("You might damage it.");

}

/*----------------------------*/
do_melt()
{
  if (!ObjIsPresent(o_plasma))
    not_yet();

  else if (cmd.nn==o_solid)
  {
    prints("The plasma dissipates as the solid melts into a puddle of liquid.");
    JunkObj( o_plasma );
    JunkObj( o_solid );
    DropObj( o_liquid );
    if (curr_loc==obj[o_plant].loc)
    {
      cmd.nn=o_plant;
      do_water();
    }
  }

  else if (cmd.nn==o_tetra)
    prints("It melts, but quickly recrystalizes.");

  else
    not_work();
}

/*----------------------------*/
do_play()
{
  if (cmd.nn==o_cube)
    do_roll();

  else if (cmd.nn==o_disk)
    prints("You need something to play it.");

  else if (cmd.nn==o_proj)
    do_use();

  else
    not_happen();
}

/*----------------------------*/
do_insert()
{
  v_word noun;
  int nn;

  if (cmd.nn==o_sing)
  {
    nn = InputNoun( "Where? ", noun );
    if ( (!strcmp(noun,"groo") || !strcmp(noun,"band") || nn==o_audio)
         && ObjIsPresent(o_audio) )
    {
      af = 1;
      JunkObj( cmd.nn );
      prints("The singularity slides in with a click.");
    }
    else
      not_work();
  }

  else if (cmd.nn==o_disk)
  {
    nn = InputNoun( "Where? ", noun );
    if ( (!strcmp(noun,"slot") || nn==o_proj) && ObjIsPresent(o_proj) )
    {
      obj[cmd.nn].loc = -7;
      ok();
    }
    else
      not_work();
  }

  else
    not_work();
}

/*----------------------------*/
do_fix()
{
  if (cmd.nn==o_proj)
    prints("You don't know how to properly fix such a delicate instrument.");

  else
    prints("You don't know how.");
}

/*----------------------------*/
do__y_()
{
  if (!ObjIsPresent(o_appa))
    PrintMess( 7 );

  else switch ( cmd.nn )
  {
    case o_cube:
      if (dr<3)
        prints("You shouldn't do that yet.");
      else
      {
        prints("The hexahedron expands one dimension.");
        ReplaceObj( cmd.nn, o_solid );
      }
      break;

    case o_tetra:
      prints("It expands a dimension, but quickly collapses back.");
      break;

    case o_strip:
      prints("The moebius strip expands one dimension.");
      ReplaceObj( cmd.nn, o_bottle );
      break;

    case o_prism:
      prints("Object too unstable.");
      break;

    case o_bottle:
    case o_solid:
    case o_liquid:
      prints("Can't go any higher in this universe.");
      break;

    case o_appa:
      prints("Sorry, can't upgrade a product this way.");
      break;

    case o_plant:
      prints("The being is already high enough.");
      break;

    default:
      not_happen();
  }
}

/*----------------------------*/
do_prove()
{
  v_word noun;
  char *msg1;
  int nn;

  msg1 = "Somehow a contradiction keeps coming into the proof.";

  switch ( cmd.nn )
  {
    case o_lemma:
    case o_theorem:
    case o_axiom:
    case o_post:
      prints("It's already proven.");
      break;

    case o_supp:
      nn = InputNoun( "With what? ", noun );
      if (nn==o_post && ObjIsPresent(o_post))
      {
        if (ObjIsPresent(o_contra))
          prints( msg1 );
        else
        {
          prints("The postulate is now a lemma.");
          ReplaceObj( cmd.nn, o_lemma );
        }
      }
      else
        not_work();
      break;

    case o_hypo:
      nn = InputNoun( "With what? ", noun );
      if (nn==o_lemma && ObjIsPresent(o_lemma) && ObjIsPresent(o_axiom))
      {
        if (ObjIsPresent(o_contra))
          prints( msg1 );
        else
        {
          prints("The hypothesis is now a theorem.");
          ReplaceObj( cmd.nn, o_theorem );
          prints("Suddelnly, a hyper-spatial cliff passes by");
          prints("and the lemma leaps to its demise.");
          JunkObj( o_lemma );
        }
      }
      else
        prints("Hmmm, something seems to be missing from the proof.");
      break;

    case o_idea:
      prints("The idea developed into a contradiction.");
      ReplaceObj( cmd.nn, 52 );
      break;

    case o_contra:
      prints("You proved that the contradiction can't be proven.");
      break;

    default:
      not_poss();
  }
}

/*----------------------------*/
do_smell()
{
  prints("You smell nothing unusual.");
}

/*----------------------------*/
do_close()
{
  not_poss();
}

/*----------------------------*/
do_open()
{
  not_poss();
}

/*----------------------------*/
do_stop()
{
  if (!strcmp(cmd.sh_noun,"slee") || !strcmp(cmd.sh_noun,"drea"))
    do_wake();

  else if (!strcmp(cmd.sh_noun,"read"))
  {
    if (InBookWorld( curr_loc ))
    {
      goto_new_lev( 1 );
      print_room = 1;
      ok();
    }
    else
      prints("Reality is like a book that you can't stop reading.");
  }
  else
    not_work();
}

/*----------------------------*/
do_say()
{
  cprintf( "'%s'", cmd.noun ); nl();
  if (gp==0)
    not_happen();

  else
  {
    if (strcmp( cmd.noun,"tesseract" ))
      zap = 2; /* wrong password */
    else
      zap = 3; /* right password */
  }
}

/*----------------------------*/
do_quit()
{
  do_score();
  zap = 1;
}

/*----------------------------*/
do_help()
{
  if (cmd.nn>0)
    how();

  else if (curr_lev==2)
    prints("Use 'wake' to wake up from your dream.");

  else if (curr_lev==3)
    prints("Use 'stop reading' to stop reading the adventure.");

  else
    prints("Sorry, quasi-hyper-neo-mathematics is beyond me.");
}

/*----------------------------*/
do_listen()
{
  char *msg;

  msg = "Of Countless Tesseracts";

  if (curr_loc==19)
    prints("Sounds like radio waves from the Creation.");

  else if (curr_loc!=obj[o_plant].loc)
    prints("You hear nothing special.");

  else if (wa==0)
    prints("The being is whispering too softly.");

  else if (!WearingObj(o_audio))
    prints("You hear a harmonic song in a strange language.");

  else if (!af)
  {
    cprintf("You hear an %d-voiced fugue in a complex 1/f melody.", sum); nl();
    prints("But you are unable to follow even a single voice.");
  }

  else
  {
    cprintf("You hear the words: %s.", msg );  nl();
    mi = mi | 8;
  }
}

/*----------------------------*/
do_save()
{
  int i;
  FILE *f;
  char s[80];

  cprintf("Filename to save game to: ");
  gets( s );
  if (!*s) return;

  f=fopen(s,"w");
  if (f)
  {
    for ( i=1; i<MaxObjs; i++ )
      fprintf( f, "%d ", obj[i].loc );

    fprintf( f, "%d %d %d %d %d %d ",
      curr_lev, curr_loc,
      level_loc[1], level_loc[2], level_loc[3], sleep_lev );

    fprintf( f, "%d %d %d %d %d %d %d %d %d %d %d %d ",
      cc, wa, ep, dr, af, gp, mi, ti, kp, dc[0], dc[1], dc[2] );

    putc( '\n', f );
    fclose( f );
    prints("Game saved.");
  }
  else
  {
    cprintf("Unable to save game to %s", s); nl();
  }
}

/*----------------------------*/
do_load()
{
  int i;
  FILE *f;
  char s[80];

  cprintf("Filename to load game from: ");
  gets( s );
  if (!*s) return;

  f=fopen(s,"r");
  if (f)
  {
    for ( i=1; i<MaxObjs; i++ )
      fscanf( f, "%d ", &obj[i].loc );

    fscanf( f, "%d %d %d %d %d %d ",
      &curr_lev, &curr_loc,
      &level_loc[1], &level_loc[2], &level_loc[3], &sleep_lev );

    fscanf( f, "%d %d %d %d %d %d %d %d %d %d %d %d ",
      &cc, &wa, &ep, &dr, &af, &gp, &mi, &ti, &kp, &dc[0], &dc[1], &dc[2] );

    for ( sum=0, i=0; i<3; i++ )
      sum += dc[i];

    fclose( f );
    prints("Game loaded.");
    print_room = 1;
  }
  else
  {
    cprintf("Unable to load game from %s", s); nl();
  }
}

/*----------------------------*/
do_score()
{
  cprintf("You scored %d out of 15.", mi );  nl();
}

/*----------------------------*/
do_sleep()
{
  if (InDreamWorld( curr_loc ))
  {
    prints("A dream within a dream would have been quite poetic,");
    prints("But time did not allow for it.");
  }

  else if (ep==0)
    prints("You're not sleepy yet.");

  else
  {
    prints("As you sleep, you begin to have a strange dream ...");
    sleep_lev = curr_lev;
    goto_new_lev( 2 );
    print_room = 1;
  }
}

/*----------------------------*/
do_wake()
{
  if (cmd.nn!=o_math && cmd.nn>0)
    not_work();

  else if (!InDreamWorld( curr_loc ))
    prints("Reality is not a fragment of nightmares and dreams.");

  else if (cmd.nn!=o_math)
  {
    prints("Wow, that was some dream.");
    goto_new_lev( sleep_lev );
    print_room = 1;
  }

  else
  {
    if (!ObjInRoom(o_theorem))
      prints("He mumbles: bother me not, I'm contemplating the ultimate question");
    else
    {
      prints("He wakes up, looks at the theorem, an shouts:");
      prints("Eureka!  This proves that the universe doesn't exis...");
      goto_new_loc( 35 );
      print_room = 1;
      mi = mi | 4;
    }
  }
}

/*----------------------------*/
do_give()
{
  int nn;
  v_word noun;

  nn = InputNoun( "To whom? ", noun );
  if (!nn)
    not_work();

  else if (!ObjIsPresent(nn))
    not_yet();

  else if (nn==o_math)
  {
    if (cmd.nn==o_theorem)
    {
      DropObj( cmd.nn );
      cmd.nn=o_math;
      do_wake();
    }
    else
      prints("He mumbles: disturb me not with such unimportant things.");
  }

  else if (nn==o_plant)
  {
    if (cmd.nn==o_liquid)
      how();
    else if (cmd.nn==o_solid)
      prints("Plants don't eat solid nutrients.");
    else
      prints("The being doesn't need that.");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -