-
Notifications
You must be signed in to change notification settings - Fork 0
/
Profession.cpp
1289 lines (1151 loc) · 39.3 KB
/
Profession.cpp
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
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include "Global.h"
#include "Util.h"
#include "Creature.h"
#include "Profession.h"
#include "Object.h"
#include "Creature.h"
#include "Mutant.h"
#include "Hero.h"
shVector <shProfession *> Professions;
shProfession *Janitor;
shProfession *SoftwareEngineer;
shProfession *SpaceMarine;
shProfession *Quarterback;
shProfession *Psion;
shProfession *Astronaut;
shProfession *Ninja;
shProfession *Detective;
shProfession *Abductor;
shProfession *Dissident;
shProfession *Mastermind;
shProfession *Yautja;
shProfession *XelNaga;
/* LoreHelp.cpp: */
extern const char *processLoreLine (const char *src, const char *arg = NULL);
shProfession::shProfession (const char *name,
int hitdiesize,
int numskills,
int reflex,
int will,
shHeroInitFunction *f,
const char *t1,
const char *t2,
const char *t3,
const char *t4,
const char *t5,
const char *t6,
const char *t7,
const char *t8,
const char *t9,
const char *t10)
{
mId = Professions.add (this);
mName = name;
mHitDieSize = hitdiesize;
mNumPracticedSkills = numskills;
mReflexSaveBonus = reflex;
mWillSaveBonus = will;
mInitFunction = f;
mTitles[0] = t1;
mTitles[1] = t2;
mTitles[2] = t3;
mTitles[3] = t4;
mTitles[4] = t5;
mTitles[5] = t6;
mTitles[6] = t7;
mTitles[7] = t8;
mTitles[8] = t9;
mTitles[9] = t10;
}
static const shObjId commonlore[] = {
/* Everyone knows stormtroopers wear stormtrooper stuff. Almost. */
kObjStormtrooperHelmet,
kObjStormtrooperSuit,
kObjStormtrooperBoots,
/* Same with aquamarine and mean green marines. */
kObjAquamarinePH,
kObjAquamarinePA,
kObjMeanGreenPH,
kObjMeanGreenPA,
kObjDeepBluePA,
/* Elves too. */
kObjElvenJumpsuit,
kObjElvenSpaceSuit,
/* Standard issue weapons. */
kObjBlaster,
kObjPhaser,
kObjLaserPistol,
kObjLaserRifle
};
static const int numcommonfacts = sizeof (commonlore) / sizeof (shObjId);
static const shObjId humanlore[] = {
/* Humans and orcs recognize this stuff. */
kObjKevlarHelmet,
kObjKevlarJacket,
kObjAsbestosJacket,
kObjFlakJacket,
kObjSpaceHelmet,
kObjSpaceSuit,
kObjSpaceBoots,
kObjLaserCannon,
kObjMiningLaser
};
static const int numhumanfacts = sizeof (humanlore) / sizeof (shObjId);
static const shObjId orclore[] = {
/* Orcs know these well. */
kObjPowerClaw,
kObjPeaShooter
};
static const int numorcfacts = sizeof (orclore) / sizeof (shObjId);
static const shObjId reticulanlore[] = {
/* Reticulans recognize this stuff. Humans usually do not. */
kObjReticulanJumpsuit,
kObjBioArmor,
kObjEBioArmor1,
kObjEBioArmor2,
kObjEBioArmor3,
kObjZapGun,
kObjZapBaton
};
static const int numreticulanfacts = sizeof (reticulanlore) / sizeof (shObjId);
static const shObjId yautjalore[] = {
/* Predator stuff. */
kObjPlateArmor,
kObjBioMask,
kObjCloakingBelt,
kObjSmartDisc,
kObjWristBlade,
kObjCombiStick,
kObjRazorWhip,
kObjNetLauncher,
kObjSpeargun,
kObjPlasmaCaster,
kObjMedicomp,
kObjSatCom
};
static const int numyautjafacts = sizeof (yautjalore) / sizeof (shObjId);
static void
addKnowledge (const shObjId list[], int count)
{
for (int i = 0; i < count; ++i)
AllIlks[list[i]].mFlags |= kIdentified;
}
static void
addStartingEquipment (shHero *hero, const char *spec[], int count)
{
int ignore_and = 1;
int ignore_or = 1;
shObject *obj;
for (int i = 0; i < count; ++i) {
const char *desc = spec[i];
if (spec[i][0] == '|') {
if (!ignore_or) {
++desc;
ignore_and = 0;
ignore_or = 1;
} else {
ignore_and = 1;
continue;
}
} else if (spec[i][0] == ',') {
if (!ignore_and) {
++desc;
} else {
continue;
}
}
obj = createObject (desc, 0);
ignore_and = obj == NULL;
ignore_or = obj != NULL;
if (obj) {
obj->identify ();
if (hero->isOrc () and !obj->isBugProof ()) {
/* Orcs don't care as much. They get random bugginess. */
obj->resetBugginessKnown ();
obj->mBugginess = RNG (-1, +1);
if (obj->isA (kObjMasterKeycard) and obj->isBuggy ()) {
obj->mBugginess = RNG (2); /* Would suck if it was buggy. */
}
}
hero->addObjectToInventory (obj, 1);
if (obj->canBeWorn ()) {
hero->don (obj, 1);
} else if (obj->isA (kWeapon)) {
hero->wield (obj, 1);
}
}
}
hero->reorganizeInventory ();
}
struct skillData
{
shSkillCode skill;
int access;
int ranks;
};
static void
addSkills (shHero *hero, const skillData spec[], int count)
{
for (int i = 0; i < count; ++i) {
hero->addSkill (spec[i].skill, spec[i].access);
if (spec[i].ranks)
hero->gainRank (spec[i].skill, spec[i].ranks);
}
}
struct mutationData
{
shMutantPower power;
int access;
};
static void
addPowers (shHero *hero, const mutationData spec[], int count,
int powers, int ranks)
{
for (int i = 0; i < count; ++i) {
hero->addSkill (kMutantPower, spec[i].access, spec[i].power);
}
for (int i = 0; i < powers; ++i) {
int idx;
do {
idx = RNG (count);
} while (hero->mMutantPowers[spec[idx].power] >= 1 or
MutantPowers[spec[idx].power].mLevel >= 5);
hero->getMutantPower (spec[idx].power, 1);
hero->gainRank (kMutantPower, ranks, spec[idx].power);
}
}
void
showIntro (shHero *hero, const char *introLines[], int count)
{
char *buf = GetBuf ();
if (hero->isOrc ()) {
snprintf (buf, SHBUFLEN, "Hai %s!", hero->mName);
} else {
snprintf (buf, SHBUFLEN, "Greetings, %s the %s.",
hero->mName, hero->mProfession->mName);
}
shMenu *intro = I->newMenu (buf, shMenu::kNoPick);
for (int i = 0; i < count; ++i) {
const char *line = processLoreLine (introLines[i]);
intro->addPtrItem (' ', line, NULL);
}
intro->finish ();
delete intro;
}
static void
initSoftwareEngineer (shHero *hero)
{
hero->mIlkId = kMonEarthling;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 4;
hero->mGlyph.mTileY = 0;
hero->mProfession = SoftwareEngineer;
hero->rollAbilityScores (8, 8, 8, 12, 13, 6);
hero->mMaxHP = SoftwareEngineer->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());
hero->mInnateIntrinsics |= kBugSensing;
const skillData skills[] =
{
{kGrenade, 2, 0}, {kHandgun, 3, 0},
{kLightGun, 1, 0}, {kHeavyGun, 1, 0},
{kUnarmedCombat, 0, 0}, {kMeleeWeapon, 1, 0},
{kSword, 1, 0},
{kConcentration, 2, 0}, {kOpenLock, 3, 0},
{kRepair, 3, 0}, {kSearch, 3, 0},
{kHacking, 4, 2}, {kSpot, 2, 0}
};
addSkills (hero, skills, sizeof (skills) / sizeof (skillData));
addKnowledge (commonlore, numcommonfacts);
addKnowledge (humanlore, numhumanfacts);
const char *stuff[] =
{
"debugged +0 pea shooter",
"debugged +0 ordinary jumpsuit",
"debugged not protected clean +0 mini computer",
"clean not cracked floppy disk",
"clean not cracked floppy disk",
"clean not cracked floppy disk",
"66% clean not cracked floppy disk",
"33% clean not cracked floppy disk",
"1d2 debugged canisters of coffee",
"1d2 debugged rolls of duct tape",
"debugged restraining bolt",
"200 energy cells",
"2d100 buckazoids"
};
addStartingEquipment (hero, stuff, sizeof (stuff) / sizeof (char *));
}
static void
initSpaceMarine (shHero *hero)
{
hero->mIlkId = kMonEarthling;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 5;
hero->mGlyph.mTileY = 0;
hero->mProfession = SpaceMarine;
hero->rollAbilityScores (13, 12, 9, 11, 7, 8);
if (hero->mAbil.mStr < 10) {
hero->mAbil.mStr = 10;
hero->mMaxAbil.mStr = 10;
}
hero->mMaxHP = SpaceMarine->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());
const skillData skills[] =
{
{kGrenade, 3, 2}, {kHandgun, 4, 2},
{kLightGun, 4, 2}, {kHeavyGun, 4, 2},
{kUnarmedCombat, 3, 0}, {kMeleeWeapon, 3, 0},
{kSword, 1, 0},
{kConcentration, 0, 0}, {kOpenLock, 2, 0},
{kRepair, 2, 0}, {kSearch, 2, 0},
{kHacking, 0, 0}, {kSpot, 2, 0}
};
addSkills (hero, skills, sizeof (skills) / sizeof (skillData));
/* Professional knowledge: */
const shObjId proflore[] = {
kObjPowerFist,
kObjPlasmaPistol,
kObjPlasmaRifle,
kObjPlasmaCannon
};
addKnowledge (commonlore, numcommonfacts);
addKnowledge (humanlore, numhumanfacts);
addKnowledge (proflore, 4);
const char *stuff[] =
{
"100 energy cells",
"99 bullets",
"3d2 debugged +0 flares",
"debugged +1 flak jacket",
"debugged +0 ordinary pistol",
"debugged +0 pulse rifle",
"debugged motion tracker",
"2d10 buckazoids"
};
addStartingEquipment (hero, stuff, sizeof (stuff) / sizeof (char *));
const char *welcome[] =
{
"Two weeks. Two weeks trapped inside that damned cargo pod with only",
"the requisition clerkbot to keep company. And the terrors outside. You",
"told him. YOU TOLD HIM. Don't buy those damn \"krab patties\", Johnny.",
"You don't know what that \"krab\" is, you never know with these backwater",
"agriworlds! He laughed on you. You told them. I wouldn't eat those damn",
"\"krab patties\" guys, Johnny bought'em off a weird looking yellow guy",
"in a fishbowl! They scorned you, and their laughter echoed through the",
"mess hall. Go eat your frozen earth shitburgers, they said. You're being",
"hypochondriac, these krab patties are awesome - but don't worry, I'll",
"take yours. And they laughed.",
"",
"WELL WHO'S LAUGHING NOW WITH HIS GUTS SPRAYED ALL OVER THE DINNER TABLE,",
"JOHNNY?! WHO'S LAUGHING WITH HIS LUNGS OOZING OUT OF HIS EXPLODED CHEST?!!",
"",
"Not me! I'm getting out of this graveyard ship, and calling back to command,",
"however long it takes. I'm going to be the most frickin' condecorated marine",
"this side of the Perdus rift. And your sorry asses will rot in that",
"MOTHERFUCKING DEATH TRAP FOREVER!!!",
"",
"So long, bastards.",
"",
"~*heroname*"
};
showIntro (hero, welcome, sizeof (welcome) / sizeof (char *));
}
static void
initQuarterback (shHero *hero)
{
hero->mIlkId = kMonEarthling;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 10;
hero->mGlyph.mTileY = 0;
hero->mProfession = Quarterback;
hero->rollAbilityScores (12, 10, 13, 12, 7, 10);
hero->mMaxHP = Quarterback->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());
const skillData skills[] =
{
{kGrenade, 4, 2}, {kHandgun, 2, 0},
{kLightGun, 2, 0}, {kHeavyGun, 2, 0},
{kUnarmedCombat, 4, 0}, {kMeleeWeapon, 3, 0},
{kSword, 2, 0},
{kConcentration, 2, 0}, {kOpenLock, 0, 0},
{kRepair, 0, 0}, {kSearch, 2, 0},
{kHacking, 0, 0}, {kSpot, 4, 2}
};
addSkills (hero, skills, sizeof (skills) / sizeof (skillData));
addKnowledge (commonlore, numcommonfacts);
addKnowledge (humanlore, numhumanfacts);
const char *stuff[] =
{
"debugged +0 set of football pads",
"debugged +0 football helmet",
"1 debugged +3 football",
"200 energy cells",
"6 debugged canisters of beer",
"3d100 buckazoids"
};
addStartingEquipment (hero, stuff, sizeof (stuff) / sizeof (char *));
}
static void
initPsion (shHero *hero)
{
hero->mIlkId = kMonEarthling;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 7;
hero->mGlyph.mTileY = 0;
hero->mProfession = Psion;
hero->rollAbilityScores (7, 10, 8, 7, 11, 15);
if (hero->mAbil.mPsi < 14) {
hero->mAbil.mPsi = 14;
hero->mMaxAbil.mPsi = 14;
}
hero->mMaxHP = Psion->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());
const skillData skills[] =
{
{kGrenade, 1, 0}, {kHandgun, 2, 1},
{kLightGun, 1, 0}, {kHeavyGun, 1, 0},
{kUnarmedCombat, 1, 0}, {kMeleeWeapon, 1, 0},
{kSword, 4, 0},
{kConcentration, 4, 0}, {kOpenLock, 1, 0},
{kRepair, 1, 0}, {kSearch, 3, 0},
{kHacking, 0, 0}, {kSpot, 2, 0}
};
addSkills (hero, skills, sizeof (skills) / sizeof (skillData));
const mutationData powers[] =
{
{kIllumination, 4}, {kDigestion, 4},
{kHypnosis, 4}, {kRegeneration, 4},
{kOpticBlast, 4}, {kHaste, 4},
{kTelepathyPower, 4}, {kTremorsensePower, 4},
{kShootWebs, 4}, {kMentalBlast, 4},
{kRestoration, 4}, {kAdrenalineControl, 4},
{kXRayVisionPower, 4}, /*{kTelekinesis, 4},*/
/*{kInvisibility, 4}, {kCharm, 4},*/
{kTeleport, 4}, {kPsionicStorm, 3}
};
addPowers (hero, powers, sizeof (powers) / sizeof (mutationData), 2, 2);
addKnowledge (commonlore, numcommonfacts);
addKnowledge (humanlore, numhumanfacts);
const char *stuff[] =
{
"debugged +1 laser pistol",
"debugged +1 ordinary jumpsuit",
"debugged pair of sunglasses",
"200 energy cells",
"2 debugged canisters of Nano-Cola",
"1 debugged canister of healing",
"1 debugged canister of RadAway",
"2d10 buckazoids"
};
addStartingEquipment (hero, stuff, sizeof (stuff) / sizeof (char *));
}
static void
initJanitor (shHero *hero)
{
hero->mIlkId = kMonSpaceOrc;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 6;
hero->mGlyph.mTileY = 0;
hero->mProfession = Janitor;
hero->rollAbilityScores (10, 12, 10, 12, 8, 8);
hero->mMaxHP = Janitor->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());
const skillData skills[] =
{
{kGrenade, 1, 0}, {kHandgun, 1, 0},
{kLightGun, 2, 0}, {kHeavyGun, 1, 0},
{kUnarmedCombat, 3, 0}, {kMeleeWeapon, 4, 0},
{kSword, 2, 0},
{kConcentration, 2, 0}, {kOpenLock, 0, 0},
{kRepair, 4, 2}, {kSearch, 4, 2},
{kHacking, 0, 0}, {kSpot, 4, 2}
};
addSkills (hero, skills, sizeof (skills) / sizeof (skillData));
addKnowledge (commonlore, numcommonfacts);
addKnowledge (humanlore, numhumanfacts);
addKnowledge (orclore, numorcfacts);
const char *stuff[] =
{
"debugged +1 mop",
"debugged +0 janitor uniform",
"debugged +1 pair of sturdy boots",
"debugged canister of super glue",
"optimized +0 monkey wrench",
"debugged master keycard",
"debugged restraining bolt",
"75 energy cells",
"1d100 buckazoids"
};
addStartingEquipment (hero, stuff, sizeof (stuff) / sizeof (char *));
const char *welcome[] =
{
"Oi kusin Noshkop!",
"",
"Ya recall dat blabbing bout putting ol' Skragashuv back in biznes?",
"",
"Well me found one of dem Ur Magnetrons ya need for the warp",
"gubbinz to rev up.",
"",
"I gab it all cleverly thott.",
"",
"Dere's dis Space Base, wiv all sorta loot, an a Ur Mangegubbin",
"sittin' all alone in da bottom. An dey lookin' fer a jenitar!",
"",
"Dis 'janiter' is s'posed to go into dis 'ulk an get rid of any",
"panzees, beekees, roaches sittin' dere an clean up all da mess",
"dem making in the 'ulk.",
"",
"Sum one to \"clean da mess up\"! Got it!?",
"",
"Im sure gonna lick da place clean. I Can go anywhere I like cos",
"I'm some sorta junitor, anything dats not bolted to da floor is",
"mine, an nobody's messin wiv meh cos I'm a ork."
"",
"So you start savin' dem teef cus Im a bringin dat magnefing.",
"",
"Oh if you'z not up fer it, dun worry, Ill just clobber you up da",
"head so bad you'll be seein stars by day but no bad feelins kusin.",
"",
"~*heroname*"
};
showIntro (hero, welcome, sizeof (welcome) / sizeof (char *));
}
static void
initAstronaut (shHero *hero) //Psiweapon keeps screwing around
{
hero->mIlkId = kMonEarthling;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 8;
hero->mGlyph.mTileY = 0;
hero->mProfession = Astronaut;
hero->rollAbilityScores (8, 10, 10, 12, 12, 10);
hero->mMaxHP = Astronaut->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());
const skillData skills[] =
{
{kGrenade, 1, 0}, {kHandgun, 3, 0},
{kLightGun, 2, 0}, {kHeavyGun, 1, 0},
{kUnarmedCombat, 3, 1}, {kMeleeWeapon, 1, 0},
{kSword, 0, 0},
{kConcentration, 2, 0}, {kOpenLock, 1, 0},
{kRepair, 3, 1}, {kSearch, 3, 2},
{kHacking, 2, 0}, {kSpot, 4, 0}
};
addSkills (hero, skills, sizeof (skills) / sizeof (skillData));
addKnowledge (commonlore, numcommonfacts);
addKnowledge (humanlore, numhumanfacts);
//HAHAHA NO WEAPON! SUCKER! (well some of a challenge!)
const char *stuff[] =
{
"debugged +0 radiation suit",
"debugged +0 space helmet",
"debugged +0 pair of space boots",
"debugged -3 space suit",
"1 optimized canister of antimatter",
"1 optimized canister of healing",
"1 optimized canister of water",
"(200 charges) small energy tank",
"optimized tricorder"
};
addStartingEquipment (hero, stuff, sizeof (stuff) / sizeof (char *));
const char *welcome[] =
{
"You had been tasked with the first test flight of the Quantum IV",
"hyperspace engine. Just as you flew clear of any gravity wells, you",
"deccelerated and began recording the experiment logs. Main power",
"diverted to the prototype engine, all systems green. All systems? No!",
"The flux capacitor displays in red! Without a second thought, you fasten",
"your space helmet on, and with an adept kick you deftly propel yourself",
"to an emergency pod, all the while screaming OH SHIT OH SHIT OH SHIT",
"at the top of your lungs.",
"",
"From a couple miles away, you see the spaceship liquefy and fold into",
"itself as it's sucked away from within by some sort of warp-hole.",
"You broadcast what you think are your last words, full with excrement",
"slang and considerations about the dubious parentage and upbringing",
"of the shipyard CEO, among other colorful expletives.",
"",
"After passing out from a panic attack, and through the warp rift, you find",
"yourself orbiting a derelict asteroid turned space station. With nothing",
"to lose except your life, you dock and set out to explore its bowels."
};
showIntro (hero, welcome, sizeof (welcome) / sizeof (char *));
}
static void
initMastermind (shHero *hero)
{
hero->mIlkId = kMonTallGreyAlien;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 3;
hero->mGlyph.mTileY = 0;
hero->mProfession = Mastermind;
/* The -2 penalty is for activated telepathy on the start. */
hero->rollAbilityScores (7, 7, 12, 10, 14, 16 - 2);
hero->mMaxHP = Mastermind->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());
const skillData skills[] =
{
{kGrenade, 2, 0}, {kHandgun, 2, 1},
{kLightGun, 2, 0}, {kHeavyGun, 1, 0},
{kUnarmedCombat, 3, 1}, {kMeleeWeapon, 1, 0},
{kSword, 2, 0},
{kConcentration, 4, 0}, {kOpenLock, 3, 0},
{kRepair, 1, 0}, {kSearch, 2, 0},
{kHacking, 0, 0}, {kSpot, 3, 0}
};
addSkills (hero, skills, sizeof (skills) / sizeof (skillData));
hero->mMutantPowers[kTelepathyPower] = 2; /* Posessed and activated. */
hero->telepathy (1);
const mutationData powers[] =
{
{kIllumination, 4}, {kDigestion, 4},
{kHypnosis, 4}, {kRegeneration, 4},
/*{kOpticBlast, 0},*/ {kHaste, 4},
{kTelepathyPower, 4}, {kTremorsensePower, 4},
/*{kShootWebs, 0},*/ {kMentalBlast, 4},
{kRestoration, 4}, {kAdrenalineControl, 4},
{kXRayVisionPower, 4}, /*{kTelekinesis, 4},*/
/*{kInvisibility, 4}, {kCharm, 4},*/
{kTeleport, 4}, {kPsionicStorm, 3}
};
addPowers (hero, powers, sizeof (powers) / sizeof (mutationData), 2, 1);
hero->gainRank (kMutantPower, 2, kTelepathyPower);
addKnowledge (commonlore, numcommonfacts);
addKnowledge (reticulanlore, numreticulanfacts);
const char *stuff[] =
{
"not buggy +0 anal probe",
"debugged +1 reticulan jumpsuit",
"debugged +0 energy dome",
"optimized +1 reticulan zap gun",
"150 energy cells",
"2 optimized canisters of nano cola",
"optimized canister of full healing"
};
addStartingEquipment (hero, stuff, sizeof (stuff) / sizeof (char *));
}
static void
initDissident (shHero *hero)
{
hero->mIlkId = kMonLittleGreyAlien;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 1;
hero->mGlyph.mTileY = 0;
hero->mProfession = Dissident;
hero->rollAbilityScores (8, 6, 10, 14, 16, 8);
hero->mMaxHP = Dissident->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());
const skillData skills[] =
{
{kGrenade, 2, 0}, {kHandgun, 1, 0},
{kLightGun, 3, 1}, {kHeavyGun, 3, 0},
{kUnarmedCombat, 0, 0}, {kMeleeWeapon, 2, 1},
{kSword, 0, 0},
{kConcentration, 1, 0}, {kOpenLock, 2, 0},
{kRepair, 2, 0}, {kSearch, 2, 0},
{kHacking, 3, 1}, {kSpot, 3, 0}
};
addSkills (hero, skills, sizeof (skills) / sizeof (skillData));
addKnowledge (commonlore, numcommonfacts);
addKnowledge (reticulanlore, numreticulanfacts);
const char *stuff[] =
{
"optimized +0 reticulan bio armor",
"debugged stabilizer belt",
"debugged not protected clean +0 bio computer",
"clean not cracked floppy disk",
"clean not cracked floppy disk",
"3 debugged grenades",
"debugged +0 laser rifle",
"200 energy cells",
"debugged +1 reticulan zap baton"
};
addStartingEquipment (hero, stuff, sizeof (stuff) / sizeof (char *));
}
static void
initAbductor (shHero *hero)
{
hero->mIlkId = kMonLittleGreyAlien;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 2;
hero->mGlyph.mTileY = 0;
hero->mProfession = Abductor;
hero->rollAbilityScores (6, 6, 10, 12, 14, 14 - 2);
hero->mMaxHP = Abductor->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());
const skillData skills[] =
{
{kGrenade, 3, 0}, {kHandgun, 2, 1},
{kLightGun, 2, 0}, {kHeavyGun, 2, 0},
{kUnarmedCombat, 0, 0}, {kMeleeWeapon, 3, 1},
{kSword, 0, 0},
{kConcentration, 4, 0}, {kOpenLock, 3, 0},
{kRepair, 2, 0}, {kSearch, 3, 0},
{kHacking, 0, 0}, {kSpot, 4, 2}
};
addSkills (hero, skills, sizeof (skills) / sizeof (skillData));
/* Start with telepathy activated already. Since this avoids -2 to
max psionics Abductors get penalized for this in ability roll. */
hero->mMutantPowers[kTelepathyPower] = 2;
hero->telepathy (1);
addKnowledge (commonlore, numcommonfacts);
addKnowledge (reticulanlore, numreticulanfacts);
const char *stuff[] =
{
"optimized +1 reticulan jumpsuit",
"debugged +0 space helmet",
"debugged shield belt",
"300 energy cells",
"optimized +0 anal probe",
"not buggy ray gun",
"debugged +0 reticulan zap gun",
"2 debugged canisters of healing"
};
addStartingEquipment (hero, stuff, sizeof (stuff) / sizeof (char *));
}
static void
initNinja (shHero *hero)
{
hero->mIlkId = kMonEarthling;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 0;
hero->mGlyph.mTileY = 0;
hero->mProfession = Ninja;
hero->rollAbilityScores (13, 10, 10, 13, 8, 8);
hero->mMaxHP = Ninja->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());
const skillData skills[] =
{
{kGrenade, 3, 1}, {kHandgun, 3, 0},
{kLightGun, 2, 0}, {kHeavyGun, 2, 0},
{kUnarmedCombat, 2, 0}, {kMeleeWeapon, 3, 0},
{kSword, 4, 1},
{kConcentration, 2, 0}, {kOpenLock, 4, 2},
{kRepair, 0, 0}, {kSearch, 2, 0},
{kHacking, 2, 0}, {kSpot, 4, 0}
};
addSkills (hero, skills, sizeof (skills) / sizeof (skillData));
/* Professional knowledge: */
const shObjId proflore[] = {
kObjNunchucks,
kObjShuriken,
kObjBo
};
addKnowledge (commonlore, numcommonfacts);
addKnowledge (humanlore, numhumanfacts);
addKnowledge (proflore, 3);
/* Up to three additional implant types known at the start. */
for (int i = RNG (1, 3); i > 0; --i) {
shObjId imp = (shObjId) RNG (kObjFirstImplant, kObjLastImplant);
AllIlks[imp].mFlags |= kIdentified;
}
const char *stuff[] =
{
"3 debugged +0 frag grenades",
"50% 1 debugged +0 frag grenade",
"optimized +0 katana",
"optimized +1 chameleon suit",
"debugged lock pick",
"25% debugged pair of scouter goggles",
"| 33% debugged pair of night vision goggles",
"| 50% debugged pair of x-ray goggles",
"| debugged pair of targeter goggles",
"debugged +2 beneficial implant"
};
addStartingEquipment (hero, stuff, sizeof (stuff) / sizeof (char *));
const char *welcome[] =
{ /* Dead Cold style purposeful arrival. */
"You have come here bearing the body",
"of your mentor. It was his request",
"that interrment be performed here.",
"",
"Oddly, the station gave no response",
"to your docking request. You pull",
"into an open shuttle bay and prepare",
"to disembark."
};
showIntro (hero, welcome, sizeof (welcome) / sizeof (char *));
}
/*
static void
initDetective (shHero *hero)
{
hero->mIlkId = kMonEarthling;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 9;
hero->mGlyph.mTileY = 0;
hero->mProfession = Detective;
hero->rollAbilityScores (10, 12, 10, 13, 11, 8);
hero->mMaxHP = Detective->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());
const skillData skills[] =
{
{kGrenade, 1, 0}, {kHandgun, 4, 2},
{kLightGun, 2, 0}, {kHeavyGun, 0, 0},
{kUnarmedCombat, 3, 0}, {kMeleeWeapon, 1, 0},
{kSword, 0, 0},
{kConcentration, 2, 0}, {kOpenLock, 3, 0},
{kRepair, 0, 0}, {kSearch, 3, 2},
{kHacking, 0, 0}, {kSpot, 2, 0}
};
addSkills (hero, skills, sizeof (skills) / sizeof (skillData));
addKnowledge (commonlore, numcommonfacts);
addKnowledge (humanlore, numhumanfacts);
const char *stuff[] =
{
"debugged +0 Khan heavy pistol",
"debugged +0 badass trenchcoat",
"bullets",
"bullets",
"1d2 debugged canisters of coffee",
"debugged detective license",
"debugged flashlight",
"10 energy cells"
};
addStartingEquipment (hero, stuff, sizeof (stuff) / sizeof (char *));
}
*/
static void
initYautja (shHero *hero)
{
hero->mIlkId = kMonYautja;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 11;
hero->mGlyph.mTileY = 0;
hero->mProfession = Yautja;
hero->rollAbilityScores (12, 15, 8, 10, 10, 5);
if (hero->mAbil.mCon < 12) {
hero->mAbil.mCon = 12;
hero->mMaxAbil.mCon = 12;
}
hero->mMaxHP = Yautja->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());
hero->mInnateIntrinsics |= kJumpy;
const skillData skills[] =
{
{kGrenade, 4, 0}, {kHandgun, 3, 0},
{kLightGun, 3, 0}, {kHeavyGun, 2, 0},
{kUnarmedCombat, 4, 0}, {kMeleeWeapon, 4, 0},
{kSword, 0, 0},
{kConcentration, 1, 0}, {kOpenLock, 0, 0},
{kRepair, 2, 0}, {kSearch, 1, 0},
{kHacking, 1, 0}, {kSpot, 3, 1}
};
addSkills (hero, skills, sizeof (skills) / sizeof (skillData));
addKnowledge (yautjalore, numyautjafacts);
const char *stuff[] =
{
"debugged +0 plate armor",
"debugged +0 bio-mask",
"debugged cloaking belt",
"100 energy cells",
"buggy glory device",
"debugged not protected clean +0 sat-com computer",
"debugged (40 charges) medicomp"
};
addStartingEquipment (hero, stuff, sizeof (stuff) / sizeof (char *));
const char *ranged[] =
{
"debugged +0 net launcher",
", 8d4 web caskets",
"debugged +0 plasma caster",
", 200 energy cells",
"debugged +0 speargun rifle",
", 20d2 spearhead darts",
"debugged +0 Smart-Disc",
", debugged clean not cracked floppy disk of Smart-Disc recall"
};
int rngwpn = RNG (4);
addStartingEquipment (hero, &ranged[rngwpn * 2], 2);
hero->gainRank (rngwpn <= 1 ? kHandgun :
rngwpn == 2 ? kLightGun : kGrenade, 2);
const char *melee[] =
{
"optimized +0 wrist blade",
"debugged +0 razor whip",
"debugged +0 combi-stick"
};
int melwpn = RNG (3);
addStartingEquipment (hero, &melee[melwpn], 1);
hero->gainRank (melwpn == 0 ? kUnarmedCombat : kMeleeWeapon, 2);
}
static void
initXelNaga (shHero *hero)
{
hero->mIlkId = kMonXelNaga;
hero->mGlyph = hero->myIlk ()->mGlyph;
hero->mGlyph.mTileX = 12;
hero->mGlyph.mTileY = 0;
hero->mProfession = XelNaga;
hero->rollAbilityScores (9, 9, 9, 9, 9, 9);
hero->mMaxHP = XelNaga->mHitDieSize +
ABILITY_MODIFIER (hero->getCon ());