*/
#include "angband.h"
+#include "avatar.h"
#include "history.h"
#include "monsterrace-hook.h"
#include "store.h"
+#include "quest.h"
+#include "player-status.h"
/*!
* オートローラーの内容を描画する間隔 /
/*! 種族の解説メッセージテーブル */
-static cptr race_jouhou[MAX_RACES] =
+static concptr race_jouhou[MAX_RACES] =
{
#ifdef JP
"人間は基本となるキャラクタです。他の全ての種族は人間と比較されます。人間はどんな職業に就くこともでき、どの職業でも平均的にこなせます。人間は寿命が短いため、レベル上昇が他のどんな種族よりも早くなる傾向があります。また、特別な修正や特性は持っていません。",
"クターとしている無表情の謎の生物です。彼らは外見がかわいらしいため、魅力が高いです。彼らは混乱しません。なぜなら、混乱してもクターとしているため変わりないからです。しかも、そのクターとしている外見から敵に見つかりにくいです。しかし、彼らは注意力が少ないため探索や知覚能力は悪いです。彼らはレベルが上がると横に伸びてACを上げる技を覚えますが、伸びている間は魔法防御能力は低くなってしまいます。",
-"アンドロイドは機械の身体を持つ人工的な存在です。魔法をうまく使うことはできませんが、戦士としては非常に優れています。彼らは他の種族のように経験値を得て成長するということはありません。身体に身につける装備によって成長します。ただし、指輪、アミュレット、光源は成長に影響しません。彼らは毒の耐性を持ち、麻痺知らずで、生命力を吸収されることがありません。また、身体が頑丈なのでACにボーナスを得ます。しかし身体のいたるところに電子回路が組み込まれているため、電撃によって通常よりも大きなダメージを受けてしまいます。彼らは食物からほとんど動力を得られませんが、油を補給する事で動力源を得る事ができます。"
+"アンドロイドは機械の身体を持つ人工的な存在です。魔法をうまく使うことはできませんが、戦士としては非常に優れています。彼らは他の種族のように経験値を得て成長するということはありません。身体に身につける装備によって成長します。ただし、指輪、アミュレット、光源は成長に影響しません。彼らは毒の耐性を持ち、麻痺知らずで、生命力を吸収されることがありません。また、身体が頑丈なのでACにボーナスを得ます。しかし身体のいたるところに電子回路が組み込まれているため、電撃によって通常よりも大きなダメージを受けてしまいます。彼らは食物からほとんど動力を得られませんが、油を補給する事で動力源を得る事ができます。",
+
+"マーフォーク実装中",
#else
"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
};
/*! 職業の解説メッセージテーブル */
-static cptr class_jouhou[MAX_CLASS] =
+static concptr class_jouhou[MAX_CLASS] =
{
#ifdef JP
"戦士は、直面する問題のほとんどを細切れに叩き切ることで解決するキャラクタです。が、時折退却して魔法の道具の世話になることもあります。不運にも、高レベルなアイテムの多くは彼らが扱える範囲を越えています。",
};
/*! 性格の解説メッセージテーブル */
-static cptr seikaku_jouhou[MAX_SEIKAKU] =
+static concptr seikaku_jouhou[MAX_SEIKAKU] =
{
#ifdef JP
"ふつうは、特に特筆するべき部分がない性格です。あらゆる技能を平均的にこなします。",
"いかさまは、初心者の練習用の性格です。あらゆる能力が高くなっています。この性格を使えば勝利者になることは容易ですが、勝利しても全く自慢になりません。",
+"チャージマンは「こんなところ」に連れて行かれても仕方のない可愛そうなお友達なんDA。腕っ節やタフさはマンモス並みに強いのだけれど知能面はまるで駄目なのが分かるだろう?この性格は最初から気が狂っているので、混乱したり幻覚を見る心配がないのです。",
+
#else
"\"Ordinary\" is a personality with no special skills or talents, with unmodified stats and skills.",
"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
};
/*! 魔法領域の詳細解説メッセージテーブル */
-static cptr realm_jouhou[VALID_REALM] =
+static concptr realm_jouhou[VALID_REALM] =
{
#ifdef JP
"生命は回復能力に優れた魔法です。治療や防御、感知魔法が多く含まれていますが、攻撃呪文もわずかに持っています。特に高レベルの呪文にはアンデッドを塵に帰す力をあると言われています。",
};
/*! 魔法領域の簡易解説メッセージテーブル */
-static cptr realm_subinfo[VALID_REALM] =
+static concptr realm_subinfo[VALID_REALM] =
{
#ifdef JP
"感知と防御と回復に優れています",
* @param helpfile ファイル名
* @return なし
*/
-static void show_help(cptr helpfile)
+static void show_help(concptr helpfile)
{
screen_save();
-
- /* Peruse the help file */
(void)show_file(TRUE, helpfile, NULL, 0, 0);
screen_load();
}
}
/* Extra info */
-#ifdef JP
- put_str ("注意:魔法の領域の選択によりあなたが習得する呪文のタイプが決まります。", 23, 5);
-#else
- put_str ("Note: The realm of magic will determine which spells you can learn.", 23, 5);
-#endif
+ put_str (_("注意:魔法の領域の選択によりあなたが習得する呪文のタイプが決まります。", "Note: The realm of magic will determine which spells you can learn."), 23, 5);
cs = 0;
- for (i = 0; i<32; i++)
+ for (i = 0; i < 32; i++)
{
/* Analize realms */
if (choices & (1L << i))
picks[n++] = i+1;
}
}
-#ifdef JP
- sprintf(cur, "%c%c %s", '*', p2, "ランダム");
-#else
- sprintf(cur, "%c%c %s", '*', p2, "Random");
-#endif
+ sprintf(cur, "%c%c %s", '*', p2, _("ランダム", "Random"));
/* Get a realm */
k = -1;
if(cs == n)
{
-#ifdef JP
- sprintf(cur, "%c%c %s", '*', p2, "ランダム");
-#else
- sprintf(cur, "%c%c %s", '*', p2, "Random");
-#endif
+ sprintf(cur, "%c%c %s", '*', p2, _("ランダム", "Random"));
}
else
{
if (k >= 0) break;
-#ifdef JP
- sprintf(buf, "領域を選んで下さい(%c-%c) ('='初期オプション設定): ", sym[0], sym[n-1]);
-#else
- sprintf(buf, "Choose a realm (%c-%c) ('=' for options): ", sym[0], sym[n-1]);
-#endif
+ sprintf(buf, _("領域を選んで下さい(%c-%c) ('='初期オプション設定): ", "Choose a realm (%c-%c) ('=' for options): "), sym[0], sym[n-1]);
put_str(buf, 10, 10);
c = inkey();
else k = -1;
if (c == '?')
{
-#ifdef JP
- show_help("jmagic.txt#MagicRealms");
-#else
- show_help("magic.txt#MagicRealms");
-#endif
+ show_help(_("jmagic.txt#MagicRealms", "magic.txt#MagicRealms"));
}
else if (c == '=')
{
screen_save();
-#ifdef JP
- do_cmd_options_aux(OPT_PAGE_BIRTH, "初期オプション((*)はスコアに影響)");
-#else
- do_cmd_options_aux(OPT_PAGE_BIRTH, "Birth option((*)s effect score)");
-#endif
+ do_cmd_options_aux(OPT_PAGE_BIRTH, _("初期オプション((*)はスコアに影響)", "Birth option((*)s effect score)"));
screen_load();
}
while (1)
{
char temp[80*10];
- cptr t;
+ concptr t;
count = 0;
p_ptr->realm1 = choose_realm(realm_choices1[p_ptr->pclass], &count);
if (count < 2)
{
-#ifdef JP
- prt("何かキーを押してください", 0, 0);
-#else
- prt("Hit any key.", 0, 0);
-#endif
+ prt(_("何かキーを押してください", "Hit any key."), 0, 0);
(void)inkey();
prt("", 0, 0);
break;
}
-else
-#ifdef JP
- if (get_check_strict("よろしいですか?", CHECK_DEFAULT_Y)) break;
-#else
- if (get_check_strict("Are you sure? ", CHECK_DEFAULT_Y)) break;
-#endif
+ else if (get_check_strict(_("よろしいですか?", "Are you sure? "), CHECK_DEFAULT_Y)) break;
}
/* Select the second realm */
if (p_ptr->realm1)
{
/* Print the realm */
-#ifdef JP
- put_str("魔法 :", 6, 1);
-#else
- put_str("Magic :", 6, 1);
-#endif
-
+ put_str(_("魔法 :", "Magic :"), 6, 1);
c_put_str(TERM_L_BLUE, realm_names[p_ptr->realm1], 6, 15);
/* Select the second realm */
while (1)
{
char temp[80*8];
- cptr t;
+ concptr t;
count = 0;
p_ptr->realm2 = choose_realm(realm_choices2[p_ptr->pclass], &count);
roff_to_buf(realm_jouhou[technic2magic(p_ptr->realm2)-1], 74, temp, sizeof(temp));
t = temp;
- for (i = 0; i< 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
if(t[0] == 0)
break;
if (count < 2)
{
-#ifdef JP
- prt("何かキーを押してください", 0, 0);
-#else
- prt("Hit any key.", 0, 0);
-#endif
+ prt(_("何かキーを押してください", "Hit any key."), 0, 0);
(void)inkey();
prt("", 0, 0);
break;
}
-#ifdef JP
- else if (get_check_strict("よろしいですか?", CHECK_DEFAULT_Y)) break;
-#else
- else if (get_check_strict("Are you sure? ", CHECK_DEFAULT_Y)) break;
-#endif
+ else if (get_check_strict(_("よろしいですか?", "Are you sure? "), CHECK_DEFAULT_Y)) break;
}
if (p_ptr->realm2)
{
birther_ptr->au = p_ptr->au;
/* Save the stats */
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
birther_ptr->stat_max[i] = p_ptr->stat_max[i];
birther_ptr->stat_max_max[i] = p_ptr->stat_max_max[i];
p_ptr->au = previous_char.au;
/* Load the stats */
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
p_ptr->stat_cur[i] = p_ptr->stat_max[i] = previous_char.stat_max[i];
p_ptr->stat_max_max[i] = previous_char.stat_max_max[i];
*/
void get_max_stats(void)
{
- int i, j;
-
- int dice[6];
+ int i, j;
+ int dice[6];
/* Roll and verify some stats */
while (TRUE)
{
/* Roll some dice */
- for (j = i = 0; i < 6; i++)
+ for (j = i = 0; i < A_MAX; i++)
{
/* Roll the dice */
dice[i] = randint1(7);
}
/* Acquire the stats */
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
BASE_STATUS max_max = 18 + 60 + dice[i]*10;
case RACE_HUMAN:
case RACE_BARBARIAN:
case RACE_DUNADAN:
+ case RACE_MERFOLK:
{
chart = 1;
break;
gold += 2000;
/* Process the stats */
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
/* Mega-Hack -- reduce gold for high stats */
if (p_ptr->stat_max[i] >= 18 + 50) gold -= 300;
{
int i, j, m, p;
int col;
- byte attr;
+ TERM_COLOR attr;
char buf[80];
{
col = 42;
/* Put the stats (and percents) */
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
/* Race/Class bonus */
j = rp_ptr->r_adj[i] + cp_ptr->c_adj[i] + ap_ptr->a_adj[i];
}
-/*!
- * @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
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--)
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;
/* 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;
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);
}
/* 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);
}
{
/* 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 */
{
/* 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);
}
/* 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);
}
static bool get_player_race(void)
{
int k, n, cs, os;
- cptr str;
+ concptr str;
char c;
char sym[MAX_RACES];
char p2 = ')';
char sym[MAX_CLASS_CHOICE];
char p2 = ')';
char buf[80], cur[80];
- cptr str;
+ concptr str;
/* Extra info */
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;
*/
static bool get_player_seikaku(void)
{
- CHARACTER_IDX k;
+ int k;
int n, os, cs;
char c;
char sym[MAX_SEIKAKU];
char p2 = ')';
char buf[80], cur[80];
char tmp[64];
- cptr str;
+ concptr str;
/* Extra info */
clear_from(10);
}
/* Set seikaku */
- p_ptr->pseikaku = k;
+ p_ptr->pseikaku = (CHARACTER_IDX)k;
ap_ptr = &seikaku_info[p_ptr->pseikaku];
#ifdef JP
strcpy(tmp, ap_ptr->title);
#endif
strcat(tmp,p_ptr->name);
- /* Display */
c_put_str(TERM_L_BLUE, tmp, 1, 34);
return TRUE;
put_str(_(" 基本値 種族 職業 性格 合計値 最大値", " Base Rac Cla Per Total Maximum"), 13, 10);
/* Output the maximum stats */
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
/* Reset the "success" counter */
stat_match[i] = 0;
{
c_put_str(TERM_WHITE, _("決定する", "Accept"), 21, 35);
}
- else if(os < 6)
+ else if(os < A_MAX)
{
c_put_str(TERM_WHITE, cur, 14 + os, 10);
}
break;
case '2':
case 'j':
- if (cs < 6) cs++;
+ if (cs < A_MAX) cs++;
break;
case '4':
case 'h':
if(c == ESCAPE || ((c == ' ' || c == '\r' || c == '\n') && cs == 6))break;
}
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
/* Save the minimum stat */
stat_limit[i] = (s16b)cval[i];
int max_percent, min_percent;
char c;
char buf[80], cur[80];
- cptr itemname[] = {
+ concptr itemname[] = {
_("年齢", "age"),
_("身長(インチ)", "height"),
_("体重(ポンド)", "weight"),
* @brief 生い立ちメッセージの内容をバッファに加える。 / Hook function for reading the histpref.prf file.
* @return なし
*/
-void add_history_from_pref_line(cptr t)
+void add_history_from_pref_line(concptr t)
{
/* Do nothing if the buffer is not ready */
if (!histpref_buf) return;
bool flag = FALSE;
bool prev = FALSE;
- cptr str;
+ concptr str;
char c;
while(1)
{
char temp[80*10];
- cptr t;
+ concptr t;
if (!get_player_race()) return FALSE;
while(1)
{
char temp[80*9];
- cptr t;
+ concptr t;
if (!get_player_class()) return FALSE;
while(1)
{
char temp[80*8];
- cptr t;
+ concptr t;
if (!get_player_seikaku()) return FALSE;
roff_to_buf(seikaku_jouhou[p_ptr->pseikaku], 74, temp, sizeof(temp));
t = temp;
- for (i = 0; i< 6; i++)
+ for (i = 0; i< A_MAX; i++)
{
if(t[0] == 0)
break;
/* Put the minimal stats */
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
int j, m;
if (autoroller)
{
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
stat_match[i] = 0;
}
if (autoroller)
{
/* Check and count acceptable stats */
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
/* This stat is okay */
if (p_ptr->stat_max[i] >= stat_limit[i])
/* Flush input */
flush();
-
/*** Display ***/
/* Mode */
{
/* Calculate the bonuses and hitpoints */
p_ptr->update |= (PU_BONUS | PU_HP);
- handle_stuff();
+ update_creature(p_ptr);
p_ptr->chp = p_ptr->mhp;
p_ptr->csp = p_ptr->msp;
/* Calc hitdie, but don't roll */
get_extra(FALSE);
- /* Calculate the bonuses and hitpoints */
p_ptr->update |= (PU_BONUS | PU_HP);
-
- handle_stuff();
-
- /* Fully healed */
+ update_creature(p_ptr);
p_ptr->chp = p_ptr->mhp;
-
- /* Fully rested */
p_ptr->csp = p_ptr->msp;
/* Process the player name */
{
char temp[80*10];
int i;
- cptr t;
+ concptr t;
if (!fff) return;
fprintf(fff, _("性格: %s\n", "Pesonality: %s\n"), seikaku_info[p_ptr->pseikaku].title);
t = temp;
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
if(t[0] == 0)
break;
fprintf(fff, _("魔法: %s\n", "Realm: %s\n"), realm_names[p_ptr->realm1]);
t = temp;
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
if(t[0] == 0)
break;
fprintf(fff, _("魔法: %s\n", "Realm: %s\n"), realm_names[p_ptr->realm2]);
t = temp;
- for (i = 0; i < 6; i++)
+ for (i = 0; i < A_MAX; i++)
{
if(t[0] == 0)
break;
}
}
}
-