/* makes a log npc for houses and hovels */ void make_house_npc(int i, int j) { pml ml = ((pml) checkmalloc(sizeof(mltype))); pob ob; ml->m = ((pmt) checkmalloc(sizeof(montype))); *(ml->m) = Monsters[NPC]; make_log_npc(ml->m); if (ml->m->id == NPC) mprint("You detect signs of life in this house."); else mprint("An eerie shiver runs down your spine as you enter...."); /* if not == NPC, then we got a ghost off the npc list */ ml->m->x = i; ml->m->y = j; Level->site[i][j].creature = ml->m; ml->m->click = (Tick + 1) % 50; ml->next = Level->mlist; Level->mlist = ml; m_status_set(ml->m,HOSTILE); if (nighttime()) m_status_reset(ml->m,AWAKE); else m_status_set(ml->m,AWAKE); if (ml->m->startthing > -1) { ob = ((pob) checkmalloc(sizeof(objtype))); *ob = Objects[ml->m->startthing]; m_pickup(ml->m,ob); } }
/* makes a hiscore npc for mansions */ void make_mansion_npc(int i, int j) { pml ml = ((pml) checkmalloc(sizeof(mltype))); ml->m = ((pmt) checkmalloc(sizeof(montype))); *(ml->m) = Monsters[NPC]; make_hiscore_npc(ml->m,random_range(14) + 1); mprint("You detect signs of life in this house."); ml->m->x = i; ml->m->y = j; Level->site[i][j].creature = ml->m; ml->m->click = (Tick + 1) % 50; ml->next = Level->mlist; Level->mlist = ml; m_status_set(ml->m,HOSTILE); if (nighttime()) m_status_reset(ml->m,AWAKE); else m_status_set(ml->m,AWAKE); }
void l_monastery(void) { char action; int done=FALSE,enrolled = FALSE; print1("Tholian Monastery of Rampart. Founded 12031, AOF."); print2("Welcome to our humble hovel."); if (nighttime()) print2("The monastery doors are sealed until dawn."); else { while (! done) { menuclear(); menuprint("Find your True Course:\n\n"); menuprint("a: Discover the Way.\n"); menuprint("b: Meditate on the Path.\n"); menuprint("c: Meditate on Knowledge.\n"); menuprint("d: Take an extended Meditation.\n"); menuprint("ESCAPE: Re-enter the World.\n"); showmenu(); action = mgetc(); if (action == ESCAPE) { done = TRUE; calc_melee(); } else if (action == 'a') { if (Player.rank[MONKS] > 0) print2("You are already initiated, Brother."); else if (Player.con < 13) print2("Your body is too fragile to walk the Path, child."); else if (Player.pow < 13) print2("Your mind is too fragile to follow the Path, child."); else if (Player.rank[COLLEGE] > 0) print2("The Collegium has corruputed your spirit, child."); else if (Player.rank[CIRCLE] > 0) print2("The Circle has corruputed your spirit, child."); else { if (Player.pow > 17) { print2("Your spirit is strong. You may study the Path with us."); morewait(); enrolled=TRUE; } else { print1("A substantial cash sacrifice will cleanse your spirit.. "); print2("Donate your worldly goods? [yn] "); if (ynq1() =='y') { if (Player.cash < 1000) { /* WDT HACK! I'd rather the monks have some other * criteria for joining. */ print2("You have not much to give."); } else { Player.cash = 0; enrolled = TRUE; dataprint(); } } } if (enrolled) { print1("Grandmaster "); nprint1(Grandmaster); nprint1(" welcomes you to the Brotherhood."); print2("You are now a Tholian Monk trainee!"); morewait(); print2("You may study the Way with us."); Studiesleft = 1; Player.rank[MONKS] = MONK_TRAINEE; Player.guildxp[MONKS] = 1; Player.maxpow += 1; Player.pow += 1; } } } else if (action == 'b') { if (Player.rank[MONKS] == 0) print2("You are not yet initiated, child."); else if (Player.rank[MONKS]==MONK_GRANDMASTER) print2("Your advancement lies within, Grandmaster."); else if (Player.rank[MONKS]==MONK_MASTER_TEARS) { if (Player.level <= Grandmasterlevel) print2("Seek more experience, Master."); else if ((Player.rank[MONKS]==MONK_MASTER_TEARS) && (Player.level > Grandmasterlevel) && find_and_remove_item(CORPSEID,EATER)) { print1("You brought back the heart of the Eater of Magic!"); morewait(); print1("The Heart is sent to the placed in the kitchen cauldron."); print2("The Grandmaster steps down. You are the new Grandmaster."); morewait(); clearmsg(); strcpy(Grandmaster,Player.name); Grandmasterlevel = Player.level; Player.rank[MONKS] = MONK_GRANDMASTER; Player.maxhp += (Player.maxpow * 3); Player.maxiq += 5; Player.iq+= 5; Player.maxpow += 3; Player.pow += 3; Player.maxstr += 3; Player.str += 3; morewait(); Grandmasterbehavior = fixnpc(4); save_hiscore_npc(16); } else print2("You must return with the heart of the Eater of Magic!"); } else if (Player.rank[MONKS]==MONK_MASTER_PAINS) { if (Player.guildxp[MONKS] < 40000) print2("Seek more experience, Master."); else { print1("You have travelled far, Master."); print2("You are now Master of Tears."); Studiesleft += 6; morewait(); print1("To become Grandmaster, you must return with the"); print2("heart of the Eater of Magic"); morewait(); clearmsg(); print1("The Eater may be found on a desert isle somewhere."); Spells[S_REGENERATE].known = TRUE; Player.rank[MONKS] = MONK_MASTER_TEARS; Player.maxhp += (Player.maxpow * 2); Player.maxpow += 2; Player.pow += 2; Player.maxstr += 2; Player.str += 2; Player.maxagi += 2; Player.agi += 2; } } else if (Player.rank[MONKS]==MONK_MASTER_SIGHS) { if (Player.guildxp[MONKS] < 15000) print2("Seek more experience, Master."); else { print1("The Path is long, Master."); print2("You are now Master of Pain."); morewait(); print1("You feel enlightened."); morewait(); clearmsg(); Studiesleft +=4; Spells[S_RITUAL].known = TRUE; Spells[S_RESTORE].known = TRUE; Player.status[ILLUMINATION] = 1500; /* enlightened */ Player.rank[MONKS] = MONK_MASTER_PAINS; Player.maxhp += Player.maxpow; Player.maxcon += 1; Player.con += 1; Player.maxdex += 2; Player.dex += 2; } } else if (Player.rank[MONKS]==MONK_MASTER) { if (Player.guildxp[MONKS] < 9000) print2("Seek more experience, Master."); else { print1("Drink, weary Master."); print2("You are now Master of Sighs."); morewait(); clearmsg(); Studiesleft +=2; Spells[S_HASTE].known = TRUE; Player.rank[MONKS] = MONK_MASTER_SIGHS; Player.maxhp += Player.maxpow; Player.maxcon += 1; Player.con += 1; Player.maxiq += 2; Player.iq += 2; } } else if (Player.rank[MONKS]==MONK_MONK) { if (Player.guildxp[MONKS] < 3000) print2("Seek more experience, Brother."); else { print1("A thousand steps on the path, Brother."); print2("You are now a Master."); morewait(); clearmsg(); Studiesleft +=2; Spells[S_HEAL].known = TRUE; Player.rank[MONKS] = MONK_MASTER; Player.maxhp += Player.maxpow; Player.maxcon += 1; Player.con += 1; Player.maxpow += 2; Player.pow += 5; /* [sic] */ } } else if (Player.rank[MONKS]==MONK_TRAINEE) { if (Player.guildxp[MONKS] < 1500) print2("Seek more experience, Brother."); else { print1("You have sought wisdom, Brother."); print2("You are now a Tholian Monk."); morewait(); clearmsg(); Studiesleft +=2; Spells[S_CURE].known = TRUE; Player.rank[MONKS] = MONK_MONK; Player.maxhp += Player.maxpow; Player.maxcon += 1; Player.con += 1; Player.maxpow += 1; Player.pow += 1; } } } else if (action == 'c') { clearmsg(); if (Studiesleft > 0) { print1("Studies permitted: "); mnumprint(Studiesleft); nprint1(" Studies."); morewait(); } if (Studiesleft < 1) { print1("Sacrifice clears a cluttered heart. "); nprint1("Donate your worldly cash? [yn] "); if (ynq1()=='y') { if (Player.cash < 2000) { if ( Player.rank[MONKS] >= MONK_GRANDMASTER ) print2("You have not much to give, Grandmaster."); else if ( Player.rank[MONKS] >= MONK_MASTER ) print2("You have not much to give, Master."); else print2("You have not much to give, Brother."); } else { Player.cash = 0; dataprint(); Studiesleft = 1; } } } if (Studiesleft > 0) { learnspell(0); Studiesleft--; } } else if (action == 'd') { if (Player.rank[MONKS] < MONK_MASTER) { clearmsg(); print1("Only Masters can achieve extended meditation, child."); print2(" "); } else { int i = 0; clearmsg(); print1("Seeking inner truth..."); morewait(); clearmsg(); morewait(); toggle_item_use(TRUE); Player.cash = 0; 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 = 43; print2("Your body and mind are whole."); if (random_range(2) == 1) { morewait(); print1("Extra whole!"); Player.maxhp += 1; } } Time += 60*24*7; Date += 7; moon_check(); timeprint(); } } } xredraw(); }
void l_college(void) { char action; int done=FALSE,enrolled = FALSE; print1("The Collegium Magii. Founded 16937, AOF."); if (nighttime()) print2("The Registration desk is closed at night...."); else { while (! done) { if ((Player.rank[COLLEGE]==MAGE) && (Player.level > Archmagelevel) && find_and_remove_item(CORPSEID,EATER)) { print1("You brought back the heart of the Eater of Magic!"); morewait(); print1("The Heart is sent to the labs for analysis."); print2("The Board of Trustees appoints you Archmage!"); morewait(); clearmsg(); strcpy(Archmage,Player.name); Archmagelevel = Player.level; Player.rank[COLLEGE] = ARCHMAGE; Player.maxiq += 5; Player.iq += 5; Player.maxpow += 5; Player.pow += 5; morewait(); Archmagebehavior = fixnpc(4); save_hiscore_npc(9); } menuclear(); menuprint("May we help you?\n\n"); menuprint("a: Enroll in the College.\n"); menuprint("b: Raise your College rank.\n"); menuprint("c: Do spell research.\n"); menuprint("ESCAPE: Leave these hallowed halls.\n"); showmenu(); action = mgetc(); if (action == ESCAPE) done = TRUE; else if (action == 'a') { if (Player.rank[COLLEGE] > 0) print2("You are already enrolled!"); else if (Player.iq < 13) print2("Your low IQ renders you incapable of being educated."); else if (Player.rank[CIRCLE] > 0) print2("Sorcery and our Magic are rather incompatible, no?"); #ifdef INCLUDE_MONKS else if (Player.rank[MONKS] > 0) print2("Meditation will not leave you enough time for studies."); #endif else { if (Player.iq > 17) { print2("You are given a scholarship!"); morewait(); enrolled=TRUE; } else { print1("Tuition is 1000Au. "); nprint1("Pay it? [yn] "); if (ynq1() =='y') { if (Player.cash < 1000) print2("You don't have the funds!"); else { Player.cash -= 1000; enrolled = TRUE; dataprint(); } } } if (enrolled) { print1("Archmage "); nprint1(Archmage); nprint1(" greets you and congratulates you on your acceptance."); print2("You are now enrolled in the Collegium Magii!"); morewait(); print1("You are now a Novice."); print2("You may research 1 spell, for your intro class."); Spellsleft = 1; Player.rank[COLLEGE] = INITIATE; Player.guildxp[COLLEGE] = 1; Player.maxiq += 1; Player.iq += 1; Player.maxpow += 1; Player.pow += 1; } } } else if (action == 'b') { if (Player.rank[COLLEGE] == 0) print2("You have not even been initiated, yet!"); else if (Player.rank[COLLEGE]==ARCHMAGE) print2("You are at the pinnacle of mastery in the Collegium."); else if (Player.rank[COLLEGE]==MAGE) { if (Player.level <= Archmagelevel) print2("You are not experienced enough to advance."); else print2("You must return with the heart of the Eater of Magic!"); } else if (Player.rank[COLLEGE]==PRECEPTOR) { if (Player.guildxp[COLLEGE] < 4000) print2("You are not experienced enough to advance."); else { print1("You are now a Mage of the Collegium Magii!"); print2("You may research 6 spells for postdoctoral research."); Spellsleft += 6; morewait(); print1("To become Archmage, you must return with the"); print2("heart of the Eater of Magic"); morewait(); clearmsg(); print1("The Eater may be found on a desert isle somewhere."); Player.rank[COLLEGE] = MAGE; Player.maxiq += 2; Player.iq += 2; Player.maxpow += 2; Player.pow += 2; } } else if (Player.rank[COLLEGE]==STUDENT) { if (Player.guildxp[COLLEGE] < 1500) print2("You are not experienced enough to advance."); else { print1("You are now a Preceptor of the Collegium Magii!"); print2("You are taught the basics of ritual magic."); morewait(); clearmsg(); print1("Your position allows you to research 4 spells."); Spellsleft +=4; Spells[S_RITUAL].known = TRUE; Player.rank[COLLEGE] = PRECEPTOR; Player.maxiq += 1; Player.iq += 1; Player.maxpow += 1; Player.pow += 1; } } else if (Player.rank[COLLEGE]==NOVICE) { if (Player.guildxp[COLLEGE] < 400) print2("You are not experienced enough to advance."); else { print1("You are now a Student at the Collegium Magii!"); print2("You are taught the spell of identification."); morewait(); clearmsg(); print1("Thesis research credit is 2 spells."); Spellsleft+=2; Spells[S_IDENTIFY].known = TRUE; Player.rank[COLLEGE] = STUDENT; Player.maxiq += 1; Player.iq += 1; Player.maxpow += 1; Player.pow += 1; } } } else if (action == 'c') { clearmsg(); if (Spellsleft > 0) { print1("Research permitted: "); mnumprint(Spellsleft); nprint1(" Spells."); morewait(); } if (Spellsleft < 1) { print1("Extracurricular Lab fee: 2000 Au. "); nprint1("Pay it? [yn] "); if (ynq1()=='y') { if (Player.cash < 2000) print1("Try again when you have the cash."); else { Player.cash -= 2000; dataprint(); Spellsleft = 1; } } } if (Spellsleft > 0) { learnspell(0); Spellsleft--; } } } } xredraw(); }
void l_thieves_guild(void) { int fee,count,i,number,done=FALSE,dues=1000; char c,action; pob lockpick; print1("You have penetrated to the Lair of the Thieves' Guild."); if (! nighttime()) print2("There aren't any thieves around in the daytime."); else { if ((Player.rank[THIEVES]==TMASTER) && (Player.level > Shadowlordlevel) && find_and_remove_item(OB_JUSTICIAR_BADGE,-1)) { print2("You nicked the Justiciar's Badge!"); morewait(); print1("The Badge is put in a place of honor in the Guild Hall."); print2("You are now the Shadowlord of the Thieves' Guild!"); morewait(); print1("Who says there's no honor among thieves?"); strcpy(Shadowlord,Player.name); Shadowlordlevel = Player.level; morewait(); Shadowlordbehavior = fixnpc(4); save_hiscore_npc(7); clearmsg(); print1("You learn the Spell of Shadowform."); Spells[S_SHADOWFORM].known = TRUE; morewait(); clearmsg(); Player.rank[THIEVES]=SHADOWLORD; Player.maxagi += 2; Player.maxdex += 2; Player.agi += 2; Player.dex += 2; } while (! done) { menuclear(); if (Player.rank[THIEVES] == 0) menuprint("a: Join the Thieves' Guild.\n"); else menuprint("b: Raise your Guild rank.\n"); menuprint("c: Get an item identified.\n"); if (Player.rank[THIEVES] > 0) menuprint("d: Fence an item.\n"); menuprint("ESCAPE: Leave this Den of Iniquity."); showmenu(); action = mgetc(); if (action == ESCAPE) done = TRUE; else if (action == 'a') { done = TRUE; if (Player.rank[THIEVES]> 0) print2("You are already a member!"); else if (Player.alignment > 10) print2("You are too lawful to be a thief!"); else { dues += dues*(12-Player.dex)/9; dues += Player.alignment*5; dues = max(100,dues); clearmsg(); mprint("Dues are"); mnumprint(dues); mprint(" Au. Pay it? [yn] "); if (ynq1() =='y') { if (Player.cash < dues) { print1("You can't cheat the Thieves' Guild!"); print2("... but the Thieves' Guild can cheat you...."); Player.cash = 0; } else { print1("Shadowlord "); nprint1(Shadowlord); print2("enters your name into the roll of the Guild."); morewait(); clearmsg(); print1("As a special bonus, you get a free lockpick."); print2("You are taught the spell of Object Detection."); morewait(); Spells[S_OBJ_DET].known = TRUE; lockpick = ((pob) checkmalloc(sizeof(objtype))); *lockpick = Objects[OB_LOCK_PICK]; /* lock pick */ gain_item(lockpick); Player.cash -= dues; dataprint(); Player.guildxp[THIEVES]=1; Player.rank[THIEVES]=TMEMBER; Player.maxdex++;Player.dex++;Player.agi++;Player.maxagi++; } } } } else if (action == 'b') { if (Player.rank[THIEVES]==0) print2("You are not even a member!"); else if (Player.rank[THIEVES]==SHADOWLORD) print2("You can't get any higher than this!"); else if (Player.rank[THIEVES]==TMASTER) { if (Player.level <= Shadowlordlevel) print2("You are not experienced enough to advance."); else print2("You must bring back the Justiciar's Badge!"); } else if (Player.rank[THIEVES]==THIEF) { if (Player.guildxp[THIEVES] < 4000) print2("You are not experienced enough to advance."); else { print1("You are now a Master Thief of the Guild!"); print2("You are taught the Spell of Apportation."); morewait(); print1("To advance to the next level you must return with"); print2("the badge of the Justiciar (cursed be his name)."); morewait(); clearmsg(); print1("The Justiciar's office is just south of the gaol."); Spells[S_APPORT].known = TRUE; Player.rank[THIEVES]=TMASTER; Player.maxagi++; Player.maxdex++; Player.agi++; Player.dex++; } } else if (Player.rank[THIEVES]==ATHIEF) { if (Player.guildxp[THIEVES] < 1500) print2("You are not experienced enough to advance."); else { print1("You are now a ranking Thief of the Guild!"); print2("You learn the Spell of Invisibility."); Spells[S_INVISIBLE].known = TRUE; Player.rank[THIEVES]=THIEF; Player.agi++; Player.maxagi++; } } else if (Player.rank[THIEVES]==TMEMBER) { if (Player.guildxp[THIEVES] < 400) print2("You are not experienced enough to advance."); else { print1("You are now an Apprentice Thief!"); print2("You are taught the Spell of Levitation."); Spells[S_LEVITATE].known = TRUE; Player.rank[THIEVES]=ATHIEF; Player.dex++; Player.maxdex++; } } } else if (action == 'c') { if (Player.rank[THIEVES]==0) { print1("RTG, Inc, Appraisers. Identification Fee: 50Au/item."); fee = 50; } else { fee = 5; print1("The fee is 5Au per item."); } print2("Identify one item, or all possessions? [ip] "); if ((char) mcigetc()=='i') { if (Player.cash < fee) print2("Try again when you have the cash."); else { Player.cash -= fee; dataprint(); identify(0); } } else { count = 0; for(i=1;i<MAXITEMS;i++) if (Player.possessions[i] != NULL) if (Player.possessions[i]->known < 2) count++; for(i=0;i<Player.packptr;i++) if (Player.pack[i] != NULL) if (Player.pack[i]->known < 2) count++; clearmsg(); print1("The fee will be: "); mnumprint(max(count*fee,fee)); nprint1("Au. Pay it? [yn] "); if (ynq1()=='y') { if (Player.cash < max(count*fee,fee)) print2("Try again when you have the cash."); else { Player.cash -= max(count*fee,fee); dataprint(); identify(1); } } } } else if (action == 'd') { if (Player.rank[THIEVES]==0) print2("Fence? Who said anything about a fence?"); else { print1("Fence one item or go through pack? [ip] "); if ((char) mcigetc()=='i') { i = getitem(NULL_ITEM); if ((i==ABORT) || (Player.possessions[i] == NULL)) print2("Huh, Is this some kind of set-up?"); else if (Player.possessions[i]->blessing < 0) print2("I don't want to buy a cursed item!"); else { clearmsg(); print1("I'll give you "); mlongprint(2 * item_value(Player.possessions[i]) / 3); nprint1("Au each. OK? [yn] "); if (ynq1() == 'y') { number = getnumber(Player.possessions[i]->number); if ((number >= Player.possessions[i]->number) && Player.possessions[i]->used) { Player.possessions[i]->used = FALSE; item_use(Player.possessions[i]); } Player.cash += number*2*item_value(Player.possessions[i])/3; /* Fenced artifacts could turn up anywhere, really... */ if (Objects[Player.possessions[i]->id].uniqueness > UNIQUE_UNMADE) Objects[Player.possessions[i]->id].uniqueness = UNIQUE_UNMADE; dispose_lost_objects(number,Player.possessions[i]); dataprint(); } else print2("Hey, gimme a break, it was a fair price!"); } } else { for(i=0;i<Player.packptr;i++) { if (Player.pack[i]->blessing > -1) { clearmsg(); print1("Sell "); nprint1(itemid(Player.pack[i])); nprint1(" for "); mlongprint(2*item_value(Player.pack[i])/3); nprint1("Au each? [ynq] "); if ((c=ynq1())=='y') { number = getnumber(Player.pack[i]->number); Player.cash += 2*number * item_value(Player.pack[i]) / 3; Player.pack[i]->number -= number; if (Player.pack[i]->number < 1) { /* Fenced an artifact? You just might see it again. */ if (Objects[Player.pack[i]->id].uniqueness > UNIQUE_UNMADE) Objects[Player.pack[i]->id].uniqueness = UNIQUE_UNMADE; free((char *)Player.pack[i]); Player.pack[i] = NULL; } dataprint(); } else if (c=='q') break; } } fixpack(); } } } } } xredraw(); }
void l_merc_guild(void) { print1("Legion of Destiny, Mercenary Guild, Inc."); if (nighttime()) { print2("The barracks are under curfew right now."); return; } print2("You enter Legion HQ, "); if (Player.rank[LEGION] == COMMANDANT) { nprint2("Your aide follows you to the staff room."); morewait(); clearmsg(); } else if (Player.rank[LEGION] > 0) { nprint2("and report to your commander."); morewait(); } switch (Player.rank[LEGION]) { case 0: nprint2("and see the Recruiting Centurion."); morewait(); print2("Do you wish to join the Legion? [yn] "); if ('y' == ynq2()) { clearmsg(); if (Player.rank[ARENA] > 0) { print1("The Centurion checks your record, and gets angry:"); print2("'The legion don't need any Arena Jocks. Git!'"); } else if (Player.rank[ORDER] > 0) { print1("The Centurion checks your record, and is amused:"); print2("'A paladin in the ranks? You must be joking.'"); } else if (Player.con < 12) { print1("The Centurion looks you over, sadly."); print2("You are too fragile to join the legion."); } else if (Player.str < 10) { print1("The Centurion looks at you contemptuously."); print2("Your strength is too low to pass the physical!"); } else { Object* newitem; bank_account * account; print1("You are tested for strength and stamina..."); morewait(); nprint1(" and you pass!"); print2("Commandant "); nprint2(Commandant); nprint2(" shakes your hand."); morewait(); print1("You are also issued a shortsword and leather."); print2("You are now a Legionaire."); morewait(); clearmsg(); /* gain shortsword */ newitem = (Object*) checkmalloc(sizeof(Object)); *newitem = Objects[OB_SHORT_SWORD]; gain_item(newitem); /* gain leather armor */ newitem = (Object*) checkmalloc(sizeof(Object)); *newitem = Objects[OB_LEATHER]; gain_item(newitem); cinema_scene("Your starting salary will be 500 AU per month paid into an account the", "legion has set up for you. The password is \"loyalty\". Don't lose your card!", 0); /* gain bank card for salary account */ account = bank_create_account(true, 0, "loyalty"); account->balance = 500; Objects[OB_DEBIT_CARD].known = 1; newitem = bank_create_card(account->number, OB_DEBIT_CARD); gain_item(newitem); clearmsg(); SalaryAmount = 500; SalaryAccount = account->number; Player.rank[LEGION] = LEGIONAIRE; Player.guildxp[LEGION] = 1; Player.str++; Player.con++; Player.maxstr++; Player.maxcon++; } } break; case COMMANDANT: print1("You find the disposition of your forces satisfactory."); break; case COLONEL: if ((Player.level > Commandantlevel) && find_and_remove_item(CORPSEID, DEMON_EMP)) { print1("You liberated the Demon Emperor's Regalia!"); morewait(); clearmsg(); print1("The Legion is assembled in salute to you!"); print2("The Regalia is held high for all to see and admire."); morewait(); clearmsg(); print1("Commandant "); nprint1(Commandant); nprint1(" promotes you to replace him,"); print2("and announces his own overdue retirement."); morewait(); clearmsg(); print1("You are the new Commandant of the Legion!"); print2("The Emperor's Regalia is sold for a ridiculous sum."); morewait(); clearmsg(); print1("You now know the Spell of Regeneration."); print2("Your training is complete. You get top salary."); strcpy(Commandant, Player.name); Commandantlevel = Player.level; Commandantbehavior = fixnpc(4); save_hiscore_npc(8); Spells[S_REGENERATE].known = true; Player.rank[LEGION] = COMMANDANT; Player.str += 2; Player.con += 2; Player.maxstr += 2; Player.maxcon += 2; SalaryAmount = 10000; } else if (Player.level <= Commandantlevel) { clearmsg(); print1("Your CO expresses satisfaction with your progress."); print2("But your service record does not yet permit promotion."); } else { clearmsg(); print1("Why do you come empty handed?"); print2("You must return with the Regalia of the Demon Emperor!"); } break; case FORCE_LEADER: clearmsg(); print1("Your CO expresses satisfaction with your progress."); if (Player.guildxp[LEGION] < merc_xps[Player.rank[LEGION]]) { print2("But your service record does not yet permit promotion."); } else { print2("You have been promoted to Legion Colonel!"); morewait(); print1("Your next promotion is contingent on the return of"); print2("the Regalia of the Demon Emperor."); morewait(); print1("The Demon Emperor holds court at the base of a volcano"); print2("to the far south, in the heart of a swamp."); morewait(); clearmsg(); print1("You have been taught the spell of heroism!"); print2("You are given advanced training, and a raise."); Spells[S_HERO].known = true; Player.rank[LEGION]=COLONEL; Player.str++; Player.con++; Player.maxstr++; Player.maxcon++; SalaryAmount = 5000; } break; case CENTURION: clearmsg(); print1("Your CO expresses satisfaction with your progress."); if (Player.guildxp[LEGION] < merc_xps[Player.rank[LEGION]]) { print2("But your service record does not yet permit promotion."); } else { print2("You are now a Legion Force-Leader!"); morewait(); clearmsg(); print1("You receive more training, and another raise."); Player.rank[LEGION]=FORCE_LEADER; Player.maxstr++; Player.str++; SalaryAmount = 2000; } break; case LEGIONAIRE: clearmsg(); print1("Your CO expresses satisfaction with your progress."); if (Player.guildxp[LEGION] < merc_xps[Player.rank[LEGION]]) { print2("But your service record does not yet permit promotion."); } else { print2("You are promoted to Legion Centurion!"); morewait(); clearmsg(); print1("You get advanced training, and a higher salary."); Player.rank[LEGION] = CENTURION; Player.maxcon++; Player.con++; SalaryAmount = 1000; } break; } }
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!'"); } } } }