]> granicus.if.org Git - nethack/commitdiff
fix #H4219 - renegade Angel banter
authorPatR <rankin@nethack.org>
Mon, 29 Feb 2016 02:47:01 +0000 (18:47 -0800)
committerPatR <rankin@nethack.org>
Mon, 29 Feb 2016 02:47:01 +0000 (18:47 -0800)
Lawful angels deliver taunt messages from a pool of messages which
might mention the lawful god; demons and non-lawful angels draw from
another pool which doesn't mention any gods.  Since it is odd for a
'renegade' angel to claim to be operating for its god, choose taunts
from the other pool of messages for renegade lawful angels.

Not related:  some formatting fixups in include/mextra.h.

doc/fixes36.1
include/mextra.h
src/wizard.c

index a45bffae8ab9f861446f08a1c0928e2d21275216..389dc5ee8ae862cb6d9a81e4760e2d3d036ea66f 100644 (file)
@@ -170,6 +170,8 @@ if a long worm inherited inventory from a previous shape, and if an egg or
        given when hero could see any tail segment even if head was unseen,
        making it seem as if worm's inventory was kept in the visible segment
 Wizard will now steal any quest artifact from hero, not just own role's
+prevent a hostile renegade Angel of <lawful god> from delivering taunt
+       messages which mention threats of retribution from that god
 
 
 Platform- and/or Interface-Specific Fixes
index 8a37a748340bffbc4e86d1a90fa81b912db5f6b1..e69d137df46f38a9755f75248c8d8fa29a330f72 100644 (file)
 /*
  *  Adding new mextra structures:
  *
- *      1. Add the structure definition and any required macros in this file
- *         above the mextra struct.
- *      2. Add a pointer to your new struct to the mextra struct in this
- *file.
- *      3. Add a referencing macro at the bottom of this file after the
- *mextra
- *         struct (see MNAME, EGD, EPRI, ESHK, EMIN, or EDOG for examples).
- *      4. Create a newXX(mtmp) function and possibly a free_XX(mtmp)
- *function
- *         in an appropriate new or existing source file and add a prototype
- *         for it to include/extern.h.
+ *       1. Add the structure definition and any required macros in this
+ *          file above the mextra struct.
+ *       2. Add a pointer to your new struct to the mextra struct in this
+ *          file.
+ *       3. Add a referencing macro at bottom of this file after the mextra
+ *          struct (see MNAME, EGD, EPRI, ESHK, EMIN, or EDOG for examples).
+ *       4. Create a newXX(mtmp) function and possibly a free_XX(mtmp)
+ *          function in an appropriate new or existing source file and add
+ *          a prototype for it to include/extern.h.
  *
- *             void FDECL(newXX, (struct monst *));
- *             void FDECL(free_XX, (struct monst *));
+ *              void FDECL(newXX, (struct monst *));
+ *              void FDECL(free_XX, (struct monst *));
  *
- *               void
- *               newXX(mtmp)
- *               struct monst *mtmp;
- *               {
- *                   if (!mtmp->mextra) mtmp->mextra = newmextra();
- *                   if (!XX(mtmp)) {
- *                       XX(mtmp) = (struct XX *)alloc(sizeof(struct XX));
- *                       (void) memset((genericptr_t) XX(mtmp),
- *                                  0, sizeof(struct XX));
- *                   }
- *               }
+ *              void
+ *              newXX(mtmp)
+ *              struct monst *mtmp;
+ *              {
+ *                  if (!mtmp->mextra)
+ *                      mtmp->mextra = newmextra();
+ *                  if (!XX(mtmp)) {
+ *                      XX(mtmp) = (struct XX *) alloc(sizeof (struct XX));
+ *                      (void) memset((genericptr_t) XX(mtmp),
+ *                                    0, sizeof (struct XX));
+ *                  }
+ *              }
  *
- *      5. Consider adding a new makemon flag MM_XX flag to include/hack.h
- *and
- *         a corresponding change to makemon() if you require your structure
- *         to be added at monster creation time. Initialize your struct
- *         after a successful return from makemon().
+ *       5. Consider adding a new makemon flag MM_XX flag to include/hack.h
+ *          and a corresponding change to makemon() if you require your
+ *          structure to be added at monster creation time.  Initialize your
+ *          struct after a successful return from makemon().
  *
- *          src/makemon.c:  if (mmflags & MM_XX) newXX(mtmp);
- *          your new code:  mon = makemon(&mons[mnum], x, y, MM_XX);
+ *              src/makemon.c:  if (mmflags & MM_XX) newXX(mtmp);
+ *              your new code:  mon = makemon(&mons[mnum], x, y, MM_XX);
  *
- *      6. Adjust size_monst() in src/cmd.c appropriately.
- *      7. Adjust dealloc_mextra() in src/mon.c to clean up
- *         properly during monst deallocation.
- *      8. Adjust copy_mextra() in src/mon.c to make duplicate
- *         copies of your struct or data on another monst struct.
- *      9. Adjust restmon() in src/restore.c to deal with your
- *         struct or data during a restore.
- *     10. Adjust savemon() in src/save.c to deal with your
- *         struct or data during a save.
+ *       6. Adjust size_monst() in src/cmd.c appropriately.
+ *       7. Adjust dealloc_mextra() in src/mon.c to clean up
+ *          properly during monst deallocation.
+ *       8. Adjust copy_mextra() in src/mon.c to make duplicate
+ *          copies of your struct or data on another monst struct.
+ *       9. Adjust restmon() in src/restore.c to deal with your
+ *          struct or data during a restore.
+ *      10. Adjust savemon() in src/save.c to deal with your
+ *          struct or data during a save.
  */
 
 /***
- **    formerly vault.h -- vault guard extension
+ **     formerly vault.h -- vault guard extension
  */
 #define FCSIZ (ROWNO + COLNO)
 #define GD_EATGOLD 0x01
