OSDN Git Service

update year to 2023
[jnethack/source.git] / src / priest.c
index 88479f6..585d2fc 100644 (file)
@@ -1,10 +1,10 @@
-/* NetHack 3.6 priest.c        $NHDT-Date: 1501725407 2017/08/03 01:56:47 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.44 $ */
+/* NetHack 3.6 priest.c        $NHDT-Date: 1545131519 2018/12/18 11:11:59 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.45 $ */
 /* Copyright (c) Izchak Miller, Steve Linhart, 1989.              */
 /* NetHack may be freely redistributed.  See license for details. */
 
 /* JNetHack Copyright */
 /* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000  */
-/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2018            */
+/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2023            */
 /* JNetHack may be freely redistributed.  See license for details. */
 
 #include "hack.h"
@@ -58,7 +58,9 @@ register xchar omx, omy, gx, gy;
     coord poss[9];
     long info[9];
     long allowflags;
+#if 0 /* dead code; see below */
     struct obj *ib = (struct obj *) 0;
+#endif
 
     if (omx == gx && omy == gy)
         return 0;
@@ -121,14 +123,17 @@ pick_move:
     }
 
     if (nix != omx || niy != omy) {
+        if (MON_AT(nix, niy))
+            return 0;
         remove_monster(omx, omy);
         place_monster(mtmp, nix, niy);
         newsym(nix, niy);
         if (mtmp->isshk && !in_his_shop && inhishop(mtmp))
             check_special_room(FALSE);
+#if 0 /* dead code; maybe someday someone will track down why... */
         if (ib) {
             if (cansee(mtmp->mx, mtmp->my))
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 pline("%s picks up %s.", Monnam(mtmp),
                       distant_name(ib, doname));
 #else
@@ -138,6 +143,7 @@ pick_move:
             obj_extract_self(ib);
             (void) mpickobj(mtmp, ib);
         }
+#endif
         return 1;
     }
     return 0;
@@ -465,7 +471,7 @@ int roomno;
                Moloch so suppress the "of Moloch" for him here too */
             if (sanctum && !Hallucination)
                 priest->ispriest = 0;
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             pline("%s intones:",
                   canseemon(priest) ? Monnam(priest) : "A nearby voice");
 #else
@@ -501,7 +507,7 @@ int roomno;
                 msg1 = "\82¨\82Ü\82¦\82Í\82±\82Ì\90_\90¹\82È\8fê\8f\8a\82ð\89\98\82µ\82Ä\82¢\82é\81I";
             }
         } else if (moves >= epri_p->enter_time) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             Sprintf(buf, "Pilgrim, you enter a %s place!",
                     !shrined ? "desecrated" : "sacred");
 #else
@@ -537,7 +543,7 @@ int roomno;
 /*JP
                 msg2 = (u.ualign.record >= ALGN_PIOUS) ? "a" : "an unusual";
 */
-                msg2 = (u.ualign.record >= ALGN_PIOUS) ? "a" : "\82¢\82Â\82É\82È\82­";
+                msg2 = (u.ualign.record >= ALGN_PIOUS) ? "" : "\82¢\82Â\82É\82È\82­";
                 this_time = &epri_p->peaceful_time;
                 other_time = &epri_p->hostile_time;
             }
@@ -676,7 +682,7 @@ register struct monst *priest;
         };
 
         if (!priest->mcanmove || priest->msleeping) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             pline("%s breaks out of %s reverie!", Monnam(priest),
                   mhis(priest));
 #else
@@ -706,7 +712,7 @@ register struct monst *priest;
             long pmoney = money_cnt(priest->minvent);
             if (pmoney > 0L) {
                 /* Note: two bits is actually 25 cents.  Hmm. */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 pline("%s gives you %s for an ale.", Monnam(priest),
                       (pmoney == 1L) ? "one bit" : "two bits");
 #else
@@ -778,7 +784,7 @@ register struct monst *priest;
                        || (u.ublessed < 20
                            && (u.ublessed < 9 || !rn2(u.ublessed))))) {
 /*JP
-            verbalize("Thy devotion has been rewarded.");
+            verbalize("Thou hast been rewarded for thy devotion.");
 */
             verbalize("\93ð\82ª\8c£\90g\82É\95ñ\82í\82ñ\81D");
             if (!(HProtection & INTRINSIC)) {
@@ -942,7 +948,7 @@ struct monst *priest;
               a_gname_at(ax, ay));
         break;
     case 1:
-#if 0 /*JP*/
+#if 0 /*JP:T*/
         pline("%s voice booms:  \"How darest thou harm my servant!\"",
               s_suffix(a_gname_at(ax, ay)));
 #else
@@ -1190,7 +1196,7 @@ struct monst *mtmp;
         } else {
             ++nsegs; /* include head in the segment count */
             segndx = wseg_at(mtmp, bhitpos.x, bhitpos.y);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             Sprintf(eos(info), ", %d%s of %d segments",
                     segndx, ordin(segndx), nsegs);
 #else
@@ -1284,7 +1290,7 @@ struct monst *mtmp;
 */
         Strcat(info, ", \95s\89Â\8e\8b");
     if (mtmp == u.ustuck)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
         Strcat(info, sticks(youmonst.data) ? ", held by you"
                       : !u.uswallow ? ", holding you"
                          : attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_DGST)
@@ -1363,7 +1369,7 @@ ustatusline()
 */
         Strcat(info, ", \8eñ\82ð\8di\82ß\82ç\82ê\82Ä\82¢\82é");
     if (Vomiting)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
         Strcat(info, ", nauseated"); /* !"nauseous" */
 #else
         Strcat(info, ", \93f\82«\8bC\82ª\82·\82é");