*/
#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
"人間は基本となるキャラクタです。他の全ての種族は人間と比較されます。人間はどんな職業に就くこともでき、どの職業でも平均的にこなせます。人間は寿命が短いため、レベル上昇が他のどんな種族よりも早くなる傾向があります。また、特別な修正や特性は持っていません。",
};
/*! 職業の解説メッセージテーブル */
-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;
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
/* Generate quests */
for (i = MIN_RANDOM_QUEST + number_of_quests - 1; i >= MIN_RANDOM_QUEST; i--)
{
- quest_type *q_ptr = &quest[i];
- monster_race *quest_r_ptr;
+ quest_type *q_ptr = &quest[i];
+ monster_race *quest_r_ptr;
q_ptr->status = QUEST_STATUS_TAKEN;
determine_random_questor(q_ptr);
if (slot == INVEN_LITE) continue; /* Does not wield toaches because buys a lantern soon */
if (inventory[slot].k_idx) continue;
- /* Get local object */
i_ptr = &object_type_body;
object_copy(i_ptr, o_ptr);
-
- /* Modify quantity */
i_ptr->number = 1;
/* Decrease the item (from the pack) */
floor_item_optimize(0 - item);
}
- /* Get the wield slot */
o_ptr = &inventory[slot];
-
- /* Wear the new stuff */
- object_copy(o_ptr, i_ptr);
-
- /* Increase the weight */
- p_ptr->total_weight += i_ptr->weight;
+ object_copy(o_ptr, i_ptr);
+ p_ptr->total_weight += i_ptr->weight;
/* Increment the equip counter by hand */
equip_cnt++;
};
/*!
- * @brief バルログが死体を食べられるモンスターかの判定 / Hook function for human corpses
- * @param r_idx モンスターID
- * @return 死体を食べられるならTRUEを返す。
- */
-static bool monster_hook_human(MONRACE_IDX r_idx)
-{
- monster_race *r_ptr = &r_info[r_idx];
-
- if (r_ptr->flags1 & (RF1_UNIQUE)) return FALSE;
-
- if (my_strchr("pht", r_ptr->d_char)) return TRUE;
-
- return FALSE;
-}
-
-/*!
* @brief 初期所持アイテムの処理 / Add an outfit object
* @details アイテムを既知のものとした上でwield_all()関数により装備させる。
* @param o_ptr 処理したいオブジェクト構造体の参照ポインタ
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--)
{
object_prep(q_ptr, lookup_kind(TV_CORPSE, SV_CORPSE));
q_ptr->pval = get_mon_num(2);
- q_ptr->number = 1;
- add_outfit(q_ptr);
+ if(q_ptr->pval)
+ {
+ q_ptr->number = 1;
+ add_outfit(q_ptr);
+ }
}
break;
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 = (byte)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 = (byte)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);
}
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_SHOT, SV_AMMO_LIGHT));
- q_ptr->number = (byte)rand_range(15, 20);
+ q_ptr->number = rand_range(15, 20);
add_outfit(q_ptr);
}
object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_BISCUIT));
- q_ptr->number = (byte)rand_range(2, 4);
+ q_ptr->number = rand_range(2, 4);
add_outfit(q_ptr);
object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_WAYBREAD));
- q_ptr->number = (byte)rand_range(2, 4);
+ q_ptr->number = rand_range(2, 4);
add_outfit(q_ptr);
object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_JERKY));
- q_ptr->number = (byte)rand_range(1, 3);
+ q_ptr->number = rand_range(1, 3);
add_outfit(q_ptr);
object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_PINT_OF_ALE));
- q_ptr->number = (byte)rand_range(2, 4);
+ q_ptr->number = rand_range(2, 4);
add_outfit(q_ptr);
object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_PINT_OF_WINE));
- q_ptr->number = (byte)rand_range(2, 4);
+ q_ptr->number = rand_range(2, 4);
add_outfit(q_ptr);
}
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_SPIKE, 0));
- q_ptr->number = (byte)rand_range(15, 20);
+ q_ptr->number = rand_range(15, 20);
add_outfit(q_ptr);
}
{
/* Hack -- Give the player some bolts */
object_prep(q_ptr, lookup_kind(TV_BOLT, SV_AMMO_NORMAL));
- q_ptr->number = (byte)rand_range(15, 20);
+ q_ptr->number = rand_range(15, 20);
add_outfit(q_ptr);
}
/* Barbarians do not need a ring of resist fear */
sv = SV_RING_SUSTAIN_STR;
- else if (tv == TV_RING && sv == SV_RING_SUSTAIN_INT &&
- p_ptr->prace == RACE_MIND_FLAYER)
- {
+ else if (tv == TV_RING && sv == SV_RING_SUSTAIN_INT && p_ptr->prace == RACE_MIND_FLAYER)
+ {
tv = TV_POTION;
sv = SV_POTION_RESTORE_MANA;
- }
+ }
q_ptr = &forge;
/* Hack -- Give the player an object */
static bool get_player_race(void)
{
int k, n, cs, os;
- cptr str;
+ concptr str;
char c;
char sym[MAX_RACES];
char p2 = ')';
char buf[80], cur[80];
-
/* Extra info */
clear_from(10);
put_str(_("注意:《種族》によってキャラクターの先天的な資質やボーナスが変化します。",
- "Note: Your 'race' determines various intrinsic factors and bonuses."), 23, 5);
+ "Note: Your 'race' determines various intrinsic factors and bonuses."), 23, 5);
/* Dump races */
for (n = 0; n < MAX_RACES; n++)
sym[n] = I2A(n);
else
sym[n] = ('A' + n - 26);
-#ifdef JP
sprintf(buf, "%c%c%s", sym[n], p2, str);
-#else
- sprintf(buf, "%c%c %s", sym[n], p2, str);
-#endif
- put_str(buf, 12 + (n/5), 1 + 16 * (n%5));
+ put_str(buf, 12 + (n / 5), 1 + 16 * (n % 5));
}
put_str(" ", 3, 40);
if(cs == MAX_RACES)
{
-#ifdef JP
- sprintf(cur, "%c%c%s", '*', p2, "ランダム");
-#else
- sprintf(cur, "%c%c %s", '*', p2, "Random");
-#endif
+ sprintf(cur, "%c%c%s", '*', p2, _("ランダム", "Random"));
put_str(" ", 4, 40);
put_str(" ", 5, 40);
}
{
rp_ptr = &race_info[cs];
str = rp_ptr->title;
-#ifdef JP
sprintf(cur, "%c%c%s", sym[cs], p2, str);
c_put_str(TERM_L_BLUE, rp_ptr->title, 3, 40);
- put_str("の種族修正", 3, 40+strlen(rp_ptr->title));
- put_str("腕力 知能 賢さ 器用 耐久 魅力 経験 ", 4, 40);
-#else
- sprintf(cur, "%c%c %s", sym[cs], p2, str);
- c_put_str(TERM_L_BLUE, rp_ptr->title, 3, 40);
- put_str(": Race modification", 3, 40+strlen(rp_ptr->title));
- put_str("Str Int Wis Dex Con Chr EXP ", 4, 40);
-#endif
+ put_str(_("腕力 知能 賢さ 器用 耐久 魅力 経験 ", "Str Int Wis Dex Con Chr EXP "), 4, 40);
+ put_str(_("の種族修正", ": Race modification"), 3, 40 + strlen(rp_ptr->title));
+
sprintf(buf, "%+3d %+3d %+3d %+3d %+3d %+3d %+4d%% ",
rp_ptr->r_adj[0], rp_ptr->r_adj[1], rp_ptr->r_adj[2], rp_ptr->r_adj[3],
rp_ptr->r_adj[4], rp_ptr->r_adj[5], (rp_ptr->r_exp - 100));
char sym[MAX_CLASS_CHOICE];
char p2 = ')';
char buf[80], cur[80];
- cptr str;
+ concptr str;
/* Extra info */
/* Display */
if (!(rp_ptr->choice & (1L << n)))
-#ifdef JP
sprintf(buf, "%c%c(%s)", sym[n], p2, str);
-#else
- sprintf(buf, "%c%c (%s)", sym[n], p2, str);
-#endif
else
-#ifdef JP
sprintf(buf, "%c%c%s", sym[n], p2, str);
-#else
- sprintf(buf, "%c%c %s", sym[n], p2, str);
-#endif
put_str(buf, 13+ (n/4), 2 + 19 * (n%4));
}
-#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 class */
k = -1;
put_str(" ", 3, 40);
if(cs == MAX_CLASS_CHOICE)
{
-#ifdef JP
- sprintf(cur, "%c%c%s", '*', p2, "ランダム");
-#else
- sprintf(cur, "%c%c %s", '*', p2, "Random");
-#endif
+ sprintf(cur, "%c%c%s", '*', p2, _("ランダム", "Random"));
put_str(" ", 4, 40);
put_str(" ", 5, 40);
}
mp_ptr = &m_info[cs];
str = cp_ptr->title;
if (!(rp_ptr->choice & (1L << cs)))
-#ifdef JP
sprintf(cur, "%c%c(%s)", sym[cs], p2, str);
-#else
- sprintf(cur, "%c%c (%s)", sym[cs], p2, str);
-#endif
else
-#ifdef JP
sprintf(cur, "%c%c%s", sym[cs], p2, str);
-#else
- sprintf(cur, "%c%c %s", sym[cs], p2, str);
-#endif
-#ifdef JP
- c_put_str(TERM_L_BLUE, cp_ptr->title, 3, 40);
- put_str("の職業修正", 3, 40+strlen(cp_ptr->title));
- put_str("腕力 知能 賢さ 器用 耐久 魅力 経験 ", 4, 40);
-#else
- 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);
-#endif
- 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));
+ c_put_str(TERM_YELLOW, cur, 13 + (cs / 4), 2 + 19 * (cs % 4));
os = cs;
}
cp_ptr = &class_info[p_ptr->pclass];
mp_ptr = &m_info[p_ptr->pclass];
-
/* Display */
c_put_str(TERM_L_BLUE, cp_ptr->title, 5, 15);
*/
static bool get_player_seikaku(void)
{
- int k, n, os, cs;
- char c;
- char sym[MAX_SEIKAKU];
- char p2 = ')';
- char buf[80], cur[80];
- char tmp[64];
- cptr str;
-
+ int k;
+ int n, os, cs;
+ char c;
+ char sym[MAX_SEIKAKU];
+ char p2 = ')';
+ char buf[80], cur[80];
+ char tmp[64];
+ concptr str;
/* Extra info */
clear_from(10);
-#ifdef JP
- put_str("注意:《性格》によってキャラクターの能力やボーナスが変化します。", 23, 5);
-#else
- put_str("Note: Your personality determines various intrinsic abilities and bonuses.", 23, 5);
-#endif
+ put_str(_("注意:《性格》によってキャラクターの能力やボーナスが変化します。", "Note: Your personality determines various intrinsic abilities and bonuses."), 23, 5);
/* Dump seikakus */
for (n = 0; n < MAX_SEIKAKU; n++)
sym[n] = ('A' + n - 26);
/* Display */
- /* Display */
-#ifdef JP
sprintf(buf, "%c%c%s", I2A(n), p2, str);
-#else
- sprintf(buf, "%c%c %s", I2A(n), p2, str);
-#endif
put_str(buf, 12 + (n/4), 2 + 18 * (n%4));
}
-#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 seikaku */
k = -1;
put_str(" ", 3, 40);
if(cs == MAX_SEIKAKU)
{
-#ifdef JP
- sprintf(cur, "%c%c%s", '*', p2, "ランダム");
-#else
- sprintf(cur, "%c%c %s", '*', p2, "Random");
-#endif
+ sprintf(cur, "%c%c%s", '*', p2, _("ランダム", "Random"));
put_str(" ", 4, 40);
put_str(" ", 5, 40);
}
{
ap_ptr = &seikaku_info[cs];
str = ap_ptr->title;
-#ifdef JP
- sprintf(cur, "%c%c%s", sym[cs], p2, str);
-#else
- sprintf(cur, "%c%c %s", sym[cs], p2, str);
-#endif
-#ifdef JP
- c_put_str(TERM_L_BLUE, ap_ptr->title, 3, 40);
- put_str("の性格修正", 3, 40+strlen(ap_ptr->title));
- put_str("腕力 知能 賢さ 器用 耐久 魅力 ", 4, 40);
-#else
- c_put_str(TERM_L_BLUE, ap_ptr->title, 3, 40);
- put_str(": Personality modification", 3, 40+strlen(ap_ptr->title));
- put_str("Str Int Wis Dex Con Chr ", 4, 40);
-#endif
- sprintf(buf, "%+3d %+3d %+3d %+3d %+3d %+3d ",
- ap_ptr->a_adj[0], ap_ptr->a_adj[1], ap_ptr->a_adj[2], ap_ptr->a_adj[3],
- ap_ptr->a_adj[4], ap_ptr->a_adj[5]);
- c_put_str(TERM_L_BLUE, buf, 5, 40);
+ sprintf(cur, "%c%c%s", sym[cs], p2, str);
+ c_put_str(TERM_L_BLUE, ap_ptr->title, 3, 40);
+ put_str(_("の性格修正", ": Personality modification"), 3, 40+strlen(ap_ptr->title));
+ put_str(_("腕力 知能 賢さ 器用 耐久 魅力 ", "Str Int Wis Dex Con Chr "), 4, 40);
+ sprintf(buf, "%+3d %+3d %+3d %+3d %+3d %+3d ",
+ ap_ptr->a_adj[0], ap_ptr->a_adj[1], ap_ptr->a_adj[2], ap_ptr->a_adj[3],
+ ap_ptr->a_adj[4], ap_ptr->a_adj[5]);
+ c_put_str(TERM_L_BLUE, buf, 5, 40);
}
c_put_str(TERM_YELLOW, cur, 12 + (cs/4), 2 + 18 * (cs%4));
os = cs;
if (k >= 0) break;
-#ifdef JP
- sprintf(buf, "性格を選んで下さい (%c-%c) ('='初期オプション設定): ", sym[0], sym[MAX_SEIKAKU-1]);
-#else
- sprintf(buf, "Choose a personality (%c-%c) ('=' for options): ", sym[0], sym[MAX_SEIKAKU-1]);
-#endif
+ sprintf(buf, _("性格を選んで下さい (%c-%c) ('='初期オプション設定): ", "Choose a personality (%c-%c) ('=' for options): "), sym[0], sym[MAX_SEIKAKU-1]);
put_str(buf, 10, 10);
c = inkey();
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();
}
else if (c !='2' && c !='4' && c !='6' && c !='8') bell();
}
/* Set seikaku */
- p_ptr->pseikaku = (byte_hack)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;
clear_from(10);
/* Extra infomation */
-#ifdef JP
- put_str("最低限得たい能力値を設定して下さい。", 10, 10);
- put_str("2/8で項目選択、4/6で値の増減、Enterで次へ", 11, 10);
-#else
- put_str("Set minimum stats.", 10, 10);
- put_str("2/8 for Select, 4/6 for Change value, Enter for Goto next", 11, 10);
-#endif
+ put_str(_("最低限得たい能力値を設定して下さい。", "Set minimum stats."), 10, 10);
+ put_str(_("2/8で項目選択、4/6で値の増減、Enterで次へ", "2/8 for Select, 4/6 for Change value, Enter for Goto next"), 11, 10);
-#ifdef JP
- put_str(" 基本値 種族 職業 性格 合計値 最大値", 13, 10);
-#else
- put_str(" Base Rac Cla Per Total Maximum", 13, 10);
-#endif
+ 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"),
_("社会的地位", "social class")
};
- /* Clean up */
clear_from(10);
/* Prompt for the minimum stats */
-#ifdef JP
- put_str("2/4/6/8で項目選択、+/-で値の増減、Enterで次へ", 11, 10);
- put_str("注意:身長と体重の最大値/最小値ぎりぎりの値は非常に出現確率が低くなります。", 23, 2);
-#else
- put_str("2/4/6/8 for Select, +/- for Change value, Enter for Goto next", 11, 10);
- put_str("Caution: Values near minimum or maximum is extremery rare.", 23, 5);
-#endif
+ put_str(_("2/4/6/8で項目選択、+/-で値の増減、Enterで次へ", "2/4/6/8 for Select, +/- for Change value, Enter for Goto next"), 11, 10);
+ put_str(_("注意:身長と体重の最大値/最小値ぎりぎりの値は非常に出現確率が低くなります。", "Caution: Values near minimum or maximum is extremery rare."), 23, 2);
if (p_ptr->psex == SEX_MALE)
{
min_percent = (int)(rp_ptr->f_b_ht-rp_ptr->f_m_ht*4+1) * 100 / (int)(rp_ptr->f_b_ht);
}
-#ifdef JP
- put_str("体格/地位の最小値/最大値を設定して下さい。", 10, 10);
- put_str(" 項 目 最小値 最大値", 13,20);
-#else
- put_str(" Parameter Min Max", 13,20);
- put_str("Set minimum/maximum attribute.", 10, 10);
-#endif
+ put_str(_("体格/地位の最小値/最大値を設定して下さい。", "Set minimum/maximum attribute."), 10, 10);
+ put_str(_(" 項 目 最小値 最大値", " Parameter Min Max"), 13,20);
/* Output the maximum stats */
for (i = 0; i < MAXITEMS; i++)
break;
case '=':
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();
break;
default:
* @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;
char temp[64 * 4];
char histbuf[HISTPREF_LIMIT];
-#ifdef JP
- if (!get_check("生い立ち設定ファイルをロードしますか? ")) return FALSE;
-#else
- if (!get_check("Load background history preference file? ")) return FALSE;
-#endif
+ if (!get_check(_("生い立ち設定ファイルをロードしますか? ", "Load background history preference file? "))) return FALSE;
/* Prepare the buffer */
histbuf[0] = '\0';
if (err)
{
-#ifdef JP
- msg_print("生い立ち設定ファイルの読み込みに失敗しました。");
-#else
- msg_print("Failed to load background history preference.");
-#endif
+ msg_print(_("生い立ち設定ファイルの読み込みに失敗しました。", "Failed to load background history preference."));
msg_print(NULL);
/* Kill the buffer */
}
else if (!histpref_buf[0])
{
-#ifdef JP
- msg_print("有効な生い立ち設定はこのファイルにありません。");
-#else
- msg_print("There does not exist valid background history preference.");
-#endif
+ msg_print(_("有効な生い立ち設定はこのファイルにありません。", "There does not exist valid background history preference."));
msg_print(NULL);
/* Kill the buffer */
bool flag = FALSE;
bool prev = FALSE;
- cptr str;
+ concptr str;
char c;
/*** Intro ***/
-
- /* Clear screen */
Term_clear();
/* Title everything */
-#ifdef JP
- put_str("名前 :", 1,26);
-#else
- put_str("Name :", 1,26);
-#endif
-
-#ifdef JP
- put_str("性別 :", 3, 1);
-#else
- put_str("Sex :", 3, 1);
-#endif
-
-#ifdef JP
- put_str("種族 :", 4, 1);
-#else
- put_str("Race :", 4, 1);
-#endif
-
-#ifdef JP
- put_str("職業 :", 5, 1);
-#else
- put_str("Class :", 5, 1);
-#endif
-
+ put_str(_("名前 :", "Name :"), 1,26);
+ put_str(_("性別 :", "Sex :"), 3, 1);
+ put_str(_("種族 :", "Race :"), 4, 1);
+ put_str(_("職業 :", "Class :"), 5, 1);
/* Dump the default name */
c_put_str(TERM_L_BLUE, p_ptr->name, 1, 34);
-
/*** Instructions ***/
/* Display some helpful information */
-#ifdef JP
- put_str("キャラクターを作成します。('S'やり直す, 'Q'終了, '?'ヘルプ)", 8, 10);
-#else
- put_str("Make your charactor. ('S' Restart, 'Q' Quit, '?' Help)", 8, 10);
-#endif
-
+ put_str(_("キャラクターを作成します。('S'やり直す, 'Q'終了, '?'ヘルプ)", "Make your charactor. ('S' Restart, 'Q' Quit, '?' Help)"), 8, 10);
/*** Player sex ***/
/* Extra info */
-#ifdef JP
- put_str("注意:《性別》の違いはゲーム上ほとんど影響を及ぼしません。", 23, 5);
-#else
- put_str("Note: Your 'sex' does not have any significant gameplay effects.", 23, 5);
-#endif
-
+ put_str(_("注意:《性別》の違いはゲーム上ほとんど影響を及ぼしません。", "Note: Your 'sex' does not have any significant gameplay effects."), 23, 5);
/* Prompt for "Sex" */
for (n = 0; n < MAX_SEXES; n++)
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);
+ update_creature(p_ptr);
- update_stuff();
-
- /* Fully healed */
p_ptr->chp = p_ptr->mhp;
-
- /* Fully rested */
p_ptr->csp = p_ptr->msp;
/* Display the player */
/* Doesn't have previous data */
if (!previous_char.quick_ok) return FALSE;
-
- /* Clear screen */
Term_clear();
/* Extra info */
-#ifdef JP
- put_str("クイック・スタートを使うと以前と全く同じキャラクターで始められます。", 11, 5);
-#else
- put_str("Do you want to use the quick start function(same character as your last one).", 11, 2);
-#endif
+ put_str(_("クイック・スタートを使うと以前と全く同じキャラクターで始められます。", "Do you want to use the quick start function(same character as your last one)."), 11, 2);
/* Choose */
while (1)
/* Calc hitdie, but don't roll */
get_extra(FALSE);
- /* Calculate the bonuses and hitpoints */
p_ptr->update |= (PU_BONUS | PU_HP);
-
- update_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 */
message_add(" ");
message_add(" ");
-#ifdef JP
- do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- 新規ゲーム開始 --------");
-#else
- do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- Start New Game --------");
-#endif
+ do_cmd_write_nikki(NIKKI_GAMESTART, 1, _("-------- 新規ゲーム開始 --------", "-------- Start New Game --------"));
do_cmd_write_nikki(NIKKI_HIGAWARI, 0, NULL);
-#ifdef JP
- sprintf(buf," 性別に%sを選択した。", sex_info[p_ptr->psex].title);
-#else
- sprintf(buf," choose %s personality.", sex_info[p_ptr->psex].title);
-#endif
+ sprintf(buf,_(" 性別に%sを選択した。", " choose %s personality."), sex_info[p_ptr->psex].title);
do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
-#ifdef JP
- sprintf(buf," 種族に%sを選択した。", race_info[p_ptr->prace].title);
-#else
- sprintf(buf," choose %s race.", race_info[p_ptr->prace].title);
-#endif
+ sprintf(buf,_(" 種族に%sを選択した。", " choose %s race."), race_info[p_ptr->prace].title);
do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
-#ifdef JP
- sprintf(buf," 職業に%sを選択した。", class_info[p_ptr->pclass].title);
-#else
- sprintf(buf," choose %s class.", class_info[p_ptr->pclass].title);
-#endif
+ sprintf(buf,_(" 職業に%sを選択した。", " choose %s class."), class_info[p_ptr->pclass].title);
do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
if (p_ptr->realm1)
{
-#ifdef JP
- sprintf(buf," 魔法の領域に%s%sを選択した。",realm_names[p_ptr->realm1], p_ptr->realm2 ? format("と%s",realm_names[p_ptr->realm2]) : "");
-#else
- sprintf(buf," choose %s%s realm.",realm_names[p_ptr->realm1], p_ptr->realm2 ? format(" realm and %s",realm_names[p_ptr->realm2]) : "");
-#endif
+ sprintf(buf,_(" 魔法の領域に%s%sを選択した。", " choose %s%s realm."),realm_names[p_ptr->realm1], p_ptr->realm2 ? format("と%s",realm_names[p_ptr->realm2]) : "");
do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
}
-#ifdef JP
- sprintf(buf," 性格に%sを選択した。", seikaku_info[p_ptr->pseikaku].title);
-#else
- sprintf(buf," choose %s.", seikaku_info[p_ptr->pseikaku].title);
-#endif
+ sprintf(buf,_(" 性格に%sを選択した。", " choose %s."), seikaku_info[p_ptr->pseikaku].title);
do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
/* Init the shops */
{
char temp[80*10];
int i;
- cptr t;
+ concptr t;
if (!fff) return;
roff_to_buf(race_jouhou[p_ptr->prace], 78, temp, sizeof(temp));
fprintf(fff, "\n\n");
-#ifdef JP
- fprintf(fff, "種族: %s\n", race_info[p_ptr->prace].title);
-#else
- fprintf(fff, "Race: %s\n", race_info[p_ptr->prace].title);
-#endif
+ fprintf(fff, _("種族: %s\n", "Race: %s\n"), race_info[p_ptr->prace].title);
+
t = temp;
for (i = 0; i < 10; i++)
{
}
roff_to_buf(class_jouhou[p_ptr->pclass], 78, temp, sizeof(temp));
fprintf(fff, "\n");
-#ifdef JP
- fprintf(fff, "職業: %s\n", class_info[p_ptr->pclass].title);
-#else
- fprintf(fff, "Class: %s\n", class_info[p_ptr->pclass].title);
-#endif
+ fprintf(fff, _("職業: %s\n", "Class: %s\n"), class_info[p_ptr->pclass].title);
+
t = temp;
for (i = 0; i < 10; i++)
{
}
roff_to_buf(seikaku_jouhou[p_ptr->pseikaku], 78, temp, sizeof(temp));
fprintf(fff, "\n");
-#ifdef JP
- fprintf(fff, "性格: %s\n", seikaku_info[p_ptr->pseikaku].title);
-#else
- fprintf(fff, "Pesonality: %s\n", seikaku_info[p_ptr->pseikaku].title);
-#endif
+ 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;
if (p_ptr->realm1)
{
roff_to_buf(realm_jouhou[technic2magic(p_ptr->realm1)-1], 78, temp, sizeof(temp));
-#ifdef JP
- fprintf(fff, "魔法: %s\n", realm_names[p_ptr->realm1]);
-#else
- fprintf(fff, "Realm: %s\n", realm_names[p_ptr->realm1]);
-#endif
+ 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;
if (p_ptr->realm2)
{
roff_to_buf(realm_jouhou[technic2magic(p_ptr->realm2)-1], 78, temp, sizeof(temp));
-#ifdef JP
- fprintf(fff, "魔法: %s\n", realm_names[p_ptr->realm2]);
-#else
- fprintf(fff, "Realm: %s\n", realm_names[p_ptr->realm2]);
-#endif
+ 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;
}
}
}
-