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:
PatR
2020-05-03 14:13:08 -07:00
parent d31e3d172a
commit 7817e69c41
17 changed files with 594 additions and 411 deletions

View File

@@ -137,11 +137,11 @@ enum explosion_types {
* is_safepet(mon)
*
* A special case check used in attack() and domove(). Placing the
* definition here is convenient.
* definition here is convenient. No longer limited to pets.
*/
#define is_safepet(mon) \
(mon && (mon->mtame || mon->mpeaceful) && canspotmon(mon) && flags.safe_dog && !Confusion \
&& !Hallucination && !Stunned)
#define is_safepet(mon) \
(flags.safe_dog && (mon) && (mon)->mpeaceful && canspotmon(mon) \
&& !Confusion && !Hallucination && !Stunned)
/*
* canseeself()

View File

@@ -1264,9 +1264,10 @@ E int FDECL(buzzmu, (struct monst *, struct attack *));
/* ### mhitm.c ### */
E int FDECL(fightm, (struct monst *));
E int FDECL(mdisplacem, (struct monst *, struct monst *, BOOLEAN_P));
E int FDECL(mattackm, (struct monst *, struct monst *));
E boolean FDECL(engulf_target, (struct monst *, struct monst *));
E int FDECL(mdisplacem, (struct monst *, struct monst *, BOOLEAN_P));
E int FDECL(mon_poly, (struct monst *, struct monst *, int));
E void FDECL(paralyze_monst, (struct monst *, int));
E int FDECL(sleep_monst, (struct monst *, int, int));
E void FDECL(slept_monst, (struct monst *));

View File

@@ -289,7 +289,8 @@ typedef struct sortloot_item Loot;
#include "extern.h"
#endif /* USE_TRAMPOLI */
/* flags to control makemon(); goodpos() uses some plus has some of its own */
/* flags to control makemon(); goodpos() uses some plus has some of its own;
these flags have exceeded 16-bits worth so ought to be changed to 'long' */
#define NO_MM_FLAGS 0x00000 /* use this rather than plain 0 */
#define NO_MINVENT 0x00001 /* suppress minvent when creating mon */
#define MM_NOWAIT 0x00002 /* don't set STRAT_WAITMASK flags */
@@ -308,6 +309,7 @@ typedef struct sortloot_item Loot;
/* if more MM_ flag masks are added, skip or renumber the GP_ one(s) */
#define GP_ALLOW_XY 0x08000 /* [actually used by enexto() to decide whether
* to make an extra call to goodpos()] */
#define GP_ALLOW_U 0x10000 /* don't reject hero's location */
/* flags for make_corpse() and mkcorpstat() */
#define CORPSTAT_NONE 0x00

View File

@@ -77,6 +77,7 @@
#define AD_SLIM 40 /* turns you into green slime */
#define AD_ENCH 41 /* remove enchantment (disenchanter) */
#define AD_CORR 42 /* corrode armor (black pudding) */
#define AD_POLY 43 /* polymorph the target (genetic engineer) */
#define AD_CLRC 240 /* random clerical spell */
#define AD_SPEL 241 /* random magic spell */

View File

@@ -244,7 +244,9 @@ struct obj {
#define stale_egg(egg) \
((g.monstermoves - (egg)->age) > (2 * MAX_EGG_HATCH_TIME))
#define ofood(o) ((o)->otyp == CORPSE || (o)->otyp == EGG || (o)->otyp == TIN)
#define polyfodder(obj) (ofood(obj) && pm_to_cham((obj)->corpsenm) != NON_PM)
#define polyfodder(obj) \
(ofood(obj) && (pm_to_cham((obj)->corpsenm) != NON_PM \
|| dmgtype(&mons[(obj)->corpsenm], AD_POLY)))
#define mlevelgain(obj) (ofood(obj) && (obj)->corpsenm == PM_WRAITH)
#define mhealup(obj) (ofood(obj) && (obj)->corpsenm == PM_NURSE)
#define Is_pudding(o) \