two new monsters from slash'em
Adds two monsters originally from slash'em. I used the slash'em tiles this time, also its code as a starting point but made various revisions. Both the tiles could benefit from some touch-ups. displacer beast: blue 'f'. Attempting a melee hit (ie, trying to move to its spot) has a 50:50 chance for it to swap places with you. Fairly tough monster to begin with, then half your ordinary attacks effectively miss and if you try to face a mob by retreating to a corridor or backing into a corner you can end up being drawn back into the open. I added bargethrough capability, and also it won't be fooled about hero's location by Displacement. [It only swaps places during combat when contact is initiated by the hero, not when attacked by another monster or when attacking.] genetic engineer: green 'Q'. Its attack causes the target to be polymorphed unless that target resists. Hero will almost always have magic resistance by the time this monster is encountered, but it can make conflict become risky by hitting and polymorphing other monsters. Slash'em flagged it hell-only but I took that flag off; I also took away its ability to teleport. Slash'em polymorphs the hero if a genetic engineer corpse is eaten; that's included and I introduced that for monsters too. I added both of these to the list of candidates for monster spell 'summon nasties' and for post-Wizard harassment. I also gave all the 'f's infravision. Probably only matters if the hero polymorphs into a feline. Displacer beast is originally from AD&D which depicts it as a six- legged cougar with a pair of tentacles; it has Displacement rather be able to affect an attacker's location. I think genetic engineer is original to slash'em where it expands Q class but seems mainly to be the base monster for Dr.Frankenstein (a unique monster with a one-level side-branch lair in slash'em's incarnation of Gehennom).
This commit is contained in:
75
src/mhitm.c
75
src/mhitm.c
@@ -833,7 +833,7 @@ struct attack *mattk;
|
||||
/*
|
||||
* See comment at top of mattackm(), for return values.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
mdamagem(magr, mdef, mattk, mwep, dieroll)
|
||||
struct monst *magr, *mdef;
|
||||
struct attack *mattk;
|
||||
@@ -1438,6 +1438,10 @@ int dieroll;
|
||||
/* there's no msomearmor() function, so just do damage */
|
||||
/* if (cancelled) break; */
|
||||
break;
|
||||
case AD_POLY:
|
||||
if (!magr->mcan && tmp < mdef->mhp)
|
||||
tmp = mon_poly(magr, mdef, tmp);
|
||||
break;
|
||||
default:
|
||||
tmp = 0;
|
||||
break;
|
||||
@@ -1480,6 +1484,75 @@ int dieroll;
|
||||
return (res == MM_AGR_DIED) ? MM_AGR_DIED : MM_HIT;
|
||||
}
|
||||
|
||||
int
|
||||
mon_poly(magr, mdef, dmg)
|
||||
struct monst *magr, *mdef;
|
||||
int dmg;
|
||||
{
|
||||
if (mdef == &g.youmonst) {
|
||||
if (Antimagic) {
|
||||
shieldeff(mdef->mx, mdef->my);
|
||||
} else if (Unchanging) {
|
||||
; /* just take a little damage */
|
||||
} else {
|
||||
/* system shock might take place in polyself() */
|
||||
if (u.ulycn == NON_PM) {
|
||||
You("are subjected to a freakish metamorphosis.");
|
||||
polyself(0);
|
||||
} else if (u.umonnum != u.ulycn) {
|
||||
You_feel("an unnatural urge coming on.");
|
||||
you_were();
|
||||
} else {
|
||||
You_feel("a natural urge coming on.");
|
||||
you_unwere(FALSE);
|
||||
}
|
||||
dmg = 0;
|
||||
}
|
||||
} else {
|
||||
char Before[BUFSZ];
|
||||
|
||||
Strcpy(Before, Monnam(mdef));
|
||||
if (resists_magm(mdef)) {
|
||||
/* Magic resistance */
|
||||
if (g.vis)
|
||||
shieldeff(mdef->mx, mdef->my);
|
||||
} else if (resist(mdef, WAND_CLASS, 0, TELL)) {
|
||||
/* general resistance to magic... */
|
||||
;
|
||||
} else if (!rn2(25) && mdef->cham == NON_PM
|
||||
&& (mdef->mcan
|
||||
|| pm_to_cham(monsndx(mdef->data)) != NON_PM)) {
|
||||
/* system shock; this variation takes away half of mon's HP
|
||||
rather than kill outright */
|
||||
if (g.vis)
|
||||
pline("%s shudders!", Before);
|
||||
|
||||
dmg += (mdef->mhpmax + 1) / 2;
|
||||
mdef->mhp -= dmg;
|
||||
dmg = 0;
|
||||
if (DEADMONSTER(mdef)) {
|
||||
if (magr == &g.youmonst)
|
||||
xkilled(mdef, XKILL_GIVEMSG | XKILL_NOCORPSE);
|
||||
else
|
||||
monkilled(mdef, "", AD_RBRE);
|
||||
}
|
||||
} else if (newcham(mdef, (struct permonst *) 0, FALSE, FALSE)) {
|
||||
if (g.vis && canspotmon(mdef))
|
||||
pline("%s%s turns into %s.", Before,
|
||||
!flags.verbose ? ""
|
||||
: " undergoes a freakish metamorphosis and",
|
||||
x_monnam(mdef, ARTICLE_A, (char *) 0,
|
||||
(SUPPRESS_NAME | SUPPRESS_IT
|
||||
| SUPPRESS_INVISIBLE), FALSE));
|
||||
dmg = 0;
|
||||
} else {
|
||||
if (g.vis && flags.verbose)
|
||||
pline1(nothing_happens);
|
||||
}
|
||||
}
|
||||
return dmg;
|
||||
}
|
||||
|
||||
void
|
||||
paralyze_monst(mon, amt)
|
||||
struct monst *mon;
|
||||
|
||||
Reference in New Issue
Block a user