Make erinyes scale with alignment abuse
Consistent with their mythological role of punishing those who had violated societal taboos -- oathbreakers, hosts who attacked their guests, etc -- erinyes scale with the cumulative amount of alignment abuse the hero has committed over the course of the game. This is tracked separately from the alignment record, and cannot be cleared by the hero improving her favor with her god via "good deeds" as the normal alignment record can. Erinyes will gain abilities, levels, and attacks as the hero's alignment abuse worsens. They will also aggravate monsters when near the hero.
This commit is contained in:
@@ -10,6 +10,7 @@ typedef schar aligntyp; /* basic alignment type */
|
|||||||
typedef struct align { /* alignment & record */
|
typedef struct align { /* alignment & record */
|
||||||
aligntyp type;
|
aligntyp type;
|
||||||
int record;
|
int record;
|
||||||
|
unsigned abuse;
|
||||||
} align;
|
} align;
|
||||||
|
|
||||||
/* bounds for "record" -- respect initial alignments of 10 */
|
/* bounds for "record" -- respect initial alignments of 10 */
|
||||||
|
|||||||
@@ -1759,6 +1759,7 @@ extern void copy_mextra(struct monst *, struct monst *);
|
|||||||
extern void dealloc_mextra(struct monst *);
|
extern void dealloc_mextra(struct monst *);
|
||||||
extern boolean usmellmon(struct permonst *);
|
extern boolean usmellmon(struct permonst *);
|
||||||
extern void mimic_hit_msg(struct monst *, short);
|
extern void mimic_hit_msg(struct monst *, short);
|
||||||
|
extern void adj_erinys(unsigned);
|
||||||
|
|
||||||
/* ### mondata.c ### */
|
/* ### mondata.c ### */
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -2492,12 +2492,14 @@
|
|||||||
and spelled this way */
|
and spelled this way */
|
||||||
MON("erinys", S_DEMON, LVL(7, 12, 2, 30, 10),
|
MON("erinys", S_DEMON, LVL(7, 12, 2, 30, 10),
|
||||||
(G_HELL | G_NOCORPSE | G_SGROUP | 2),
|
(G_HELL | G_NOCORPSE | G_SGROUP | 2),
|
||||||
|
/* erinys attacks (among other things) are variable depending on your
|
||||||
|
alignment abuse, can be increased from here by adj_erinys(mon.c) */
|
||||||
A(ATTK(AT_WEAP, AD_DRST, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK,
|
A(ATTK(AT_WEAP, AD_DRST, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK,
|
||||||
NO_ATTK),
|
NO_ATTK),
|
||||||
SIZ(WT_HUMAN, 400, MS_SILENT, MZ_HUMAN), MR_FIRE | MR_POISON, 0,
|
SIZ(WT_HUMAN, 400, MS_SILENT, MZ_HUMAN), MR_FIRE | MR_POISON, 0,
|
||||||
M1_HUMANOID | M1_POIS,
|
M1_HUMANOID | M1_POIS,
|
||||||
M2_NOPOLY | M2_DEMON | M2_STALK | M2_HOSTILE | M2_STRONG | M2_NASTY
|
M2_NOPOLY | M2_DEMON | M2_STALK | M2_STRONG | M2_NASTY | M2_FEMALE
|
||||||
| M2_FEMALE | M2_COLLECT,
|
| M2_COLLECT,
|
||||||
M3_INFRAVISIBLE | M3_INFRAVISION, 10, CLR_RED, ERINYS),
|
M3_INFRAVISIBLE | M3_INFRAVISION, 10, CLR_RED, ERINYS),
|
||||||
MON("barbed devil", S_DEMON, LVL(8, 12, 0, 35, 8),
|
MON("barbed devil", S_DEMON, LVL(8, 12, 0, 35, 8),
|
||||||
(G_HELL | G_NOCORPSE | G_SGROUP | 2),
|
(G_HELL | G_NOCORPSE | G_SGROUP | 2),
|
||||||
|
|||||||
@@ -1219,8 +1219,14 @@ adjalign(int n)
|
|||||||
int newalign = u.ualign.record + n;
|
int newalign = u.ualign.record + n;
|
||||||
|
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
|
unsigned newabuse = u.ualign.abuse - n;
|
||||||
|
|
||||||
if (newalign < u.ualign.record)
|
if (newalign < u.ualign.record)
|
||||||
u.ualign.record = newalign;
|
u.ualign.record = newalign;
|
||||||
|
if (newabuse > u.ualign.abuse) {
|
||||||
|
u.ualign.abuse = newabuse;
|
||||||
|
adj_erinys(newabuse);
|
||||||
|
}
|
||||||
} else if (newalign > u.ualign.record) {
|
} else if (newalign > u.ualign.record) {
|
||||||
u.ualign.record = newalign;
|
u.ualign.record = newalign;
|
||||||
if (u.ualign.record > ALIGNLIM)
|
if (u.ualign.record > ALIGNLIM)
|
||||||
|
|||||||
@@ -2129,6 +2129,8 @@ peace_minded(register struct permonst *ptr)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
if (ptr->msound == MS_NEMESIS)
|
if (ptr->msound == MS_NEMESIS)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
if (ptr == &mons[PM_ERINYS])
|
||||||
|
return !u.ualign.abuse;
|
||||||
|
|
||||||
if (race_peaceful(ptr))
|
if (race_peaceful(ptr))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|||||||
@@ -5462,4 +5462,53 @@ check_gear_next_turn(struct monst *mon)
|
|||||||
{
|
{
|
||||||
mon->misc_worn_check |= I_SPECIAL;
|
mon->misc_worn_check |= I_SPECIAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* make erinyes more dangerous based on your alignment abuse */
|
||||||
|
void
|
||||||
|
adj_erinys(unsigned abuse)
|
||||||
|
{
|
||||||
|
struct permonst *pm = &mons[PM_ERINYS];
|
||||||
|
|
||||||
|
if (abuse > 5L) {
|
||||||
|
pm->mflags1 |= M1_SEE_INVIS;
|
||||||
|
}
|
||||||
|
if (abuse > 10L) {
|
||||||
|
pm->mflags1 |= M1_AMPHIBIOUS;
|
||||||
|
}
|
||||||
|
if (abuse > 15L) {
|
||||||
|
pm->mflags1 |= M1_FLY;
|
||||||
|
}
|
||||||
|
if (abuse > 20L) {
|
||||||
|
/* more powerful attack */
|
||||||
|
pm->mattk[0].damn = 3;
|
||||||
|
}
|
||||||
|
if (abuse > 25L) {
|
||||||
|
pm->mflags1 |= M1_REGEN;
|
||||||
|
}
|
||||||
|
if (abuse > 30L) {
|
||||||
|
pm->mflags1 |= M1_TPORT_CNTRL;
|
||||||
|
}
|
||||||
|
if (abuse > 35L) {
|
||||||
|
/* second attack */
|
||||||
|
pm->mattk[1].aatyp = AT_WEAP;
|
||||||
|
pm->mattk[1].adtyp = AD_DRST;
|
||||||
|
pm->mattk[1].damn = 3;
|
||||||
|
pm->mattk[1].damd = 4;
|
||||||
|
}
|
||||||
|
if (abuse > 40L) {
|
||||||
|
pm->mflags1 |= M1_TPORT;
|
||||||
|
}
|
||||||
|
if (abuse > 50L) {
|
||||||
|
/* third (spellcasting) attack */
|
||||||
|
pm->mattk[2].aatyp = AT_MAGC;
|
||||||
|
pm->mattk[2].adtyp = AD_SPEL;
|
||||||
|
pm->mattk[2].damn = 3;
|
||||||
|
pm->mattk[2].damd = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* also adjust level and difficulty */
|
||||||
|
pm->mlevel = min(7 + u.ualign.abuse, 50);
|
||||||
|
pm->difficulty = min(10 + (u.ualign.abuse / 3), 25);
|
||||||
|
}
|
||||||
|
|
||||||
/*mon.c*/
|
/*mon.c*/
|
||||||
|
|||||||
@@ -639,6 +639,10 @@ dochug(register struct monst* mtmp)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Erinyes will inform surrounding monsters of your crimes */
|
||||||
|
if (mdat == &mons[PM_ERINYS] && !mtmp->mpeaceful && m_canseeu(mtmp))
|
||||||
|
aggravate();
|
||||||
|
|
||||||
/* Shriekers and Medusa have irregular abilities which must be
|
/* Shriekers and Medusa have irregular abilities which must be
|
||||||
checked every turn. These abilities do not cost a turn when
|
checked every turn. These abilities do not cost a turn when
|
||||||
used. */
|
used. */
|
||||||
|
|||||||
@@ -692,6 +692,7 @@ restgamestate(NHFILE *nhfp)
|
|||||||
/* must come after all mons & objs are restored */
|
/* must come after all mons & objs are restored */
|
||||||
relink_timers(FALSE);
|
relink_timers(FALSE);
|
||||||
relink_light_sources(FALSE);
|
relink_light_sources(FALSE);
|
||||||
|
adj_erinys(u.ualign.abuse);
|
||||||
/* inventory display is now viable */
|
/* inventory display is now viable */
|
||||||
iflags.perm_invent = defer_perm_invent;
|
iflags.perm_invent = defer_perm_invent;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user