Esempio n. 1
0
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....");
}
Esempio n. 2
0
void l_voidstone(void)
{
  int i;
  print1("This is a grey and uninteresting stone.");
  print2("A feeling of nihility emanates from it.");
  morewait();
  clearmsg();
  if (cinema_confirm("You're about to touch it.")=='y') {
    print1("You feel negated.");
    morewait();
    Player.mana = 0;
    toggle_item_use(TRUE);
    for(i=0;i<NUMSTATI;i++)
      Player.status[i] = 0;
    for(i=0;i<MAXITEMS;i++) 
      if (Player.possessions[i] != NULL) {
	Player.possessions[i]->blessing = 0;
	Player.possessions[i]->plus = 0;
	Player.possessions[i]->usef = I_NOTHING;
      }
    toggle_item_use(FALSE);
    calc_melee();
  }
  else print1("You back away from the strange rock.");
}
Esempio n. 3
0
void l_vault(void)
{
    print1("You come to a thick vault door with a complex time lock.");
    if ((hour()==23)) {
        print2("The door is open.");
        Level->site[12][56].locchar = FLOOR;
    }
    else {
        print2("The door is closed.");
        Level->site[12][56].locchar = WALL;
        morewait();
        clearmsg();
        if (cinema_confirm("You're about to try to crack the safe.")=='y') {
            if (random_range(100) < Player.rank[THIEVES]*Player.rank[THIEVES]) {
                print2("The lock clicks open!!!");
                gain_experience(5000);
                Level->site[12][56].locchar = FLOOR;
            }
            else {
                print2("Uh, oh, set off the alarm.... The castle guard arrives....");
                morewait();
                if (Player.rank[NOBILITY] == DUKE) {
                    clearmsg();
                    print1("\"Ah, just testing us, your Grace?  I hope we're up to scratch.\"");
                    morewait();
                }
                else
                    send_to_jail();
            }
        }
        else print2("Good move.");
    }
}
Esempio n. 4
0
void l_countryside(void)
{
    if (optionp(CONFIRM)) {
        if (cinema_confirm("You're about to return to the countryside.") != 'y')
            return;
    }
    change_environment(E_COUNTRYSIDE);
}
Esempio n. 5
0
/* check a move attempt in the countryside */
int p_country_moveable(int x, int y)
{
    if (! inbounds(x,y)) return (false);
    else if (optionp(CONFIRM)) {
        if ((Country[x][y].current_terrain_type == CHAOS_SEA) ||
                (Country[x][y].current_terrain_type == MOUNTAINS))
            return(cinema_confirm("That's dangerous terrain, and slow going.")=='y');
        else return(true);
    }
    else return(true);
}
Esempio n. 6
0
void l_house_exit(void)
{
  if (optionp(CONFIRM)) {
    clearmsg();
    if (cinema_confirm("You're about to step out of this abode.") != 'y')
      return;
  }
#ifndef MSDOS_SUPPORTED_ANTIQUE
  free_level(Level);
#endif
  Level = NULL;
  change_environment(Last_Environment);
}
Esempio n. 7
0
void l_tactical_exit(void)
{
  if (optionp(CONFIRM)) {
    if (cinema_confirm("You're about to leave this place.") != 'y')
      return;
  }
  /* Free up monsters and items, and the level, if not SAVE_LEVELS */
  free_level(Level);
  Level = NULL;
  if ((Current_Environment == E_TEMPLE) || 
      (Current_Environment == E_TACTICAL_MAP) )
    change_environment(E_COUNTRYSIDE);
  else change_environment(Last_Environment);
}
Esempio n. 8
0
void l_adept(void)
{
    print1("You see a giant shimmering gate in the form of an omega.");
    if (! gamestatusp(ATTACKED_ORACLE)) {
        if (Player.str+Player.con+Player.iq+Player.pow < 100)
            print2("A familiar female voice says: I would not advise this now....");
        else print2("A familiar female voice says: Go for it!");
    }
    morewait();
    clearmsg();
    if (cinema_confirm("You're about to step into the mystic portal.")!='y') {
        if (Player.level > 100) {
            print1("The Lords of Destiny spurn your cowardice and indecision...");
            Player.xp = 0;
            Player.level = 0;
            Player.hp = Player.maxhp = Player.con;
            Player.mana = calcmana();
            print2("You suddenly feel very inexperienced.");
            dataprint();
            morewait();
            clearmsg();
        }
        print1("You edge away from the challenge.");
    }
    else {
        clearmsg();
        print1("You pass through the portal.");
        morewait();
        drawomega();
        print1("Like wow man! Colors! ");
        if (Player.patron != DESTINY) {
            print2("Strange forces try to tear you apart!");
            p_damage(random_range(200),UNSTOPPABLE,"a vortex of chaos");
        }
        else print2("Some strange force shields you from a chaos vortex!");
        morewait();
        print1("Your head spins for a moment....");
        print2("and clears....");
        morewait();
        Player.hp = Player.maxhp;
        Player.mana = calcmana();
        change_environment(E_ABYSS);
    }
}
Esempio n. 9
0
void l_chaostone(void)
{
  print1("This is a menhir carved of black marble with veins of gold.");
  print2("It emanates an aura of raw chaos, which is not terribly");
  morewait();
  print1("surprising, considering its location.");
  if (Player.alignment < 0) 
    print2("You feel an almost unbearable attraction to the stone.");
  else print2("You find it extremely difficult to approach the stone.");
  morewait();
  clearmsg();
  if (cinema_confirm("You reach out your fist to strike it.")=='y') {
    print1("A sudden flux of energy surrounds you!");
    morewait();
    if (stonecheck(-1)) {
      print2("You feel stronger!");
      Player.maxstr = min(Player.maxstr+10,max(30,Player.maxstr));
      dataprint();
    }
  }
  else print1("You step back from the ominous dolmech.");
}
Esempio n. 10
0
void l_lawstone(void)
{
  print1("This is a stele carved of blueish-green feldspar.");
  print2("You feel an aura of serenity rising from it, and your gaze");
  morewait();
  print1("is attracted to the bulk of Star Peak to the North-East.");
  if (Player.alignment > 0) 
    print2("You feel a subtle attraction to the stone.");
  else print2("You find the stone extremely distasteful to contemplate.");
  morewait();
  clearmsg();
  if (cinema_confirm("Your arm moves as though compelled to grasp it.")=='y') {
    print1("A matrix of power flows about you!");
    morewait();
    if (stonecheck(1)) {
      print2("You feel more vigorous!");
      Player.maxcon = min(Player.maxcon+10,max(Player.maxcon,30));
      dataprint();
    }
  }
  else print1("You step back from the strange obelisk.");
}
Esempio n. 11
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.");
}
Esempio n. 12
0
/* x y is the proposed place to move to */
int p_moveable(int x, int y)
{
    State.setSkipMonsters();
    if (! inbounds(x,y)) return (false);
    else if (Player.status[SHADOWFORM]) {
        switch(Level->site[x][y].p_locf) {
        case L_CHAOS:
        case L_ABYSS:
        case L_VOID:
            return cinema_confirm("That looks dangerous.") == 'y';
        default:
            State.setSkipMonsters(false);
            return(true);
        }
    }
    else if (loc_statusp(x,y,SECRET)) {
        if (State.getFastMove() == false) print3("Ouch!");
        return(false);
    }
    else if (Level->site[x][y].creature != NULL) {
        if (State.getFastMove() == false) {
            Level->site[x][y].creature->fight_monster();
            State.setSkipMonsters(false);
            return(false);
        }
        else return(false);
    }
    else if (Level->site[x][y].locchar == CLOSED_DOOR) // Zop: move into door -> opens doors
    {
        if (Level->site[x][y].aux == LOCKED) {
            print3("That door seems to be locked.");
            return(false);
        }
        else {
            Level->site[x][y].locchar = OPEN_DOOR;
            lset(x, y, CHANGED);
            State.setSkipMonsters(false);
            return(false);
        }
    }
    else if ((Level->site[x][y].locchar == WALL) ||
             (Level->site[x][y].locchar == STATUE) ||
             (Level->site[x][y].locchar == PORTCULLIS) ||
             (State.getFastMove() &&
              ((Level->site[x][y].locchar == HEDGE) ||
               (Level->site[x][y].locchar == LAVA) ||
               (Level->site[x][y].locchar == ABYSS) ||
               (Level->site[x][y].locchar == VOID_CHAR) ||
               (Level->site[x][y].locchar == FIRE) ||
               (Level->site[x][y].locchar == WHIRLWIND) ||
               (Level->site[x][y].locchar == WATER) ||
               (Level->site[x][y].locchar == LIFT) ||
               (Level->site[x][y].locchar == TRAP)))) {
        if (State.getFastMove() == false) print3("Ouch!");
        return(false);
    }
    else if (optionp(CONFIRM)) {
        if ((Level->site[x][y].locchar == HEDGE) ||
                (Level->site[x][y].locchar == LAVA) ||
                (Level->site[x][y].locchar == FIRE) ||
                (Level->site[x][y].locchar == WHIRLWIND) ||
                (Level->site[x][y].locchar == ABYSS) ||
                (Level->site[x][y].locchar == VOID_CHAR) ||
                (Level->site[x][y].locchar == WATER) ||
                (Level->site[x][y].locchar == RUBBLE) ||
                (Level->site[x][y].locchar == LIFT) ||
                (Level->site[x][y].locchar == TRAP)) {
            /* horses WILL go into water... */
            if (State.getMounted()) {
                if (Level->site[x][y].locchar != WATER ||
                        Level->site[x][y].p_locf != L_WATER) {
                    print1("You can't convince your steed to continue.");
                    State.setSkipMonsters();
                    return(false);
                }
                else return(true);
            }
            else if (cinema_confirm("Look where you're about to step!") == 'y') State.setSkipMonsters(false);
            else State.setSkipMonsters();
            return(State.getSkipMonsters() == false);
        }
        else {
            State.setSkipMonsters(false);
            return(true);
        }
    }
    else {
        State.setSkipMonsters(false);
        return(true);
    }
}
Esempio n. 13
0
void l_brothel(void)
{
    char response;
    print1("You come to a heavily reinforced inner door.");
    print2("A sign reads `The House of the Eclipse'");
    morewait();
    clearmsg();
    if (cinema_confirm("You are about to open the door.")=='y') {
        menuclear();
        menuprint("a:knock on the door.\n");
        menuprint("b:try to pick the lock.\n");
        menuprint("c:bash down the door.\n");
        menuprint("ESCAPE: Leave this house of ill repute.\n");
        showmenu();
        do
            response = menugetc();
        while ((response != 'a') &&
                (response != 'b') &&
                (response != 'c') &&
                (response != ESCAPE));
        xredraw();
        if (response == 'a') {
            if (!nighttime())
                print2("There is no reponse.");
            else {
                print1("A window opens in the door.");
                print2("`500Au, buddy. For the night.' pay it? [yn] ");
                if (ynq2()=='y') {
                    if (Player.cash < 500) {
                        print1("`What, no roll?!'");
                        print2("The bouncer bounces you a little and lets you go.");
                        p_damage(25,UNSTOPPABLE,"da bouncer");
                    }
                    else {
                        Player.cash -= 500;
                        print1("You are ushered into an opulently appointed hall.");
                        print2("After an expensive dinner (takeout from Les Crapuleux)");
                        morewait();
                        if (Player.preference == 'n') {
                            switch(random_range(4)) {
                            case 0:
                                print1("you spend the evening playing German Whist with");
                                break;
                            case 1:
                                print1("you spend the evening discussing philosophy with");
                                break;
                            case 2:
                                print1("you spend the evening playing chess against");
                                break;
                            case 3:
                                print1("you spend the evening telling your adventures to");
                            }
                            print2("various employees of the House of the Eclipse.");
                        }
                        else {
                            print1("you spend an enjoyable and educational evening with");
                            if (Player.preference == 'm' ||
                                    (Player.preference == 'y' && random_range(2)))
                                switch(random_range(4)) {
                                case 0:
                                    print2("Skarn the Insatiable, a satyr.");
                                    break;
                                case 1:
                                    print2("Dryden the Defanged, an incubus.");
                                    break;
                                case 2:
                                    print2("Gorgar the Equipped, a centaur.");
                                    break;
                                case 3:
                                    print2("Hieronymus, the mendicant priest of Eros.");
                                    break;
                                }
                            else switch(random_range(4)) {
                                case 0:
                                    print2("Noreen the Nymph (omaniac)");
                                    break;
                                case 1:
                                    print2("Angelface, a recanted succubus.");
                                    break;
                                case 2:
                                    print2("Corporal Sue of the City Guard (moonlighting).");
                                    break;
                                case 3:
                                    print2("Sheena the Queena the Jungle, a wereleopard.");
                                    break;
                                }
                        }
                        morewait();
                        if (hour() > 12) Time += ((24-hour())+8) * 60;
                        else {
                            Time += ((9-hour())*60);
                            Date++;
                        }
                        Player.food = 40;
                        Player.status[DISEASED] = 0;
                        Player.status[POISONED] = 0;
                        Player.hp = Player.maxhp;
                        /* reduce temporary stat gains to max stat levels */
                        toggle_item_use(TRUE);
                        Player.str = min(Player.str,Player.maxstr);
                        Player.con = min(Player.con,Player.maxcon);
                        Player.agi = min(Player.agi,Player.maxagi);
                        Player.dex = min(Player.dex,Player.maxdex);
                        Player.iq = min(Player.iq,Player.maxiq);
                        Player.pow = min(Player.pow,Player.maxpow);
                        toggle_item_use(FALSE);
                        if (Player.preference == 'n')
                            Player.iq++; /* whatever :-) */
                        else
                            Player.con++;
                        gain_experience(100);
                        timeprint();
                        dataprint();
                        showflags();
                        morewait();
                        clearmsg();
                        if (Player.preference == 'n')
                            print1("You arise refreshed the next morning...");
                        else
                            print1("You arise, tired but happy, the next morning...");
                    }
                }
                else print2("What are you, some kinda prude?");
            }
        }
        else if (response == 'b') {
            if (nighttime()) {
                print1("As you fumble at the lock, the door opens....");
                print2("The bouncer tosses you into the street.");
            }
            else print1("The door appears to be bolted and barred from behind.");
        }
        else if (response == 'c') {
            if (nighttime()) {
                print1("As you charge toward the door it opens....");
                print2("Yaaaaah! Thud!");
                morewait();
                print1("You run past the startled bouncer into a wall.");
                p_damage(20,UNSTOPPABLE,"a move worthy of Clouseau");
                print2("The bouncer tosses you into the street.");
            }
            else {
                print1("Ouch! The door resists your efforts.");
                p_damage(1,UNSTOPPABLE,"a sturdy door");
                morewait();
                print1("You hear an irritated voice from inside:");
                print2("'Keep it down out there! Some of us are trying to sleep!'");
            }
        }
    }
}
Esempio n. 14
0
void l_condo(void)
{
    pol ol,prev=NULL;
    int i,done=FALSE,over=FALSE,weeksleep=FALSE;
    char response;

    if (! gamestatusp(SOLD_CONDO)) {
        response = cinema_interact
                   ("rp","Rampart Arms. Weekly Condo Rentals and Purchases",
                    "Which are you interested in [r,p, or ESCAPE] ",
                    NULL);
        if (response == 'p') {
            print2("Only 50,000Au. Buy it? [yn] ");
            if (ynq2()=='y') {
                if (Player.cash < 50000)
                    print3("No mortgages, buddy.");
                else {
                    setgamestatus(SOLD_CONDO);
                    Player.cash-=50000;
                    dataprint();
                    print2("You are the proud owner of a luxurious condo penthouse.");
                    Condoitems = NULL;
                }
            }
        }
        else if (response == 'r') {
            print2("Weekly Rental, 1000Au. Pay for it? [yn] ");
            if (ynq2()=='y') {
                if (Player.cash < 1000)
                    print2("Hey, pay the rent or out you go....");
                else {
                    weeksleep = TRUE;
                    Player.cash -=1000;
                    dataprint();
                }
            }
        }
        else print2("Please keep us in mind for your housing needs.");
    }
    else {
        while (! done) {
            menuclear();
            menuprint("Home Sweet Home\n");
            menuprint("a: Leave items in your safe.\n");
            menuprint("b: Retrieve items.\n");
            menuprint("c: Take a week off to rest.\n");
            menuprint("d: Retire permanently.\n");
            menuprint("ESCAPE: Leave this place.\n");
            showmenu();
            response = (char) mcigetc();
            if (response == 'a') {
                i = getitem(NULL_ITEM);
                if (i != ABORT) {
                    if (Player.possessions[i]->blessing < 0)
                        print2("The item just doesn't want to be stored away...");
                    else {
                        ol = ((pol) checkmalloc(sizeof(oltype)));
                        ol->thing = Player.possessions[i];
                        ol->next = Condoitems;
                        Condoitems = ol;
                        conform_unused_object(Player.possessions[i]);
                        Player.possessions[i] = NULL;
                    }
                }
            }
            else if (response == 'b') {
                ol = Condoitems;
                while ((ol != NULL) && (! over)) {
                    print1("Retrieve ");
                    nprint1(itemid(ol->thing));
                    nprint1(" [ynq] ");
                    response = (char) mcigetc();
                    /* DAG -- fix memory leak where object list nodes weren't deleted */
                    if (response == 'y') {
                        gain_item(ol->thing);
                        if (ol == Condoitems)
                        {
                            ol = ol->next;
                            free( Condoitems );
                            Condoitems = ol;
                        }
                        else
                        {
                            ol=ol->next;
                            free( prev->next );
                            prev->next = ol;
                        }
                    }
                    else if (response == 'q')
                        over = TRUE;
                    else
                    {
                        prev = ol;
                        ol = ol->next;
                    }
                }
            }
            else if (response == 'c') {
                weeksleep = TRUE;
                print1("You take a week off to rest...");
                morewait();
            }
            else if (response == 'd') {
                clearmsg();
                if (cinema_confirm("You ponder settling down here for good.") == 'y') {
                    p_win();
                }
            }
            else if (response == ESCAPE) done = TRUE;
        }
        xredraw();
    }
    if (weeksleep) {
        clearmsg();
        print1("Taking a week off to rest...");
        morewait();
        toggle_item_use(TRUE);
        Player.hp = Player.maxhp;
        Player.str = Player.maxstr;
        Player.agi = Player.maxagi;
        Player.con = Player.maxcon;
        Player.dex = Player.maxdex;
        Player.iq = Player.maxiq;
        Player.pow = Player.maxpow;
        for (i=0; i<NUMSTATI; i++)
            if (Player.status[i]<1000) Player.status[i]=0;
        toggle_item_use(FALSE);
        Player.food = 36;
        print2("You're once again fit and ready to continue your adventure.");
        Time += 60*24*7;
        Date += 7;
        moon_check();
        timeprint();
    }
}
Esempio n. 15
0
void l_mansion(void)
{
    if (cinema_confirm("You're about to enter a palatial mansion.")=='y')
        change_environment(E_MANSION);
}
Esempio n. 16
0
void l_house(void)
{
    if (cinema_confirm("You're about to walk into someone's house.")=='y')
        change_environment(E_HOUSE);
}
Esempio n. 17
0
void l_hovel(void)
{
    if (cinema_confirm("You're about to duck into a hovel.")=='y')
        change_environment(E_HOVEL);
}