OSDN Git Service

[Refactor] #37353 混沌の戦士のレイシャル「幻惑の光」を confusing_light() に分離。 / Separate Chaos warrior...
[hengband/hengband.git] / src / birth.c
index 206f843..4e4b1eb 100644 (file)
  */
 
 #include "angband.h"
+#include "avatar.h"
 #include "history.h"
 #include "monsterrace-hook.h"
 #include "store.h"
+#include "quest.h"
+#include "player-status.h"
 
 /*!
  * オートローラーの内容を描画する間隔 / 
@@ -119,7 +122,9 @@ static concptr race_jouhou[MAX_RACES] =
   
 "クターとしている無表情の謎の生物です。彼らは外見がかわいらしいため、魅力が高いです。彼らは混乱しません。なぜなら、混乱してもクターとしているため変わりないからです。しかも、そのクターとしている外見から敵に見つかりにくいです。しかし、彼らは注意力が少ないため探索や知覚能力は悪いです。彼らはレベルが上がると横に伸びてACを上げる技を覚えますが、伸びている間は魔法防御能力は低くなってしまいます。",
   
-"アンドロイドは機械の身体を持つ人工的な存在です。魔法をうまく使うことはできませんが、戦士としては非常に優れています。彼らは他の種族のように経験値を得て成長するということはありません。身体に身につける装備によって成長します。ただし、指輪、アミュレット、光源は成長に影響しません。彼らは毒の耐性を持ち、麻痺知らずで、生命力を吸収されることがありません。また、身体が頑丈なのでACにボーナスを得ます。しかし身体のいたるところに電子回路が組み込まれているため、電撃によって通常よりも大きなダメージを受けてしまいます。彼らは食物からほとんど動力を得られませんが、油を補給する事で動力源を得る事ができます。"
+"アンドロイドは機械の身体を持つ人工的な存在です。魔法をうまく使うことはできませんが、戦士としては非常に優れています。彼らは他の種族のように経験値を得て成長するということはありません。身体に身につける装備によって成長します。ただし、指輪、アミュレット、光源は成長に影響しません。彼らは毒の耐性を持ち、麻痺知らずで、生命力を吸収されることがありません。また、身体が頑丈なのでACにボーナスを得ます。しかし身体のいたるところに電子回路が組み込まれているため、電撃によって通常よりも大きなダメージを受けてしまいます。彼らは食物からほとんど動力を得られませんが、油を補給する事で動力源を得る事ができます。",
+
+"マーフォーク実装中",
 
 #else
 
@@ -197,6 +202,8 @@ static concptr race_jouhou[MAX_RACES] =
 
 "An android is a artificial creation with a body of machinery.  They are poor at spell casting, but they make excellent warriors.  They don't acquire experience like other races, but rather gain in power as they attach new equipment to their frame.  Rings, amulets, and lights do not influence growth.  Androids are resistant to poison, can move freely, and are immune to exp-draining attacks.  Moreover, because of their hard metallic bodies, they get a bonus to AC.  Androids have electronic circuits throughout their body and must beware of electric shocks.  They gain very little nutrition from the food of mortals, but they can use flasks of oil as their energy source."
 
+"Merfolk implementing.",
+
 #endif
 };
 
@@ -348,6 +355,8 @@ static concptr seikaku_jouhou[MAX_SEIKAKU] =
 
 "いかさまは、初心者の練習用の性格です。あらゆる能力が高くなっています。この性格を使えば勝利者になることは容易ですが、勝利しても全く自慢になりません。",
 
+"チャージマンは「こんなところ」に連れて行かれても仕方のない可愛そうなお友達なんDA。腕っ節やタフさはマンモス並みに強いのだけれど知能面はまるで駄目なのが分かるだろう?この性格は最初から気が狂っているので、混乱したり幻覚を見る心配がないのです。",
+
 #else
 
 "\"Ordinary\" is a personality with no special skills or talents, with unmodified stats and skills.",
@@ -373,7 +382,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
 };
 
@@ -1228,6 +1240,7 @@ static void get_history(void)
                case RACE_HUMAN:
                case RACE_BARBARIAN:
                case RACE_DUNADAN:
+               case RACE_MERFOLK:
                {
                        chart = 1;
                        break;
@@ -1819,45 +1832,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
@@ -2242,8 +2216,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--)
@@ -2272,7 +2244,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;
@@ -2284,7 +2256,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;
@@ -2292,7 +2264,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);
        }
@@ -2303,7 +2275,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);
        }
@@ -2311,13 +2283,20 @@ 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);
        }
        q_ptr = &forge;
 
+       if (p_ptr->prace == RACE_MERFOLK)
+       {
+               object_prep(q_ptr, lookup_kind(TV_RING, SV_RING_LEVITATION_FALL));
+               q_ptr->number = 1;
+               add_outfit(q_ptr);
+       }
+
        if ((p_ptr->pclass == CLASS_RANGER) || (p_ptr->pclass == CLASS_CAVALRY))
        {
                /* Hack -- Give the player some arrows */
@@ -2337,7 +2316,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);
        }
@@ -2346,7 +2325,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);
        }
@@ -2694,13 +2673,13 @@ static bool get_player_class(void)
                                else
                                        sprintf(cur, "%c%c%s", sym[cs], p2, str);
 
-                                       c_put_str(TERM_L_BLUE, cp_ptr->title, 3, 40);
-                                       put_str(_("の職業修正", ": Class modification"), 3, 40+strlen(cp_ptr->title));
-                                       put_str(_("腕力 知能 賢さ 器用 耐久 魅力 経験 ", "Str  Int  Wis  Dex  Con  Chr   EXP "), 4, 40);
-                                       sprintf(buf, "%+3d  %+3d  %+3d  %+3d  %+3d  %+3d %+4d%% ",
-                                               cp_ptr->c_adj[0], cp_ptr->c_adj[1], cp_ptr->c_adj[2], cp_ptr->c_adj[3],
-                                               cp_ptr->c_adj[4], cp_ptr->c_adj[5], cp_ptr->c_exp);
-                                       c_put_str(TERM_L_BLUE, buf, 5, 40);
+                               c_put_str(TERM_L_BLUE, cp_ptr->title, 3, 40);
+                               put_str(_("の職業修正", ": Class modification"), 3, 40 + strlen(cp_ptr->title));
+                               put_str(_("腕力 知能 賢さ 器用 耐久 魅力 経験 ", "Str  Int  Wis  Dex  Con  Chr   EXP "), 4, 40);
+                               sprintf(buf, "%+3d  %+3d  %+3d  %+3d  %+3d  %+3d %+4d%% ",
+                                       cp_ptr->c_adj[0], cp_ptr->c_adj[1], cp_ptr->c_adj[2], cp_ptr->c_adj[3],
+                                       cp_ptr->c_adj[4], cp_ptr->c_adj[5], cp_ptr->c_exp);
+                               c_put_str(TERM_L_BLUE, buf, 5, 40);
                        }
                        c_put_str(TERM_YELLOW, cur, 13 + (cs / 4), 2 + 19 * (cs % 4));
                        os = cs;
@@ -4726,4 +4705,3 @@ void dump_yourself(FILE *fff)
                }
        }
 }
-