OSDN Git Service

upgrade to 3.6.1
[jnethack/source.git] / src / sit.c
index 0c47c8e..3dc0d0a 100644 (file)
--- a/src/sit.c
+++ b/src/sit.c
@@ -1,5 +1,6 @@
-/* NetHack 3.6 sit.c   $NHDT-Date: 1445906863 2015/10/27 00:47:43 $  $NHDT-Branch: master $:$NHDT-Revision: 1.51 $ */
+/* NetHack 3.6 sit.c   $NHDT-Date: 1458341129 2016/03/18 22:45:29 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.53 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
+/*-Copyright (c) Robert Patrick Rankin, 2012. */
 /* NetHack may be freely redistributed.  See license for details. */
 
 /* JNetHack Copyright */
@@ -160,9 +161,9 @@ dosit()
             } else if (u.utraptype == TT_LAVA) {
                 /* Must have fire resistance or they'd be dead already */
 /*JP
-                You("sit in the lava!");
+                You("sit in the %s!", hliquid("lava"));
 */
-                You("\97n\8aâ\82Ì\92\86\82É\8dÀ\82Á\82½\81I");
+                You("%s\82Ì\92\86\82É\8dÀ\82Á\82½\81I", hliquid("\97n\8aâ"));
                 if (Slimed)
                     burn_away_slime();
                 u.utrap += rnd(4);
@@ -184,7 +185,7 @@ dosit()
             You("sit down.");
 */
             You("\8dÀ\82Á\82½\81D");
-            dotrap(trap, 0);
+            dotrap(trap, VIASITTING);
         }
     } else if (Underwater || Is_waterlevel(&u.uz)) {
         if (Is_waterlevel(&u.uz))
@@ -200,9 +201,9 @@ dosit()
     } else if (is_pool(u.ux, u.uy)) {
     in_water:
 /*JP
-        You("sit in the water.");
+        You("sit in the %s.", hliquid("water"));
 */
-        You("\90\85\82Ì\92\86\82Å\8dÀ\82Á\82½\81D");
+        You("%s\82Ì\92\86\82Å\8dÀ\82Á\82½\81D", hliquid("\90\85"));
         if (!rn2(10) && uarm)
 /*JP
             (void) water_damage(uarm, "armor", TRUE);
@@ -237,21 +238,21 @@ dosit()
     } else if (is_lava(u.ux, u.uy)) {
         /* must be WWalking */
 /*JP
-        You(sit_message, "lava");
+        You(sit_message, hliquid("lava"));
 */
-        You(sit_message, "\97n\8aâ");
+        You(sit_message, hliquid("\97n\8aâ"));
         burn_away_slime();
         if (likes_lava(youmonst.data)) {
 /*JP
-            pline_The("lava feels warm.");
+            pline_The("%s feels warm.", hliquid("lava"));
 */
-            pline("\97n\8aâ\82Í\92g\82©\82¢\81D");
+            pline_The("%s\82Í\92g\82©\82¢\81D", hliquid("\97n\8aâ"));
             return 1;
         }
 /*JP
-        pline_The("lava burns you!");
+        pline_The("%s burns you!", hliquid("lava"));
 */
-        You("\97n\8aâ\82Å\94R\82¦\82½\81I");
+        pline_The("%s\82Å\94R\82¦\82½\81I", hliquid("\97n\8aâ"));
         losehp(d((Fire_resistance ? 2 : 10), 10), /* lava damage */
 /*JP
                "sitting on lava", KILLED_BY);
@@ -311,6 +312,7 @@ dosit()
                 if (u.uhp >= (u.uhpmax - 5))
                     u.uhpmax += 4;
                 u.uhp = u.uhpmax;
+                u.ucreamed = 0;
                 make_blinded(0L, TRUE);
                 make_sick(0L, (char *) 0, FALSE, SICK_ALL);
                 heal_legs();
@@ -377,6 +379,7 @@ dosit()
                  "\90¹\82È\82é\8bÊ\8dÀ\82É\8dÀ\82è\82µ\93ð\82É\8eô\82¢\82 \82ê\81I");
                 if (Luck > 0) {
                     make_blinded(Blinded + rn1(100, 250), TRUE);
+                    change_luck((Luck > 1) ? -rnd(2) : -1);
                 } else
                     rndcurse();
                 break;
@@ -612,6 +615,7 @@ attrcurse()
             You("\92g\82©\82³\82ð\8a´\82\82½\81D");
             break;
         }
+        /*FALLTHRU*/
     case 2:
         if (HTeleportation & INTRINSIC) {
             HTeleportation &= ~INTRINSIC;
@@ -621,6 +625,7 @@ attrcurse()
             You("\82¿\82å\82Á\82Æ\97\8e\82¿\82Â\82¢\82½\81D");
             break;
         }
+        /*FALLTHRU*/
     case 3:
         if (HPoison_resistance & INTRINSIC) {
             HPoison_resistance &= ~INTRINSIC;
@@ -630,6 +635,7 @@ attrcurse()
             You("\8f­\82µ\8bC\95ª\82ª\88«\82­\82È\82Á\82½\81I");
             break;
         }
+        /*FALLTHRU*/
     case 4:
         if (HTelepat & INTRINSIC) {
             HTelepat &= ~INTRINSIC;
@@ -641,6 +647,7 @@ attrcurse()
             Your("\8cÜ\8a´\82Í\96\83á\83\82µ\82½\81I");
             break;
         }
+        /*FALLTHRU*/
     case 5:
         if (HCold_resistance & INTRINSIC) {
             HCold_resistance &= ~INTRINSIC;
@@ -650,6 +657,7 @@ attrcurse()
             You("\97Á\82µ\82³\82ð\8a´\82\82½\81D");
             break;
         }
+        /*FALLTHRU*/
     case 6:
         if (HInvis & INTRINSIC) {
             HInvis &= ~INTRINSIC;
@@ -659,6 +667,7 @@ attrcurse()
             You("\96Ï\91z\82ð\95ø\82¢\82½\81D");
             break;
         }
+        /*FALLTHRU*/
     case 7:
         if (HSee_invisible & INTRINSIC) {
             HSee_invisible &= ~INTRINSIC;
@@ -673,6 +682,7 @@ attrcurse()
 #endif
             break;
         }
+        /*FALLTHRU*/
     case 8:
         if (HFast & INTRINSIC) {
             HFast &= ~INTRINSIC;
@@ -682,6 +692,7 @@ attrcurse()
             You("\92x\82­\82È\82Á\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
             break;
         }
+        /*FALLTHRU*/
     case 9:
         if (HStealth & INTRINSIC) {
             HStealth &= ~INTRINSIC;
@@ -691,6 +702,7 @@ attrcurse()
             You("\95s\8aí\97p\82É\82È\82Á\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
             break;
         }
+        /*FALLTHRU*/
     case 10:
         /* intrinsic protection is just disabled, not set back to 0 */
         if (HProtection & INTRINSIC) {
@@ -701,6 +713,7 @@ attrcurse()
             You("\96³\96h\94õ\82É\82È\82Á\82½\8bC\82ª\82µ\82½\81D");
             break;
         }
+        /*FALLTHRU*/
     case 11:
         if (HAggravate_monster & INTRINSIC) {
             HAggravate_monster &= ~INTRINSIC;
@@ -710,6 +723,7 @@ attrcurse()
             You("\96£\97Í\82ª\8e¸\82¹\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
             break;
         }
+        /*FALLTHRU*/
     default:
         break;
     }