Commit Graph

20 Commits

Author SHA1 Message Date
nhmall
6459d44461 some spelling and inconsistency corrections; comments and elsewhere 2026-01-11 11:31:34 -05:00
nhmall
5f69dc6228 make attack result macros more distinguishable from makemon macros
Use the MM_ prefix only for the makemon macros, and change these five as follows:

 MM_MISS 0x0     -> M_ATTK_MISS      /* aggressor missed */
 MM_HIT 0x1      -> M_ATTK_HIT       /* aggressor hit defender */
 MM_DEF_DIED 0x2 -> M_ATTK_DEF_DIED  /* defender died */
 MM_AGR_DIED 0x4 -> M_ATTK_AGR_DIED  /* aggressor died */
 MM_AGR_DONE 0x8 -> M_ATTK_AGR_DONE  /* aggressor is done with their turn */

include/hack.h:#define NO_MM_FLAGS     0x000000L /* use this rather than plain 0 */
include/hack.h:#define MM_NOWAIT       0x000002L /* don't set STRAT_WAITMASK flags */
include/hack.h:#define MM_NOCOUNTBIRTH 0x000004L /* don't increment born count (for revival) */
include/hack.h:#define MM_IGNOREWATER  0x000008L /* ignore water when positioning */
include/hack.h:#define MM_ADJACENTOK   0x000010L /* acceptable to use adjacent coordinates */
include/hack.h:#define MM_ANGRY        0x000020L /* monster is created angry */
include/hack.h:#define MM_NONAME       0x000040L /* monster is not christened */
include/hack.h:#define MM_EGD          0x000100L /* add egd structure */
include/hack.h:#define MM_EPRI         0x000200L /* add epri structure */
include/hack.h:#define MM_ESHK         0x000400L /* add eshk structure */
include/hack.h:#define MM_EMIN         0x000800L /* add emin structure */
include/hack.h:#define MM_EDOG         0x001000L /* add edog structure */
include/hack.h:#define MM_ASLEEP       0x002000L /* monsters should be generated asleep */
include/hack.h:#define MM_NOGRP        0x004000L /* suppress creation of monster groups */
include/hack.h:#define MM_NOTAIL       0x008000L /* if a long worm, don't give it a tail */
include/hack.h:#define MM_MALE         0x010000L /* male variation */
include/hack.h:#define MM_FEMALE       0x020000L /* female variation */
include/hack.h:#define MM_NOMSG        0x040000L /* no appear message */

include/hack.h:#define MM_NOEXCLAM     0x400000L /* more sedate "<mon> appears." mesg for ^G */
include/hack.h:#define MM_IGNORELAVA   0x800000L /* ignore lava when positioning */
2023-03-19 12:19:34 -04:00
nhmall
88f6df2d8b some tabs to spaces
cd src
    grep -P -n '\t' *.c | grep -v "1:"
    cd ../include
    grep -P -n '\t' *.h | grep -v "1:"
    cd ..

side note: win/Qt/*.cpp are full of tabs
2022-10-26 14:21:23 -04:00
Pasi Kallinen
b635160297 Minor ranged attack tweak
Make monsters with magic and gaze attacks avoid hero,
just like spitters and breathers already did.
Some small code cleanup related to the ranged attacks.
2022-08-07 22:33:47 +03:00
Pasi Kallinen
b797baba7a Make return values use defines 2020-12-04 09:30:21 +02:00
Pasi Kallinen
20b6ea602b Unify ad_phys 2020-12-04 09:30:19 +02:00
Pasi Kallinen
36bb52466d Unify ad_deth 2020-12-04 09:30:19 +02:00
Pasi Kallinen
0d445a7a7c Unify monster-hits-monster 2020-12-04 09:30:14 +02:00
nhmall
ac9ba38449 file header bump from "NetHack 3.6" to "NetHack 3.7" 2020-08-03 22:07:36 -04:00
PatR
7817e69c41 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).
2020-05-03 14:13:08 -07:00
Sean Hunt
1c081b1647 Remove stale version control lines. 2015-05-25 09:21:31 +09:00
Sean Hunt
8b57d96fd2 Reformat .h files.
I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.

The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
2015-05-25 09:21:15 +09:00
karnov
2a907f894e Version number increment 2015-05-06 22:04:27 -04:00
Sean Hunt
6e9fa71b05 Make SEDUCE unconditional. 2015-02-27 19:33:48 -05:00
keni
03140969ee Bulk recovery of file CVS headers and addition of NHDT- headers. 2015-02-26 09:19:03 -05:00
keni
df20791e59 Add RCS version lines 2009-05-06 10:45:32 +00:00
nethack.allison
c146fe012d housekeeping: mark trunk sources 3.5 (include) 2005-01-02 16:50:12 +00:00
nethack.rankin
e848030571 warning bit
Avoid gcc's inaccurate warning about mattk possibly being
used before being set in do_breathe().
2002-03-25 08:05:27 +00:00
nethack.allison
06528d1002 3.3.2 to 3.4.0 2002-02-04 16:06:00 +00:00
jwalz
d09990baf5 *** empty log message *** 2002-01-05 21:05:47 +00:00