OSDN Git Service

[Refactor] #37353 後で同名の構造体を作り、feat_*と命名を一致させるため floor_type を feat_ground_type に改名...
[hengband/hengband.git] / src / spells2.c
index 39955b5..f0d7733 100644 (file)
@@ -928,9 +928,9 @@ bool cleansing_nova(player_type *creature_ptr, bool magic, bool powerful)
 bool unleash_mana_storm(player_type *creature_ptr, bool powerful)
 {
        msg_print(_("強力な魔力が敵を引き裂いた!", "Mighty magics rend your enemies!"));
-       project(0, (powerful ? 7 : 5), p_ptr->y, p_ptr->x,
+       project(0, (powerful ? 7 : 5), creature_ptr->y, creature_ptr->x,
        (randint1(200) + (powerful ? 500 : 300)) * 2, GF_MANA, PROJECT_KILL | PROJECT_ITEM | PROJECT_GRID, -1);
-       if ((p_ptr->pclass != CLASS_MAGE) && (p_ptr->pclass != CLASS_HIGH_MAGE) && (p_ptr->pclass != CLASS_SORCERER) && (p_ptr->pclass != CLASS_MAGIC_EATER) && (p_ptr->pclass != CLASS_BLUE_MAGE))
+       if ((creature_ptr->pclass != CLASS_MAGE) && (creature_ptr->pclass != CLASS_HIGH_MAGE) && (creature_ptr->pclass != CLASS_SORCERER) && (creature_ptr->pclass != CLASS_MAGIC_EATER) && (creature_ptr->pclass != CLASS_BLUE_MAGE))
        {
                (void)take_hit(DAMAGE_NOESCAPE, 50, _("コントロールし難い強力な魔力の解放", "unleashing magics too mighty to control"), -1);
        }
@@ -1542,7 +1542,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
                                        else
                                        {
                                                /* Create floor */
-                                               cave_set_feat(y, x, floor_type[randint0(100)]);
+                                               cave_set_feat(y, x, feat_ground_type[randint0(100)]);
                                        }
                                }
                                else /* In generation */
@@ -2040,7 +2040,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
                                else
                                {
                                        /* Create floor */
-                                       cave_set_feat(yy, xx, floor_type[randint0(100)]);
+                                       cave_set_feat(yy, xx, feat_ground_type[randint0(100)]);
                                }
                        }
                }
@@ -4645,145 +4645,6 @@ void cast_shuffle(void)
        }
 }
 