@@ -84,7 +82,7 @@ struct egd {
 };
 
 /***
- **    formerly epri.h -- temple priest extension
+ **     formerly epri.h -- temple priest extension
  */
 struct epri {
     aligntyp shralign; /* alignment of priest's shrine */
@@ -100,7 +98,7 @@ struct epri {
    (and emin extension) */
 
 /***
- **    formerly eshk.h -- shopkeeper extension
+ **     formerly eshk.h -- shopkeeper extension
  */
 #define REPAIR_DELAY 5 /* minimum delay between shop damage & repair */
 #define BILLSZ 200
@@ -135,7 +133,7 @@ struct eshk {
 };
 
 /***
- **    formerly emin.h -- minion extension
+ **     formerly emin.h -- minion extension
  */
 struct emin {
     aligntyp min_align; /* alignment of minion */
@@ -143,17 +141,17 @@ struct emin {
 };
 
 /***
- **    formerly edog.h -- pet extension
+ **     formerly edog.h -- pet extension
  */
-/*     various types of pet food, the lower, the better liked */
+/*      various types of pet food, the lower, the better liked */
 #define DOGFOOD 0
 #define CADAVER 1
 #define ACCFOOD 2
 #define MANFOOD 3
-#define APPORT 4
-#define POISON 5
-#define UNDEF 6
-#define TABU 7
+#define APPORT  4
+#define POISON  5
+#define UNDEF   6
+#define TABU    7
 
 struct edog {
     long droptime;            /* moment dog dropped object */
@@ -169,7 +167,7 @@ struct edog {
 };
 
 /***
- **    mextra.h -- collection of all monster extensions
+ **     mextra.h -- collection of all monster extensions
  */
 struct mextra {
     char *mname;
index f8d72c1c03f1ce678eb3ca1250be0ceae9a01e68..6ab8e57bd869c06ef03ff7486fcf0a5fa6e61c0c 100644 (file)
@@ -751,11 +751,12 @@ register struct monst *mtmp;
             verbalize("%s %s!",
                       random_malediction[rn2(SIZE(random_malediction))],
                       random_insult[rn2(SIZE(random_insult))]);
-    } else if (is_lminion(mtmp)) {
+    } else if (is_lminion(mtmp)
+               && !(mtmp->isminion && EMIN(mtmp)->renegade)) {
         com_pager(rn2(QTN_ANGELIC - 1 + (Hallucination ? 1 : 0))
                   + QT_ANGELIC);
     } else {
-        if (!rn2(5))
+        if (!rn2(is_minion(mtmp->data) ? 100 : 5))
             pline("%s casts aspersions on your ancestry.", Monnam(mtmp));
         else
             com_pager(rn2(QTN_DEMONIC) + QT_DEMONIC);