-/* File: mind.c */
+/*!
+ * @file mind.c
+ * @brief 各職業の特殊技能実装 / Special magics
+ * @date 2014/01/15
+ * @author
+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
+ * This software may be copied and distributed for educational, research,\n
+ * and not for profit purposes provided that this copyright and statement\n
+ * are included in all such copies. Other copyrights may also apply.\n
+ * 2005 henkma \n
+ * 2014 Deskull rearranged comment for Doxygen.\n
+ * @details
+ * mind.cとあるが実際には超能力者、練気術師、狂戦士、鏡使い、忍者までの
+ * 特殊技能を揃えて実装している。
+ */
-/* Purpose: Mindcrafter code */
-/*
- * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
- *
- * This software may be copied and distributed for educational, research, and
- * not for profit purposes provided that this copyright and statement are
- * included in all such copies.
- */
#include "angband.h"
-#include "mindtips.h"
-
-mind_power mind_powers[5] =
+/*! 特殊技能の一覧テーブル */
+mind_power const mind_powers[5] =
{
{
{
/* Level gained, cost, %fail, name */
#ifdef JP
- { 1, 1, 15, "Îî»ë"},
- { 2, 1, 20, "¿À·Ð¹¶·â"},
- { 3, 2, 25, "¼¡¸µ¤Î½Ö¤"},
- { 7, 6, 35, "µõ¶õ¤Î¸¸±Æ"},
- { 9, 7, 50, "Àº¿À»ÙÇÛ"},
- { 11, 7, 30, "Ç°Æ°¾×·âÃÆ"},
- { 13, 12, 50, "³»²½"},
- { 15, 12, 60, "¥µ¥¤¥³¥á¥È¥ê¡¼"},
- { 18, 10, 45, "Àº¿ÀÇÈÆ°"},
- { 23, 15, 50, "¥¢¥É¥ì¥Ê¥ê¥ó¡¦¥É¡¼¥Ô¥ó¥°"},
- { 26, 28, 60, "¥Æ¥ì¥¥Í¥·¥¹"},
- { 28, 10, 40, "¥µ¥¤¥¥Ã¥¯¡¦¥É¥ì¥¤¥ó"},
- { 35, 35, 75, "¸÷¤Î·õ"},
- { 45,150, 85, "´°Á´¤ÊÀ¤³¦"},
+ { 1, 1, 15, "霊視"},
+ { 2, 1, 20, "神経攻撃"},
+ { 3, 2, 25, "次元の瞬き"},
+ { 7, 6, 35, "虚空の幻影"},
+ { 9, 7, 50, "精神支配"},
+ { 11, 7, 30, "念動衝撃弾"},
+ { 13, 12, 50, "鎧化"},
+ { 15, 12, 60, "ã\82µã\82¤ã\82³ã\83¡ã\83\88ã\83ªã\83¼"},
+ { 18, 10, 45, "精神波動"},
+ { 23, 15, 50, "ã\82¢ã\83\89ã\83¬ã\83\8aã\83ªã\83³ã\83»ã\83\89ã\83¼ã\83\94ã\83³ã\82°"},
+ { 26, 28, 60, "ã\83\86ã\83¬ã\82ã\83\8dã\82·ã\82¹"},
+ { 28, 10, 40, "サイキック・ドレイン"},
+ { 35, 35, 75, "光の剣"},
+ { 45,150, 85, "完全な世界"},
{ 99, 0, 0, ""},
{ 99, 0, 0, ""},
{ 99, 0, 0, ""},
{
/* Level gained, cost, %fail, name */
#ifdef JP
- { 1, 1, 15, "¾®Î¶"},
- { 3, 3, 30, "Á®¸÷"},
- { 5, 6, 35, "Éñ¶õ½Ñ"},
- { 8, 5, 40, "¥«¥á¥Ï¥áÇÈ"},
- { 10, 7, 45, "ÂÐËâË¡Ëɸæ"},
- { 13, 5, 60, "Îýµ¤"},
- { 17, 17, 50, "ŻƮµ¤"},
- { 20, 20, 50, "¾×ÇÈ"},
- { 23, 18, 55, "×Âζ"},
- { 25, 30, 70, "¤¤¤Æ¤Ä¤¯ÇÈÆ°"},
- { 28, 26, 50, "¸¸Î´"},
- { 32, 35, 65, "Îû¹ö²Ð±ê"},
- { 38, 42, 75, "Ķ¥«¥á¥Ï¥áÇÈ"},
- { 44, 50, 80, "¸÷®°ÜÆ°"},
+ { 1, 1, 15, "小龍"},
+ { 3, 3, 30, "閃光"},
+ { 5, 6, 35, "舞空術"},
+ { 8, 5, 40, "カメハメ波"},
+ { 10, 7, 45, "対魔法防御"},
+ { 13, 5, 60, "練気"},
+ { 17, 17, 50, "纏闘気"},
+ { 20, 20, 50, "衝波"},
+ { 23, 18, 55, "彗龍"},
+ { 25, 30, 70, "いてつく波動"},
+ { 28, 26, 50, "幻霊召喚"},
+ { 32, 35, 65, "煉獄火炎"},
+ { 38, 42, 75, "超カメハメ波"},
+ { 44, 50, 80, "光速移動"},
{ 99, 0, 0, ""},
{ 99, 0, 0, ""},
{ 99, 0, 0, ""},
{
/* Level gained, cost, %fail, name */
#ifdef JP
- { 8, 5, 40, "»¦µ¤´¶ÃÎ"},
- { 15, 20, 0, "ÆÍ·â"},
- { 20, 15, 0, "¥È¥é¥Ã¥×Ê´ºÕ"},
- { 25, 20, 60, "ÃÏ¿Ì"},
- { 30, 80, 75, "³§»¦¤·"},
+ { 8, 5, 40, "殺気感知"},
+ { 15, 20, 0, "突撃"},
+ { 20, 15, 0, "トラップ粉砕"},
+ { 25, 20, 60, "地震"},
+ { 30, 80, 75, "皆殺し"},
{ 99, 0, 0, ""},
{ 99, 0, 0, ""},
{ 99, 0, 0, ""},
{
/* Level gained, cost, %fail, name */
#ifdef JP
- { 1, 1, 15, "¿¿¸«¤Î¶À"},
- { 1, 2, 40, "¶ÀÀ¸À®"},
- { 2, 2, 20, "¸÷¤Î¤·¤º¤¯"},
- { 3, 2, 20, "ÏĤó¤À¶À"},
- { 5, 3, 35, "Á®¸÷¶À"},
- { 6, 5, 35, "×Ǥ¨¤ë¶À"},
-
- { 10, 5, 30, "Èù¿Ð±£¤ì"},
- { 12, 12, 30, "ÄÉÊü¤Î¶À"},
- { 15, 15, 30, "¶ÀºÕ¤"},
- { 19, 13, 30, "ºÅ̲¶À"},
- { 23, 18, 50, "¥·¡¼¥«¡¼¥ì¥¤"},
-
- { 25, 20, 40, "¶À¤ÎÉõ°õ"},
- { 27, 30, 60, "¿å¶À¤Î½â"},
- { 29, 30, 60, "¥¹¡¼¥Ñ¡¼¥ì¥¤"},
- { 31, 35, 60, "¸¸ÏǤθ÷"},
- { 33, 50, 80, "¶À¤Î¹ñ"},
-
- { 36, 30, 80, "¶ÀÈ´¤±"},
- { 38, 40, 70, "µ¢´Ô¤Î¶À"},
- { 40, 50, 55, "±Æʬ¿È"},
- { 43, 55, 70, "ÉõËâ·ë³¦"},
- { 46, 70, 75, "¥é¥Õ¥Î¡¼¥ë¤Î¶À"},
+ { 1, 1, 15, "真見の鏡"},
+ { 1, 2, 40, "鏡生成"},
+ { 2, 2, 20, "光のしずく"},
+ { 3, 2, 20, "歪んだ鏡"},
+ { 5, 3, 35, "閃光鏡"},
+ { 6, 5, 35, "彷える鏡"},
+
+ { 10, 5, 30, "微塵隠れ"},
+ { 12, 12, 30, "追放の鏡"},
+ { 15, 15, 30, "鏡砕き"},
+ { 19, 13, 30, "催眠鏡"},
+ { 23, 18, 50, "ã\82·ã\83¼ã\82«ã\83¼ã\83¬ã\82¤"},
+
+ { 25, 20, 40, "鏡の封印"},
+ { 27, 30, 60, "水鏡の盾"},
+ { 29, 30, 60, "ã\82¹ã\83¼ã\83\91ã\83¼ã\83¬ã\82¤"},
+ { 31, 35, 60, "幻惑の光"},
+ { 33, 50, 80, "鏡の国"},
+
+ { 36, 30, 80, "鏡抜け"},
+ { 38, 40, 70, "帰還の鏡"},
+ { 40, 50, 55, "影分身"},
+ { 43, 55, 70, "封魔結界"},
+ { 46, 70, 75, "ラフノールの鏡"},
#else
{ 1, 1, 15, "Mirror of Seeing"},
{ 1, 2, 40, "Making a Mirror"},
{
/* Level gained, cost, %fail, name */
#ifdef JP
- { 1, 1, 20, "°Å°ÇÀ¸À®"},
- { 2, 2, 25, "¼þÊÕÄ´ºº"},
- { 3, 3, 25, "ÍÕ±£¤ì"},
- { 5, 3, 30, "ÊѤï¤ê¿È"},
- { 7, 8, 35, "¹âÈô¤Ó"},
- { 8, 10, 35, "°ì·âΥæ"},
- { 10, 10, 40, "¶âÇû¤ê"},
- { 12, 12, 70, "¸Å¤Î¸ýÅÁ"},
- { 15, 10, 50, "Éâ±À"},
- { 17, 12, 45, "²ÐÆÛ"},
- { 18, 20, 40, "Æþ¿È"},
- { 20, 5, 50, "ȬÊý¼ê΢·õ"},
- { 22, 15, 55, "º¿³ù"},
- { 25, 32, 60, "±ì¶Ì"},
- { 28, 32, 60, "ž¿È"},
- { 30, 30, 70, "Çúȯ¤ÎÌæ¾Ï"},
- { 32, 40, 40, "ÅÚÆÛ"},
- { 34, 35, 50, "̸±£¤ì"},
- { 38, 40, 60, "Îû¹ö²Ð±ê"},
- { 41, 50, 55, "ʬ¿È"},
+ { 1, 1, 20, "暗闇生成"},
+ { 2, 2, 25, "周辺調査"},
+ { 3, 3, 25, "葉隠れ"},
+ { 5, 3, 30, "変わり身"},
+ { 7, 8, 35, "高飛び"},
+ { 8, 10, 35, "一撃離脱"},
+ { 10, 10, 40, "金縛り"},
+ { 12, 12, 70, "古の口伝"},
+ { 15, 10, 50, "浮雲"},
+ { 17, 12, 45, "火遁"},
+ { 18, 20, 40, "入身"},
+ { 20, 5, 50, "八方手裏剣"},
+ { 22, 15, 55, "鎖鎌"},
+ { 25, 32, 60, "煙玉"},
+ { 28, 32, 60, "転身"},
+ { 30, 30, 70, "爆発の紋章"},
+ { 32, 40, 40, "土遁"},
+ { 34, 35, 50, "霧隠れ"},
+ { 38, 40, 60, "煉獄火炎"},
+ { 41, 50, 55, "分身"},
{ 99, 0, 0, ""},
#else
{ 1, 1, 20, "Create Darkness"},
},
};
+/*! 特殊能力の解説文字列 */
+static cptr const mind_tips[5][MAX_MIND_POWERS] =
+{
+#ifdef JP
+{
+ "近くの全ての見えるモンスターを感知する。レベル5で罠/扉、15で透明なモンスター、30で財宝とアイテムを感知できるようになる。レベル20で周辺の地形を感知し、45でその階全体を永久に照らし、ダンジョン内のすべてのアイテムを感知する。レベル25で一定時間テレパシーを得る。",
+ "精神攻撃のビームまたは球を放つ。",
+ "近距離のテレポートをする。",
+ "遠距離のテレポートをする。",
+ "レベル30未満で、モンスターを朦朧か混乱か恐怖させる球を放つ。レベル30以上で視界内の全てのモンスターを魅了する。抵抗されると無効。",
+ "テレキネシスの球を放つ。",
+ "一定時間、ACを上昇させる。レベルが上がると、酸、炎、冷気、電撃、毒の耐性も得られる。",
+ "レベル25未満で、アイテムの雰囲気を知る。レベル25以上で、アイテムを鑑定する。",
+ "レベル25未満で、自分を中心とした精神攻撃の球を発生させる。レベル25以上で、視界内の全てのモンスターに対して精神攻撃を行う。",
+ "恐怖と朦朧から回復し、ヒーロー気分かつ加速状態でなければHPが少し回復する。さらに、一定時間ヒーロー気分になり、加速する。",
+ "アイテムを自分の足元へ移動させる。",
+ "精神攻撃の球を放つ。モンスターに命中すると、0~1.5ターン消費する。抵抗されなければ、MPが回復する。",
+ "無傷球をも切り裂く純粋なエネルギーのビームを放つ。",
+ "時を止める。全MPを消費し、消費したMPに応じて長く時を止めていられる。",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+},
+{
+ "ごく小さい気の球を放つ。",
+ "光源が照らしている範囲か部屋全体を永久に明るくする。",
+ "一定時間、空中に浮けるようになる。",
+ "射程の短い気のビームを放つ。",
+ "一定時間、魔法防御能力を上昇させる。",
+ "気を練る。気を練ると術の威力は上がり、持続時間は長くなる。練った気は時間とともに拡散する。練りすぎると暴走する危険がある。",
+ "一定時間、攻撃してきた全てのモンスターを傷つけるオーラを纏う。",
+ "隣りのモンスターに対して気をぶつけ、吹きとばす。",
+ "大きな気の球を放つ。",
+ "モンスター1体にかかった魔法を解除する。",
+ "1体の幽霊を召喚する。",
+ "自分を中心とした超巨大な炎の球を発生させる。",
+ "射程の長い、強力な気のビームを放つ。",
+ "しばらくの間、非常に速く動くことができる。",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+},
+{
+ "近くの思考することができるモンスターを感知する。",
+ "攻撃した後、反対側に抜ける。",
+ "トラップにかかるが、そのトラップを破壊する。",
+ "周囲のダンジョンを揺らし、壁と床をランダムに入れ変える。",
+ "全方向に向かって攻撃する。",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+},
+{
+ "近くの全てのモンスターを感知する。レベル15で透明なモンスターを感知する。レベル25で一定時間テレパシーを得る。レベル35で周辺の地形を感知する。全ての効果は、鏡の上でないとレベル4だけ余計に必要になる。",
+ "自分のいる床の上に鏡を生成する。",
+ "閃光の矢を放つ。レベル10以上では鏡の上で使うとビームになる。",
+ "近距離のテレポートをする。",
+ "自分の周囲や、 自分のいる部屋全体を明るくする。",
+ "遠距離のテレポートをする。",
+ "一定時間、鏡のオーラが付く。攻撃を受けると破片のダメージで反撃し、さらに鏡の上にいた場合近距離のテレポートをする。",
+ "モンスターをテレポートさせるビームを放つ。抵抗されると無効。",
+ "破片の球を放つ。",
+ "全ての鏡の周りに眠りの球を発生させる。",
+ "ターゲットに向かって魔力のビームを放つ。鏡に命中すると、その鏡を破壊し、別の鏡に向かって反射する。",
+ "鏡の上のモンスターを消し去る。",
+ "一定時間、ACを上昇させる。レベル32で反射が付く。レベル40で魔法防御が上がる。",
+ "ターゲットに向かって強力な魔力のビームを放つ。鏡に命中すると、その鏡を破壊し、8方向に魔力のビームを発生させる。",
+ "視界内のモンスターを減速させ、朦朧とさせ、混乱させ、恐怖させ、麻痺させる。鏡の上で使うと威力が高い。",
+ "フロアを作り変える。鏡の上でしか使えない。",
+ "短距離内の指定した場所にテレポートする。",
+ "地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。",
+ "全ての攻撃が、1/2の確率で無効になる。",
+ "視界内の2つの鏡とプレイヤーを頂点とする三角形の領域に、魔力の結界を発生させる。",
+ "一定時間、ダメージを受けなくなるバリアを張る。切れた瞬間に少しターンを消費するので注意。",
+},
+{
+ "半径3以内かその部屋を暗くする。",
+ "近くの全ての見えるモンスターを感知する。レベル5で罠/扉/階段、レベル15でアイテムを感知できるようになる。レベル45でその階全体の地形と全てのアイテムを感知する。",
+ "近距離のテレポートをする。",
+ "攻撃を受けた瞬間にテレポートをするようになる。失敗するとその攻撃のダメージを受ける。テレポートに失敗することもある。",
+ "遠距離のテレポートをする。",
+ "攻撃してすぐにテレポートする。",
+ "敵1体の動きを封じる。ユニークモンスター相手の場合又は抵抗された場合には無効。",
+ "アイテムを識別する。",
+ "一定時間、浮遊能力を得る。",
+ "自分を中心とした火の球を発生させ、テレポートする。さらに、一定時間炎に対する耐性を得る。装備による耐性に累積する。",
+ "素早く相手に近寄り攻撃する。",
+ "ランダムな方向に8回くさびを投げる。",
+ "敵を1体自分の近くに引き寄せる。",
+ "ダメージのない混乱の球を放つ。",
+ "1体のモンスターと位置を交換する。",
+ "自分のいる床の上に、モンスターが通ると爆発してダメージを与えるルーンを描く。",
+ "一定時間、半物質化し壁を通り抜けられるようになる。さらに、一定時間酸への耐性を得る。装備による耐性に累積する。",
+ "自分を中心とした超巨大な毒、衰弱、混乱の球を発生させ、テレポートする。",
+ "ランダムな方向に何回か炎か地獄かプラズマのビームを放つ。",
+ "全ての攻撃が、1/2の確率で無効になる。",
+ "",
+},
+#else
+{
+ "Detects visible monsters in your vicinity and more and more. Detects traps and doors at level 5, invisible monsters at level 15, items at level 30. And magic mapping at level 20. Lights and know the whole level at level 45. Gives telepathy at level 25.",
+ "Fires a beam or ball which inflicts PSI damage.",
+ "Teleport short distance.",
+ "Teleport long distance.",
+ "Stuns, confuses or scares a monster. Or attempts to charm all monsters in sight at level 30.",
+ "Fires a ball which hurts monsters with telekinesis.",
+ "Gives stone skin and some resistance to elements for a while. The level increased, the more number of resistances given.",
+ "Gives feeling of an item. Or identify an item at level 25.",
+ "Generate a ball centered on you which inflict monster with PSI damage. Or inflict all monsters with PSI damage at level 25.",
+ "Removes fear and stun. Gives heroism and speed. Heals HP a little unless you already have heroism and temporal speed boost.",
+ "Pulls a distant item close to you.",
+ "Fires a ball which damages, co. Absorbing is takes more turns which from 0 to 1.5.",
+ "Fires a beam of pure energy which penetrate the invulnerability barrier.",
+ "Stops time. Consumes all of your SP. The more consumes SP, the longer duration of spell.",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+},
+{
+ "Fires a very small energy ball.",
+ "Lights up nearby area and the inside of a room permanently.",
+ "Gives levitaion a while.",
+ "Fires a short energy beam.",
+ "Gives magic resistance for a while.",
+ "Improves spirit energy power temporaly. Improved spirit energy will be more and more powerfull or have longer duration. Too many improving results in uncontrollable explosion of spirit energy.",
+ "Gives aura which damages all monsters which attacked you for a while.",
+ "Damages an adjacent monster, and blow it away.",
+ "Fires a large energy ball.",
+ "Dispels all magics which is effecting a monster.",
+ "Summons ghosts.",
+ "Generates a huge ball of frame which centered on you.",
+ "Fires a long, powerful energy beam.",
+ "Gives extremely fast speed.",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+},
+{
+ "Detects all monsters except mindless in your vicinity.",
+ "Attacks monster with your weapons normaly, then move through counter side of the monster.",
+ "Sets off a trap, then destroy that trap.",
+ "Shakes dungeon structure, and results in random swaping of floors and walls.",
+ "Attacks all adjacent monsters.",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+},
+{
+ "Detects visible monsters in your vicinity and more and more. Detects invisible monsters at level 15. Gives telepathy at level 25. Magic mapping at level 35. All of effects need 4 more levels unless on a mirror.",
+ "Makes a mirror under you.",
+ "Fires bolt of flash light. Or fires beam of light on a mirror at level 10.",
+ "Teleport short distance.",
+ "Lights up nearby area and the inside of a room permanently.",
+ "Teleport long distance.",
+ "Gives aura of shards of mirror for a while. It cause counter attack to monsters which attacks you.",
+ "Teleports all monsters on the line away unless resisted.",
+ "Fires a ball of shards.",
+ "Generate balls which send monsters to sleep on all mirrors in the whole level.",
+ "Fires a beam of mana. If the beam hit a mirror, it breaks that mirror and reflects toward another mirror.",
+ "Eliminates a monster on a mirror from current dungeon level.",
+ "Gives bonus to AC. Gives reflection at level 32. Gives magic resistance at level 40.",
+ "Fires a powerful beam of mana. If the beam hit a mirror, it breaks that mirror and fires 8 beams of mana to 8 different directions from that point.",
+ "Attempts to slow, stun, confuse, scare, freeze all monsters in sight. Gets more power on a mirror.",
+ "Recreates current dungeon level. Can only be used on a mirror.",
+ "Teleport to given location.",
+ "Recalls player from dungeon to town, or from town to the deepest level of dungeon.",
+ "Completely protects you from any attacks at one in two chance.",
+ "Generates a magical triangle which damages all monsters in the area. The vertices of the triangle is you and two mirrors in sight.",
+ "Generates barrier which completly protect you from almost all damages. Takes a few your turns when the barrier breaks or duration time is exceeded.",
+},
+
+{
+ "Darken nearby area and inside of a room.",
+ "Detects visible monsters in your vicinity and more and more. Detects traps, doors and stairs at level 5, items at level 15. Lights and know the whole level at level 45.",
+ "Teleport short distance.",
+ "Teleport as you recieve an attack. Might be able to teleport just before recieveing damages at higher level.",
+ "Teleport long distance.",
+ "Attack and teleport in a time.",
+ "Attempt to freeze a monster.",
+ "Identifies an item.",
+ "Gives levitation for a while.",
+ "Generate a fire ball and teleport in a time. Gives resistance to fire for a while. This resistance can be added to which from equipment for more powerful resistance.",
+ "Steps close to a monster and attacks at a time.",
+ "Shoots 8 iron Spikes in 8 random directions.",
+ "Teleport a monster to a place adjacent to you.",
+ "Releases a confusion ball which doesn't inflict any damage.",
+ "Swaps positions of you and a monster.",
+ "Sets a glyph under you. The glyph will explode when a monster moves on it.",
+ "Become ethereal form which gives ability to pass walls, and gives resistance to acid for a while. This resistance can be added to which from equipment for more powerful resistance.",
+ "Generates huge balls of poison, drain life and confusion, then teleport in a time.",
+ "Fires some number of beams of fire, nether or plasma in random directions.",
+ "Creates shadows of yourself which gives you abillity to completely evade any attacks at one in two chance for a while.",
+ "",
+},
+#endif
+};
+/*!
+ * @brief 特殊技能の効果情報をまとめたフォーマットを返す
+ * @param p 情報を返す文字列参照ポインタ
+ * @param use_mind 職業毎の特殊技能ID
+ * @param power モンスター魔法のID
+ * @return なし
+ */
void mindcraft_info(char *p, int use_mind, int power)
{
#ifdef JP
- cptr s_dam = "»½ý:";
- cptr s_dur = "´ü´Ö:";
- cptr s_range = "ÈÏ°Ï:";
+ cptr s_dam = "損傷:";
+ cptr s_dur = "期間:";
+ cptr s_range = "範囲:";
#else
cptr s_dam = "dam ";
cptr s_dur = "dur ";
cptr s_range = "range ";
#endif
- int plev = p_ptr->lev;
+ int plev = p_ptr->lev;
- strcpy(p, "");
+ strcpy(p, "");
- switch (use_mind)
- {
- case MIND_MINDCRAFTER:
- switch (power)
+ switch (use_mind)
{
- case 0: break;
- case 1: sprintf(p, " %s%dd%d", s_dam, 3 + ((plev - 1) / 4), 3 + plev/15); break;
- case 2: sprintf(p, " %s10", s_range); break;
- case 3: sprintf(p, " %s%d", s_range, plev * 5); break;
- case 4: break;
- case 5: sprintf(p, " %s%dd8", s_dam, 8 + ((plev - 5) / 4)); break;
- case 6: sprintf(p, " %s%d", s_dur, plev); break;
- case 7: break;
- case 8: sprintf(p, (plev < 25 ? " %s%d" : " %sd%d"), s_dam, (plev < 25 ? plev * 3 / 2 : plev * ((plev - 5) / 10 + 1))); break;
- case 9: sprintf(p, " %s10+d%d", s_dur, plev * 3 / 2); break;
-#ifdef JP
- case 10: sprintf(p, " ºÇÂç½ÅÎÌ:%d.%dkg", lbtokg1(plev * 15),lbtokg2(plev * 15)); break;
-#else
- case 10: sprintf(p, " max wgt %d", plev * 15); break;
-#endif
- case 11: sprintf(p, " %s%dd6", s_dam, plev / 2); break;
- case 12: sprintf(p, " %sd%d+%d", s_dam, plev * 3, plev * 3); break;
-#ifdef JP
- case 13: sprintf(p, " ¹ÔÆ°:%d²ó", (p_ptr->csp + 100-p_ptr->energy_need - 50)/100); break;
-#else
- case 13: sprintf(p, " %d acts.", (p_ptr->csp + 100-p_ptr->energy_need - 50)/100); break;
-#endif
- }
- break;
- case MIND_KI:
- {
- int boost = p_ptr->magic_num1[0];
+ case MIND_MINDCRAFTER:
+ switch (power)
+ {
+ case 0: break;
+ case 1: sprintf(p, " %s%dd%d", s_dam, 3 + ((plev - 1) / 4), 3 + plev/15); break;
+ case 2: sprintf(p, " %s10", s_range); break;
+ case 3: sprintf(p, " %s%d", s_range, plev * 5); break;
+ case 4: break;
+ case 5: sprintf(p, " %s%dd8", s_dam, 8 + ((plev - 5) / 4)); break;
+ case 6: sprintf(p, " %s%d", s_dur, plev); break;
+ case 7: break;
+ case 8: sprintf(p, (plev < 25 ? " %s%d" : " %sd%d"), s_dam, (plev < 25 ? plev * 3 / 2 : plev * ((plev - 5) / 10 + 1))); break;
+ case 9: sprintf(p, " %s10+d%d", s_dur, plev * 3 / 2); break;
+#ifdef JP
+ case 10: sprintf(p, " 最大重量:%d.%dkg", lbtokg1(plev * 15),lbtokg2(plev * 15)); break;
+#else
+ case 10: sprintf(p, " max wgt %d", plev * 15); break;
+#endif
+ case 11: sprintf(p, " %s%dd6", s_dam, plev / 2); break;
+ case 12: sprintf(p, " %sd%d+%d", s_dam, plev * 3, plev * 3); break;
+ case 13: sprintf(p, _(" 行動:%ld回", " %ld acts."), (long int)(p_ptr->csp + 100-p_ptr->energy_need - 50)/100); break;
+ }
+ break;
+ case MIND_KI:
+ {
+ int boost = P_PTR_KI;
- if (heavy_armor()) boost /= 2;
+ if (heavy_armor()) boost /= 2;
- switch (power)
- {
- case 0: sprintf(p, " %s%dd4", s_dam, 3 + ((plev - 1) / 5) + boost / 12); break;
- case 1: break;
- case 2: sprintf(p, " %s%d+d30", s_dur, 30 + boost / 5); break;
- case 3: sprintf(p, " %s%dd5", s_dam, 5 + ((plev - 1) / 5) + boost / 10); break;
- case 4: sprintf(p, " %s%d+d20", s_dur, 20 + boost / 5); break;
- case 5: break;
- case 6: sprintf(p, " %s%d+d%d", s_dur, 15 + boost / 7, plev / 2); break;
- case 7: sprintf(p, " %s%dd8", s_dam, 8 + ((plev - 5) / 5) + boost / 12); break;
- case 8: sprintf(p, " %s10d6+%d", s_dam, plev * 3 / 2 + boost * 3 / 5); break;
- case 9: break;
-#ifdef JP
- case 10: sprintf(p, " ºÇÂç%dɤ", 1+boost/100); break;
-#else
- case 10: sprintf(p, " max %d", 1+boost/100); break;
-#endif
- case 11: sprintf(p, " %s%d", s_dam, 100 + plev + boost); break;
- case 12: sprintf(p, " %s%dd15", s_dam, 10 + plev / 2 + boost * 3 / 10); break;
-#ifdef JP
- case 13: sprintf(p, " ¹ÔÆ°:%d+d16²ó", 16+boost/20); break;
-#else
- case 13: sprintf(p, " %d+d16 acts", 16+boost/20); break;
-#endif
- }
- break;
- case MIND_MIRROR_MASTER:
+ switch (power)
+ {
+ case 0: sprintf(p, " %s%dd4", s_dam, 3 + ((plev - 1) / 5) + boost / 12); break;
+ case 1: break;
+ case 2: sprintf(p, " %s%d+d30", s_dur, 30 + boost / 5); break;
+ case 3: sprintf(p, " %s%dd5", s_dam, 5 + ((plev - 1) / 5) + boost / 10); break;
+ case 4: sprintf(p, " %s%d+d20", s_dur, 20 + boost / 5); break;
+ case 5: break;
+ case 6: sprintf(p, " %s%d+d%d", s_dur, 15 + boost / 7, plev / 2); break;
+ case 7: sprintf(p, " %s%dd8", s_dam, 8 + ((plev - 5) / 4) + boost / 12); break;
+ case 8: sprintf(p, " %s10d6+%d", s_dam, plev * 3 / 2 + boost * 3 / 5); break;
+ case 9: break;
+ case 10: sprintf(p, _(" 最大%d体", " max %d"), 1+boost/100); break;
+ case 11: sprintf(p, " %s%d", s_dam, 100 + plev + boost); break;
+ case 12: sprintf(p, " %s%dd15", s_dam, 10 + plev / 2 + boost * 3 / 10); break;
+ case 13: sprintf(p, _(" 行動:%d+d16回", " %d+d16 acts"), 16+boost/20); break;
+ }
+ break;
+ }
+ case MIND_MIRROR_MASTER:
{
- switch (power)
- {
- case 0: break;
- case 1: break;
- case 2: sprintf(p, " %s%dd4", s_dam, 3 + ((plev - 1) / 5) ); break;
- case 3: sprintf(p, " %s10", s_range); break;
- case 4: break;
- case 5: sprintf(p, " %s%d", s_range, plev *5); break;
- case 6: sprintf(p, " %s20+d20", s_dur); break;
- case 7: break;
- case 8: sprintf(p, " %s%dd8", s_dam, 8+((plev -5)/4) ); break;
- case 9: break;
- case 10: sprintf(p, " %s%dd8", s_dam, 11+(plev-5)/4 ); break;
- case 11: break;
- case 12: sprintf(p, " %s20+d20", s_dur); break;
- case 13: sprintf(p, " %s150+d%d", s_dam, plev*2 ); break;
- case 14: break;
- case 15: break;
- case 16: sprintf(p, " %s%d", s_range, plev/2 +10); break;
- case 17: break;
- case 18: sprintf(p, " %s6+d6", s_dur); break;
- case 19: sprintf(p, " %s%d", s_dam, plev*11+5 ); break;
- case 20: sprintf(p, " %s4+d4", s_dur); break;
- }
- break;
+ switch (power)
+ {
+ case 0: break;
+ case 1: break;
+ case 2: sprintf(p, " %s%dd4", s_dam, 3 + ((plev - 1) / 5) ); break;
+ case 3: sprintf(p, " %s10", s_range); break;
+ case 4: break;
+ case 5: sprintf(p, " %s%d", s_range, plev *5); break;
+ case 6: sprintf(p, " %s20+d20", s_dur); break;
+ case 7: break;
+ case 8: sprintf(p, " %s%dd8", s_dam, 8+((plev -5)/4) ); break;
+ case 9: break;
+ case 10: sprintf(p, " %s%dd8", s_dam, 11+(plev-5)/4 ); break;
+ case 11: break;
+ case 12: sprintf(p, " %s20+d20", s_dur); break;
+ case 13: sprintf(p, " %s150+d%d", s_dam, plev*2 ); break;
+ case 14: break;
+ case 15: break;
+ case 16: sprintf(p, " %s%d", s_range, plev/2 +10); break;
+ case 17: break;
+ case 18: sprintf(p, " %s6+d6", s_dur); break;
+ case 19: sprintf(p, " %s%d", s_dam, plev*11+5 ); break;
+ case 20: sprintf(p, " %s4+d4", s_dur); break;
+ }
+ break;
}
- case MIND_NINJUTSU:
+ case MIND_NINJUTSU:
{
- switch (power)
- {
- case 0: break;
- case 1: break;
- case 2: sprintf(p, " %s10", s_range); break;
- case 3: break;
- case 4: sprintf(p, " %s%d", s_range , plev *5); break;
- case 5: sprintf(p, " %s30", s_range); break;
- case 6: break;
- case 7: break;
- case 8: sprintf(p, " %s20+d20", s_dur); break;
- case 9: sprintf(p, " %s%d", s_dam, (50+plev)/2 ); break;
- case 10: break;
- case 11: break;
- case 12: break;
- case 13: break;
- case 14: break;
- case 15: break;
- case 16: sprintf(p, " %s%d+d%d", s_dur, plev/2, plev/2); break;
- case 17: sprintf(p, " %s%d*3", s_dam, (75+plev*2/3)/2 ); break;
- case 18: sprintf(p, " %s%dd10", s_dam, 6+plev/8 ); break;
- case 19: sprintf(p, " %s6+d6", s_dur); break;
- }
- break;
+ switch (power)
+ {
+ case 0: break;
+ case 1: break;
+ case 2: sprintf(p, " %s10", s_range); break;
+ case 3: break;
+ case 4: sprintf(p, " %s%d", s_range , plev *5); break;
+ case 5: sprintf(p, " %s30", s_range); break;
+ case 6: break;
+ case 7: break;
+ case 8: sprintf(p, " %s20+d20", s_dur); break;
+ case 9: sprintf(p, " %s%d", s_dam, (50+plev)/2 ); break;
+ case 10: break;
+ case 11: break;
+ case 12: break;
+ case 13: break;
+ case 14: break;
+ case 15: break;
+ case 16: sprintf(p, " %s%d+d%d", s_dur, plev/2, plev/2); break;
+ case 17: sprintf(p, " %s%d*3", s_dam, (75+plev*2/3)/2 ); break;
+ case 18: sprintf(p, " %s%dd10", s_dam, 6+plev/8 ); break;
+ case 19: sprintf(p, " %s6+d6", s_dur); break;
+ }
+ break;
+ }
}
- }
- }
}
- /*
+/*!
+ * @brief 使用可能な特殊技能を選択する /
* Allow user to choose a mindcrafter power.
- *
- * If a valid spell is chosen, saves it in '*sn' and returns TRUE
- * If the user hits escape, returns FALSE, and set '*sn' to -1
- * If there are no legal choices, returns FALSE, and sets '*sn' to -2
- *
- * The "prompt" should be "cast", "recite", or "study"
- * The "known" should be TRUE for cast/pray, FALSE for study
- *
- * nb: This function has a (trivial) display bug which will be obvious
- * when you run it. It's probably easy to fix but I haven't tried,
- * sorry.
+ * @param sn 選択した特殊技能ID、キャンセルの場合-1、不正な選択の場合-2を返す
+ * @param only_browse 一覧を見るだけの場合TRUEを返す
+ * @return 発動可能な魔法を選択した場合TRUE、キャンセル処理か不正な選択が行われた場合FALSEを返す。
+ * @details
+ * If a valid spell is chosen, saves it in '*sn' and returns TRUE\n
+ * If the user hits escape, returns FALSE, and set '*sn' to -1\n
+ * If there are no legal choices, returns FALSE, and sets '*sn' to -2\n
+ *\n
+ * The "prompt" should be "cast", "recite", or "study"\n
+ * The "known" should be TRUE for cast/pray, FALSE for study\n
+ *\n
+ * nb: This function has a (trivial) display bug which will be obvious\n
+ * when you run it. It's probably easy to fix but I haven't tried,\n
+ * sorry.\n
*/
- static int get_mind_power(int *sn, bool only_browse)
- {
- int i;
- int num = 0;
- int y = 1;
- int x = 10;
- int minfail = 0;
- int plev = p_ptr->lev;
- int chance = 0;
- int ask = TRUE;
- char choice;
- char out_val[160];
- char comment[80];
- cptr p;
-
- mind_type spell;
- mind_power *mind_ptr;
- bool flag, redraw;
- int use_mind;
- int menu_line = (use_menu ? 1 : 0);
-
- switch(p_ptr->pclass)
+static bool_hack get_mind_power(SPELL_IDX *sn, bool only_browse)
+{
+ SPELL_IDX i;
+ int num = 0;
+ int y = 1;
+ int x = 10;
+ int minfail = 0;
+ int plev = p_ptr->lev;
+ int chance = 0;
+ int ask = TRUE;
+ char choice;
+ char out_val[160];
+ char comment[80];
+ cptr p;
+ COMMAND_CODE code;
+ mind_type spell;
+ const mind_power *mind_ptr;
+ bool flag, redraw;
+ int use_mind;
+ int menu_line = (use_menu ? 1 : 0);
+
+ switch (p_ptr->pclass)
{
case CLASS_MINDCRAFTER:
- {
- use_mind = MIND_MINDCRAFTER;
-#ifdef JP
- p = "ĶǽÎÏ";
-#else
- p = "mindcraft";
-#endif
- break;
- }
+ {
+ use_mind = MIND_MINDCRAFTER;
+ p = _("超能力", "mindcraft");
+ break;
+ }
case CLASS_FORCETRAINER:
- {
- use_mind = MIND_KI;
-#ifdef JP
- p = "Îýµ¤½Ñ";
-#else
- p = "Force";
-#endif
- break;
- }
+ {
+ use_mind = MIND_KI;
+ p = _("練気術", "Force");
+ break;
+ }
case CLASS_BERSERKER:
- {
- use_mind = MIND_BERSERKER;
-#ifdef JP
- p = "µ»";
-#else
- p = "brutal power";
-#endif
- break;
- }
+ {
+ use_mind = MIND_BERSERKER;
+ p = _("技", "brutal power");
+ break;
+ }
case CLASS_MIRROR_MASTER:
- {
- use_mind = MIND_MIRROR_MASTER;
-#ifdef JP
- p = "¶ÀËâË¡";
-#else
- p = "magic";
-#endif
- break;
- }
+ {
+ use_mind = MIND_MIRROR_MASTER;
+ p = _("鏡魔法", "magic");
+ break;
+ }
case CLASS_NINJA:
- {
- use_mind = MIND_NINJUTSU;
-#ifdef JP
- p = "Ǧ½Ñ";
-#else
- p = "ninjutsu";
-#endif
- break;
- }
+ {
+ use_mind = MIND_NINJUTSU;
+ p = _("忍術", "ninjutsu");
+ break;
+ }
default:
- {
- use_mind = 0;
-#ifdef JP
- p = "ĶǽÎÏ";
-#else
- p = "mindcraft";
-#endif
- break;
- }
+ {
+ use_mind = 0;
+ p = _("超能力", "mindcraft");
+ break;
+ }
}
- mind_ptr = &mind_powers[use_mind];
+ mind_ptr = &mind_powers[use_mind];
/* Assume cancelled */
- *sn = (-1);
+ *sn = (-1);
#ifdef ALLOW_REPEAT /* TNB */
- /* Get the spell, if available */
- if (repeat_pull(sn))
+ /* Get the spell, if available */
+
+ if (repeat_pull(&code))
{
- /* Verify the spell */
- if (mind_ptr->info[*sn].min_lev <= plev)
- {
- /* Success */
- return (TRUE);
- }
+ *sn = (SPELL_IDX)code;
+ /* Hack -- If requested INVEN_FORCE(1111), pull again */
+ if (*sn == INVEN_FORCE) repeat_pull(&code);
+ *sn = (SPELL_IDX)code;
+
+ /* Verify the spell */
+ if (mind_ptr->info[*sn].min_lev <= plev)
+ {
+ /* Success */
+ return (TRUE);
+ }
}
#endif /* ALLOW_REPEAT -- TNB */
- /* Nothing chosen yet */
- flag = FALSE;
+ /* Nothing chosen yet */
+ flag = FALSE;
- /* No redraw yet */
- redraw = FALSE;
+ /* No redraw yet */
+ redraw = FALSE;
- for (i = 0; i < MAX_MIND_POWERS; i++)
+ for (i = 0; i < MAX_MIND_POWERS; i++)
{
if (mind_ptr->info[i].min_lev <= plev)
{
}
}
- /* Build a prompt (accept all spells) */
- if (only_browse)
+ /* Build a prompt (accept all spells) */
+ if (only_browse)
{
-#ifdef JP
- (void) strnfmt(out_val, 78, "(%^s %c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤Ë¤Ä¤¤¤ÆÃΤê¤Þ¤¹¤«¡©",
-#else
- (void) strnfmt(out_val, 78, "(%^ss %c-%c, *=List, ESC=exit) Use which %s? ",
-#endif
+ (void) strnfmt(out_val, 78,
+ _("(%^s %c-%c, '*'で一覧, ESC) どの%sについて知りますか?", "(%^ss %c-%c, *=List, ESC=exit) Use which %s? "),
p, I2A(0), I2A(num - 1), p);
- }
+ }
else
- {
-#ifdef JP
-(void) strnfmt(out_val, 78, "(%^s %c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò»È¤¤¤Þ¤¹¤«¡©",
-#else
- (void)strnfmt(out_val, 78, "(%^ss %c-%c, *=List, ESC=exit) Use which %s? ",
-#endif
- p, I2A(0), I2A(num - 1), p);
+ {
+ (void) strnfmt(out_val, 78,
+ _("(%^s %c-%c, '*'で一覧, ESC) どの%sを使いますか?", "(%^ss %c-%c, *=List, ESC=exit) Use which %s? "),
+ p, I2A(0), I2A(num - 1), p);
}
if (use_menu && !only_browse) screen_save();
/* Get a spell from the user */
- choice= (always_show_list || use_menu) ? ESCAPE:1 ;
- while (!flag)
- {
+ choice= (always_show_list || use_menu) ? ESCAPE:1 ;
+ while (!flag)
+ {
if(choice==ESCAPE) choice = ' ';
else if( !get_com(out_val, &choice, TRUE) )break;
{
if (!only_browse) screen_load();
return (FALSE);
- break;
}
case '8':
/* Display a list of spells */
prt("", y, x);
-#ifdef JP
-put_str("̾Á°", y, x + 5);
-#else
- put_str("Name", y, x + 5);
-#endif
+ put_str(_("名前", "Name"), y, x + 5);
#ifdef JP
-put_str(format("Lv %s ¼ºÎ¨ ¸ú²Ì", ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU)) ? "HP" : "MP"), y, x + 35);
+put_str(format("Lv %s 失率 効果", ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU)) ? "HP" : "MP"), y, x + 35);
#else
put_str(format("Lv %s Fail Info", ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU)) ? "HP" : "MP"), y, x + 35);
#endif
if (i == 5)
{
int j;
- for (j = 0; j < p_ptr->magic_num1[0] / 50; j++)
+ for (j = 0; j < P_PTR_KI / 50; j++)
mana_cost += (j+1) * 3 / 2;
}
}
if (use_menu)
{
-#ifdef JP
- if (i == (menu_line-1)) strcpy(psi_desc, " ¡Õ ");
-#else
- if (i == (menu_line-1)) strcpy(psi_desc, " > ");
-#endif
+ if (i == (menu_line-1)) strcpy(psi_desc, _(" 》 ", " > "));
else strcpy(psi_desc, " ");
}
else
- sprintf(psi_desc, " %c) ",I2A(i));
+ sprintf(psi_desc, " %c) ", I2A(i));
/* Dump the spell --(-- */
strcat(psi_desc,
format("%-30s%2d %4d%s %3d%%%s",
spell.name, spell.min_lev, mana_cost,
#ifdef JP
- (((use_mind == MIND_MINDCRAFTER) && (i == 13)) ? "¡Á" : " "),
+ (((use_mind == MIND_MINDCRAFTER) && (i == 13)) ? "~" : " "),
#else
(((use_mind == MIND_MINDCRAFTER) && (i == 13)) ? "~ " : " "),
#endif
ask = isupper(choice);
/* Lowercase */
- if (ask) choice = tolower(choice);
+ if (ask) choice = (char)tolower(choice);
/* Extract request */
i = (islower(choice) ? A2I(choice) : -1);
char tmp_val[160];
/* Prompt */
-#ifdef JP
-(void) strnfmt(tmp_val, 78, "%s¤ò»È¤¤¤Þ¤¹¤«¡©", spell.name);
-#else
- (void)strnfmt(tmp_val, 78, "Use %s? ", spell.name);
-#endif
-
+ (void) strnfmt(tmp_val, 78, _("%sを使いますか?", "Use %s? "), spell.name);
/* Belay that order */
if (!get_check(tmp_val)) continue;
if (redraw && !only_browse) screen_load();
/* Show choices */
- if (show_choices)
- {
- /* Update */
- p_ptr->window |= (PW_SPELL);
+ p_ptr->window |= (PW_SPELL);
- /* Window stuff */
- window_stuff();
- }
+ /* Window stuff */
+ window_stuff();
/* Abort if needed */
if (!flag) return (FALSE);
#ifdef ALLOW_REPEAT /* TNB */
- repeat_push(*sn);
+ repeat_push((COMMAND_CODE)i);
#endif /* ALLOW_REPEAT -- TNB */
return (TRUE);
}
-
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'mindcrafter'.
+/*!
+ * @brief 超能力の発動 /
+ * do_cmd_cast calls this function if the player's class is 'mindcrafter'.
+ * @param spell 発動する特殊技能のID
+ * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
static bool cast_mindcrafter_spell(int spell)
{
int b = 0;
int dir;
- int plev = p_ptr->lev;
+ TIME_EFFECT t;
+ PLAYER_LEVEL plev = p_ptr->lev;
/* spell code */
switch (spell)
{
chg_virtue(V_KNOWLEDGE, 1);
chg_virtue(V_ENLIGHTEN, 1);
- wiz_lite(FALSE, FALSE);
+ wiz_lite(FALSE);
}
else if (plev > 19)
map_area(DETECT_RAD_MAP);
}
if ((plev > 24) && (plev < 40))
- set_tim_esp(plev, FALSE);
+ set_tim_esp((TIME_EFFECT)plev, FALSE);
-#ifdef JP
-if (!b) msg_print("°ÂÁ´¤Êµ¤¤¬¤¹¤ë¡£");
-#else
- if (!b) msg_print("You feel safe.");
-#endif
+ if (!b) msg_print(_("安全な気がする。", "You feel safe."));
break;
case 1:
break;
case 2:
/* Minor displace */
- teleport_player(10);
+ teleport_player(10, 0L);
break;
case 3:
/* Major displace */
- teleport_player(plev * 5);
+ teleport_player(plev * 5, 0L);
break;
case 4:
/* Domination */
break;
case 6:
/* Character Armour */
- set_shield(plev, FALSE);
- if (plev > 14) set_oppose_acid(plev, FALSE);
- if (plev > 19) set_oppose_fire(plev, FALSE);
- if (plev > 24) set_oppose_cold(plev, FALSE);
- if (plev > 29) set_oppose_elec(plev, FALSE);
- if (plev > 34) set_oppose_pois(plev, FALSE);
+ set_shield((TIME_EFFECT)plev, FALSE);
+ if (plev > 14) set_oppose_acid((TIME_EFFECT)plev, FALSE);
+ if (plev > 19) set_oppose_fire((TIME_EFFECT)plev, FALSE);
+ if (plev > 24) set_oppose_cold((TIME_EFFECT)plev, FALSE);
+ if (plev > 29) set_oppose_elec((TIME_EFFECT)plev, FALSE);
+ if (plev > 34) set_oppose_pois((TIME_EFFECT)plev, FALSE);
break;
case 7:
/* Psychometry */
if (plev < 25)
return psychometry();
else
- return ident_spell(FALSE, FALSE);
- break;
+ return ident_spell(FALSE);
case 8:
/* Mindwave */
-#ifdef JP
-msg_print("Àº¿À¤òDZ¤¸¶Ê¤²¤ëÇÈÆ°¤òȯÀ¸¤µ¤»¤¿¡ª");
-#else
- msg_print("Mind-warping forces emanate from your brain!");
-#endif
+ msg_print(_("精神を捻じ曲げる波動を発生させた!", "Mind-warping forces emanate from your brain!"));
if (plev < 25)
- project(0, 2 + plev / 10, py, px,
+ project(0, 2 + plev / 10, p_ptr->y, p_ptr->x,
(plev * 3), GF_PSI, PROJECT_KILL, -1);
else
(void)mindblast_monsters(randint1(plev * ((plev - 5) / 10 + 1)));
* Only heal when Adrenalin Channeling is not active. We check
* that by checking if the player isn't fast and 'heroed' atm.
*/
- if (!p_ptr->fast || !p_ptr->hero)
+ if (!IS_FAST() || !IS_HERO())
{
hp_player(plev);
}
- b = 10 + randint1((plev * 3) / 2);
- set_hero(b, FALSE);
+ t = 10 + randint1((plev * 3) / 2);
+ set_hero(t, FALSE);
/* Haste */
- (void)set_fast(b, FALSE);
+ (void)set_fast(t, FALSE);
break;
case 10:
/* Telekinesis */
{
if (world_player)
{
-#ifdef JP
- msg_print("´û¤Ë»þ¤Ï»ß¤Þ¤Ã¤Æ¤¤¤ë¡£");
-#else
- msg_print("Time is already stopped.");
-#endif
+ msg_print(_("既に時は止まっている。", "Time is already stopped."));
return (FALSE);
}
world_player = TRUE;
-#ifdef JP
- msg_print("¡Ö»þ¤è¡ª¡×");
-#else
- msg_print("You yell 'Time!'");
-#endif
+ msg_print(_("「時よ!」", "You yell 'Time!'"));
msg_print(NULL);
/* Hack */
break;
}
default:
-#ifdef JP
-msg_print("¤Ê¤Ë¡©");
-#else
- msg_print("Zap?");
-#endif
-
+ msg_print(_("なに?", "Zap?"));
}
return TRUE;
}
-
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'ForceTrainer'.
+/*!
+ * @brief 練気術の発動 /
+ * do_cmd_cast calls this function if the player's class is 'ForceTrainer'.
+ * @param spell 発動する特殊技能のID
+ * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
static bool cast_force_spell(int spell)
{
- int dir;
- int plev = p_ptr->lev;
- int boost = p_ptr->magic_num1[0];
+ DIRECTION dir;
+ int plev = p_ptr->lev;
+ int boost = P_PTR_KI;
if (heavy_armor()) boost /= 2;
(void)lite_area(damroll(2, (plev / 2)), (plev / 10) + 1);
break;
case 2:
- set_tim_ffall(randint1(30) + 30 + boost / 5, FALSE);
+ set_tim_levitation(randint1(30) + 30 + boost / 5, FALSE);
break;
case 3:
project_length = plev / 8 + 3;
set_resist_magic(randint1(20) + 20 + boost / 5, FALSE);
break;
case 5:
-#ifdef JP
- msg_print("µ¤¤òÎý¤Ã¤¿¡£");
-#else
- msg_print("You improved the Force.");
-#endif
- p_ptr->magic_num1[0] += (70 + plev);
+ msg_print(_("気を練った。", "You improved the Force."));
+ P_PTR_KI += (70 + plev);
p_ptr->update |= (PU_BONUS);
- if (randint1(p_ptr->magic_num1[0]) > (plev * 4 + 120))
+ if (randint1(P_PTR_KI) > (plev * 4 + 120))
{
-#ifdef JP
- msg_print("µ¤¤¬Ë½Áö¤·¤¿¡ª");
-#else
- msg_print("The Force exploded!");
-#endif
- fire_ball(GF_MANA, 0, p_ptr->magic_num1[0] / 2, 10);
-#ifdef JP
- take_hit(DAMAGE_LOSELIFE, p_ptr->magic_num1[0] / 2, "µ¤¤Î˽Áö", -1);
-#else
- take_hit(DAMAGE_LOSELIFE, p_ptr->magic_num1[0] / 2, "Explosion of the Force", -1);
-#endif
+ msg_print(_("気が暴走した!", "The Force exploded!"));
+ fire_ball(GF_MANA, 0, P_PTR_KI / 2, 10);
+ take_hit(DAMAGE_LOSELIFE, p_ptr->magic_num1[0] / 2, _("気の暴走", "Explosion of the Force"), -1);
}
else return TRUE;
break;
project_length = 1;
if (!get_aim_dir(&dir)) return FALSE;
- y = py + ddy[dir];
- x = px + ddx[dir];
+ y = p_ptr->y + ddy[dir];
+ x = p_ptr->x + ddx[dir];
dam = damroll(8 + ((plev - 5) / 4) + boost / 12, 8);
fire_beam(GF_MISSILE, dir, dam);
if (cave[y][x].m_idx)
int i;
int ty = y, tx = x;
int oy = y, ox = x;
- int m_idx = cave[y][x].m_idx;
+ MONSTER_IDX m_idx = cave[y][x].m_idx;
monster_type *m_ptr = &m_list[m_idx];
+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
char m_name[80];
monster_desc(m_name, m_ptr, 0);
- if (randint1(r_info[m_ptr->r_idx].level * 3 / 2) > randint0(dam / 2) + dam/2)
+ if (randint1(r_ptr->level * 3 / 2) > randint0(dam / 2) + dam/2)
{
-#ifdef JP
- msg_format("%s¤ÏÈô¤Ð¤µ¤ì¤Ê¤«¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s was not blown away.", m_name);
-#endif
+ msg_format(_("%sは飛ばされなかった。", "%^s was not blown away."), m_name);
}
else
{
}
if ((ty != oy) || (tx != ox))
{
-#ifdef JP
- msg_format("%s¤ò¿á¤Èô¤Ð¤·¤¿¡ª", m_name);
-#else
- msg_format("You blow %s away!", m_name);
-#endif
+ msg_format(_("%sを吹き飛ばした!", "You blow %s away!"), m_name);
cave[oy][ox].m_idx = 0;
- cave[ty][tx].m_idx = m_idx;
- m_ptr->fy = ty;
- m_ptr->fx = tx;
+ cave[ty][tx].m_idx = (s16b)m_idx;
+ m_ptr->fy = (byte_hack)ty;
+ m_ptr->fx = (byte_hack)tx;
update_mon(m_idx, TRUE);
lite_spot(oy, ox);
lite_spot(ty, tx);
+
+ if (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
+ p_ptr->update |= (PU_MON_LITE);
}
}
}
break;
case 9:
{
- monster_type *m_ptr;
- char m_name[80];
+ MONSTER_IDX m_idx;
if (!target_set(TARGET_KILL)) return FALSE;
- if (!cave[target_row][target_col].m_idx) break;
- if (!los(py, px, target_row, target_col)) break;
- m_ptr = &m_list[cave[target_row][target_col].m_idx];
- monster_desc(m_name, m_ptr, 0);
- if (m_ptr->invulner)
- {
- m_ptr->invulner = 0;
-#ifdef JP
-msg_format("%s¤Ï¤â¤¦ÌµÅ¨¤Ç¤Ï¤Ê¤¤¡£", m_name);
-#else
- msg_format("%^s is no longer invulnerable.", m_name);
-#endif
- }
- if (m_ptr->fast)
- {
- m_ptr->fast = 0;
-#ifdef JP
-msg_format("%s¤Ï¤â¤¦²Ã®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
- msg_format("%^s is no longer fast.", m_name);
-#endif
- }
- if (m_ptr->slow)
- {
- m_ptr->slow = 0;
-#ifdef JP
-msg_format("%s¤Ï¤â¤¦¸ºÂ®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
- msg_format("%^s is no longer slow.", m_name);
-#endif
- }
- p_ptr->redraw |= (PR_HEALTH);
- if (p_ptr->riding == cave[target_row][target_col].m_idx) p_ptr->redraw |= (PR_UHEALTH);
-
+ m_idx = cave[target_row][target_col].m_idx;
+ if (!m_idx) break;
+ if (!player_has_los_bold(target_row, target_col)) break;
+ if (!projectable(p_ptr->y, p_ptr->x, target_row, target_col)) break;
+ dispel_monster_status(m_idx);
break;
}
case 10:
bool success = FALSE;
for (i = 0; i < 1 + boost/100; i++)
- if (summon_specific(-1, py, px, plev, SUMMON_PHANTOM, PM_FORCE_PET))
+ if (summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_PHANTOM, PM_FORCE_PET))
success = TRUE;
if (success)
{
-#ifdef JP
-msg_print("¸æÍѤǤ´¤¶¤¤¤Þ¤¹¤¬¡¢¸æ¼ç¿ÍÍÍ¡©");
-#else
- msg_print("'Your wish, master?'");
-#endif
+ msg_print(_("御用でございますが、御主人様?", "'Your wish, master?'"));
}
else
{
-#ifdef JP
- msg_print("²¿¤â¸½¤ì¤Ê¤«¤Ã¤¿¡£");
-#else
- msg_print("Nothing happen.");
-#endif
+ msg_print(_("何も現れなかった。", "Nothing happen."));
}
break;
}
set_lightspeed(randint1(16) + 16 + boost / 20, FALSE);
break;
default:
-#ifdef JP
-msg_print("¤Ê¤Ë¡©");
-#else
- msg_print("Zap?");
-#endif
-
+ msg_print(_("なに?", "Zap?"));
}
- p_ptr->magic_num1[0] = 0;
+ P_PTR_KI = 0;
p_ptr->update |= (PU_BONUS);
return TRUE;
}
-/* by henkma */
-/* calculate mirrors */
+
+/*!
+ * @brief 現在フロアに存在している鏡の数を数える / calculate mirrors
+ * @return 鏡の枚数
+ */
static int number_of_mirrors( void )
{
int x,y;
int val=0;
for( x=0 ; x < cur_wid ; x++ ){
for( y=0 ; y < cur_hgt ; y++ ){
- if( (cave[y][x].info & CAVE_IN_MIRROR) )val++;
+ if (is_mirror_grid(&cave[y][x])) val++;
}
}
return val;
}
+/*!
+ * @brief 鏡魔法の発動 /
+ * do_cmd_cast calls this function if the player's class is 'Mirror magic'.
+ * @param spell 発動する特殊技能のID
+ * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
+ */
static bool cast_mirror_spell(int spell)
{
int dir;
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
int tmp;
- int x,y;
+ TIME_EFFECT t;
+ int x, y;
/* spell code */
switch (spell)
{
- /* mirror of seeing */
+ /* mirror of seeing */
case 0:
- tmp = (cave[py][px].info & CAVE_IN_MIRROR) ? 4 : 0;
- if( plev + tmp > 4)detect_monsters_normal(DETECT_RAD_DEFAULT);
- if( plev + tmp > 18 )detect_monsters_invis(DETECT_RAD_DEFAULT);
- if( plev + tmp > 28 )set_tim_esp(plev,FALSE);
- if( plev + tmp > 38 )map_area(DETECT_RAD_MAP);
- if( tmp == 0 && plev < 5 ){
-#ifdef JP
- msg_print("¶À¤¬¤Ê¤¯¤Æ½¸Ãæ¤Ç¤¤Ê¤«¤Ã¤¿¡ª");
-#else
- msg_print("You need a mirror to concentrate!");
-#endif
- }
- break;
- /* drip of light */
+ tmp = is_mirror_grid(&cave[p_ptr->y][p_ptr->x]) ? 4 : 0;
+ if (plev + tmp > 4)detect_monsters_normal(DETECT_RAD_DEFAULT);
+ if (plev + tmp > 18)detect_monsters_invis(DETECT_RAD_DEFAULT);
+ if (plev + tmp > 28)set_tim_esp((TIME_EFFECT)plev, FALSE);
+ if (plev + tmp > 38)map_area(DETECT_RAD_MAP);
+ if (tmp == 0 && plev < 5) {
+ msg_print(_("鏡がなくて集中できなかった!", "You need a mirror to concentrate!"));
+ }
+ break;
+ /* drip of light */
case 1:
- if( number_of_mirrors() < 4 + plev/10 ){
- warding_mirror();
- }
- else {
-#ifdef JP
-msg_format("¤³¤ì°Ê¾å¶À¤ÏÀ©¸æ¤Ç¤¤Ê¤¤¡ª");
-#else
-msg_format("There are too many mirrors to control!");
-#endif
- }
- break;
+ if (number_of_mirrors() < 4 + plev / 10) {
+ place_mirror();
+ }
+ else {
+ msg_format(_("これ以上鏡は制御できない!", "There are too many mirrors to control!"));
+ }
+ break;
case 2:
- if (!get_aim_dir(&dir)) return FALSE;
- if ( plev > 9 && (cave[py][px].info & CAVE_IN_MIRROR) ){
- fire_beam(GF_LITE, dir,damroll(3+((plev-1)/5),4));
- }
- else {
- fire_bolt(GF_LITE, dir,damroll(3+((plev-1)/5),4));
- }
- break;
- /* warped mirror */
+ if (!get_aim_dir(&dir)) return FALSE;
+ if (plev > 9 && is_mirror_grid(&cave[p_ptr->y][p_ptr->x])) {
+ fire_beam(GF_LITE, dir, damroll(3 + ((plev - 1) / 5), 4));
+ }
+ else {
+ fire_bolt(GF_LITE, dir, damroll(3 + ((plev - 1) / 5), 4));
+ }
+ break;
+ /* warped mirror */
case 3:
- teleport_player(10);
- break;
- /* mirror of light */
+ teleport_player(10, 0L);
+ break;
+ /* mirror of light */
case 4:
- (void)lite_area(damroll(2, (plev / 2)), (plev / 10) + 1);
- break;
- /* mirror of wandering */
+ (void)lite_area(damroll(2, (plev / 2)), (plev / 10) + 1);
+ break;
+ /* mirror of wandering */
case 5:
- teleport_player(plev * 5);
- break;
- /* robe of dust */
+ teleport_player(plev * 5, 0L);
+ break;
+ /* robe of dust */
case 6:
- set_dustrobe(20+randint1(20),FALSE);
- break;
- /* banishing mirror */
+ set_dustrobe(20 + randint1(20), FALSE);
+ break;
+ /* banishing mirror */
case 7:
- if (!get_aim_dir(&dir)) return FALSE;
- (void)fire_beam(GF_AWAY_ALL, dir , plev);
- break;
- /* mirror clashing */
+ if (!get_aim_dir(&dir)) return FALSE;
+ (void)fire_beam(GF_AWAY_ALL, dir, plev);
+ break;
+ /* mirror clashing */
case 8:
- if (!get_aim_dir(&dir)) return FALSE;
- fire_ball(GF_SHARDS, dir, damroll(8 + ((plev - 5) / 4), 8),
- (plev > 20 ? (plev - 20) / 8 + 1 : 0));
- break;
- /* mirror sleeping */
+ if (!get_aim_dir(&dir)) return FALSE;
+ fire_ball(GF_SHARDS, dir, damroll(8 + ((plev - 5) / 4), 8),
+ (plev > 20 ? (plev - 20) / 8 + 1 : 0));
+ break;
+ /* mirror sleeping */
case 9:
- for(x=0;x<cur_wid;x++){
- for(y=0;y<cur_hgt;y++){
- if(cave[y][x].info & CAVE_IN_MIRROR){
- project(0,2,y,x,plev,GF_OLD_SLEEP,(PROJECT_GRID|PROJECT_ITEM|PROJECT_KILL|PROJECT_JUMP|PROJECT_NO_HANGEKI),-1);
- }
- }
- }
- break;
- /* seeker ray */
+ for (x = 0; x < cur_wid; x++) {
+ for (y = 0; y < cur_hgt; y++) {
+ if (is_mirror_grid(&cave[y][x])) {
+ project(0, 2, y, x, (HIT_POINT)plev, GF_OLD_SLEEP, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
+ }
+ }
+ }
+ break;
+ /* seeker ray */
case 10:
- if (!get_aim_dir(&dir)) return FALSE;
- fire_beam(GF_SEEKER,dir, damroll(11+(plev-5)/4,8));
- break;
- /* seal of mirror */
+ if (!get_aim_dir(&dir)) return FALSE;
+ fire_beam(GF_SEEKER, dir, damroll(11 + (plev - 5) / 4, 8));
+ break;
+ /* seal of mirror */
case 11:
- seal_of_mirror(plev*4+100);
- break;
- /* shield of water */
+ seal_of_mirror(plev * 4 + 100);
+ break;
+ /* shield of water */
case 12:
- tmp = 20+randint1(20);
- set_shield(tmp, FALSE);
- if( plev > 31 )set_tim_reflect(tmp, FALSE);
- if( plev > 39 )set_resist_magic(tmp,FALSE);
- break;
- /* super ray */
+ t = 20 + randint1(20);
+ set_shield(t, FALSE);
+ if (plev > 31)set_tim_reflect(t, FALSE);
+ if (plev > 39)set_resist_magic(t, FALSE);
+ break;
+ /* super ray */
case 13:
- if (!get_aim_dir(&dir)) return FALSE;
- fire_beam(GF_SUPER_RAY,dir, 150+randint1(2*plev));
- break;
- /* illusion light */
+ if (!get_aim_dir(&dir)) return FALSE;
+ fire_beam(GF_SUPER_RAY, dir, 150 + randint1(2 * plev));
+ break;
+ /* illusion light */
case 14:
- tmp = (cave[py][px].feat & CAVE_IN_MIRROR) ? 4 : 3;
- slow_monsters();
- stun_monsters(plev*tmp);
- confuse_monsters(plev*tmp);
- turn_monsters(plev*tmp);
- stun_monsters(plev*tmp);
- stasis_monsters(plev*tmp);
- break;
- /* mirror shift */
+ tmp = is_mirror_grid(&cave[p_ptr->y][p_ptr->x]) ? 4 : 3;
+ slow_monsters(plev);
+ stun_monsters(plev*tmp);
+ confuse_monsters(plev*tmp);
+ turn_monsters(plev*tmp);
+ stun_monsters(plev*tmp);
+ stasis_monsters(plev*tmp);
+ break;
+ /* mirror shift */
case 15:
- if( !(cave[py][px].info & CAVE_IN_MIRROR) ){
-#ifdef JP
- msg_print("¶À¤Î¹ñ¤Î¾ì½ê¤¬¤ï¤«¤é¤Ê¤¤¡ª");
-#else
- msg_print("You cannot find out where is the world of mirror!");
-#endif
+ if (!is_mirror_grid(&cave[p_ptr->y][p_ptr->x])) {
+ msg_print(_("鏡の国の場所がわからない!", "You cannot find out where is the world of mirror!"));
+ break;
+ }
+ alter_reality();
break;
- }
- alter_reality();
- break;
- /* mirror tunnel */
+ /* mirror tunnel */
case 16:
-#ifdef JP
- msg_print("¶À¤ÎÀ¤³¦¤òÄ̤êÈ´¤±¡Ä ");
-#else
- msg_print("Go through the world of mirror...");
-#endif
- return dimension_door();
- /* mirror of recall */
+ msg_print(_("鏡の世界を通り抜け… ", "Go through the world of mirror..."));
+ return mirror_tunnel();
+
+ /* mirror of recall */
case 17:
- if(!word_of_recall())return FALSE;
- break;
- /* multi-shadow */
+ return word_of_recall();
+ /* multi-shadow */
case 18:
- set_multishadow(6+randint1(6),FALSE);
- break;
- /* binding field */
+ set_multishadow(6 + randint1(6), FALSE);
+ break;
+ /* binding field */
case 19:
-#ifdef JP
- if( !binding_field(plev*11+5) )msg_print("ŬÅö¤Ê¶À¤òÁª¤Ù¤Ê¤«¤Ã¤¿¡ª");
-#else
- if( !binding_field(plev*11+5) )msg_print("You were not able to choose suitable mirrors!");
-#endif
- break;
- /* mirror of Ruffnor */
+ if (!binding_field(plev * 11 + 5))msg_print(_("適当な鏡を選べなかった!", "You were not able to choose suitable mirrors!"));
+ break;
+ /* mirror of Ruffnor */
case 20:
- (void)set_invuln(randint1(4)+4,FALSE);
- break;
+ (void)set_invuln(randint1(4) + 4, FALSE);
+ break;
default:
-#ifdef JP
-msg_print("¤Ê¤Ë¡©");
-#else
- msg_print("Zap?");
-#endif
+ msg_print(_("なに?", "Zap?"));
}
p_ptr->magic_num1[0] = 0;
return TRUE;
}
-
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'berserker'.
+/*!
+ * @brief 怒りの発動 /
+ * do_cmd_cast calls this function if the player's class is 'berserker'.
+ * @param spell 発動する特殊技能のID
+ * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
static bool cast_berserk_spell(int spell)
{
- int y, x;
- int dir;
+ POSITION y, x;
+ DIRECTION dir;
/* spell code */
switch (spell)
{
if (p_ptr->riding)
{
-#ifdef JP
- msg_print("¾èÇÏÃæ¤Ë¤Ï̵Íý¤À¡£");
-#else
- msg_print("You cannot do it when riding.");
-#endif
+ msg_print(_("乗馬中には無理だ。", "You cannot do it when riding."));
return FALSE;
}
if (!get_rep_dir2(&dir)) return FALSE;
if (dir == 5) return FALSE;
- y = py + ddy[dir];
- x = px + ddx[dir];
+ y = p_ptr->y + ddy[dir];
+ x = p_ptr->x + ddx[dir];
if (!cave[y][x].m_idx)
{
-#ifdef JP
- msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
- msg_print("There is no monster.");
-#endif
+ msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
return FALSE;
}
py_attack(y, x, 0);
- if (!player_can_enter(cave[y][x].feat) || is_trap(cave[y][x].feat))
+ if (!player_can_enter(cave[y][x].feat, 0) || is_trap(cave[y][x].feat))
break;
y += ddy[dir];
x += ddx[dir];
- if (player_can_enter(cave[y][x].feat) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx)
+ if (player_can_enter(cave[y][x].feat, 0) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx)
{
- int oy, ox;
-
msg_print(NULL);
- /* Save the old location */
- oy = py;
- ox = px;
-
/* Move the player */
- py = y;
- px = x;
-
- forget_flow();
-
- /* Redraw the old spot */
- lite_spot(oy, ox);
-
- /* Redraw the new spot */
- lite_spot(py, px);
-
- /* Check for new panel (redraw map) */
- verify_panel();
-
- /* Update stuff */
- p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW);
-
- /* Update the monsters */
- p_ptr->update |= (PU_DISTANCE);
-
- /* Window stuff */
- p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
- /* Handle stuff XXX XXX XXX */
- handle_stuff();
+ (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
}
break;
}
case 2:
{
if (!get_rep_dir2(&dir)) return FALSE;
- y = py + ddy[dir];
- x = px + ddx[dir];
+ y = p_ptr->y + ddy[dir];
+ x = p_ptr->x + ddx[dir];
move_player(dir, easy_disarm, TRUE);
break;
}
case 3:
- earthquake(py, px, 8+randint0(5));
+ earthquake(p_ptr->y, p_ptr->x, 8+randint0(5));
break;
case 4:
- {
- cave_type *c_ptr;
- monster_type *m_ptr;
-
- for (dir = 0; dir < 8; dir++)
- {
- y = py + ddy_ddd[dir];
- x = px + ddx_ddd[dir];
- c_ptr = &cave[y][x];
-
- /* Get the monster */
- m_ptr = &m_list[c_ptr->m_idx];
-
- /* Hack -- attack monsters */
- if (c_ptr->m_idx && (m_ptr->ml || cave_floor_bold(y, x)))
- py_attack(y, x, 0);
- }
+ massacre();
break;
- }
default:
-#ifdef JP
-msg_print("¤Ê¤Ë¡©");
-#else
- msg_print("Zap?");
-#endif
+ msg_print(_("なに?", "Zap?"));
}
return TRUE;
}
-
-
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'ninja'.
+/*!
+ * @brief 忍術の発動 /
+ * do_cmd_cast calls this function if the player's class is 'ninja'.
+ * @param spell 発動する特殊技能のID
+ * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
static bool cast_ninja_spell(int spell)
{
- int x, y;
+ POSITION x, y;
int dir;
int plev = p_ptr->lev;
case 1:
if (plev > 44)
{
- wiz_lite(FALSE, TRUE);
+ wiz_lite(TRUE);
}
detect_monsters_normal(DETECT_RAD_DEFAULT);
if (plev > 4)
break;
case 2:
{
- teleport_player(10);
- if (cave[py][px].info & (CAVE_GLOW | CAVE_MNLT)) set_superstealth(FALSE);
- else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
+ teleport_player(10, 0L);
break;
}
case 3:
{
if (!(p_ptr->special_defense & NINJA_KAWARIMI))
{
-#ifdef JP
- msg_print("Ũ¤Î¹¶·â¤ËÂФ·¤ÆÉÒ´¶¤Ë¤Ê¤Ã¤¿¡£");
-#else
- msg_print("You are now prepare to evade any attacks.");
-#endif
-
+ msg_print(_("敵の攻撃に対して敏感になった。", "You are now prepare to evade any attacks."));
p_ptr->special_defense |= NINJA_KAWARIMI;
p_ptr->redraw |= (PR_STATUS);
}
}
case 4:
{
- teleport_player(p_ptr->lev*5);
- if (cave[py][px].info & (CAVE_GLOW | CAVE_MNLT)) set_superstealth(FALSE);
- else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
+ teleport_player(p_ptr->lev * 5, 0L);
break;
}
case 5:
{
if (!get_rep_dir(&dir, FALSE)) return FALSE;
- y = py + ddy[dir];
- x = px + ddx[dir];
+ y = p_ptr->y + ddy[dir];
+ x = p_ptr->x + ddx[dir];
if (cave[y][x].m_idx)
{
py_attack(y, x, 0);
if (randint0(p_ptr->skill_dis) < 7)
-#ifdef JP
-msg_print("¤¦¤Þ¤¯Æ¨¤²¤é¤ì¤Ê¤«¤Ã¤¿¡£");
-#else
- msg_print("You failed to run away.");
-#endif
+ msg_print(_("うまく逃げられなかった。", "You failed to run away."));
else
- {
- teleport_player(30);
- if (cave[py][px].info & (CAVE_GLOW | CAVE_MNLT)) set_superstealth(FALSE);
- else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
- }
+ teleport_player(30, 0L);
}
else
{
-#ifdef JP
-msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
- msg_print("You don't see any monster in this direction");
-#endif
-
+ msg_print(_("その方向にはモンスターはいません。", "You don't see any monster in this direction"));
msg_print(NULL);
}
break;
break;
}
case 7:
- return ident_spell(FALSE, FALSE);
- break;
+ return ident_spell(FALSE);
case 8:
- set_tim_ffall(randint1(20) + 20, FALSE);
+ set_tim_levitation(randint1(20) + 20, FALSE);
break;
case 9:
fire_ball(GF_FIRE, 0, 50+plev, plev/10+2);
- teleport_player(30);
- if (cave[py][px].info & (CAVE_GLOW | CAVE_MNLT)) set_superstealth(FALSE);
- else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
- set_oppose_fire(plev, FALSE);
+ teleport_player(30, 0L);
+ set_oppose_fire((TIME_EFFECT)plev, FALSE);
break;
case 10:
- project_length = 5;
- if (!get_aim_dir(&dir)) return FALSE;
- project_hook(GF_ATTACK, dir, HISSATSU_NYUSIN, PROJECT_STOP | PROJECT_KILL);
-
- break;
+ return rush_attack(NULL);
case 11:
{
int i;
for (i = 0; i < 8; i++)
{
- int slot;
+ OBJECT_IDX slot;
for (slot = 0; slot < INVEN_PACK; slot++)
{
if (slot == INVEN_PACK)
{
#ifdef JP
- if (!i) msg_print("¤¯¤µ¤Ó¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¡£");
- else msg_print("¤¯¤µ¤Ó¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
+ if (!i) msg_print("くさびを持っていない。");
+ else msg_print("くさびがなくなった。");
#else
if (!i) msg_print("You have no Iron Spikes.");
else msg_print("You have no more Iron Spikes.");
}
/* Gives a multiplier of 2 at first, up to 3 at 40th */
- do_cmd_throw_aux(1, FALSE, slot);
+ do_cmd_throw(1, FALSE, slot);
- energy_use = 100;
+ p_ptr->energy_use = 100;
}
break;
}
case 12:
{
monster_type *m_ptr;
- int m_idx;
+ MONSTER_IDX m_idx;
char m_name[80];
int i;
int path_n;
u16b path_g[512];
- int ty,tx;
+ POSITION ty, tx;
if (!target_set(TARGET_KILL)) return FALSE;
m_idx = cave[target_row][target_col].m_idx;
if (!m_idx) break;
+ if (m_idx == p_ptr->riding) break;
if (!player_has_los_bold(target_row, target_col)) break;
+ if (!projectable(p_ptr->y, p_ptr->x, target_row, target_col)) break;
m_ptr = &m_list[m_idx];
monster_desc(m_name, m_ptr, 0);
-#ifdef JP
- msg_format("%s¤ò°ú¤Ìᤷ¤¿¡£", m_name);
-#else
- msg_format("You pull back %s.", m_name);
-#endif
-
- path_n = project_path(path_g, MAX_RANGE, target_row, target_col, py, px, 0);
+ msg_format(_("%sを引き戻した。", "You pull back %s."), m_name);
+ path_n = project_path(path_g, MAX_RANGE, target_row, target_col, p_ptr->y, p_ptr->x, 0);
ty = target_row, tx = target_col;
for (i = 1; i < path_n; i++)
{
int ny = GRID_Y(path_g[i]);
int nx = GRID_X(path_g[i]);
-
+ cave_type *c_ptr = &cave[ny][nx];
+
if (in_bounds(ny, nx) && cave_empty_bold(ny, nx) &&
- cave[ny][nx].feat != FEAT_GLYPH &&
- cave[ny][nx].feat != FEAT_MINOR_GLYPH &&
- !(cave[ny][nx].feat >= FEAT_PATTERN_START &&
- cave[ny][nx].feat <= FEAT_PATTERN_XTRA2))
+ !(c_ptr->info & CAVE_OBJECT) &&
+ !pattern_tile(ny, nx))
{
ty = ny;
tx = nx;
/* Update the old location */
cave[target_row][target_col].m_idx = 0;
- /* Update the new location */
- cave[ty][tx].m_idx = m_idx;
+ /* Update the new location */
+ cave[ty][tx].m_idx = (s16b)m_idx;
/* Move the monster */
- m_ptr->fy = ty;
- m_ptr->fx = tx;
+ m_ptr->fy = (byte_hack)ty;
+ m_ptr->fx = (byte_hack)tx;
/* Wake the monster up */
- m_ptr->csleep = 0;
+ (void)set_monster_csleep(m_idx, 0);
/* Update the monster (new location) */
update_mon(m_idx, TRUE);
/* Redraw the new grid */
lite_spot(ty, tx);
- p_ptr->update |= (PU_MON_LITE);
+ if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
+ p_ptr->update |= (PU_MON_LITE);
+
+ if (m_ptr->ml)
+ {
+ /* Auto-Recall if possible and visible */
+ if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
+
+ /* Track a new monster */
+ health_track(m_idx);
+ }
break;
}
break;
case 16:
(void)set_kabenuke(randint1(plev/2) + plev/2, FALSE);
- set_oppose_acid(plev, FALSE);
+ set_oppose_acid((TIME_EFFECT)plev, FALSE);
break;
case 17:
fire_ball(GF_POIS, 0, 75+plev*2/3, plev/5+2);
- fire_ball(GF_OLD_DRAIN, 0, 75+plev*2/3, plev/5+2);
+ fire_ball(GF_HYPODYNAMIA, 0, 75+plev*2/3, plev/5+2);
fire_ball(GF_CONFUSION, 0, 75+plev*2/3, plev/5+2);
- teleport_player(30);
- if (cave[py][px].info & (CAVE_GLOW | CAVE_MNLT)) set_superstealth(FALSE);
- else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
+ teleport_player(30, 0L);
break;
case 18:
{
int typ = one_in_(2) ? GF_FIRE : one_in_(3) ? GF_NETHER : GF_PLASMA;
int attempts = 1000;
- while(attempts--)
+ while (attempts--)
{
- scatter(&y, &x, py, px, 4, 0);
+ scatter(&y, &x, p_ptr->y, p_ptr->x, 4, 0);
- if ((y != py) || (x != px)) break;
+ if (!player_bold(y, x)) break;
}
project(0, 0, y, x, damroll(6 + plev / 8, 10), typ,
(PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_KILL), -1);
set_multishadow(6+randint1(6), FALSE);
break;
default:
-#ifdef JP
-msg_print("¤Ê¤Ë¡©");
-#else
- msg_print("Zap?");
-#endif
+ msg_print(_("なに?", "Zap?"));
}
return TRUE;
}
-
-
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'mindcrafter'.
+/*!
+ * @brief 特殊技能コマンドのメインルーチン /
+ * @return なし
*/
void do_cmd_mind(void)
{
- int n = 0, b = 0;
+ SPELL_IDX n = 0;
+ int b = 0;
int chance;
int minfail = 0;
int plev = p_ptr->lev;
mind_type spell;
bool cast;
int use_mind, mana_cost;
-#ifdef JP
cptr p;
-#endif
bool on_mirror = FALSE;
/* not if confused */
if (p_ptr->confused)
{
-#ifdef JP
-msg_print("º®Í𤷤Ƥ¤¤Æ½¸Ãæ¤Ç¤¤Ê¤¤¡ª");
-#else
- msg_print("You are too confused!");
-#endif
-
+ msg_print(_("混乱していて集中できない!", "You are too confused!"));
return;
}
#ifdef JP
switch(p_ptr->pclass)
{
- case CLASS_MINDCRAFTER: use_mind = MIND_MINDCRAFTER;p = "Àº¿À";break;
- case CLASS_FORCETRAINER: use_mind = MIND_KI;p = "µ¤";break;
- case CLASS_BERSERKER: use_mind = MIND_BERSERKER;p = "Åܤê";break;
- case CLASS_MIRROR_MASTER: use_mind = MIND_MIRROR_MASTER;p = "¶ÀËâË¡";break;
- case CLASS_NINJA: use_mind = MIND_NINJUTSU;p = "Àº¿À";break;
- default: use_mind = 0;p = "ĶǽÎÏ";break;
+ case CLASS_MINDCRAFTER: use_mind = MIND_MINDCRAFTER;p = "精神";break;
+ case CLASS_FORCETRAINER: use_mind = MIND_KI;p = "気";break;
+ case CLASS_BERSERKER: use_mind = MIND_BERSERKER;p = "怒り";break;
+ case CLASS_MIRROR_MASTER: use_mind = MIND_MIRROR_MASTER;p = "鏡魔法";break;
+ case CLASS_NINJA: use_mind = MIND_NINJUTSU;p = "精神";break;
+ default: use_mind = 0;p = "超能力";break;
}
#else
switch(p_ptr->pclass)
if (n == 5)
{
int j;
- for (j = 0; j < p_ptr->magic_num1[0] / 50; j++)
+ for (j = 0; j < P_PTR_KI / 50; j++)
mana_cost += (j+1) * 3 / 2;
}
}
{
if (mana_cost > p_ptr->chp)
{
-#ifdef JP
-msg_print("£È£Ð¤¬Â¤ê¤Þ¤»¤ó¡£");
-#else
- msg_print("You do not have enough hp to use this power.");
-#endif
+ msg_print(_("HPが足りません。", "You do not have enough hp to use this power."));
return;
}
}
else if (mana_cost > p_ptr->csp)
{
/* Warning */
-#ifdef JP
-msg_print("£Í£Ð¤¬Â¤ê¤Þ¤»¤ó¡£");
-#else
- msg_print("You do not have enough mana to use this power.");
-#endif
-
+ msg_print(_("MPが足りません。", "You do not have enough mana to use this power."));
if (!over_exert) return;
/* Verify */
-#ifdef JP
-if (!get_check("¤½¤ì¤Ç¤âÄ©À路¤Þ¤¹¤«? ")) return;
-#else
- if (!get_check("Attempt it anyway? ")) return;
-#endif
+ if (!get_check(_("それでも挑戦しますか? ", "Attempt it anyway? "))) return;
}
if (randint0(100) < chance)
{
if (flush_failure) flush();
-#ifdef JP
-msg_format("%s¤Î½¸Ãæ¤Ë¼ºÇÔ¤·¤¿¡ª",p);
-#else
- msg_format("You failed to concentrate hard enough!");
-#endif
+ msg_format(_("%sの集中に失敗した!", "You failed to concentrate hard enough!"), p);
sound(SOUND_FAIL);
if ((use_mind != MIND_BERSERKER) && (use_mind != MIND_NINJUTSU))
{
- if ((use_mind == MIND_KI) && (n != 5) && p_ptr->magic_num1[0])
+ if ((use_mind == MIND_KI) && (n != 5) && P_PTR_KI)
{
-#ifdef JP
- msg_print("µ¤¤¬»¶¤Ã¤Æ¤·¤Þ¤Ã¤¿¡¥¡¥¡¥");
-#else
- msg_print("Your improved Force has gone away...");
-#endif
- p_ptr->magic_num1[0] = 0;
+ msg_print(_("気が散ってしまった...", "Your improved Force has gone away..."));
+ P_PTR_KI = 0;
}
if (randint1(100) < (chance / 2))
if( use_mind == MIND_MINDCRAFTER ){
if (b < 5)
{
-#ifdef JP
-msg_print("¤Ê¤ó¤Æ¤³¤Ã¤¿¡ªÆ¬¤ÎÃ椬¿¿¤ÃÇò¤Ë¤Ê¤Ã¤¿¡ª");
-#else
- msg_print("Oh, no! Your mind has gone blank!");
-#endif
-
+ msg_print(_("なんてこった!頭の中が真っ白になった!", "Oh, no! Your mind has gone blank!"));
lose_all_info();
}
else if (b < 15)
{
-#ifdef JP
-msg_print("´ñ̯¤Ê¸÷·Ê¤¬ÌܤÎÁ°¤ÇÍ٤äƤ¤¤ë...");
-#else
- msg_print("Weird visions seem to dance before your eyes...");
-#endif
-
+ msg_print(_("奇妙な光景が目の前で踊っている...", "Weird visions seem to dance before your eyes..."));
set_image(p_ptr->image + 5 + randint1(10));
}
else if (b < 45)
{
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤ÎƬ¤Ïº®Í𤷤¿¡ª");
-#else
- msg_print("Your brain is addled!");
-#endif
-
+ msg_print(_("あなたの頭は混乱した!", "Your brain is addled!"));
set_confused(p_ptr->confused + randint1(8));
}
else if (b < 90)
else
{
/* Mana storm */
-#ifdef JP
-msg_format("%s¤ÎÎϤ¬À©¸æ¤Ç¤¤Ê¤¤ÈÅή¤È¤Ê¤Ã¤Æ²òÊü¤µ¤ì¤¿¡ª", p);
-#else
- msg_print("Your mind unleashes its power in an uncontrollable storm!");
-#endif
+ msg_format(_("%sの力が制御できない氾流となって解放された!", "Your mind unleashes its power in an uncontrollable storm!"), p);
- project(1, 2 + plev / 10, py, px, plev * 2,
+ project(PROJECT_WHO_UNCTRL_POWER, 2 + plev / 10, p_ptr->y, p_ptr->x, plev * 2,
GF_MANA, PROJECT_JUMP | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM, -1);
p_ptr->csp = MAX(0, p_ptr->csp - plev * MAX(1, plev / 10));
}
}
else if (b < 81)
{
-#ifdef JP
-msg_print("¶À¤ÎÀ¤³¦¤Î´³¾Ä¤ò¼õ¤±¤¿¡ª");
-#else
- msg_print("Weird visions seem to dance before your eyes...");
-#endif
- teleport_player(10);
-
+ msg_print(_("鏡の世界の干渉を受けた!", "Weird visions seem to dance before your eyes..."));
+ teleport_player(10, TELEPORT_PASSIVE);
}
else if (b < 96)
{
-#ifdef JP
-msg_print("¤Þ¤ï¤ê¤Î¤â¤Î¤¬¥¥é¥¥éµ±¤¤¤Æ¤¤¤ë¡ª");
-#else
- msg_print("Your brain is addled!");
-#endif
-
+ msg_print(_("まわりのものがキラキラ輝いている!", "Your brain is addled!"));
set_image(p_ptr->image + 5 + randint1(10));
}
else
{
/* Mana storm */
-#ifdef JP
-msg_format("%s¤ÎÎϤ¬À©¸æ¤Ç¤¤Ê¤¤ÈÅή¤È¤Ê¤Ã¤Æ²òÊü¤µ¤ì¤¿¡ª", p);
-#else
- msg_print("Your mind unleashes its power in an uncontrollable storm!");
-#endif
+ msg_format(_("%sの力が制御できない氾流となって解放された!", "Your mind unleashes its power in an uncontrollable storm!"), p);
- project(1, 2 + plev / 10, py, px, plev * 2,
+ project(PROJECT_WHO_UNCTRL_POWER, 2 + plev / 10, p_ptr->y, p_ptr->x, plev * 2,
GF_MANA, PROJECT_JUMP | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM, -1);
p_ptr->csp = MAX(0, p_ptr->csp - plev * MAX(1, plev / 10));
}
break;
case MIND_MIRROR_MASTER:
/* Cast the spell */
- if( (cave[py][px].info & CAVE_IN_MIRROR) )on_mirror = TRUE;
+ if( is_mirror_grid(&cave[p_ptr->y][p_ptr->x]) )on_mirror = TRUE;
cast = cast_mirror_spell(n);
break;
case MIND_NINJUTSU:
cast = cast_ninja_spell(n);
break;
default:
-#ifdef JP
- msg_format("Ææ¤ÎǽÎÏ:%d, %d",use_mind, n);
-#else
- msg_format("Mystery power:%d, %d",use_mind, n);
-#endif
+ msg_format(_("謎の能力:%d, %d", "Mystery power:%d, %d"),use_mind, n);
return;
}
/* Take a turn */
- energy_use = 100;
+ p_ptr->energy_use = 100;
/* teleport from mirror costs small energy */
if( on_mirror && p_ptr->pclass == CLASS_MIRROR_MASTER )
{
- if( n==2 || n==4 || n==6 || n==15 )energy_use = 50;
+ if( n==3 || n==5 || n==7 || n==16 ) p_ptr->energy_use = 50;
}
if ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU))
{
-#ifdef JP
- take_hit(DAMAGE_USELIFE, mana_cost, "²áÅ٤ν¸Ãæ", -1);
-#else
- take_hit(DAMAGE_USELIFE, mana_cost, "concentrating too hard", -1);
-#endif
+ take_hit(DAMAGE_USELIFE, mana_cost, _("過度の集中", "concentrating too hard"), -1);
/* Redraw hp */
p_ptr->redraw |= (PR_HP);
}
p_ptr->csp = MAX(0, p_ptr->csp - mana_cost);
/* Message */
-#ifdef JP
-msg_format("%s¤ò½¸Ã椷¤¹¤®¤Æµ¤¤ò¼º¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª",p);
-#else
- msg_print("You faint from the effort!");
-#endif
-
+ msg_format(_("%sを集中しすぎて気を失ってしまった!", "You faint from the effort!"),p);
/* Hack -- Bypass free action */
(void)set_paralyzed(p_ptr->paralyzed + randint1(5 * oops + 1));
bool perm = (randint0(100) < 25);
/* Message */
-#ifdef JP
-msg_print("¼«Ê¬¤ÎÀº¿À¤ò¹¶·â¤·¤Æ¤·¤Þ¤Ã¤¿¡ª");
-#else
- msg_print("You have damaged your mind!");
-#endif
-
+ msg_print(_("自分の精神を攻撃してしまった!", "You have damaged your mind!"));
/* Reduce constitution */
(void)dec_stat(A_WIS, 15 + randint1(10), perm);
}
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'mindcrafter'.
+/*!
+ * @brief 現在プレイヤーが使用可能な特殊技能の一覧表示 /
+ * @return なし
*/
void do_cmd_mind_browse(void)
{
- int n = 0;
+ SPELL_IDX n = 0;
int j, line;
char temp[62*5];
int use_mind = 0;
Term_erase(12, 17, 255);
Term_erase(12, 16, 255);
- roff_to_buf( mind_tips[use_mind][n],62,temp);
+ roff_to_buf(mind_tips[use_mind][n], 62, temp, sizeof(temp));
for(j=0, line = 17;temp[j];j+=(1+strlen(&temp[j])))
{
prt(&temp[j], line, 15);
{
case MIND_MIRROR_MASTER:
case MIND_NINJUTSU:
-#ifdef JP
- prt("²¿¤«¥¡¼¤ò²¡¤·¤Æ²¼¤µ¤¤¡£",0,0);
-#else
- prt("Hit any key.",0,0);
-#endif
+ prt(_("何かキーを押して下さい。", "Hit any key."),0,0);
(void)inkey();
}
}
-
- screen_load();
}