#include "angband.h"
-#include "kajitips.h"
+static cptr const kaji_tips[5] =
+{
+#ifdef JP
+ "現在持っているエッセンスの一覧を表示する。",
+ "アイテムからエッセンスを取り出す。エッセンスを取られたアイテムは全く魔法がかかっていない初期状態に戻る。",
+ "既にエッセンスが付加されたアイテムからエッセンスのみ消し去る。エッセンスは手に入らない。",
+ "アイテムにエッセンスを付加する。既にエッセンスが付加されたアイテムやアーティファクトには付加できない。",
+ "武器や防具を強化したり、攻撃で傷つかないようにしたりする。エッセンスが付加されたアイテムやアーティファクトに対しても使用できる。",
+#else
+ "Display essences you have.",
+ "Extract essences from an item. The item become non magical.",
+ "Remove added essences from an equipment which was improved before. The removed essence will be ruined.",
+ "Add essences to an item. The improved items or artifacts cannot be reimprove.",
+ "Enchant an equipment or make an equiment element-proofed. The improved items and artifacts can be enchanted too.",
+#endif
+};
/*!
* @brief 床上、モンスター所持でスタックされたアイテムを削除しスタックを補完する / Excise a dungeon object from any stacks
if (size)
{
/* Message */
-#ifdef JP
- msg_print("アイテム情報を圧縮しています...");
-#else
- msg_print("Compacting objects...");
-#endif
-
+ msg_print(_("アイテム情報を圧縮しています...", "Compacting objects..."));
/* Redraw map */
p_ptr->redraw |= (PR_MAP);
}
/* Nearby objects start out "immune" */
- if ((cur_dis > 0) && (distance(py, px, y, x) < cur_dis)) continue;
+ if ((cur_dis > 0) && (distance(p_ptr->y, p_ptr->x, y, x) < cur_dis)) continue;
/* Saving throw */
chance = 90;
/* Warn the player (except during dungeon creation) */
-#ifdef JP
- if (character_dungeon) msg_print("アイテムが多すぎる!");
-#else
- if (character_dungeon) msg_print("Too many objects!");
-#endif
-
+ if (character_dungeon) msg_print(_("アイテムが多すぎる!", "Too many objects!"));
/* Oops */
return (0);
#if 0
/* Oops */
-#ifdef JP
- msg_format("アイテムがない (%d,%d)", tval, sval);
-#else
- msg_format("No object (%d,%d)", tval, sval);
-#endif
+ msg_format(_("アイテムがない (%d,%d)", "No object (%d,%d)"), tval, sval);
#endif
{
char o_name[MAX_NLEN];
- /* Describe */
- object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
-
- /* Artifact */
- if (object_is_fixed_artifact(o_ptr))
- {
- /* Silly message */
-#ifdef JP
- msg_format("伝説のアイテム (%s)", o_name);
-#else
- msg_format("Artifact (%s)", o_name);
-#endif
-
- }
-
- /* Random Artifact */
- else if (o_ptr->art_name)
- {
-#ifdef JP
- msg_print("ランダム・アーティファクト");
-#else
- msg_print("Random artifact");
-#endif
-
- }
-
- /* Ego-item */
- else if (object_is_ego(o_ptr))
- {
- /* Silly message */
-#ifdef JP
- msg_format("名のあるアイテム (%s)", o_name);
-#else
- msg_format("Ego-item (%s)", o_name);
-#endif
-
- }
+ object_aware(o_ptr);
+ object_known(o_ptr);
- /* Normal item */
- else
- {
- /* Silly message */
-#ifdef JP
- msg_format("アイテム (%s)", o_name);
-#else
- msg_format("Object (%s)", o_name);
-#endif
+ /* Mark the item as fully known */
+ o_ptr->ident |= (IDENT_MENTAL);
- }
+ /* Description */
+ object_desc(o_name, o_ptr, 0);
+ msg_format_wizard(CHEAT_OBJECT, _("%sを生成しました。", "%s was generated."), o_name);
}
/*!
int i;
int k_idx = 0;
-
- /* No artifacts in the town */
+ /*! @note 地上ではキャンセルする / No artifacts in the town */
if (!dun_level) return (FALSE);
- /* Themed object */
+ /*! @note get_obj_num_hookによる指定がある場合は生成をキャンセルする / Themed object */
if (get_obj_num_hook) return (FALSE);
- /* Check the artifact list (just the "specials") */
+ /*! @note 全固定アーティファクト中からIDの若い順に生成対象とその確率を走査する / Check the artifact list (just the "specials") */
for (i = 0; i < max_a_idx; i++)
{
artifact_type *a_ptr = &a_info[i];
- /* Skip "empty" artifacts */
+ /*! @note アーティファクト名が空の不正なデータは除外する / Skip "empty" artifacts */
if (!a_ptr->name) continue;
- /* Cannot make an artifact twice */
+ /*! @note 既に生成回数がカウントされたアーティファクト、QUESTITEMと非INSTA_ARTは除外 / Cannot make an artifact twice */
if (a_ptr->cur_num) continue;
-
if (a_ptr->gen_flags & TRG_QUESTITEM) continue;
if (!(a_ptr->gen_flags & TRG_INSTA_ART)) continue;
- /* XXX XXX Enforce minimum "depth" (loosely) */
- if (a_ptr->level > dun_level)
+ /*! @note アーティファクト生成階が現在に対して足りない場合は高確率で1/(不足階層*2)を満たさないと生成リストに加えられない /
+ * XXX XXX Enforce minimum "depth" (loosely) */
+ if (a_ptr->level > object_level)
{
- /* Acquire the "out-of-depth factor" */
- int d = (a_ptr->level - dun_level) * 2;
-
- /* Roll for out-of-depth creation */
+ /* @note / Acquire the "out-of-depth factor". Roll for out-of-depth creation. */
+ int d = (a_ptr->level - object_level) * 2;
if (!one_in_(d)) continue;
}
- /* Artifact "rarity roll" */
+ /*! @note 1/(レア度)の確率を満たさないと除外される / Artifact "rarity roll" */
if (!one_in_(a_ptr->rarity)) continue;
- /* Find the base object */
+ /*! @note INSTA_ART型固定アーティファクトのベースアイテムもチェック対象とする。ベースアイテムの生成階層が足りない場合1/(不足階層*5) を満たさないと除外される。 /
+ * Find the base object. XXX XXX Enforce minimum "object" level (loosely). Acquire the "out-of-depth factor". Roll for out-of-depth creation. */
k_idx = lookup_kind(a_ptr->tval, a_ptr->sval);
-
- /* XXX XXX Enforce minimum "object" level (loosely) */
if (k_info[k_idx].level > object_level)
{
- /* Acquire the "out-of-depth factor" */
int d = (k_info[k_idx].level - object_level) * 5;
-
- /* Roll for out-of-depth creation */
if (!one_in_(d)) continue;
}
- /* Assign the template */
+ /*! @note 前述の条件を満たしたら、後のIDのアーティファクトはチェックせずすぐ確定し生成処理に移す /
+ * Assign the template. Mega-Hack -- mark the item as an artifact. Hack: Some artifacts get random extra powers. Success. */
object_prep(o_ptr, k_idx);
- /* Mega-Hack -- mark the item as an artifact */
o_ptr->name1 = i;
-
- /* Hack: Some artifacts get random extra powers */
random_artifact_resistance(o_ptr, a_ptr);
-
- /* Success */
return (TRUE);
}
- /* Failure */
+ /*! @note 全INSTA_ART固定アーティファクトを試行しても決まらなかった場合 FALSEを返す / Failure */
return (FALSE);
}
*/
static void a_m_aux_1(object_type *o_ptr, int level, int power)
{
- int tohit1 = randint1(5) + m_bonus(5, level);
- int todam1 = randint1(5) + m_bonus(5, level);
+ hit_prob tohit1 = randint1(5) + m_bonus(5, level);
+ hit_point todam1 = randint1(5) + m_bonus(5, level);
- int tohit2 = m_bonus(10, level);
- int todam2 = m_bonus(10, level);
+ hit_prob tohit2 = m_bonus(10, level);
+ hit_point todam2 = m_bonus(10, level);
if ((o_ptr->tval == TV_BOLT) || (o_ptr->tval == TV_ARROW) || (o_ptr->tval == TV_SHOT))
{
{
if (one_in_(50) || (power > 2)) /* power > 2 is debug only */
create_artifact(o_ptr, FALSE);
-
- /* Mention the item */
- if (cheat_peek) object_mention(o_ptr);
-
break;
}
switch (o_ptr->name2)
{
- case EGO_DWARVEN:
- if (o_ptr->tval != TV_HARD_ARMOR)
- {
- okay_flag = FALSE;
- break;
- }
- case EGO_DRUID:
- if (o_ptr->tval != TV_SOFT_ARMOR)
- {
- okay_flag = FALSE;
- break;
- }
- default:
+ case EGO_DWARVEN:
+ if (o_ptr->tval != TV_HARD_ARMOR)
+ {
+ okay_flag = FALSE;
+ }
+ break;
+ case EGO_DRUID:
+ if (o_ptr->tval != TV_SOFT_ARMOR)
+ {
+ okay_flag = FALSE;
+ }
+ break;
+ default:
break;
}
- if (okay_flag)
- break;
+ if (okay_flag) break;
}
switch (o_ptr->name2)
{
if (o_ptr->sval == SV_DRAGON_SHIELD)
{
- /* Mention the item */
- if (cheat_peek) object_mention(o_ptr);
dragon_resist(o_ptr);
if (!one_in_(3)) break;
}
{
if (o_ptr->sval == SV_SET_OF_DRAGON_GLOVES)
{
- /* Mention the item */
- if (cheat_peek) object_mention(o_ptr);
dragon_resist(o_ptr);
if (!one_in_(3)) break;
}
{
if (o_ptr->sval == SV_PAIR_OF_DRAGON_GREAVE)
{
- /* Mention the item */
- if (cheat_peek) object_mention(o_ptr);
dragon_resist(o_ptr);
if (!one_in_(3)) break;
}
{
if (o_ptr->sval == SV_DRAGON_HELM)
{
- /* Mention the item */
- if (cheat_peek) object_mention(o_ptr);
dragon_resist(o_ptr);
if (!one_in_(3)) break;
}
break;
}
}
+
}
break;
}
- /* Mention the item */
- if (cheat_peek) object_mention(o_ptr);
-
break;
}
/* gain one low ESP */
add_esp_weak(o_ptr, FALSE);
- /* Mention the item */
- if (cheat_peek) object_mention(o_ptr);
-
break;
}
/* Some figurines are cursed */
if (one_in_(6)) o_ptr->curse_flags |= TRC_CURSED;
- if (cheat_peek)
- {
-#ifdef JP
- msg_format("%sの人形, 深さ +%d%s",
-#else
- msg_format("Figurine of %s, depth +%d%s",
-#endif
-
- r_name + r_ptr->name, check - 1,
- !object_is_cursed(o_ptr) ? "" : " {cursed}");
- }
-
break;
}
o_ptr->pval = i;
- if (cheat_peek)
- {
-#ifdef JP
- msg_format("%sの死体, 深さ +%d",
-#else
- msg_format("Corpse of %s, depth +%d",
-#endif
-
- r_name + r_ptr->name, check - 1);
- }
object_aware(o_ptr);
object_known(o_ptr);
if (cheat_peek)
{
-#ifdef JP
- msg_format("%sの像", r_name + r_ptr->name);
-#else
- msg_format("Statue of %s", r_name + r_ptr->name);
-#endif
-
+ msg_format(_("%sの像", "Statue of %s"), r_name + r_ptr->name);
}
object_aware(o_ptr);
object_known(o_ptr);
if (a_ptr->gen_flags & (TRG_RANDOM_CURSE1)) o_ptr->curse_flags |= get_curse(1, o_ptr);
if (a_ptr->gen_flags & (TRG_RANDOM_CURSE2)) o_ptr->curse_flags |= get_curse(2, o_ptr);
-
- /* Cheat -- peek at the item */
- if (cheat_peek) object_mention(o_ptr);
-
/* Done */
return;
}
if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_HAYABUSA) && (o_ptr->pval > 2) && (o_ptr->name2 != EGO_ATTACKS))
o_ptr->pval = 2;
}
-
- /* Cheat -- describe the item */
- if (cheat_peek) object_mention(o_ptr);
/* Done */
return;
if (k_ptr->gen_flags & (TRG_RANDOM_CURSE1)) o_ptr->curse_flags |= get_curse(1, o_ptr);
if (k_ptr->gen_flags & (TRG_RANDOM_CURSE2)) o_ptr->curse_flags |= get_curse(2, o_ptr);
}
+
+
}
obj_level = k_info[j_ptr->k_idx].level;
if (object_is_fixed_artifact(j_ptr)) obj_level = a_info[j_ptr->name1].level;
- /* Notice "okay" out-of-depth objects */
- if (!object_is_cursed(j_ptr) && !object_is_broken(j_ptr) &&
- (obj_level > dun_level))
- {
- /* Cheat -- peek at items */
- if (cheat_peek) object_mention(j_ptr);
- }
+ if (cheat_peek) object_mention(j_ptr);
/* Success */
return (TRUE);
* This routine uses "object_level" for the "generation level".\n
* This routine requires a clean floor grid destination.\n
*/
-void place_object(int y, int x, u32b mode)
+void place_object(position y, position x, u32b mode)
{
- s16b o_idx;
+ idx o_idx;
/* Acquire grid */
cave_type *c_ptr = &cave[y][x];
* @details
* The location must be a legal, clean, floor grid.
*/
-void place_gold(int y, int x)
+void place_gold(position y, position x)
{
s16b o_idx;
/* Debug */
-#ifdef JP
- if (p_ptr->wizard) msg_print("(破損)");
-#else
- if (p_ptr->wizard) msg_print("(breakage)");
-#endif
-
+ if (p_ptr->wizard) msg_print(_("(破損)", "(breakage)"));
/* Failure */
return (0);
/* Debug */
-#ifdef JP
- if (p_ptr->wizard) msg_print("(床スペースがない)");
-#else
- if (p_ptr->wizard) msg_print("(no floor space)");
-#endif
-
+ if (p_ptr->wizard) msg_print(_("(床スペースがない)", "(no floor space)"));
/* Failure */
return (0);
#endif
/* Debug */
-#ifdef JP
- if (p_ptr->wizard) msg_print("(床スペースがない)");
-#else
- if (p_ptr->wizard) msg_print("(no floor space)");
-#endif
+ if (p_ptr->wizard) msg_print(_("(床スペースがない)", "(no floor space)"));
/* Mega-Hack -- preserve artifacts */
if (preserve_mode)
/* Debug */
-#ifdef JP
- if (p_ptr->wizard) msg_print("(アイテムが多過ぎる)");
-#else
- if (p_ptr->wizard) msg_print("(too many objects)");
-#endif
-
+ if (p_ptr->wizard) msg_print(_("(アイテムが多過ぎる)", "(too many objects)"));
/* Hack -- Preserve artifacts */
if (object_is_fixed_artifact(j_ptr))
/* Message when an object falls under the player */
if (chance && player_bold(by, bx))
{
-#ifdef JP
- msg_print("何かが足下に転がってきた。");
-#else
- msg_print("You feel something roll beneath your feet.");
-#endif
-
+ msg_print(_("何かが足下に転がってきた。", "You feel something roll beneath your feet."));
}
/* XXX XXX XXX */
if (((item == INVEN_RARM) || (item == INVEN_LARM)) &&
object_is_melee_weapon(o_ptr))
{
-#ifdef JP
- act = "を装備からはずした";
-#else
- act = "You were wielding";
-#endif
-
+ act = _("を装備からはずした", "You were wielding");
}
/* Took off bow */
else if (item == INVEN_BOW)
{
-#ifdef JP
- act = "を装備からはずした";
-#else
- act = "You were holding";
-#endif
-
+ act = _("を装備からはずした", "You were holding");
}
/* Took off light */
else if (item == INVEN_LITE)
{
-#ifdef JP
- act = "を光源からはずした";
-#else
- act = "You were holding";
-#endif
-
+ act = _("を光源からはずした", "You were holding");
}
/* Took off something */
else
{
-#ifdef JP
- act = "を装備からはずした";
-#else
- act = "You were wearing";
-#endif
-
+ act = _("を装備からはずした", "You were wearing");
}
/* Modify, Optimize */
object_desc(o_name, q_ptr, 0);
/* Message */
-#ifdef JP
- msg_format("%s(%c)を落とした。", o_name, index_to_label(item));
-#else
- msg_format("You drop %s (%c).", o_name, index_to_label(item));
-#endif
-
+ msg_format(_("%s(%c)を落とした。", "You drop %s (%c)."), o_name, index_to_label(item));
/* Drop it near the player */
- (void)drop_near(q_ptr, 0, py, px);
+ (void)drop_near(q_ptr, 0, p_ptr->y, p_ptr->x);
/* Modify, Describe, Optimize */
inven_item_increase(item, -amt);
while (combined);
/* Message */
-#ifdef JP
- if (flag) msg_print("ザックの中のアイテムをまとめ直した。");
-#else
- if (flag) msg_print("You combine some items in your pack.");
-#endif
+ if (flag) msg_print(_("ザックの中のアイテムをまとめ直した。", "You combine some items in your pack."));
}
/*!
}
/* Message */
-#ifdef JP
- if (flag) msg_print("ザックの中のアイテムを並べ直した。");
-#else
- if (flag) msg_print("You reorder some items in your pack.");
-#endif
-
+ if (flag) msg_print(_("ザックの中のアイテムを並べ直した。", "You reorder some items in your pack."));
}
/*!
* @brief 警告基準を定めるために魔法の効果属性に基づいて最大魔法ダメージを計算する。 /
* Calculate spell damages
* @param spell_num RF4ならRF4_SPELL_STARTのように32区切りのベースとなる数値
-* @param spell_flag RF4_SHRIEKなどのスペルフラグ
* @param typ 効果属性のID
* @param m_idx 魔法を行使するモンスターのID
* @param max 算出した最大ダメージを返すポインタ
if (projectable(my, mx, yy, xx))
{
u32b f4 = r_ptr->flags4;
- u32b f5 = r_ptr->flags5;
- u32b f6 = r_ptr->flags6;
+ u32b f5 = r_ptr->a_ability_flags1;
+ u32b f6 = r_ptr->a_ability_flags2;
if (!(d_info[dungeon_type].flags1 & DF1_NO_MAGIC))
{
if (f4 & RF4_BR_DISE) spell_damcalc_by_spellnum(MS_BR_DISEN, GF_DISENCHANT, c_ptr->m_idx, &dam_max0);
if (f4 & RF4_BR_NEXU) spell_damcalc_by_spellnum(MS_BR_NEXUS, GF_NEXUS, c_ptr->m_idx, &dam_max0);
if (f4 & RF4_BR_TIME) spell_damcalc_by_spellnum(MS_BR_TIME, GF_TIME, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_INER) spell_damcalc_by_spellnum(MS_BR_INERTIA, GF_INERTIA, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_INER) spell_damcalc_by_spellnum(MS_BR_INERTIA, GF_INERTIAL, c_ptr->m_idx, &dam_max0);
if (f4 & RF4_BR_GRAV) spell_damcalc_by_spellnum(MS_BR_GRAVITY, GF_GRAVITY, c_ptr->m_idx, &dam_max0);
if (f4 & RF4_BR_SHAR) spell_damcalc_by_spellnum(MS_BR_SHARDS, GF_SHARDS, c_ptr->m_idx, &dam_max0);
if (f4 & RF4_BR_PLAS) spell_damcalc_by_spellnum(MS_BR_PLASMA, GF_PLASMA, c_ptr->m_idx, &dam_max0);
#else
-static cptr essence_name[] =
+cptr essence_name[] =
{
"strength",
"intelligen.",
{
prt("",i,0);
}
-#ifdef JP
- prt("エッセンス 個数 エッセンス 個数 エッセンス 個数", 1, 8);
-#else
- prt("Essence Num Essence Num Essence Num ", 1, 8);
-#endif
+ prt(_("エッセンス 個数 エッセンス 個数 エッセンス 個数",
+ "Essence Num Essence Num Essence Num "), 1, 8);
for (i = 0; essence_name[i]; i++)
{
if (!essence_name[i][0]) continue;
prt(format("%-11s %5d", essence_name[i], p_ptr->magic_num1[i]), 2+num%21, 8+num/21*22);
num++;
}
-#ifdef JP
- prt("現在所持しているエッセンス", 0, 0);
-#else
- prt("List of all essences you have.", 0, 0);
-#endif
+ prt(_("現在所持しているエッセンス", "List of all essences you have."), 0, 0);
(void)inkey();
screen_load();
return;
item_tester_no_ryoute = TRUE;
/* Get an item */
-#ifdef JP
- q = "どのアイテムから抽出しますか?";
- s = "抽出できるアイテムがありません。";
-#else
- q = "Extract from which item? ";
- s = "You have nothing you can extract from.";
-#endif
+ q = _("どのアイテムから抽出しますか?", "Extract from which item? ");
+ s = _("抽出できるアイテムがありません。", "You have nothing you can extract from.");
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
{
char o_name[MAX_NLEN];
object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
-#ifdef JP
- if (!get_check(format("本当に%sから抽出してよろしいですか?", o_name))) return;
-#else
- if (!get_check(format("Really extract from %s? ", o_name))) return;
-#endif
+ if (!get_check(format(_("本当に%sから抽出してよろしいですか?", "Really extract from %s? "), o_name))) return;
}
- energy_use = 100;
+ p_ptr->energy_use = 100;
object_flags(o_ptr, old_flgs);
if (have_flag(old_flgs, TR_KILL_DRAGON)) add_flag(old_flgs, TR_SLAY_DRAGON);
for (i = 0; i < mode_max; i++)
prt(format(" %c) %s", 'a' + i, menu_name[i]), 2 + i, 14);
-#ifdef JP
- if (!get_com("何を付加しますか:", &choice, TRUE))
-#else
- if (!get_com("Command :", &choice, TRUE))
-#endif
+ if (!get_com(_("何を付加しますか:", "Command :"), &choice, TRUE))
{
screen_load();
return 0;
redraw = FALSE;
/* Build a prompt */
-#ifdef JP
- (void) strnfmt(out_val, 78, "('*'で一覧, ESCで中断) どの能力を付加しますか?");
-#else
- (void)strnfmt(out_val, 78, "(*=List, ESC=exit) Add which ability? ");
-#endif
+ (void) strnfmt(out_val, 78, _("('*'で一覧, ESCで中断) どの能力を付加しますか?", "(*=List, ESC=exit) Add which ability? "));
if (use_menu) screen_save();
/* Get a spell from the user */
if (use_menu)
{
if (ctr == (menu_line-1))
-#ifdef JP
- strcpy(dummy, "》 ");
-#else
- strcpy(dummy, "> ");
-#endif
+ strcpy(dummy, _("》 ", "> "));
else strcpy(dummy, " ");
}
switch(es_ptr->add)
{
case ESSENCE_SH_FIRE:
-#ifdef JP
- strcat(dummy, "(焼棄+耐火炎)");
-#else
- strcat(dummy, "(brand fire + res.fire)");
-#endif
+ strcat(dummy, _("(焼棄+耐火炎)", "(brand fire + res.fire)"));
if (p_ptr->magic_num1[TR_BRAND_FIRE] < es_ptr->value) able[ctr] = FALSE;
if (p_ptr->magic_num1[TR_RES_FIRE] < es_ptr->value) able[ctr] = FALSE;
break;
case ESSENCE_SH_ELEC:
-#ifdef JP
- strcat(dummy, "(電撃+耐電撃)");
-#else
- strcat(dummy, "(brand elec. + res. elec.)");
-#endif
+ strcat(dummy, _("(電撃+耐電撃)", "(brand elec. + res. elec.)"));
if (p_ptr->magic_num1[TR_BRAND_ELEC] < es_ptr->value) able[ctr] = FALSE;
if (p_ptr->magic_num1[TR_RES_ELEC] < es_ptr->value) able[ctr] = FALSE;
break;
case ESSENCE_SH_COLD:
-#ifdef JP
- strcat(dummy, "(凍結+耐冷気)");
-#else
- strcat(dummy, "(brand cold + res. cold)");
-#endif
+ strcat(dummy, _("(凍結+耐冷気)", "(brand cold + res. cold)"));
if (p_ptr->magic_num1[TR_BRAND_COLD] < es_ptr->value) able[ctr] = FALSE;
if (p_ptr->magic_num1[TR_RES_COLD] < es_ptr->value) able[ctr] = FALSE;
break;
case ESSENCE_RESISTANCE:
-#ifdef JP
- strcat(dummy, "(耐火炎+耐冷気+耐電撃+耐酸)");
-#else
- strcat(dummy, "(r.fire+r.cold+r.elec+r.acid)");
-#endif
+ strcat(dummy, _("(耐火炎+耐冷気+耐電撃+耐酸)", "(r.fire+r.cold+r.elec+r.acid)"));
if (p_ptr->magic_num1[TR_RES_FIRE] < es_ptr->value) able[ctr] = FALSE;
if (p_ptr->magic_num1[TR_RES_COLD] < es_ptr->value) able[ctr] = FALSE;
if (p_ptr->magic_num1[TR_RES_ELEC] < es_ptr->value) able[ctr] = FALSE;
if (p_ptr->magic_num1[TR_RES_ACID] < es_ptr->value) able[ctr] = FALSE;
break;
case ESSENCE_SUSTAIN:
-#ifdef JP
- strcat(dummy, "(耐火炎+耐冷気+耐電撃+耐酸)");
-#else
- strcat(dummy, "(r.fire+r.cold+r.elec+r.acid)");
-#endif
+ strcat(dummy, _("(耐火炎+耐冷気+耐電撃+耐酸)", "(r.fire+r.cold+r.elec+r.acid)"));
if (p_ptr->magic_num1[TR_RES_FIRE] < es_ptr->value) able[ctr] = FALSE;
if (p_ptr->magic_num1[TR_RES_COLD] < es_ptr->value) able[ctr] = FALSE;
if (p_ptr->magic_num1[TR_RES_ELEC] < es_ptr->value) able[ctr] = FALSE;
char tmp_val[160];
/* Prompt */
-#ifdef JP
- (void) strnfmt(tmp_val, 78, "%sを付加しますか? ", essence_info[num[i]].add_name);
-#else
- (void) strnfmt(tmp_val, 78, "Add the abilitiy of %s? ", essence_info[num[i]].add_name);
-#endif
+ (void) strnfmt(tmp_val, 78, _("%sを付加しますか? ", "Add the abilitiy of %s? "), essence_info[num[i]].add_name);
/* Belay that order */
if (!get_check(tmp_val)) continue;
item_tester_no_ryoute = TRUE;
/* Get an item */
-#ifdef JP
- q = "どのアイテムを改良しますか?";
- s = "改良できるアイテムがありません。";
-#else
- q = "Improve which item? ";
- s = "You have nothing to improve.";
-#endif
+ q = _("どのアイテムを改良しますか?", "Improve which item? ");
+ s = _("改良できるアイテムがありません。", "You have nothing to improve.");
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
if ((mode != 10) && (object_is_artifact(o_ptr) || object_is_smith(o_ptr)))
{
-#ifdef JP
- msg_print("そのアイテムはこれ以上改良できない。");
-#else
- msg_print("This item is no more able to be improved.");
-#endif
+ msg_print(_("そのアイテムはこれ以上改良できない。", "This item is no more able to be improved."));
return;
}
if (o_ptr->number > 1)
{
use_essence *= o_ptr->number;
-#ifdef JP
- msg_format("%d個あるのでエッセンスは%d必要です。", o_ptr->number, use_essence);
-#else
- msg_format("It will take %d essences.",use_essence);
-#endif
-
+ msg_format(_("%d個あるのでエッセンスは%d必要です。", "It will take %d essences."), o_ptr->number, use_essence);
}
if (es_ptr->essence != -1)
{
if (p_ptr->magic_num1[es_ptr->essence] < use_essence)
{
-#ifdef JP
- msg_print("エッセンスが足りない。");
-#else
- msg_print("You don't have enough essences.");
-#endif
+ msg_print(_("エッセンスが足りない。", "You don't have enough essences."));
return;
}
if (is_pval_flag(es_ptr->add))
{
if (o_ptr->pval < 0)
{
-#ifdef JP
- msg_print("このアイテムの能力修正を強化することはできない。");
-#else
- msg_print("You cannot increase magic number of this item.");
-#endif
+ msg_print(_("このアイテムの能力修正を強化することはできない。", "You cannot increase magic number of this item."));
return;
}
else if (es_ptr->add == TR_BLOWS)
{
if (o_ptr->pval > 1)
{
-#ifdef JP
- if (!get_check("修正値は1になります。よろしいですか?")) return;
-#else
- if (!get_check("The magic number of this weapon will become 1. Are you sure? ")) return;
-#endif
+ if (!get_check(_("修正値は1になります。よろしいですか?", "The magic number of this weapon will become 1. Are you sure? "))) return;
}
o_ptr->pval = 1;
-#ifdef JP
- msg_format("エッセンスを%d個使用します。", use_essence);
-#else
- msg_format("It will take %d essences.", use_essence);
-#endif
+ msg_format(_("エッセンスを%d個使用します。", "It will take %d essences."), use_essence);
}
else if (o_ptr->pval > 0)
{
use_essence *= o_ptr->pval;
-#ifdef JP
- msg_format("エッセンスを%d個使用します。", use_essence);
-#else
- msg_format("It will take %d essences.", use_essence);
-#endif
+ msg_format(_("エッセンスを%d個使用します。", "It will take %d essences."), use_essence);
}
else
{
int pval;
int limit = MIN(5, p_ptr->magic_num1[es_ptr->essence]/es_ptr->value);
-#ifdef JP
- sprintf(tmp, "いくつ付加しますか? (1-%d): ", limit);
-#else
- sprintf(tmp, "Enchant how many? (1-%d): ", limit);
-#endif
+ sprintf(tmp, _("いくつ付加しますか? (1-%d): ", "Enchant how many? (1-%d): "), limit);
strcpy(tmp_val, "1");
if (!get_string(tmp, tmp_val, 1)) return;
else if (pval < 1) pval = 1;
o_ptr->pval += pval;
use_essence *= pval;
-#ifdef JP
- msg_format("エッセンスを%d個使用します。", use_essence);
-#else
- msg_format("It will take %d essences.", use_essence);
-#endif
+ msg_format(_("エッセンスを%d個使用します。", "It will take %d essences."), use_essence);
}
if (p_ptr->magic_num1[es_ptr->essence] < use_essence)
{
-#ifdef JP
- msg_print("エッセンスが足りない。");
-#else
- msg_print("You don't have enough essences.");
-#endif
+ msg_print(_("エッセンスが足りない。", "You don't have enough essences."));
return;
}
}
int get_to_h, get_to_d;
strcpy(tmp_val, "1");
-#ifdef JP
- if (!get_string(format("いくつ付加しますか? (1-%d):", p_ptr->lev/7+3), tmp_val, 2)) return;
-#else
- if (!get_string(format("Enchant how many? (1-%d):", p_ptr->lev/7+3), tmp_val, 2)) return;
-#endif
+ if (!get_string(format(_("いくつ付加しますか? (1-%d):", "Enchant how many? (1-%d):"), p_ptr->lev/7+3), tmp_val, 2)) return;
val = atoi(tmp_val);
if (val > p_ptr->lev/7+3) val = p_ptr->lev/7+3;
else if (val < 1) val = 1;
use_essence *= val;
-#ifdef JP
- msg_format("エッセンスを%d個使用します。", use_essence);
-#else
- msg_format("It will take %d essences.", use_essence);
-#endif
+ msg_format(_("エッセンスを%d個使用します。", "It will take %d essences."), use_essence);
if (p_ptr->magic_num1[es_ptr->essence] < use_essence)
{
-#ifdef JP
- msg_print("エッセンスが足りない。");
-#else
- msg_print("You don't have enough essences.");
-#endif
+ msg_print(_("エッセンスが足りない。", "You don't have enough essences."));
return;
}
get_to_h = ((val+1)/2+randint0(val/2+1));
{
if ((o_ptr->to_h >= p_ptr->lev/5+5) && (o_ptr->to_d >= p_ptr->lev/5+5))
{
-#ifdef JP
- msg_print("改良に失敗した。");
-#else
- msg_print("You failed to enchant.");
-#endif
- energy_use = 100;
+ msg_print(_("改良に失敗した。", "You failed to enchant."));
+ p_ptr->energy_use = 100;
return;
}
else
{
if (o_ptr->to_a >= p_ptr->lev/5+5)
{
-#ifdef JP
- msg_print("改良に失敗した。");
-#else
- msg_print("You failed to enchant.");
-#endif
- energy_use = 100;
+ msg_print(_("改良に失敗した。", "You failed to enchant."));
+ p_ptr->energy_use = 100;
return;
}
else
}
if (!success)
{
-#ifdef JP
- msg_print("エッセンスが足りない。");
-#else
- msg_print("You don't have enough essences.");
-#endif
+ msg_print(_("エッセンスが足りない。", "You don't have enough essences."));
return;
}
if (es_ptr->add == ESSENCE_SUSTAIN)
}
}
- energy_use = 100;
+ p_ptr->energy_use = 100;
#ifdef JP
msg_format("%sに%sの能力を付加しました。", o_name, es_ptr->add_name);
item_tester_hook = object_is_smith;
/* Get an item */
-#ifdef JP
- q = "どのアイテムのエッセンスを消去しますか?";
- s = "エッセンスを付加したアイテムがありません。";
-#else
- q = "Remove from which item? ";
- s = "You have nothing to remove essence.";
-#endif
+ q = _("どのアイテムのエッセンスを消去しますか?", "Remove from which item? ");
+ s = _("エッセンスを付加したアイテムがありません。", "You have nothing to remove essence.");
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
}
object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
-#ifdef JP
- if (!get_check(format("よろしいですか? [%s]", o_name))) return;
-#else
- if (!get_check(format("Are you sure? [%s]", o_name))) return;
-#endif
+ if (!get_check(format(_("よろしいですか? [%s]", "Are you sure? [%s]"), o_name))) return;
- energy_use = 100;
+ p_ptr->energy_use = 100;
if (o_ptr->xtra3 == 1+ESSENCE_SLAY_GLOVE)
{
o_ptr->xtra3 = 0;
object_flags(o_ptr, flgs);
if (!(have_pval_flags(flgs))) o_ptr->pval = 0;
-#ifdef JP
- msg_print("エッセンスを取り去った。");
-#else
- msg_print("You removed all essence you have added.");
-#endif
+ msg_print(_("エッセンスを取り去った。", "You removed all essence you have added."));
/* Combine the pack */
p_ptr->notice |= (PN_COMBINE | PN_REORDER);
{
if (p_ptr->confused)
{
-#ifdef JP
- msg_print("混乱していて作業できない!");
-#else
- msg_print("You are too confused!");
-#endif
-
+ msg_print(_("混乱していて作業できない!", "You are too confused!"));
return;
}
if (p_ptr->blind)
{
-#ifdef JP
- msg_print("目が見えなくて作業できない!");
-#else
- msg_print("You are blind!");
-#endif
-
+ msg_print(_("目が見えなくて作業できない!", "You are blind!"));
return;
}
if (p_ptr->image)
{
-#ifdef JP
- msg_print("うまく見えなくて作業できない!");
-#else
- msg_print("You are hallucinating!");
-#endif
-
+ msg_print(_("うまく見えなくて作業できない!", "You are hallucinating!"));
return;
}
}