OSDN Git Service

undo failed-commit.
[hengband/hengband.git] / src / do-spell.c
index 64c7b0c..44945e6 100644 (file)
@@ -277,15 +277,15 @@ static void cast_wonder(int dir)
        }
 
        if (die < 8) clone_monster(dir);
-       else if (die < 14) speed_monster(dir);
+       else if (die < 14) speed_monster(dir, plev);
        else if (die < 26) heal_monster(dir, damroll(4, 6));
-       else if (die < 31) poly_monster(dir);
+       else if (die < 31) poly_monster(dir, plev);
        else if (die < 36)
                fire_bolt_or_beam(beam_chance() - 10, GF_MISSILE, dir,
                                  damroll(3 + ((plev - 1) / 5), 4));
        else if (die < 41) confuse_monster(dir, plev);
        else if (die < 46) fire_ball(GF_POIS, dir, 20 + (plev / 2), 3);
-       else if (die < 51) (void)lite_line(dir);
+       else if (die < 51) (void)lite_line(dir, damroll(6, 8));
        else if (die < 56)
                fire_bolt_or_beam(beam_chance() - 10, GF_ELEC, dir,
                                  damroll(3 + ((plev - 5) / 4), 8));
@@ -320,8 +320,8 @@ static void cast_wonder(int dir)
        else /* RARE */
        {
                dispel_monsters(150);
-               slow_monsters();
-               sleep_monsters();
+               slow_monsters(plev);
+               sleep_monsters(plev);
                hp_player(300);
        }
 }
@@ -396,7 +396,7 @@ static void cast_invoke_spirits(int dir)
        }
        else if (die < 31)
        {
-               poly_monster(dir);
+               poly_monster(dir, plev);
        }
        else if (die < 36)
        {
@@ -413,7 +413,7 @@ static void cast_invoke_spirits(int dir)
        }
        else if (die < 51)
        {
-               (void)lite_line(dir);
+               (void)lite_line(dir, damroll(6, 8));
        }
        else if (die < 56)
        {
@@ -478,8 +478,8 @@ static void cast_invoke_spirits(int dir)
        else
        { /* RARE */
                dispel_monsters(150);
-               slow_monsters();
-               sleep_monsters();
+               slow_monsters(plev);
+               sleep_monsters(plev);
                hp_player(300);
        }
 
@@ -2046,7 +2046,7 @@ static cptr do_sorcery_spell(int spell, int mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               sleep_monster(dir);
+                               sleep_monster(dir, plev);
                        }
                }
                break;
@@ -2128,7 +2128,7 @@ static cptr do_sorcery_spell(int spell, int mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               slow_monster(dir);
+                               slow_monster(dir, plev);
                        }
                }
                break;
@@ -2149,7 +2149,7 @@ static cptr do_sorcery_spell(int spell, int mode)
 
                        if (cast)
                        {
-                               sleep_monsters();
+                               sleep_monsters(plev);
                        }
                }
                break;
@@ -2836,7 +2836,7 @@ static cptr do_nature_spell(int spell, int mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               wall_to_mud(dir);
+                               wall_to_mud(dir, 20 + randint1(30));
                        }
                }
                break;
@@ -2937,7 +2937,7 @@ static cptr do_nature_spell(int spell, int mode)
                                msg_print("A line of sunlight appears.");
 #endif
 
-                               lite_line(dir);
+                               lite_line(dir, damroll(6, 8));
                        }
                }
                break;
@@ -2958,7 +2958,7 @@ static cptr do_nature_spell(int spell, int mode)
 
                        if (cast)
                        {
-                               slow_monsters();
+                               slow_monsters(plev);
                        }
                }
                break;
@@ -3810,7 +3810,7 @@ static cptr do_chaos_spell(int spell, int mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               poly_monster(dir);
+                               poly_monster(dir, plev);
                        }
                }
                break;
@@ -4333,7 +4333,7 @@ static cptr do_death_spell(int spell, int mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               sleep_monster(dir);
+                               sleep_monster(dir, plev);
                        }
                }
                break;
@@ -5354,7 +5354,7 @@ static cptr do_trump_spell(int spell, int mode)
 
                                if (!result) return NULL;
 
-                               speed_monster(dir);
+                               speed_monster(dir, plev);
                        }
                }
                break;
@@ -6412,7 +6412,7 @@ static cptr do_arcane_spell(int spell, int mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               wall_to_mud(dir);
+                               wall_to_mud(dir, 20 + randint1(30));
                        }
                }
                break;
@@ -6442,7 +6442,7 @@ static cptr do_arcane_spell(int spell, int mode)
                                msg_print("A line of light appears.");
 #endif
 
-                               lite_line(dir);
+                               lite_line(dir, damroll(6, 8));
                        }
                }
                break;
@@ -8888,7 +8888,7 @@ static cptr do_crusade_spell(int spell, int mode)
                        {
                                project(0, 1, py, px, b_dam, GF_HOLY_FIRE, PROJECT_KILL, -1);
                                dispel_monsters(d_dam);
-                               slow_monsters();
+                               slow_monsters(plev);
                                stun_monsters(power);
                                confuse_monsters(power);
                                turn_monsters(power);
@@ -8995,7 +8995,7 @@ static cptr do_music_spell(int spell, int mode)
 
                        if (cont)
                        {
-                               slow_monsters();
+                               slow_monsters(plev);
                        }
                }
                break;
@@ -9801,8 +9801,8 @@ static cptr do_music_spell(int spell, int mode)
 
                        if (cont)
                        {
-                               slow_monsters();
-                               sleep_monsters();
+                               slow_monsters(plev);
+                               sleep_monsters(plev);
                        }
                }
 
