示例#1
0
文件: move.c 项目: anylonen/omega
void l_fire_station(void)
{
  print1("The flames leap up, and the heat is incredible.");
  if (Player.immunity[FLAME]) {
    print2("You feel the terrible heat despite your immunity to fire!");
    morewait();
  }
  print2("Enter the flames? [yn] ");
  if (ynq2()=='y') {
    if (Player.hp == 1) p_death("total incineration");
    else Player.hp = 1;
    dataprint();
    print1("You feel like you are being incinerated! Jump back? [yn] ");
    if (ynq1()=='y')
      print2("Phew! That was close!");
    else {
      Player.pow -= (15+random_range(15));
      if (Player.pow > 0) {
	print2("That's odd, the flame seems to have cooled down now....");
	print3("A flicker of fire seems to dance above the void nearby.");
	Level->site[Player.x][Player.y].locchar = FLOOR;
	Level->site[Player.x][Player.y].p_locf = L_NO_OP;
	stationcheck();
      }
      else {
	print2("The flames seem to have leached away all your mana!");
	p_death("the Essence of Fire");
      }
    }
  }
  else print2("You flinch away from the all-consuming fire.");
}
示例#2
0
文件: move.c 项目: anylonen/omega
void l_earth_station(void)
{
  pob o;
  print1("The tendrilled mass reaches out for you from the muddy ooze.");
  if (find_item(&o,OB_SALT_WATER,-1))
    print2("A splash of salt water does nothing to dissuade the vines.");
  morewait();
  print1("Enter the overgrown mire? [yn] ");
  if (ynq1()=='y') {
    if (Player.hp == 1) p_death("being eaten alive");
    else Player.hp = 1;
    dataprint();
    print1("You are being dragged into the muck. Suckers bite you....");
    print2("You're about to be entangled.... Leave the mud? [yn] ");
    if (ynq2()=='y')
      print2("Phew! That was close!");
    else {
      Player.str -= (15+random_range(15));
      if (Player.str > 0) {
	print1("That's odd, the vine withdraws....");
	print2("A spatter of dirt sprays into the void nearby.");
	Level->site[Player.x][Player.y].locchar = FLOOR;
	Level->site[Player.x][Player.y].p_locf = L_NO_OP;
	stationcheck();
      }
      else {
	print2("The tendril has destroyed your strength!");
	p_death("the Essence of Earth");
      }
    }
  }
  else print2("You step back from the ominous vegetation.");
}
示例#3
0
文件: move.c 项目: anylonen/omega
void l_air_station(void)
{
  print1("The whirlwind spins wildly and crackles with lightning.");
  if (Player.immunity[ELECTRICITY])
    print2("You feel static cling despite your immunity to electricity!");
  morewait();
  print1("Enter the storm? [yn] ");
  if (ynq1()=='y') {
    if (Player.hp == 1) p_death("being torn apart and then electrocuted");
    else Player.hp = 1;
    dataprint();
    print1("You are buffeted and burnt by the storm....");
    print2("You begin to lose consciousness.... Leave the storm? [yn] ");
    if (ynq1()=='y')
      print2("Phew! That was close!");
    else {
      Player.iq -= (random_range(15)+15);
      if (Player.iq > 0) {
	print1("That's odd, the storm subsides....");
	print2("A gust of wind brushes past the void nearby.");
	Level->site[Player.x][Player.y].locchar = FLOOR;
	Level->site[Player.x][Player.y].p_locf = L_NO_OP;
	stationcheck();
      }
      else {
	print2("The swirling storm has destroyed your intelligence!");
	p_death("the Essence of Air");
      }
    }
  }
  else print2("You step back from the ominous whirlwind.");
}
示例#4
0
文件: move.c 项目: anylonen/omega
void l_void_station(void)
{
  int i,something=FALSE;
  if (cinema_confirm("You're about to Peter Pan into an endless void.")=='y') {
    if (Level->mlist == NULL) {
      print2("You fall forever. Eventually you die of starvation.");
      morewait();
      while(Player.hp>0) {
	Time+=60;
	hourly_check();
	usleep(250000);
      }
    }
    else {
      print1("You enter the void.");
      print2("You feel a sudden surge of power from five directions.");
      morewait();
      something = (Player.packptr > 0);
      if (! something)
	for(i=0;((i<MAXITEMS)&&(!something));i++)
	  if (Player.possessions[i] != NULL)
	    something = TRUE;
      if (something) {
	print1("The flow of power is disrupted by something!");
	print2("The power is unbalanced! You lose control!");
	morewait();
	print1("Each of your cells explodes with a little scream of pain.");
	print2("Your disrupted essence merges with the megaflow.");
	p_death("the Power of the Void");
      }
      else if (! gamestatusp(PREPARED_VOID)){
	print1("The hungry void swallows you whole!");
	print2("Your being dissipates with a pathetic little sigh....");
	p_death("the Emptyness of the Void");
      }
      else {
	print1("The flow of power rages through your body,");
	print2("but you manage to master the surge!");
	print3("You feel adept....");
	morewait();clearmsg();
	print1("With a thought, you soar up through the void to the");
	print2("place from whence you came.");
	print3("As the platform of the Challenge dwindles beneath you");
	morewait();
	clearmsg();
	print1("You see Death raise his scythe to you in a salute.");
	Player.rank[ADEPT] = 1;
	setgamestatus(COMPLETED_CHALLENGE);
	FixedPoints = calc_points();
	/* set so change_environment puts player in correct temple! */
	Player.x = 49;
	Player.y = 59;
	print2("You find yourself back in the Temple of Destiny.");
	morewait();
	change_environment(E_TEMPLE);
      }
    }
  }
  else print2("You back away from the edge....");
}
示例#5
0
void i_azoth(pob o)
{
    if (o->plus < 0) {
        mprint("The mercury was poisonous!");
        p_poison(25);
    }
    else if (o->plus == 0) {
        mprint("The partially enchanted azoth makes you sick!");
        Player.con = ((int) (Player.con / 2));
        calc_melee();
    }
    else if (o->blessing < 1) {
        mprint("The unblessed azoth warps your soul!");
        Player.pow = Player.maxpow = ((int) (Player.maxpow / 2));
        level_drain(random_range(10),"cursed azoth");
    }
    else {
        mprint("The azoth fills you with cosmic power!");
        if (Player.str > Player.maxstr*2) {
            mprint("The power rages out of control!");
            p_death("overdose of azoth");
        }
        else {
            heal(10);
            cleanse(1);
            Player.mana = calcmana()*3;
            toggle_item_use(TRUE);
            Player.str = (Player.maxstr++)*3;
            toggle_item_use(FALSE);
        }
    }
}
示例#6
0
文件: move.c 项目: anylonen/omega
void l_sacrificestone(void)
{
  int sacrifice=1;
  int oldmaxhp = Player.maxhp;
  print1("You have come on a weathered basaltic block.");
  print2("On the top surface is an indentation in human shape.");
  morewait();
  print1("You see old rust colored stains in the grain of the stone.");
  print2("You sense something awakening. Touch the block? [yn] ");
  if (ynq2() == 'y') {
    print1("You sense great pain emanating from the ancient altar.");
    print2("Climb on to the block? [yn] ");
    if (ynq2() == 'y') {
      print1("You are stuck fast to the block!");
      print2("You feel your life-force being sucked away!");
      morewait();
      print1("Hit ESCAPE to try and get up at any moment, SPACE to remain.");
      do {
	switch(random_range(4)) {
	  case 0: print2("You feel weaker."); break;
	  case 1: print2("You feel your life fading."); break;
	  case 2: print2("Your energy is vanishing."); break;
	  case 3: print2("You are being drained."); break;
	  }
	Player.hp -= sacrifice;
	Player.maxhp -= sacrifice/2;
	sacrifice *= 2;
	dataprint();
	if ((Player.hp < 1) || (Player.maxhp < 1))
	  p_death("self-sacrifice");
      } while (stillonblock());
      print1("You manage to wrench yourself off the ancient altar!");
      print2("You leave some skin behind, though....");
      morewait();
      if ((oldmaxhp > 10) && (Player.maxhp < 3 * oldmaxhp/4)) {
	print1("A strange red glow arises from the altar.");
	print2("The glow surrounds you.... You sense gratitude.");
	Player.pow += sacrifice;
	Player.maxpow += sacrifice/10;
	dataprint();
      }
      else {
	print1("You a have a sense of rejection.");
	print2("A roil of fetid vapor smokes up from the altar.");
	gain_experience(sacrifice);
      }
    }
    else {
      print1("You sense an emotion of pique all around you.");
      print2("You retreat from the strange stone.");
    }
  }
  else {
    print1("You decide discretion to be the better part of valour.");
    print2("The stone seems to subside sleepily.");
  }
}
示例#7
0
文件: move.c 项目: anylonen/omega
void l_water_station(void)
{
  print1("The fluid seems murky and unknowably deep.");
  print2("It bubbles and hisses threateningly.");
  morewait();
  if (Player.status[BREATHING]) {
    print1("You don't feel sanguine about trying to breathe that stuff!");
    morewait();
  }
  if (Player.immunity[ACID]) {
    print2("The vapor burns despite your immunity to acid!");
    morewait();
  }
  print1("Enter the fluid? [yn] ");
  if (ynq1()=='y') {
    if (Player.hp == 1) p_death("drowning in acid (ick, what a way to go)");
    else Player.hp = 1;
    dataprint();
    print2("You choke....");
    morewait();
    nprint2("Your lungs burn....");
    morewait();
    print2("Your body begins to disintegrate.... Leave the pool? [yn] ");
    if (ynq2()=='y')
      print2("Phew! That was close!");
    else {
      clearmsg();
      Player.con -= (15+random_range(15));
      if (Player.con > 0) {
	print1("That's odd, the fluid seems to have been neutralized....");
	print2("A moist miasma wafts above the void nearby.");
	Level->site[Player.x][Player.y].locchar = FLOOR;
	Level->site[Player.x][Player.y].p_locf = L_NO_OP;
	stationcheck();
      }
      else {
	print2("The bubbling fluid has destroyed your constitution!");
	p_death("the Essence of Water");
      }
    }
    
  }
  else print2("You step back from the pool of acid.");
}
示例#8
0
文件: itemf2.c 项目: anylonen/omega
void weapon_scythe(int dmgmod, pob o, pmt m)
{
  mprint("Slice!");
  m_death(m);
  if (! Player.rank[ADEPT]) {
    mprint("Ooops!");
    mprint("You accidentally touch yourself on the backswing....");
    p_death("the Scythe of Death");
  }
}
示例#9
0
void weapon_scythe(int dmgmod, Object* o, Monster* m)
{
    mprint("Slice!");
    m->m_death();
    if (! Player.rank[ADEPT]) {
        mprint("Ooops!");
        mprint("You accidentally touch yourself on the backswing....");
        p_death("the Scythe of Death");
    }
}
示例#10
0
文件: aux1.cpp 项目: Geozop/OmegaRPG
/* do dmg points of damage of type dtype, from source fromstring */
void p_damage(int dmg, int dtype, char *fromstring)
{
    if (State.getFastMove()) {
        drawvision(Player.x,Player.y);
        State.setFastMove(false);
    }
    if (! p_immune(dtype)) {
        if (dtype == NORMAL_DAMAGE) Player.hp -= max(1,(dmg-Player.absorption));
        else Player.hp -= dmg;
        if (Player.hp < 1) p_death(fromstring);
    }
    else mprint("You resist the effects!");
    dataprint();
}
示例#11
0
文件: aux1.cpp 项目: Geozop/OmegaRPG
/* check to see if too much tunneling has been done in this level */
void tunnelcheck(void)
{
    if ((Level->depth == 0 && Current_Environment != E_DLAIR) ||
            Current_Environment == E_ASTRAL)
        return;
    Level->tunnelled++;
    if ((Level->tunnelled) > (Level->level_length)/4)
        mprint("Dust and stone fragments fall on you from overhead.");
    if ((Level->tunnelled) >(Level->level_length)/2)
        mprint("You hear groaning and creaking noises.");
    if ((Level->tunnelled) > (3*(Level->level_length))/4)
        mprint("The floor trembles and you hear a loud grinding screech.");
    if ((Level->tunnelled) > Level->level_length) {
        mprint("With a scream of tortured stone, the entire dungeon caves in!!!");
        gain_experience(5000);
        if (Player.status[SHADOWFORM]) {
            change_environment(E_COUNTRYSIDE);
            switch (Country[Player.x][Player.y].base_terrain_type)
            {
            case CASTLE:
            case STARPEAK:
            case CAVES:
            case VOLCANO:
                Country[Player.x][Player.y].current_terrain_type = MOUNTAINS;
                break;
            case DRAGONLAIR:
                Country[Player.x][Player.y].current_terrain_type = DESERT;
                break;
            case MAGIC_ISLE:
                Country[Player.x][Player.y].current_terrain_type = CHAOS_SEA;
                break;
            case PALACE:
                Country[Player.x][Player.y].current_terrain_type = JUNGLE;
                break;
            }
            Country[Player.x][Player.y].base_terrain_type =
                Country[Player.x][Player.y].current_terrain_type;
            c_set(Player.x, Player.y, CHANGED);
            print1("In your shadowy state, you float back up to the surface.");
            return;
        }
        mprint("You are flattened into an unpleasant jellylike substance.");
        p_death("dungeon cave-in");
    }
}
示例#12
0
文件: itemf2.c 项目: anylonen/omega
void weapon_demonblade(int dmgmod, pob o, pmt m)
{ 
  if (o->blessing > -1) {
    mprint("Demonblade disintegrates with a soft sigh.");
    mprint("You stop foaming at the mouth.");
    Player.status[BERSERK] = 0;
    conform_lost_object(o);
  }
  else if (m->specialf == M_SP_DEMON) {
    mprint("The demon flees in terror before your weapon!");
    m_vanish(m);
  }
  else if (m->meleef != M_MELEE_SPIRIT) {
    if (m->level > random_range(10)) {
      if( Player.hp < Player.maxhp )
        Player.hp = min(Player.maxhp,Player.hp+m->hp);
      Player.str++;
      if( Player.pow < Player.maxpow )
        Player.pow = min(Player.maxpow,Player.pow+m->level);
      m_death(m);
      mprint("You feel a surge of raw power from Demonblade!");
    }
    else p_hit(m,Player.dmg+dmgmod,NORMAL_DAMAGE);

  }
  else {
    mprint("Demonblade howls as it strikes the spirit!");
    if (random_range(10) == 1) {
      mprint("... and shatters into a thousand lost fragments!");
      morewait();
      p_damage(50,UNSTOPPABLE,"Demonblade exploding");
      conform_lost_object(o);
    }
    else {
      mprint("You feel your lifeforce draining....");
      p_damage(25,UNSTOPPABLE,"a backlash of negative energies");
      Player.str -= 3;
      Player.con -= 3;
      if (Player.str < 1 || Player.con < 1)
	p_death("a backlash of negative energies");
    }
  }
}
示例#13
0
void heal(int amount)
{
    if (amount > -1) {
        mprint("You feel better.");
        if (Player.hp < Player.maxhp + amount)
        {
            Player.hp += random_range(10*amount)+1;
            if (Player.hp > Player.maxhp)
                Player.hp = Player.maxhp + amount;
        }
        Player.status[BLINDED] = 0;
    }
    else {
        mprint("You feel unwell.");
        Player.hp -= random_range(10*abs(amount)+1);
        if (Player.hp < 0)
            p_death("magical disruption");
    }
    dataprint();
}
示例#14
0
文件: move.c 项目: anylonen/omega
void l_chaos(void)
{
  if (gamestatusp(MOUNTED)) {
    print1("Your steed tries to swim in the raw Chaos, but seems to");
    print2("be having some difficulties...");
    morewait();
    print1("probably because it's just turned into a chaffinch.");
    morewait();
    resetgamestatus(MOUNTED);
  }
  if (! onewithchaos)
    print1("You are immersed in raw Chaos....");
  if (Player.rank[ADEPT]) {
    if (! onewithchaos)
    {
      onewithchaos = 1;
      print2("You achieve oneness of Chaos....");
    }
    Player.mana = max(Player.mana,calcmana());
    Player.hp = max(Player.hp, Player.maxhp);
  }
  else if (onewithchaos) /* adept that gets amnesia from chaos storm */
  {
    print2("The chaos sea doesn't seem to bother you at all.");
  }
  else if (Player.rank[PRIESTHOOD] && (! saved)) {
    print2("A mysterious force protects you from the Chaos!");
    print3("Wow.... You feel a bit smug.");
    gain_experience(500);
    saved = TRUE;
  }
  else {
    print2("Uh oh....");
    if (saved) nprint2("Nothing mysterious happens this time....");
    morewait();
    print1("Congratulations! You've achieved maximal entropy!");
    Player.alignment -= 50;
    gain_experience(1000);
    p_death("immersion in raw Chaos");
  }
}
示例#15
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();
}
示例#16
0
文件: move.c 项目: anylonen/omega
void l_magic_pool(void)
{
  int possibilities=random_range(100);
  print1("This pool seems to be enchanted....");
  if (gamestatusp(MOUNTED)) {
    if (random_range(2)) {
      print2("Your horse is polymorphed into a fig newton.");
      resetgamestatus(MOUNTED);
    }
    else print2("Whatever it was, your horse enjoyed it....");
  }
  else  if (possibilities == 0) {
    print1("Oh no! You encounter the DREADED AQUAE MORTIS...");
    if (random_range(1000) < Player.level*Player.level*Player.level) {
      print2("The DREADED AQUAE MORTIS throttles you within inches....");
      print3("but for some reason chooses to let you escape.");
      gain_experience(500);
      Player.hp = 1;
    }
    else p_death("the DREADED AQUAE MORTIS!");
  }
  else if (possibilities < 25)
    augment(0);
  else if (possibilities < 30)
    augment(1);
  else if (possibilities < 60)
    augment(-1);
  else if (possibilities < 65)
    cleanse(1);
  else if (possibilities < 80) {
    if (Player.possessions[O_WEAPON_HAND] != NULL) {
      print1("You drop your weapon in the pool! It's gone forever!");
      dispose_lost_objects(1,Player.possessions[O_WEAPON_HAND]);
    }
    else print1("You feel fortunate.");
  }
  else if (possibilities < 90) {
    if (Player.possessions[O_WEAPON_HAND] != NULL) {
      print1("Your weapon leaves the pool with a new edge....");
      Player.possessions[O_WEAPON_HAND]->plus += random_range(10)+1;
      calc_melee();
    }
    else print1("You feel unfortunate.");
  }
  else if (possibilities < 95) {
    Player.hp += 10;
    print1("You feel healthier after the dip...");
  }
  else if (possibilities < 99) {
    print1("Oooh, a tainted pool...");
    p_poison(10);
  }
  else if (possibilities == 99) {
    print1("Wow! A pool of azoth!");
    heal(10);
    cleanse(1);
    Player.mana = calcmana()*3;
    Player.str = (Player.maxstr++)*3;
  }
  print2("The pool seems to have dried up.");
  Level->site[Player.x][Player.y].locchar = TRAP;
  Level->site[Player.x][Player.y].p_locf = L_TRAP_PIT;
  lset(Player.x, Player.y, CHANGED);
}
示例#17
0
文件: move.c 项目: anylonen/omega
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);
      }
    }
  }
}