Skip to content

Commit e1e5d3f

Browse files
committed
Clean up role-specific bits for Draugr.
Draugr can be Barbarians, Convicts, Infidels, Knights, or Rogues. This commits implements a bit of a kludge so when someone playing as Draugr race and these roles, spell skills are negated as they can never cast spells. Also in this commit - Draugr (sans Convicts) will start with at least 5 eggs in inventory. Since they can only eat brains, meat-based corpses and eggs, start them out with at least something to tide them over at the beginning.
1 parent 1930f3e commit e1e5d3f

File tree

4 files changed

+373
-7
lines changed

4 files changed

+373
-7
lines changed

doc/evilhack-changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -3426,4 +3426,5 @@ The following changes to date are:
34263426
- Revival routine for Draugr race
34273427
- Draugr and critical hits from Sunsword/The Hammer of the Gods
34283428
- Draugr really are undead
3429+
- Clean up role-specific bits for Draugr
34293430

src/role.c

+236-1
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,227 @@ const struct Role race_roles[] = {
787787
{ { 0, 0 } }
788788
};
789789

790+
/* Draugr roles */
791+
const struct Role draugr_roles[] = {
792+
{ { "Barbarian", 0 },
793+
{ { "Plunderer", "Plunderess" },
794+
{ "Pillager", 0 },
795+
{ "Bandit", 0 },
796+
{ "Brigand", 0 },
797+
{ "Raider", 0 },
798+
{ "Reaver", 0 },
799+
{ "Slayer", 0 },
800+
{ "Chieftain", "Chieftainess" },
801+
{ "Conqueror", "Conqueress" } },
802+
"Mitra", "Crom", "Set", /* Hyborian */
803+
"Bar",
804+
"the Camp of the Duali Tribe",
805+
"the Duali Oasis",
806+
PM_BARBARIAN,
807+
NON_PM,
808+
NON_PM,
809+
PM_PELIAS,
810+
PM_CHIEFTAIN,
811+
PM_THOTH_AMON,
812+
PM_OGRE,
813+
PM_TROLL,
814+
S_OGRE,
815+
S_TROLL,
816+
ART_RING_OF_P_HUL,
817+
MH_HUMAN | MH_DWARF | MH_ORC | MH_GIANT | MH_CENTAUR
818+
| MH_TORTLE | MH_DRAUGR,
819+
ROLE_MALE | ROLE_FEMALE | ROLE_NEUTRAL | ROLE_CHAOTIC,
820+
/* Str Int Wis Dex Con Cha */
821+
{ 16, 7, 7, 15, 16, 6 },
822+
{ 30, 6, 7, 20, 30, 7 },
823+
/* Init Lower Higher */
824+
{ 14, 0, 0, 10, 2, 0 }, /* Hit points */
825+
{ 1, 0, 0, 1, 0, 1 },
826+
10, /* Energy */
827+
10,
828+
14,
829+
0,
830+
0,
831+
8,
832+
A_INT,
833+
0,
834+
-4 },
835+
{ { "Convict", 0 },
836+
{ { "Detainee", 0 },
837+
{ "Inmate", 0 },
838+
{ "Jail-bird", 0 },
839+
{ "Prisoner", 0 },
840+
{ "Outlaw", 0 },
841+
{ "Crook", 0 },
842+
{ "Desperado", 0 },
843+
{ "Felon", 0 },
844+
{ "Fugitive", 0 } },
845+
"Ilmater", "Grumbar", "_Tymora", /* Faerunian */
846+
"Con",
847+
"Castle Waterdeep Dungeon",
848+
"the Warden's Level",
849+
PM_CONVICT,
850+
NON_PM,
851+
PM_SEWER_RAT,
852+
PM_ROBERT_THE_LIFER,
853+
PM_INMATE,
854+
PM_WARDEN_ARIANNA,
855+
PM_GIANT_BEETLE,
856+
PM_SOLDIER_ANT,
857+
S_RODENT,
858+
S_SPIDER,
859+
ART_STRIPED_SHIRT_OF_LIBERATIO,
860+
MH_HUMAN | MH_DWARF | MH_GNOME | MH_ORC | MH_HOBBIT
861+
| MH_ILLITHID | MH_DROW | MH_DRAUGR,
862+
ROLE_MALE | ROLE_FEMALE | ROLE_CHAOTIC | ROLE_NORACEALIGN,
863+
/* Str Int Wis Dex Con Cha */
864+
{ 10, 7, 7, 7, 13, 6 },
865+
{ 20, 20, 10, 20, 20, 10 },
866+
/* Init Lower Higher */
867+
{ 8, 0, 0, 8, 0, 0 }, /* Hit points */
868+
{ 1, 0, 0, 1, 0, 1 },
869+
10, /* Energy */
870+
-10,
871+
5,
872+
0,
873+
2,
874+
10,
875+
A_INT,
876+
0,
877+
-4 },
878+
{ { "Infidel", 0 },
879+
{ { "Apostate", 0 },
880+
{ "Heathen", 0 },
881+
{ "Heretic", 0 },
882+
{ "Idolater", "Idolatress" },
883+
{ "Cultist", 0 },
884+
{ "Splanchomancer", 0 },
885+
{ "Maleficus", "Malefica" },
886+
{ "Demonologist", 0 },
887+
{ "Heresiarch", 0 } },
888+
0, 0, 0, /* uses a random role's pantheon */
889+
"Inf",
890+
"the Hidden Temple",
891+
"the Howling Forest",
892+
PM_INFIDEL,
893+
NON_PM,
894+
PM_LESSER_HOMUNCULUS,
895+
PM_ARCHBISHOP_OF_MOLOCH,
896+
PM_CULTIST,
897+
PM_PALADIN,
898+
PM_AGENT,
899+
PM_CHAMPION,
900+
S_DOG,
901+
S_UNICORN,
902+
ART_IDOL_OF_MOLOCH,
903+
MH_HUMAN | MH_ELF | MH_ORC | MH_ILLITHID | MH_GIANT
904+
| MH_CENTAUR | MH_DROW | MH_DRAUGR,
905+
ROLE_MALE | ROLE_FEMALE | ROLE_CHAOTIC, /* actually unaligned */
906+
/* Str Int Wis Dex Con Cha */
907+
{ 7, 7, 10, 7, 7, 7 },
908+
{ 20, 10, 25, 15, 20, 10 },
909+
/* Init Lower Higher */
910+
{ 10, 0, 0, 8, 1, 0 }, /* Hit points */
911+
{ 4, 3, 0, 1, 0, 2 },
912+
10, /* Energy */
913+
10,
914+
3,
915+
1,
916+
2,
917+
10,
918+
A_WIS,
919+
0,
920+
-4 },
921+
{ { "Dark Knight", 0 },
922+
{ { "Sniveler", 0 },
923+
{ "Pawn", 0 },
924+
{ "Brute", 0 },
925+
{ "Mercenary", 0 },
926+
{ "Blackguard", 0 },
927+
{ "Turncoat", 0 },
928+
{ "Knave", "Vixen" },
929+
{ "Dark Baron", "Dark Baroness" },
930+
{ "Dark Paladin", 0 } },
931+
"Lugh", "_Brigit", "Manannan Mac Lir", /* Celtic */
932+
"Kni",
933+
"Camelot Castle",
934+
"the Isle of Glass",
935+
PM_KNIGHT,
936+
NON_PM,
937+
PM_PONY,
938+
PM_KING_ARTHUR,
939+
PM_PAGE,
940+
PM_IXOTH,
941+
PM_QUASIT,
942+
PM_OCHRE_JELLY,
943+
S_IMP,
944+
S_JELLY,
945+
ART_MAGIC_MIRROR_OF_MERLIN,
946+
MH_HUMAN | MH_DWARF | MH_ELF | MH_ORC | MH_CENTAUR
947+
| MH_DROW | MH_DRAUGR,
948+
ROLE_MALE | ROLE_FEMALE | ROLE_LAWFUL | ROLE_CHAOTIC,
949+
/* Str Int Wis Dex Con Cha */
950+
{ 13, 7, 14, 8, 10, 17 },
951+
{ 30, 15, 15, 10, 20, 10 },
952+
/* Init Lower Higher */
953+
{ 14, 0, 0, 8, 2, 0 }, /* Hit points */
954+
{ 1, 4, 0, 1, 0, 2 },
955+
10, /* Energy */
956+
10,
957+
8,
958+
-2,
959+
0,
960+
9,
961+
A_WIS,
962+
0,
963+
-4 },
964+
{ { "Rogue", 0 },
965+
{ { "Footpad", 0 },
966+
{ "Cutpurse", 0 },
967+
{ "Rogue", 0 },
968+
{ "Pilferer", 0 },
969+
{ "Robber", 0 },
970+
{ "Burglar", 0 },
971+
{ "Filcher", 0 },
972+
{ "Magsman", "Magswoman" },
973+
{ "Thief", 0 } },
974+
"Issek", "Mog", "Kos", /* Nehwon */
975+
"Rog",
976+
"the Thieves' Guild Hall",
977+
"the Assassins' Guild Hall",
978+
PM_ROGUE,
979+
NON_PM,
980+
NON_PM,
981+
PM_MASTER_OF_THIEVES,
982+
PM_THUG,
983+
PM_MASTER_ASSASSIN,
984+
PM_LEPRECHAUN,
985+
PM_GUARDIAN_NAGA,
986+
S_NYMPH,
987+
S_NAGA,
988+
ART_MASTER_KEY_OF_THIEVERY,
989+
MH_HUMAN | MH_ELF | MH_ORC | MH_HOBBIT | MH_GNOME
990+
| MH_DROW | MH_DRAUGR,
991+
ROLE_MALE | ROLE_FEMALE | ROLE_NEUTRAL | ROLE_CHAOTIC,
992+
/* Str Int Wis Dex Con Cha */
993+
{ 7, 7, 7, 10, 7, 6 },
994+
{ 20, 10, 10, 30, 20, 10 },
995+
/* Init Lower Higher */
996+
{ 10, 0, 0, 8, 1, 0 }, /* Hit points */
997+
{ 1, 0, 0, 1, 0, 1 },
998+
11, /* Energy */
999+
10,
1000+
8,
1001+
0,
1002+
1,
1003+
9,
1004+
A_INT,
1005+
0,
1006+
-4 },
1007+
/* Array terminator */
1008+
{ { 0, 0 } }
1009+
};
1010+
7901011
/* The player's role, created at runtime from initial
7911012
* choices. This may be munged in role_init().
7921013
*/
@@ -2509,7 +2730,8 @@ role_init()
25092730
urace = races[flags.initrace];
25102731

25112732
/* kick it over to alternate-alignment role */
2512-
if (alignmnt == A_CHAOTIC && Role_if(PM_KNIGHT)) {
2733+
if (alignmnt == A_CHAOTIC && Role_if(PM_KNIGHT)
2734+
&& !Race_if(PM_DRAUGR)) {
25132735
urole = align_roles[0];
25142736
}
25152737

@@ -2518,6 +2740,19 @@ role_init()
25182740
urole = race_roles[0];
25192741
}
25202742

2743+
if (Race_if(PM_DRAUGR)) {
2744+
if (Role_if(PM_BARBARIAN))
2745+
urole = draugr_roles[0];
2746+
else if (Role_if(PM_CONVICT))
2747+
urole = draugr_roles[1];
2748+
else if (Role_if(PM_INFIDEL))
2749+
urole = draugr_roles[2];
2750+
else if (Role_if(PM_KNIGHT))
2751+
urole = draugr_roles[3];
2752+
else if (Role_if(PM_ROGUE))
2753+
urole = draugr_roles[4];
2754+
}
2755+
25212756
/* Fix up the quest leader */
25222757
if (urole.ldrnum != NON_PM) {
25232758
pm = &mons[urole.ldrnum];

0 commit comments

Comments
 (0)