OSDN Git Service

スピードシステム改造。
[hengbandforosx/hengbandosx.git] / src / spells3.c
index a035978..48df39b 100644 (file)
@@ -5538,30 +5538,32 @@ bool dimension_door(void)
 
        if (!tgt_pt(&x, &y)) return FALSE;
 
-       p_ptr->energy -= 60 - plev;
+       p_ptr->energy_need += (s16b)((s32b)(60 - plev) * ENERGY_NEED() / 100L);
 
        if (!cave_empty_bold(y, x) || (cave[y][x].info & CAVE_ICKY) ||
                (distance(y, x, py, px) > plev / 2 + 10) ||
                (!randint0(plev / 10 + 10)))
        {
-         if( p_ptr->pclass != CLASS_MIRROR_MASTER ){
+               if( p_ptr->pclass != CLASS_MIRROR_MASTER ){
 #ifdef JP
-msg_print("ÀºÎ¤«¤éʪ¼Á³¦¤ËÌá¤ë»þ¤¦¤Þ¤¯¤¤¤«¤Ê¤«¤Ã¤¿¡ª");
+                       msg_print("ÀºÎ¤«¤éʪ¼Á³¦¤ËÌá¤ë»þ¤¦¤Þ¤¯¤¤¤«¤Ê¤«¤Ã¤¿¡ª");
 #else
-               msg_print("You fail to exit the astral plane correctly!");
+                       msg_print("You fail to exit the astral plane correctly!");
 #endif
-         }
-         else {
+               }
+               else
+               {
 #ifdef JP
-msg_print("¶À¤ÎÀ¤³¦¤ò¤¦¤Þ¤¯Ä̤ì¤Ê¤«¤Ã¤¿¡ª");
+                       msg_print("¶À¤ÎÀ¤³¦¤ò¤¦¤Þ¤¯Ä̤ì¤Ê¤«¤Ã¤¿¡ª");
 #else
-               msg_print("You fail to exit the astral plane correctly!");
+                       msg_print("You fail to exit the astral plane correctly!");
 #endif
-         }
-               p_ptr->energy -= 60 - plev;
+               }
+               p_ptr->energy_need += (s16b)((s32b)(60 - plev) * ENERGY_NEED() / 100L);
                teleport_player((plev+2)*2);
        }
-       else teleport_player_to(y, x, TRUE);
+       else
+               teleport_player_to(y, x, TRUE);
 
        return (TRUE);
 }