Ejemplo n.º 1
0
void l_balancestone(void)
{
  print1("This is a massive granite slab teetering dangerously on a corner.");
  print2("You feel a sense of balance as you regard it.");
  morewait();
  clearmsg();
  if (cinema_confirm("Your hand naturally drifts forward to touch it.")=='y') {
    print1("A vortex of mana spins about you!");
    if (abs(Player.alignment) > random_range(50)) {
      print2("The cyclone whirls you off to a strange place!");
      morewait();
      change_environment(E_COUNTRYSIDE);
      do {
	  setPlayerXY( random_range(COUNTRY_WIDTH), random_range(COUNTRY_LENGTH));
      } while (Country[Player.x][Player.y].current_terrain_type == CHAOS_SEA);
      screencheck(Player.x,Player.y);
      drawvision(Player.x,Player.y);
    }
    else {
      print2("You are being drained of experience! Step back? [yn] ");
      if (ynq2()=='y') {
	clearmsg();
	print1("The vortex calms down, dimishes, and then disappears.");
      }
      else {
	Player.xp -= Player.xp/4;
	dataprint();
	print2("The vortex vanishes. Suddenly, there is a clap of thunder!");
	morewait();
	Player.alignment = 0;
	strategic_teleport(1);
      }
    }
  }
  else print1("You step back from the unlikely boulder.");
}
Ejemplo n.º 2
0
/* various kinds of wishes */
void wish(int blessing)
{
    int i;
    char wishstr[80];
    clearmsg();
    print1("What do you wish for? ");
    if (blessing < 0)
        deathprint();
    else
        strcpy(wishstr,msgscanstring());
    if (blessing < 0 || strcmp(wishstr,"Death")==0) {
        print2("As you wish, so shall it be.");
        p_death("a deathwish");
    }
    if (strcmp(wishstr,"Power")==0) {
        print2("You feel a sudden surge of energy");
        Player.mana=calcmana()*10;
    }
    else if (strcmp(wishstr,"Skill")==0) {
        print2("You feel more competent.");
        if (gamestatusp(CHEATED))
            gain_experience(10000);
        else
            gain_experience(min(10000,Player.xp));
    }
    else if (strcmp(wishstr,"Wealth")==0) {
        print2("You are submerged in shower of gold pieces!");
        Player.cash += 10000;
    }
    else if (strcmp(wishstr,"Balance")==0) {
        print2("You feel neutral.");
        Player.alignment = 0;
    }
    else if (strcmp(wishstr,"Chaos")==0) {
        print2("You feel chaotic.");
        Player.alignment -= 25;
    }
    else if (strcmp(wishstr,"Law")==0) {
        print2("You feel lawful.");
        Player.alignment += 25;
    }
    else if (strcmp(wishstr,"Location")==0)
        strategic_teleport(1);
    else if (strcmp(wishstr,"Knowledge")==0) {
        print2("You feel more knowledgeable.");
        i = random_range(NUMSPELLS);
        if (Spells[i].known)
            Spells[i].powerdrain =
                (max(1,Spells[i].powerdrain/2));
        else Spells[i].known = TRUE;
    }
    else if (strcmp(wishstr,"Health")==0) {
        print2("You feel vigorous");
        Player.hp = max( Player.hp, Player.maxhp);
        Player.status[DISEASED] = 0;
        Player.status[POISONED] = 0;
        Player.food = 43;
        /* Wish for Health when starving does some good. PGM */
    }
    else if (strcmp(wishstr,"Destruction")==0)
        annihilate(gamestatusp(CHEATED));
    else if (strcmp(wishstr,"Acquisition")==0)
        acquire(gamestatusp(CHEATED));
    else if (strcmp(wishstr,"Summoning")==0)
        summon(gamestatusp(CHEATED),-1);
    else if (strcmp(wishstr,"Stats") == 0 && gamestatusp(CHEATED))
    {
        Player.str = Player.maxstr = Player.con = Player.maxcon =
                                         Player.agi = Player.maxagi = Player.dex = Player.maxdex =
                                                 Player.iq = Player.maxiq = Player.pow = Player.maxpow = 200;
        calc_melee();
    }
    else print2("You feel stupid.");
    dataprint();
    showflags();
}
Ejemplo n.º 3
0
void l_abyss(void)
{
  int i;
  if (Current_Environment != Current_Dungeon) {
    print1("You fall through a dimensional portal!");
    morewait();
    strategic_teleport(-1);
  }
  else {
    print1("You enter the infinite abyss!");
    morewait();
    if (random_range(100)==13) {
      print1("As you fall you see before you what seems like");
      print2("an infinite congerie of iridescent bubbles.");
      print3("You have met Yog Sothoth!!!");
      morewait();
      clearmsg();
      if (Player.alignment > -10) 
	p_death("the Eater of Souls");
      else {
	print1("The All-In-One must have taken pity on you.");
	print2("A transdimensional portal appears...");
	morewait();
	change_level(Level->depth,Level->depth+1,FALSE);
	gain_experience(2000);
	Player.alignment -= 50;
      }
    }
    else {
      i = 0;
      print1("You fall...");
      while(random_range(3)!=2) {
	if (i%6 == 0)
	    print2("and fall... ");
	else
	    nprint2("and fall... ");
	i++;
	morewait();
      }
      i++;
      print1("Finally,you emerge through an interdimensional interstice...");
      morewait();
      if (Level->depth+i>MaxDungeonLevels) {
	print2("You emerge high above the ground!!!!");
	print3("Yaaaaaaaah........");
	morewait();
	change_environment(E_COUNTRYSIDE);
	do {
	  setPlayerXY( random_range(COUNTRY_WIDTH), random_range(COUNTRY_LENGTH));
	} while(Country[Player.x][Player.y].base_terrain_type == CHAOS_SEA);
	p_damage(i*50,NORMAL_DAMAGE,"a fall from a great height");
      }
      else {
	print2("You built up some velocity during your fall, though....");
	morewait();
	p_damage(i*5,NORMAL_DAMAGE,"a fall through the abyss");
	change_level(Level->depth,Level->depth+i,FALSE);
	gain_experience(i*i*50);
      }
    }
  }
}