-bool_hack life_stream(bool_hack message, bool_hack virtue_change)
-{
-       if(virtue_change)
-       {
-               chg_virtue(V_VITALITY, 1);
-               chg_virtue(V_UNLIFE, -5);
-       }
-       if(message)
-       {
-               msg_print(_("体中に生命力が満ちあふれてきた!", "You feel life flow through your body!"));
-       }
-       restore_level();
-       (void)set_poisoned(0);
-       (void)set_blind(0);
-       (void)set_confused(0);
-       (void)set_image(0);
-       (void)set_stun(0);
-       (void)set_cut(0);
-       (void)restore_all_status();
-       (void)set_shero(0, TRUE);
-       handle_stuff();
-       hp_player(5000);
-
-       return TRUE;
-}
-
-bool_hack heroism(int base)
-{
-       bool_hack ident = FALSE;
-       if(set_afraid(0)) ident = TRUE;
-       if(set_hero(p_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE;
-       if(hp_player(10)) ident = TRUE;
-       return ident;
-}
-
-bool_hack berserk(int base)
-{
-       bool_hack ident = FALSE;
-       if (set_afraid(0)) ident = TRUE;
-       if (set_shero(p_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE;
-       if (hp_player(30)) ident = TRUE;
-       return ident;
-}
-
-bool_hack cure_light_wounds(DICE_NUMBER dice, DICE_SID sides)
-{
-       bool_hack ident = FALSE;
-       if (hp_player(damroll(dice, sides))) ident = TRUE;
-       if (set_blind(0)) ident = TRUE;
-       if (set_cut(p_ptr->cut - 10)) ident = TRUE;
-       if (set_shero(0, TRUE)) ident = TRUE;
-       return ident;
-}
-
-bool_hack cure_serious_wounds(DICE_NUMBER dice, DICE_SID sides)
-{
-       bool_hack ident = FALSE;
-       if (hp_player(damroll(dice, sides))) ident = TRUE;
-       if (set_blind(0)) ident = TRUE;
-       if (set_confused(0)) ident = TRUE;
-       if (set_cut((p_ptr->cut / 2) - 50)) ident = TRUE;
-       if (set_shero(0, TRUE)) ident = TRUE;
-       return ident;
-}
-
-bool_hack cure_critical_wounds(HIT_POINT pow)
-{
-       bool_hack ident = FALSE;
-       if (hp_player(pow)) ident = TRUE;
-       if (set_blind(0)) ident = TRUE;
-       if (set_confused(0)) ident = TRUE;
-       if (set_poisoned(0)) ident = TRUE;
-       if (set_stun(0)) ident = TRUE;
-       if (set_cut(0)) ident = TRUE;
-       if (set_shero(0, TRUE)) ident = TRUE;
-       return ident;
-}
-
-bool_hack true_healing(HIT_POINT pow)
-{
-       bool_hack ident = FALSE;
-       if (hp_player(pow)) ident = TRUE;
-       if (set_blind(0)) ident = TRUE;
-       if (set_confused(0)) ident = TRUE;
-       if (set_poisoned(0)) ident = TRUE;
-       if (set_stun(0)) ident = TRUE;
-       if (set_cut(0)) ident = TRUE;
-       if (set_image(0)) ident = TRUE;
-       return ident;
-}
-
-bool_hack restore_mana(bool_hack magic_eater)
-{
-       bool_hack ident = FALSE;
-
-       if (p_ptr->pclass == CLASS_MAGIC_EATER && magic_eater)
-       {
-               int i;
-               for (i = 0; i < EATER_EXT * 2; i++)
-               {
-                       p_ptr->magic_num1[i] += (p_ptr->magic_num2[i] < 10) ? EATER_CHARGE * 3 : p_ptr->magic_num2[i] * EATER_CHARGE / 3;
-                       if (p_ptr->magic_num1[i] > p_ptr->magic_num2[i] * EATER_CHARGE) p_ptr->magic_num1[i] = p_ptr->magic_num2[i] * EATER_CHARGE;
-               }
-               for (; i < EATER_EXT * 3; i++)
-               {
-                       KIND_OBJECT_IDX k_idx = lookup_kind(TV_ROD, i - EATER_EXT * 2);
-                       p_ptr->magic_num1[i] -= ((p_ptr->magic_num2[i] < 10) ? EATER_ROD_CHARGE * 3 : p_ptr->magic_num2[i] * EATER_ROD_CHARGE / 3)*k_info[k_idx].pval;
-                       if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;
-               }
-               msg_print(_("頭がハッキリとした。", "You feel your head clear."));
-               p_ptr->window |= (PW_PLAYER);
-               ident = TRUE;
-       }
-       else if (p_ptr->csp < p_ptr->msp)
-       {
-               p_ptr->csp = p_ptr->msp;
-               p_ptr->csp_frac = 0;
-               msg_print(_("頭がハッキリとした。", "You feel your head clear."));
-               p_ptr->redraw |= (PR_MANA);
-               p_ptr->window |= (PW_PLAYER);
-               p_ptr->window |= (PW_SPELL);
-               ident = TRUE;
-       }
-
-       return ident;
-}
-
-bool restore_all_status(void)
-{
-       bool ident = FALSE; 
-       if (do_res_stat(A_STR)) ident = TRUE;
-       if (do_res_stat(A_INT)) ident = TRUE;
-       if (do_res_stat(A_WIS)) ident = TRUE;
-       if (do_res_stat(A_DEX)) ident = TRUE;
-       if (do_res_stat(A_CON)) ident = TRUE;
-       if (do_res_stat(A_CHR)) ident = TRUE;
-       return ident;
-}
-
 /*!
  * @brief 口を使う継続的な処理を中断する
  * @return なし
@@ -5315,11 +5176,11 @@ bool sword_dancing(player_type *creature_ptr)
 bool confusing_light(player_type *creature_ptr)
 {
        msg_print(_("辺りを睨んだ...", "You glare nearby monsters..."));
-       slow_monsters(p_ptr->lev);
-       stun_monsters(p_ptr->lev * 4);
-       confuse_monsters(p_ptr->lev * 4);
-       turn_monsters(p_ptr->lev * 4);
-       stasis_monsters(p_ptr->lev * 4);
+       slow_monsters(creature_ptr->lev);
+       stun_monsters(creature_ptr->lev * 4);
+       confuse_monsters(creature_ptr->lev * 4);
+       turn_monsters(creature_ptr->lev * 4);
+       stasis_monsters(creature_ptr->lev * 4);
        return TRUE;
 }