1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-07-28 16:32:27 +01:00

Add spell bonuses from PC species as well as role.

The base bonus is (spell level+1)/2 * 5. This yeilds bonuses in the vanilla range, but that may be too small to really matter :-/

Humans: Abjuration. They make things mundane
Clockwords: Wizard lock (auto cast). Affinity with mechanical things.
Chiros: Magic Mapping. They know caves.
Dwarves: Digging. They dig.
Drow: Sleep. Affinity with sleeping poison.
Elves: Remove curse. Low-key holy.
Gnomes: Invisibility. They can vanish.
Half-dragons: Detect treasure. Dragons can horde.
Incants: no bonus. Already has a bonus to all spells.
Orcs: Cancellation. Good vs. angels and other mighty foes.
Vampires: Drain life. They drain life.
Yukis: Charm monster. Nymphs.
This commit is contained in:
chris 2022-04-13 09:59:14 -04:00
parent fcb3af7216
commit 6406d2d4bc
3 changed files with 30 additions and 12 deletions

View file

@ -227,6 +227,8 @@ struct Race {
#define NIGHTVISION2 2
#define NIGHTVISION3 3
int spelspec; /* spell (SPE_) the species excels at */
int spelsbon; /* penalty (-bonus) for that spell */
/*** Properties in variable-length arrays ***/
/* intrinsics (see attrib.c) */

View file

@ -702,7 +702,8 @@ const struct Race races[] = {
/* Init Lower Higher */
{ 2, 0, 0, 2, 1, 0 }, /* Hit points */
{ 1, 0, 2, 0, 2, 0 }, /* Energy */
NORMALNIGHTVIS
NORMALNIGHTVIS,
SPE_ABJURATION, -20
},
{ "clockwork automaton", "automatic", "clockwork-kind", "Clk",
{0, 0},
@ -715,7 +716,8 @@ const struct Race races[] = {
/* Init Lower Higher */
{ 3, 0, 3, 0, 3, 0 }, /* Hit points */
{ 3, 0, 3, 0, 3, 0 }, /* Energy */
NORMALNIGHTVIS
NORMALNIGHTVIS,
SPE_WIZARD_LOCK, -1000
},
{ "Chiropteran", "Chiropteric", "Chiropteran-hood", "Bat",
{0, 0},
@ -728,7 +730,8 @@ const struct Race races[] = {
/* Init Lower Higher */
{ 5, 0, 1, 3, 1, 2 }, /* Hit points */
{ 0, 0, 0, 0, 0, 0 }, /* Energy */
NORMALNIGHTVIS
NORMALNIGHTVIS,
SPE_MAGIC_MAPPING, -15
},
{ "dwarf", "dwarven", "dwarvenkind", "Dwa",
{0, 0},
@ -741,7 +744,8 @@ const struct Race races[] = {
/* Init Lower Higher */
{ 4, 0, 0, 3, 2, 0 }, /* Hit points */
{ 0, 0, 0, 0, 0, 0 }, /* Energy */
NORMALNIGHTVIS
NORMALNIGHTVIS,
SPE_DIG, -15
},
{ "Drow", "droven", "drovenkind", "Dro",
{"hedrow", "drow"},
@ -754,7 +758,8 @@ const struct Race races[] = {
/* Init Lower Higher */
{ 8, 0, 3, 0, 1, 0 }, /* Hit points */
{ 8, 0, 3, 0, 3, 0 }, /* Energy */
NO_NIGHTVISION
NO_NIGHTVISION,
SPE_SLEEP, -5
},
{ "elf", "elven", "elvenkind", "Elf",
{"elf", "elf-maid"},
@ -767,7 +772,8 @@ const struct Race races[] = {
/* Init Lower Higher */
{ 7, 0, 3, 0, 1, 0 }, /* Hit points */
{ 7, 0, 3, 0, 3, 0 }, /* Energy */
NIGHTVISION3
NIGHTVISION3,
SPE_REMOVE_CURSE, -10
},
{ "gnome", "gnomish", "gnomehood", "Gno",
{0, 0},
@ -780,7 +786,8 @@ const struct Race races[] = {
/* Init Lower Higher */
{ 1, 0, 0, 1, 0, 0 }, /* Hit points */
{ 12, 0, 4, 0, 2, 2 }, /* Energy */
NIGHTVISION2
NIGHTVISION2,
SPE_INVISIBILITY, -10
},
{ "Half-dragon", "Half-dragon", "Half-dragonhood", "Hlf",
{0, 0},
@ -793,7 +800,8 @@ const struct Race races[] = {
/* Init Lower Higher */
{ 4, 0, 0, 4, 2, 0 }, /* Hit points */
{ 4, 0, 0, 4, 2, 0 }, /* Energy */
NORMALNIGHTVIS
NORMALNIGHTVIS,
SPE_DETECT_TREASURE, -10
},
{ "incantifier", "incantifier", "wanterkind", "Inc",
{0, 0},
@ -808,6 +816,7 @@ const struct Race races[] = {
{ 2, 0, 0, 2, 0, 1 }, /* Hit points */
{ 0, 0, 100, 0, 100, 0 }, /* Energy */
NORMALNIGHTVIS
//Note: Bonus to all spells.
},
{ "Inheritor", "human", "humanity", "Inh",
{"man", "woman"},
@ -821,7 +830,8 @@ const struct Race races[] = {
/* Init Lower Higher */
{ 2, 0, 0, 2, 1, 0 }, /* Hit points */
{ 1, 0, 2, 0, 2, 0 }, /* Energy */
NORMALNIGHTVIS
NORMALNIGHTVIS,
SPE_ABJURATION, -20
},
{ "orc", "orcish", "orcdom", "Orc",
{0, 0},
@ -834,7 +844,8 @@ const struct Race races[] = {
/* Init Lower Higher */
{ 1, 0, 0, 1, 0, 3 }, /* Hit points */
{ 1, 0, 1, 0, 1, 0 }, /* Energy */
NIGHTVISION2
NIGHTVISION2,
SPE_CANCELLATION, -15
},
{ "vampire", "vampiric", "vampirehood", "Vam",
{"vampire", "vampiress"},
@ -847,7 +858,8 @@ const struct Race races[] = {
/* Init Lower Higher */
{ 3, 0, 0, 3, 2, 0 }, /* Hit points */
{ 3, 0, 4, 0, 4, 0 }, /* Energy */
NORMALNIGHTVIS
NORMALNIGHTVIS,
SPE_DRAIN_LIFE, -5
},
{ "yuki-onna", "yuki-onnic", "feyhood", "Swn",
{0, 0},
@ -860,7 +872,8 @@ const struct Race races[] = {
/* Init Lower Higher */
{ 2, 0, 1, 0, 0, 1 }, /* Hit points */
{ 2, 0, 3, 0, 3, 0 }, /* Energy */
NORMALNIGHTVIS
NORMALNIGHTVIS,
SPE_CHARM_MONSTER, -15
},
/* Array terminator */
{ 0, 0, 0, 0, 0 }};

View file

@ -6014,6 +6014,9 @@ int spell;
if(spellid(spell) == urole.spelspec)
splcaster += urole.spelsbon;
if(spellid(spell) == urace.spelspec)
splcaster += urace.spelsbon;
/* `healing spell' bonus */
if(emergency_spell(spell)){
(uarm && uarm->otyp == HEALER_UNIFORM) ?