@@ -10280,7 +10280,7 @@ static cptr do_hissatsu_spell(int spell, int mode)
     
                if (cast)
                {
-                       if (!do_cmd_throw_aux(1, TRUE, 0)) return NULL;
+                       if (!do_cmd_throw_aux(1, TRUE, -1)) return NULL;
                }
                break;
 
@@ -11685,10 +11685,10 @@ static cptr do_hex_spell(int spell, int mode)
        case 7:
 #ifdef JP
                if (name) return "²æËý";
-               if (desc) return "¿ô¥¿¡¼¥ó¹¶·â¤òÂѤ¨¡¢¼õ¤±¤¿¥À¥á¡¼¥¸¤Î1/5¤òËâÎϤεå¤È¤·¤ÆÊü¤Ä¡£";
+               if (desc) return "¿ô¥¿¡¼¥ó¹¶·â¤òÂѤ¨¤¿¸å¡¢¼õ¤±¤¿¥À¥á¡¼¥¸¤òÃϹö¤Î¶È²Ð¤È¤·¤Æ¼þ°Ï¤ËÊü½Ð¤¹¤ë¡£";
 #else
                if (name) return "Patience";
-               if (desc) return "Fires strong mana ball after patient any damage while few turns.";
+               if (desc) return "Bursts hell fire strongly after patients any damage while few turns.";
 #endif
                power = MIN(200, (p_ptr->magic_num1[2] * 2));
                if (info) return info_damage(0, 0, power);
@@ -11743,6 +11743,10 @@ static cptr do_hex_spell(int spell, int mode)
                                        msg_format("You return %d damages.", power);
 #endif
                                }
+
+                               /* Reset */
+                               p_ptr->magic_num2[1] = 0;
+                               p_ptr->magic_num2[2] = 0;
                                p_ptr->magic_num1[2] = 0;
                        }
                }
@@ -12169,8 +12173,13 @@ static cptr do_hex_spell(int spell, int mode)
                {
                        object_type *o_ptr = &inventory[INVEN_OUTER];
 
-                       if (!o_ptr->k_idx) do_spell(REALM_HEX, spell, SPELL_STOP);
-                       if (!object_is_cursed(o_ptr)) do_spell(REALM_HEX, spell, SPELL_STOP);
+                       if ((!o_ptr->k_idx) || (!object_is_cursed(o_ptr)))
+                       {
+                               do_spell(REALM_HEX, spell, SPELL_STOP);
+                               p_ptr->magic_num1[0] &= ~(1L << spell);
+                               p_ptr->magic_num2[0]--;
+                               if (!p_ptr->magic_num2[0]) set_action(ACTION_NONE);
+                       }
                }
                if (stop)
                {
@@ -12383,20 +12392,20 @@ static cptr do_hex_spell(int spell, int mode)
                if (cast)
                {
 #ifdef JP
-                       msg_print("Éð´ï¤Î³é˾¤¬¾Ã¤¨µî¤Ã¤¿¡£");
+                       msg_print("¤¢¤Ê¤¿¤ÎÉð´ï¤¬·ì¤òÍߤ·¤Æ¤¤¤ë¡£");
 #else
-                       msg_format("Thirsty of weapon%s disappeared.", (empty_hands(FALSE)) ? "" : "s");
+                       if (!empty_hands(FALSE))
+                               msg_print("Your weapons want more blood now.");
+                       else
+                               msg_print("Your weapon wants more blood now.");
 #endif
                }
                if (stop)
                {
 #ifdef JP
-                       msg_print("¤¢¤Ê¤¿¤ÎÉð´ï¤¬·ì¤òÍߤ·¤Æ¤¤¤ë¡£");
+                       msg_print("Éð´ï¤Î³é˾¤¬¾Ã¤¨µî¤Ã¤¿¡£");
 #else
-                       if (!empty_hands(FALSE))
-                               msg_print("Your weapons want more blood now.");
-                       else
-                               msg_print("Your weapon wants more blood now.");
+                       msg_format("Thirsty of weapon%s disappeared.", (empty_hands(FALSE)) ? "" : "s");
 #endif
                }
                break;
@@ -12498,10 +12507,10 @@ static cptr do_hex_spell(int spell, int mode)
        case 31:
 #ifdef JP
                if (name) return "Éü½²¤ÎÀë¹ð";
-               if (desc) return "¿ô¥¿¡¼¥ó¸å¤Ë¡¢¤½¤ì¤Þ¤Ç¼õ¤±¤¿¥À¥á¡¼¥¸¤Ë±þ¤¸¤¿°ÒÎϤÎËâË¡¤ÎÃƤò¡¢ÂоݤΥâ¥ó¥¹¥¿¡¼¤¬¤½¤Î»þ¤¤¤¿°ÌÃÖ¤ËÊü¤Ä¡£";
+               if (desc) return "¿ô¥¿¡¼¥ó¸å¤Ë¤½¤ì¤Þ¤Ç¼õ¤±¤¿¥À¥á¡¼¥¸¤Ë±þ¤¸¤¿°ÒÎϤÎÃϹö¤Î¹å²Ð¤ÎÃƤòÊü¤Ä¡£";
 #else
                if (name) return "Revenge sentence";
-               if (desc) return "Fires magic ball to revenge after few turns.";
+               if (desc) return "Fires  a ball of hell fire to try revenging after few turns.";
 #endif
                power = p_ptr->magic_num1[2];
                if (info) return info_damage(0, 0, power);