forked from muspellsson/omega-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmtalk.c
794 lines (720 loc) · 20.6 KB
/
mtalk.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
/* omega copyright (c) 1987,1988,1989 by Laurence Raphael Brothers */
/* mtalk.c */
/* monster talk functions */
#include "glob.h"
/* The druid's altar is in the northern forest */
void m_talk_druid(pmt m)
{
int i;
pml curr;
if (! m_statusp(m,HOSTILE)) {
print1("The Archdruid raises a hand in greeting.");
if (! gamestatusp(SPOKE_TO_DRUID)) {
setgamestatus(SPOKE_TO_DRUID);
morewait();
print1("The Archdruid congratulates you on reaching his sanctum.");
print2("You feel competent.");
/* DAG gain_experience starts with a morewait as well... */
/* morewait(); */
gain_experience(300);
if (Player.patron == DRUID) {
print1("The Archdruid conveys to you the wisdom of nature....");
print2("You feel like a sage.");
morewait();
for(i=0;i<NUMRANKS;i++) {
if (Player.guildxp[i] > 0)
Player.guildxp[i] += 300;
}
}
}
mprint("Do you request a ritual of neutralization? [yn] ");
if (ynq() == 'y') {
if (Phase/2 == 6 || Phase/2 == 0) { /* full or new moon */
mprint("\"Unfortunately, I cannot perform a ritual of balance on");
if (Phase/2 == 6)
mprint("this lawful day.\"");
else
mprint("this chaotic day.\"");
}
else if (Phase/2 == 3 || Phase/2 == 9) { /* half moon */
mprint("You take part in today's holy celebration of balance...");
Player.alignment = 0;
Player.mana = calcmana();
if (Player.patron == DRUID)
gain_experience(200); /* if a druid wants to spend 2 days */
Time+=60; /* celebrating for 1600 xp, why not? */
hourly_check();
Time+=60;
hourly_check();
Time+=60;
hourly_check();
Time+=60;
hourly_check();
Time+=60;
hourly_check();
Time+=60;
hourly_check();
}
else {
mprint("The ArchDruid conducts a sacred rite of balance...");
if (Player.patron == DRUID) {
Player.alignment = 0;
Player.mana = calcmana();
}
else
Player.alignment -= Player.alignment*max(0, 10 - Player.level)/10;
/* the higher level the character is, the more set in his/her ways */
Time+=60;
hourly_check();
}
dataprint();
}
}
else {
mprint("The ArchDruid looks at you and cries: 'Unclean! Unclean!'");
disrupt(Player.x,Player.y,100);
mprint("This seems to have satiated his desire for vengeance.");
mprint("'Have you learned your lesson?' The ArchDruid asks. [yn] ");
/* WDT: this didn't used to have a 'y'. I'm not sure what was
* intended. */
if (ynq() != 'n') {
mprint("'I certainly hope so!' says the ArchDruid.");
for (curr = Level->mlist; curr; curr = curr->next)
m_status_reset(curr->m, HOSTILE);
m_vanish(m);
}
else {
mprint("'Idiot.' mutters the ArchDruid.");
p_damage(500,UNSTOPPABLE,"the ArchDruid's Vengeance");
}
}
}
void m_talk_silent(pmt m)
{
#ifdef NEW_QUOTES
int reply = random_range(8);
#else
int reply = random_range(4);
#endif
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
switch (reply) {
case 0:strcat(Str2," does not reply. "); break;
case 1:strcat(Str2," shrugs silently. "); break;
case 2:strcat(Str2," holds a finger to his mouth. "); break;
case 3:strcat(Str2," glares at you but says nothing. "); break;
case 4:strcat(Str2," is not going to answer you. "); break;
case 5:strcat(Str2," has taken a vow of silence. "); break;
case 6:strcat(Str2," attempts sign language. "); break;
case 7:strcat(Str2," fails to respond."); break;
}
mprint(Str2);
}
void m_talk_stupid(pmt m)
{
int reply = random_range(4);
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
switch (reply) {
case 0:strcat(Str2," looks at you with mute incomprehension."); break;
case 1:strcat(Str2," growls menacingly and ignores you."); break;
case 2:strcat(Str2," does not seem to have heard you."); break;
case 3:strcat(Str2," tries to pretend it didn't hear you."); break;
}
mprint(Str2);
}
void m_talk_greedy(pmt m)
{
int reply = random_range(4);
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
switch (reply) {
case 0:strcat(Str2," says: Give me a treasure.... ");break;
case 1:strcat(Str2," says: Stand and deliver, knave! "); break;
case 2:strcat(Str2," says: Your money or your life! "); break;
case 3:strcat(Str2," says: Yield or Die! "); break;
}
mprint(Str2);
}
void m_talk_hungry(pmt m)
{
int reply = random_range(4);
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
switch (reply) {
case 0:strcat(Str2," says: I hunger, foolish adventurer! "); break;
case 1:strcat(Str2," drools menacingly at you. "); break;
case 2:strcat(Str2," says: You're invited to be lunch! "); break;
case 3:strcat(Str2," says: Feeed Meee! "); break;
}
mprint(Str2);
}
void m_talk_guard(pmt m)
{
if (m_statusp(m,HOSTILE)) {
print1("'Surrender in the name of the Law!'");
print2("Do it? [yn] ");
if (ynq2()=='y') {
Player.alignment++;
if (Current_Environment == E_CITY) {
print1("Go directly to jail. Do not pass go, do not collect 200Au.");
print2("You are taken to the city gaol.");
morewait();
send_to_jail();
drawvision(Player.x,Player.y);
}
else {
clearmsg();
print1("Mollified, the guard disarms you and sends you away.");
dispose_lost_objects(1,Player.possessions[O_WEAPON_HAND]);
pacify_guards();
}
}
else {
clearmsg();
print1("All right, you criminal scum, you asked for it!");
}
}
else /* not hostile */
{
if ( (!CitySiteList[L_TOURIST-CITYSITEBASE][0]) &&
(Current_Environment == E_CITY) )
{
print1("You should visit the tourist information booth and get their guidebook.");
print2("The booth is located near the entrance to the city.");
morewait();
CitySiteList[L_TOURIST-CITYSITEBASE][0] = TRUE;
}
else
if (Player.rank[ORDER]>0)
print1("'Greetings comrade! May you always tread the paths of Law.'");
#ifdef NEW_QUOTES
else {
if (random_range(2))
print1("Move it right along, stranger!");
else print1("Nothing to see here.");
}
#else
else print1("Move it right along, stranger!");
#endif
}
}
void m_talk_mp(pmt m)
{
mprint("The mendicant priest asks you to spare some treasure for the needy");
}
void m_talk_titter(pmt m)
{
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
strcat(Str2," titters obscenely at you.");
mprint(Str2);
}
void m_talk_ninja(pmt m)
{
mprint("The black-garbed figure says apologetically:");
mprint("'Situree simasita, wakarimasen.'");
}
void m_talk_thief(pmt m)
{
if (Player.rank[THIEVES]) {
if (m->level == 2)
m->monstring = "sneak thief";
else m->monstring = "master thief";
print1("The cloaked figure makes a gesture which you recognize...");
print2("...the thieves' guild recognition signal!");
print3("'Sorry, mate, thought you were a mark....'");
morewait();
m_vanish(m);
}
else m_talk_man(m);
}
void m_talk_assassin(pmt m)
{
m->monstring = "master assassin";
print1("The ominous figure does not reply, but hands you an embossed card:");
print2("'Guild of Assassins Ops are forbidden to converse with targets.'");
}
void m_talk_im(pmt m)
{
pol tmp;
if (strcmp(m->monstring,"itinerant merchant") != 0) {
m->monstring = "itinerant merchant";
}
if (m->possessions == NULL)
mprint("The merchant says: Alas! I have nothing to sell!");
else {
m->possessions->thing->known = 2;
clearmsg();
mprint("I have a fine");
mprint(itemid(m->possessions->thing));
mprint("for only");
mlongprint(max(10,4*true_item_value(m->possessions->thing)));
mprint("Au.");
mprint("Want it? [yn] ");
if (ynq()=='y') {
if (Player.cash < (max(10,4*true_item_value(m->possessions->thing)))) {
if (Player.alignment > 10) {
mprint("Well, I'll let you have it for what you've got.");
Player.cash = 0;
gain_item(m->possessions->thing);
}
else mprint("Beat it, you deadbeat!");
}
else {
mprint("Here you are. Have a good day.");
Player.cash -= max(10,(4*item_value(m->possessions->thing)));
gain_item(m->possessions->thing);
}
}
else
{
mprint("Sorry I couldn't help you.");
free_obj( m->possessions->thing, TRUE );
}
tmp = m->possessions;
m->possessions = tmp->next;
free( tmp );
if (NULL != m->possessions)
{
mprint("Well then, I must be off. Good day.");
m_vanish(m);
}
}
}
void m_talk_man(pmt m)
{
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
switch (random_range(5)) {
case 0:strcat(Str2," asks you for the way home."); break;
case 1:strcat(Str2," wishes you a pleasant day."); break;
case 2:strcat(Str2," sneers at you contemptuously."); break;
case 3:strcat(Str2," smiles and nods."); break;
case 4:strcat(Str2," tells you a joke."); break;
}
mprint(Str2);
}
void m_talk_evil(pmt m)
{
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
switch (random_range(14)) {
case 0:strcat(Str2," says: 'THERE CAN BE ONLY ONE!'"); break;
case 1:strcat(Str2," says: 'Prepare to die, Buckwheat!'"); break;
case 2:strcat(Str2," says: 'Time to die!'"); break;
case 3:strcat(Str2," says: 'There will be no mercy.'"); break;
case 4:strcat(Str2," insults your mother-in-law."); break;
case 5:strcat(Str2," says: 'Kurav tu ando mul!'"); break;
case 6:strcat(Str2," says: '!va al infierno!'"); break;
case 7:strcat(Str2," says: 'dame desu, nee.'"); break;
case 8:strcat(Str2," spits on your rug and calls your cat a bastard.");
break;
case 9:strcat(Str2," snickers malevolently and draws a weapon."); break;
case 10:strcat(Str2," sends 'rm -r *' to your shell!"); break;
case 11:strcat(Str2," tweaks your nose and cackles evilly."); break;
case 12:strcat(Str2," thumbs you in the eyes."); break;
case 13:strcat(Str2," kicks you in the groin."); break;
}
mprint(Str2);
}
void m_talk_robot(pmt m)
{
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
switch (random_range(4)) {
case 0:strcat(Str2," says: 'exterminate...Exterminate...EXTERMINATE!!!'");
break;
case 1:strcat(Str2," says: 'Kill ... Crush ... Destroy'");
break;
case 2:strcat(Str2," says: 'Danger -- Danger'");
break;
case 3:strcat(Str2," says: 'Yo Mama -- core dumped.'");
break;
}
mprint(Str2);
}
void m_talk_slithy(pmt m)
{
mprint("It can't talk -- it's too slithy!");
}
void m_talk_mimsy(pmt m)
{
mprint("It can't talk -- it's too mimsy!");
}
void m_talk_burble(pmt m)
{
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
strcat(Str2," burbles hatefully at you.");
mprint(Str2);
}
void m_talk_beg(pmt m)
{
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
strcat(Str2," asks you for alms.");
mprint(Str2);
}
void m_talk_hint(pmt m)
{
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
if (m_statusp(m,HOSTILE)) {
strcat(Str2," only sneers at you. ");
mprint(Str2);
}
else {
strcat(Str2," whispers in your ear: ");
mprint(Str2);
hint();
m->talkf = M_TALK_SILENT;
}
}
void m_talk_gf(pmt m)
{
mprint("The good fairy glints: Would you like a wish?");
if (ynq()=='y') {
mprint("The good fairy glows: Are you sure?");
if (ynq()=='y') {
mprint("The good fairy radiates: Really really sure?");
if (ynq()=='y') {
mprint("The good fairy beams: I mean, like, sure as sure can be?");
if (ynq()=='y') {
mprint("The good fairy dazzles: You don't want a wish, right?");
if (ynq()=='y') mprint("The good fairy laughs: I thought not.");
else wish(0);
}
}
}
}
mprint("In a flash of sweet-smelling light, the fairy vanishes....");
Player.hp = max(Player.hp,Player.maxhp);
Player.mana = max(Player.mana,calcmana());
mprint("You feel mellow.");
m_vanish(m);
}
void m_talk_ef(pmt m)
{
mprint("The evil fairy roils: Eat my pixie dust!");
mprint("She waves her black-glowing wand, which screams thinly....");
m->movef=M_MOVE_SMART;
m->meleef=M_MELEE_POISON;
m->specialf=M_SP_THIEF;
m_status_set(m,HOSTILE);
acquire(-1);
bless(-1);
sleep_player(m->level/2);
summon(-1,-1);
summon(-1,-1);
summon(-1,-1);
summon(-1,-1);
}
void m_talk_seductor(pmt m)
{
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
if (Player.preference == 'n')
{
strcat(Str2, " notices your disinterest and leaves with a pout.");
mprint(Str2);
}
else
{
strcat(Str2," beckons seductively...");
mprint(Str2);
mprint("Flee? [yn] ");
if (ynq()=='y') {
mprint("You feel stupid.");
}
else {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
strcat(Str2," shows you a good time....");
mprint(Str2);
gain_experience(500);
Player.con++;
}
}
m_vanish(m);
}
void m_talk_demonlover(pmt m)
{
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
if (Player.preference == 'n')
{
strcat(Str2, " notices your disinterest and changes with a snarl...");
mprint(Str2);
morewait();
}
else
{
strcat(Str2," beckons seductively...");
mprint(Str2);
mprint("Flee? [yn] ");
if (ynq()=='y')
mprint("You feel fortunate....");
else {
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
strcat(Str2," shows you a good time....");
mprint(Str2);
morewait();
mprint("You feel your life energies draining...");
level_drain(random_range(3)+1,"a demon's kiss");
morewait();
}
}
m->talkf = M_TALK_EVIL;
m->meleef = M_MELEE_SPIRIT;
m->specialf = M_SP_DEMON;
m_status_reset(m,NEEDY);
m_status_set(m,HOSTILE);
if ((m->monchar&0xff) == 's') {
m->monchar = 'I'|CLR(RED);
m->monstring = "incubus";
}
else {
m->monchar = 'S'|CLR(RED);
m->monstring = "succubus";
}
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
strcat(Str2," laughs insanely.");
mprint(Str2);
mprint("You now notice the fangs, claws, batwings...");
}
void m_talk_horse(pmt m)
{
if (m_statusp(m,HOSTILE))
mprint("The horse neighs angrily at you.");
else if (m_statusp(m,HUNGRY))
mprint("The horse noses curiously at your pack.");
else if (gamestatusp(MOUNTED))
mprint("The horse and your steed don't seem to get along.");
else if (Current_Environment == Current_Dungeon)
mprint("The horse shies; maybe he doesn't like the dungeon air....");
else {
mprint("The horse lets you pat his nose. Want to ride him? [yn] ");
if (ynq()=='y') {
m_remove(m);
setgamestatus(MOUNTED);
calc_melee();
mprint("You are now equitating!");
}
}
}
void m_talk_hyena(pmt m)
{
mprint("The hyena only laughs at you...");
}
void m_talk_parrot(pmt m)
{
mprint("Polly wanna cracker?");
}
void m_talk_servant(pmt m)
{
int target,x=Player.x,y=Player.y;
if (m->id == SERV_LAW) {
target = SERV_CHAOS;
mprint("The Servant of Law pauses in thought for a moment.");
mprint("You are asked: Are there any Servants of Chaos hereabouts? [yn] ");
}
else {
target = SERV_LAW;
mprint("The Servant of Chaos grins mischievously at you.");
mprint("You are asked: Are there any Servants of Law hereabouts? [yn] ");
}
if (ynq()=='y') {
print1("Show me.");
show_screen();
drawmonsters(TRUE);
setspot(&x,&y);
if (Level->site[x][y].creature != NULL) {
if (Level->site[x][y].creature->id == target) {
mprint("The Servant launches itself towards its enemy.");
mprint("In a blaze of combat, the Servants annihilate each other!");
gain_experience(m->xpv);
m_death(Level->site[x][y].creature);
Level->site[m->x][m->y].creature = NULL;
m->x = x;
m->y = y;
Level->site[x][y].creature = m;
m_death(Level->site[x][y].creature);
}
else mprint("Right. Tell me about it. Idiot!");
}
else mprint("Right. Tell me about it. Idiot!");
}
else mprint("The servant shrugs and turns away.");
}
void m_talk_animal(pmt m)
{
if (m->uniqueness == COMMON) {
strcpy(Str2,"The ");
strcat(Str2,m->monstring);
}
else strcpy(Str2,m->monstring);
mprint(Str2);
mprint("shows you a scholarly paper by Dolittle, D. Vet.");
mprint("which demonstrates that animals don't have speech centers");
mprint("complex enough to communicate in higher languages.");
mprint("It giggles softly to itself and takes back the paper.");
}
void m_talk_scream(pmt m)
{
mprint("A thinly echoing scream reaches your ears....");
morewait();
mprint("You feel doomed....");
morewait();
mprint("A bird appears and flies three times widdershins around your head.");
summon(-1,QUAIL);
m->talkf = M_TALK_EVIL;
}
void m_talk_archmage(pmt m)
{
if (m_statusp(m,HOSTILE)) {
mprint("The Archmage ignores your attempt at conversation");
mprint("and concentrates on his spellcasting....");
}
else if (Current_Environment == E_COURT) {
mprint("The Archmage congratulates you on getting this far.");
mprint("He invites you to attempt the Throne of High Magic");
mprint("but warns you that it is important to wield the Sceptre");
mprint("before sitting on the throne.");
if (Level->site[m->x][m->y].p_locf == L_THRONE) {
mprint("The Archmage smiles and makes an arcane gesture....");
m_vanish(m);
}
}
else {
mprint("The Archmage tells you to find him again in his");
mprint("Magical Court at the base of his castle in the mountains");
mprint("of the far North-East; if you do he will give you some");
mprint("important information.");
}
}
void m_talk_maharaja(pmt m)
{
if (m_statusp(m,HOSTILE)) {
switch (random_range(4)) {
case 0: mprint("The Maharaja says: 'So Mote it be!'");
break;
case 1: mprint("The Maharaja says: 'Let it be written!'");
break;
case 2: mprint("The Maharaja says: 'Let it be done!'");
break;
case 3: mprint("The Maharaja offers you goat-eyeball soup.'");
break;
}
}
else if (Current_Environment == E_PALACE) {
mprint("The Maharaja insists that you leave. Or die.");
}
else {
mprint("Where did I put those dungeons?");
}
}
void m_talk_merchant(pmt m)
{
if (! m_statusp(m,HOSTILE)) {
if (Current_Environment == E_VILLAGE) {
mprint("The merchant asks you if you want to buy a horse for 250GP.");
mprint("Pay the merchant? [yn] ");
if (ynq()=='y') {
if (Player.cash < 250)
mprint("The merchant says: 'Come back when you've got the cash!'");
else {
Player.cash -= 250;
mprint("The merchant takes your money and tells you to select");
mprint("any horse you want in the stables.");
mprint("He says: 'You'll want to get to know him before trying to");
mprint("ride him. By the way, food for the horse is not included.'");
mprint("The merchant runs off toward the bank, cackling gleefully.");
m_vanish(m);
}
}
else mprint("The merchant tells you to stop wasting his time.");
}
else {
mprint("The merchant tells you to visit his stables at his village");
mprint("for a great deal on a horse.");
}
}
else {
mprint("The merchant ignores you and screams:");
mprint("'Help! Help! I'm being oppressed!'");
}
}
void m_talk_prime(pmt m)
{
if (!m_statusp(m,HOSTILE)) {
if (Current_Environment == E_CIRCLE) {
print1("The Prime nods brusquely at you, removes a gem from his");
print2("sleeve, places it on the floor, and vanishes wordlessly.");
morewait();
m_dropstuff(m);
m_vanish(m);
}
else {
print1("The Prime makes an intricate gesture, which leaves behind");
print2("glowing blue sparks... He winks mischievously at you....");
if (Player.rank[CIRCLE] > 0) {
morewait();
print1("The blue sparks strike you! You feel enhanced!");
print2("You feel more experienced....");
Player.pow+=Player.rank[CIRCLE];
Player.mana += calcmana();
gain_experience(1000);
m_vanish(m);
}
}
}
else m_talk_evil(m);
}