OSDN Git Service

[Refactor] #37353 determine_random_questor() を quest.c へ移動。 / Move determine_random_q...
[hengband/hengband.git] / src / birth.c
index dda03af..fe6fc59 100644 (file)
@@ -15,6 +15,7 @@
 #include "history.h"
 #include "monsterrace-hook.h"
 #include "store.h"
+#include "quest.h"
 
 /*!
  * オートローラーの内容を描画する間隔 / 
@@ -352,6 +353,8 @@ static concptr seikaku_jouhou[MAX_SEIKAKU] =
 
 "いかさまは、初心者の練習用の性格です。あらゆる能力が高くなっています。この性格を使えば勝利者になることは容易ですが、勝利しても全く自慢になりません。",
 
+"チャージマンは「こんなところ」に連れて行かれても仕方のない可愛そうなお友達なんDA。腕っ節やタフさはマンモス並みに強いのだけれど知能面はまるで駄目なのが分かるだろう?この性格は最初から気が狂っているので、混乱したり幻覚を見る心配がないのです。",
+
 #else
 
 "\"Ordinary\" is a personality with no special skills or talents, with unmodified stats and skills.",
@@ -377,7 +380,10 @@ static concptr seikaku_jouhou[MAX_SEIKAKU] =
 
 "A \"Patient\" person does things carefully.  Patient people have high constitution, and high resilience, but poor abilities in most other skills.  Also it directly influences your hit-points.",
 
-"\"munchkin\" is a personality for beginners.  It raises all your stats and skills.  With this personality, you can win the game easily, but gain little honor in doing so."
+"\"munchkin\" is a personality for beginners.  It raises all your stats and skills.  With this personality, you can win the game easily, but gain little honor in doing so.",
+
+"\ChargeMan\" is crazy killer. It render you powerfull strength and constitution, but poor intelligence.you are not confused and seen the illusion because this you go mad from the beginning.",
+
 #endif
 };
 
@@ -1824,45 +1830,6 @@ static void player_wipe_without_name(void)
 }
 
 
-/*!
- * @brief ランダムクエストの討伐ユニークを決める / Determine the random quest uniques
- * @param q_ptr クエスト構造体の参照ポインタ
- * @return なし
- */
-void determine_random_questor(quest_type *q_ptr)
-{
-       MONRACE_IDX r_idx;
-       monster_race *r_ptr;
-
-       /* Prepare allocation table */
-       get_mon_num_prep(mon_hook_quest, NULL);
-
-       while (1)
-       {
-               /*
-                * Random monster 5 - 10 levels out of depth
-                * (depending on level)
-                */
-               r_idx = get_mon_num(q_ptr->level + 5 + randint1(q_ptr->level / 10));
-               r_ptr = &r_info[r_idx];
-
-               if (!(r_ptr->flags1 & RF1_UNIQUE)) continue;
-               if (r_ptr->flags1 & RF1_QUESTOR) continue;
-               if (r_ptr->rarity > 100) continue;
-               if (r_ptr->flags7 & RF7_FRIENDLY) continue;
-               if (r_ptr->flags7 & RF7_AQUATIC) continue;
-               if (r_ptr->flags8 & RF8_WILD_ONLY) continue;
-               if (no_questor_or_bounty_uniques(r_idx)) continue;
-
-               /*
-                * Accept monsters that are 2 - 6 levels
-                * out of depth depending on the quest level
-                */
-               if (r_ptr->level > (q_ptr->level + (q_ptr->level / 20))) break;
-       }
-
-       q_ptr->r_idx = r_idx;
-}
 
 /*!
  * @brief ダンジョン内部のクエストを初期化する / Initialize random quests and final quests
@@ -2247,8 +2214,6 @@ void player_outfit(void)
 
        case RACE_DEMON:
                /* Demon can drain vitality from humanoid corpse */
-
-               /* Prepare allocation table */
                get_mon_num_prep(monster_hook_human, NULL);
 
                for (i = rand_range(3,4); i > 0; i--)
@@ -2277,7 +2242,7 @@ void player_outfit(void)
        case RACE_ENT:
                /* Potions of Water */
                object_prep(q_ptr, lookup_kind(TV_POTION, SV_POTION_WATER));
-               q_ptr->number = (byte)rand_range(15, 23);
+               q_ptr->number = (ITEM_NUMBER)rand_range(15, 23);
                add_outfit(q_ptr);
 
                break;
@@ -2289,7 +2254,7 @@ void player_outfit(void)
                /* Fuel with oil (move pval to xtra4) */
                apply_magic(q_ptr, 1, AM_NO_FIXED_ART);
 
-               q_ptr->number = (byte)rand_range(7, 12);
+               q_ptr->number = (ITEM_NUMBER)rand_range(7, 12);
                add_outfit(q_ptr);
 
                break;
@@ -2297,7 +2262,7 @@ void player_outfit(void)
        default:
                /* Food rations */
                object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_RATION));
-               q_ptr->number = (byte)rand_range(3, 7);
+               q_ptr->number = (ITEM_NUMBER)rand_range(3, 7);
 
                add_outfit(q_ptr);
        }
@@ -2308,7 +2273,7 @@ void player_outfit(void)
                /* Hack -- Give the player scrolls of DARKNESS! */
                object_prep(q_ptr, lookup_kind(TV_SCROLL, SV_SCROLL_DARKNESS));
 
-               q_ptr->number = rand_range(2, 5);
+               q_ptr->number = (ITEM_NUMBER)rand_range(2, 5);
 
                add_outfit(q_ptr);
        }
@@ -2316,7 +2281,7 @@ void player_outfit(void)
        {
                /* Hack -- Give the player some torches */
                object_prep(q_ptr, lookup_kind(TV_LITE, SV_LITE_TORCH));
-               q_ptr->number = rand_range(3, 7);
+               q_ptr->number = (ITEM_NUMBER)rand_range(3, 7);
                q_ptr->xtra4 = rand_range(3, 7) * 500;
 
                add_outfit(q_ptr);
@@ -2349,7 +2314,7 @@ void player_outfit(void)
        {
                /* Hack -- Give the player some arrows */
                object_prep(q_ptr, lookup_kind(TV_ARROW, SV_AMMO_NORMAL));
-               q_ptr->number = (byte)rand_range(15, 20);
+               q_ptr->number = (ITEM_NUMBER)rand_range(15, 20);
 
                add_outfit(q_ptr);
        }
@@ -2358,7 +2323,7 @@ void player_outfit(void)
                /* Hack -- Give the player some arrows */
                object_prep(q_ptr, lookup_kind(TV_WAND, SV_WAND_MAGIC_MISSILE));
                q_ptr->number = 1;
-               q_ptr->pval = (byte)rand_range(25, 30);
+               q_ptr->pval = (PARAMETER_VALUE)rand_range(25, 30);
 
                add_outfit(q_ptr);
        }