OSDN Git Service

Merge remote-tracking branch 'remotes/origin/feature/Fix-Steal-And-Run' into develop...
authordeskull <deskull@users.sourceforge.jp>
Fri, 15 Jan 2021 14:01:24 +0000 (23:01 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Fri, 15 Jan 2021 14:01:24 +0000 (23:01 +0900)
16 files changed:
lib/edit/r_info.txt
src/art-definition/art-accessory-types.h [new file with mode: 0644]
src/art-definition/art-armor-types.h [new file with mode: 0644]
src/art-definition/art-bow-types.h [new file with mode: 0644]
src/art-definition/art-protector-types.h [new file with mode: 0644]
src/art-definition/art-sword-types.h [new file with mode: 0644]
src/art-definition/art-weapon-types.h [new file with mode: 0644]
src/art-definition/random-art-effects.h [new file with mode: 0644]
src/core/status-reseter.c [new file with mode: 0644]
src/core/status-reseter.h [new file with mode: 0644]
src/io/chuukei.c [new file with mode: 0644]
src/io/chuukei.h [new file with mode: 0644]
src/market/arena-info-table.c
src/player/selfinfo.c [new file with mode: 0644]
src/spell-kind/magic-item-recharger.c
src/spell-kind/spells-teleport.c

index 82d5f30..19b79ef 100644 (file)
@@ -13746,13 +13746,13 @@ N:728:デイドラ・ブルー・ドラゴン
 E:Daedra Blue Dragon
 G:D:b
 I:120:39d50:30:110:40
-W:47:1:0:12000:100000:1190
+W:47:1:0:9000:100000:1190
 B:CLAW:HURT:4d10
 B:CLAW:ELEC:6d12
 B:BITE:HURT:4d10
 B:BITE:ELEC:6d12
-F:FORCE_SLEEP | FORCE_MAXHP | AURA_ELEC | CAN_FLY |
-F:ONLY_ITEM | DROP_2D2 | DROP_3D2 | DROP_GOOD | SELF_LITE_2 |
+F:FORCE_SLEEP | FORCE_MAXHP | AURA_ELEC | CAN_FLY
+F:ONLY_ITEM | DROP_2D2 | DROP_GOOD | SELF_LITE_2
 F:BASH_DOOR | POWERFUL | MOVE_BODY | DROP_CORPSE
 F:EVIL | DRAGON | IM_ELEC | NO_CONF | NO_SLEEP | RIDING
 S:1_IN_4 | BLIND | CONF | SCARE | BR_ELEC
@@ -14103,13 +14103,13 @@ N:741:デイドラ・ホワイト・ドラゴン
 E:Daedra White Dragon
 G:D:W
 I:120:39d50:30:110:40
-W:47:1:0:12000:100000:1194
+W:47:1:0:9000:100000:1194
 B:CLAW:HURT:4d10
 B:CLAW:COLD:6d12
 B:BITE:HURT:4d10
 B:BITE:COLD:6d12
-F:FORCE_SLEEP | FORCE_MAXHP | CAN_FLY | AURA_COLD |
-F:ONLY_ITEM | DROP_2D2 | DROP_3D2 | DROP_GOOD | 
+F:FORCE_SLEEP | FORCE_MAXHP | CAN_FLY | AURA_COLD
+F:ONLY_ITEM | DROP_2D2 | DROP_GOOD
 F:BASH_DOOR | POWERFUL | MOVE_BODY | DROP_CORPSE
 F:EVIL | DRAGON | IM_COLD | NO_CONF | NO_SLEEP | RIDING
 S:1_IN_4 | BLIND | CONF | SCARE | BR_COLD
@@ -14471,13 +14471,13 @@ N:756:デイドラ・レッド・ドラゴン
 E:Daedra Red Dragon
 G:D:r
 I:120:45d50:40:120:40
-W:48:1:0:16000:360000:1192
+W:48:1:0:10000:360000:1192
 B:CLAW:HURT:4d14
 B:CLAW:FIRE:6d16
 B:CLAW:HURT:4d14
 B:BITE:FIRE:6d16
-F:FORCE_SLEEP | FORCE_MAXHP | CAN_FLY | DROP_CORPSE | SELF_LITE_1 |
-F:ONLY_ITEM | DROP_2D2 | DROP_4D2 | DROP_GOOD | SELF_LITE_2 |
+F:FORCE_SLEEP | FORCE_MAXHP | CAN_FLY | DROP_CORPSE | SELF_LITE_1
+F:ONLY_ITEM | DROP_2D2 | DROP_GOOD | SELF_LITE_2
 F:BASH_DOOR | POWERFUL | MOVE_BODY | AURA_FIRE |
 F:EVIL | DRAGON | IM_FIRE | NO_CONF | NO_SLEEP | RIDING
 S:1_IN_4 | BLIND | CONF | SCARE | BR_FIRE
@@ -15464,7 +15464,7 @@ N:790:万色デイドラ・ドラゴン
 E:Daedra Dragon of Many Colours
 G:D:v
 I:120:60d50:40:125:80
-W:50:2:0:21000:200000:1198
+W:50:2:0:18000:200000:1198
 B:CLAW:HURT:6d10
 B:BITE:HURT:6d10
 B:BUTT:HURT:6d10
@@ -15472,7 +15472,7 @@ B:CRUSH:HURT:6d10
 F:ATTR_MULTI | CAN_FLY
 F:FORCE_SLEEP | FORCE_MAXHP | AURA_ELEC | AURA_FIRE | AURA_COLD
 F:IM_ACID | IM_ELEC | IM_FIRE | IM_COLD | IM_POIS
-F:ONLY_ITEM | DROP_2D2 | DROP_3D2 | DROP_GOOD
+F:ONLY_ITEM | DROP_3D2 | DROP_GOOD
 F:BASH_DOOR | POWERFUL | MOVE_BODY | DROP_CORPSE
 F:EVIL | DRAGON | NO_CONF | NO_SLEEP | RIDING | SELF_LITE_2
 S:1_IN_4 |
@@ -18304,20 +18304,21 @@ N:890:デイドラ・グリーン・ドラゴン
 E:Daedra Green Draon
 G:D:g
 I:120:39d50:30:110:40
-W:47:1:0:12000:100000:1196
+W:47:1:0:9000:100000:1196
 B:CLAW:HURT:4d10
 B:CLAW:POISON:6d11
 B:BITE:HURT:4d10
 B:BITE:POISON:6d11
 F:FORCE_SLEEP | FORCE_MAXHP |
-F:ONLY_ITEM | DROP_2D2 | DROP_3D2 | DROP_GOOD |
+F:ONLY_ITEM | DROP_2D2 | DROP_GOOD |
 F:BASH_DOOR | POWERFUL | MOVE_BODY | DROP_CORPSE | CAN_FLY |
 F:EVIL | DRAGON | IM_POIS | NO_CONF | NO_SLEEP | RIDING |
 S:1_IN_4 | BLIND | CONF | SCARE | BR_POIS
 D:$It is a dragon that has accumulated great power in the Oblivion
 D:$ and has returned to this world.
+D:$  It scatters a breathtakingly ferocious miasma.
 D:冥界で強大な力を蓄えて現世に舞い戻ってきたドラゴンだ。
-D:
+D:息が詰まるほどの猛烈な瘴気を撒き散らしている。
 
 N:891:バラヒアを裏切りし『ゴルリム』
 E:Gorlim, Betrayer of Barahir
@@ -22871,7 +22872,7 @@ F:EVIL | DEMON | IM_COLD | IM_POIS | RES_NETH | NO_CONF | NO_SLEEP | HURT_FIRE
 S:1_IN_6 | 
 S:MIND_BLAST
 D:$It looks like a skinny large humanoid.
-D:$  Folklore has it that those who commit cannibalism are brought to cognate
+D:$  Folklore has it that those who commit cannibalism are brought to cognate.
 D:それは痩せこけた巨人の姿をしていて、人食いの罪を犯した者を
 D:同族にすると言われている。
 
@@ -22896,9 +22897,11 @@ R:526:1d3
 R:560:1d2
 R:1113:4d5
 R:1118:4d5
-D:$It is a too huge towering tornado of winds that looks vaguely like dragons or other winged beast
-D:$ This violent wind enjoying, dragons comes.
-D:それはあまりにも高くそびえ立つような風の竜巻で、漠然とドラゴンか他の翼ある魔獣に見える。
+D:$It is a too huge towering tornado of winds that looks vaguely like
+D:$ dragons or other winged beast.
+D:$  This violent wind enjoying, dragons comes.
+D:それはあまりにも高くそびえ立つような風の竜巻で、
+D:漠然とドラゴンか他の翼ある魔獣に見える。
 D:風の暴威を楽しんでドラゴンがやってくる。
 
 N:1142:年経たマグマのエレメンタル
@@ -22923,9 +22926,11 @@ R:899:4d5
 R:1098:1d2
 R:1111:4d5
 R:1131:1d3
-D:$It is a too huge towering glowing form of molten hate.that looks vaguely like spiders or other arthropod that live in lava cave.
+D:$It is a too huge towering glowing form of molten hate
+D:$ that looks vaguely like spiders or other arthropod that live in lava cave.
 D:$ Molten mineral give off toxic gas.
-D:それはあまりにも高くそびえ立つような光を発する憎悪が溶けてできたような塊で、漠然と溶岩洞窟に生息する蜘蛛か他の虫のように見える。
+D:それはあまりにも高くそびえ立つような光を発する憎悪が溶けてできたような塊で、
+D:漠然と溶岩洞窟に生息する蜘蛛か他の虫のように見える。
 D:溶けた鉱物が有毒ガスを噴出している。
 
 N:1143:年経た火のエレメンタル
@@ -22948,9 +22953,11 @@ R:1111:4d5
 R:1116:4d5
 R:510:1d3
 R:589:1d2
-D:$It is a too huge towering inferno of flames that looks vaguely like Balrog or other demons.
+D:$It is a too huge towering inferno of flames that looks vaguely like
+D:$ Balrog or other demons.
 D:$ This flame of destruction respecting, demons comes.
-D:それはあまりにも高くそびえ立つような火炎地獄で、漠然とバルログか他のデーモンのように見える。
+D:それはあまりにも高くそびえ立つような火炎地獄で、
+D:漠然とバルログか他のデーモンのように見える。
 D:その破壊の炎を慕ってデーモンがやってくる。
 
 N:1144:年経た氷のエレメンタル
@@ -22975,8 +22982,10 @@ R:549:1d2
 R:570:1d3
 R:1112:4d5
 R:1117:4d5
-D:$It is a too huge towering glacier of ice that looks vaguely like Animals in cold regions.
-D:それはあまりにも高くそびえ立つような氷河で、漠然と寒冷地の動物のように見える。
+D:$It is a too huge towering glacier of ice that looks vaguely like
+D:$ Animals in cold regions.
+D:それはあまりにも高くそびえ立つような氷河で、
+D:漠然と寒冷地の動物のように見える。
 
 N:1145:年経た汚物エレメンタル
 E:Elder ooze elemental
@@ -23001,8 +23010,10 @@ R:592:1d2
 R:1115:4d6
 R:1131:1d3
 R:1132:1d3
-D:$It is a too huge towering mass of filth that looks vaguely like Hydras, crocodilians or frogs.
-D:それはあまりにも高くそびえ立つような汚物の塊で、漠然とヒドラやワニやカエルのように見える。
+D:$It is a too huge towering mass of filth that looks vaguely like
+D:$ Hydras, crocodilians or frogs.
+D:それはあまりにも高くそびえ立つような汚物の塊で、
+D:漠然とヒドラやワニやカエルのように見える。
 
 # 紫電は航続距離が短いので鉄獄に入れませんでした
 # Storing cherry-blossom
@@ -23020,7 +23031,8 @@ R:1147:5d5
 D:$It is a ghost of those who made human life a part,
 D:$ flied on the battlefield with iron wings,
 D:$ and continued to shed a lot of blood on both sides.
-D:それは人の命を部品にし、鉄の翼を纏って戦場を駆け、敵味方共に幾多の血を流し続けた者達の亡霊だ。
+D:それは人の命を部品にし、鉄の翼を纏って戦場を駆け、
+D:敵味方共に幾多の血を流し続けた者達の亡霊だ。
 
 N:1147:ハヤブサ
 E:Betty G4M 'Falcon'
@@ -23035,7 +23047,8 @@ S:1_IN_6 | BO_MANA | MISSILE | BLINK
 D:$It is a ghost of those who made human life a part,
 D:$ flied on the battlefield with iron wings,
 D:$ and continued to shed a lot of blood on both sides.
-D:それは人の命を部品にし、鉄の翼を纏って戦場を駆け、敵味方共に幾多の血を流し続けた者達の亡霊だ。
+D:それは人の命を部品にし、鉄の翼を纏って戦場を駆け、
+D:敵味方共に幾多の血を流し続けた者達の亡霊だ。
 
 N:1148:放火魔『雄一』
 E:Yu'uichi, the Arsonist
@@ -23222,7 +23235,8 @@ F:FRIENDS | FORCE_SLEEP | DROP_90
 F:NONLIVING | NO_CONF | NO_STUN | NO_SLEEP | NO_FEAR
 F:NEVER_MOVE | NEVER_BLOW
 S:1_IN_2 | BR_ELEC | BR_PLAS
-D:$It is Moai who landed in Angband. You can not destroy this ion ring.
+D:$It is Moai who landed in Angband.
+D:$  You can not destroy this ion ring.
 D:鉄獄に降り立ったモアイだ。こいつの吐き出すイオンリングは破壊できない。
 
 # 死に際に7/8の確率で自分自身を召喚する
@@ -23235,7 +23249,8 @@ F:HURT_ROCK | IM_ELEC | RES_PLAS | RES_GRAV | RES_TELE | DROP_90
 F:NONLIVING | NO_CONF | NO_STUN | NO_SLEEP | NO_FEAR
 F:NEVER_MOVE | NEVER_BLOW
 S:1_IN_2 | BR_ELEC | BR_PLAS
-D:$It is a Moai piled up like a totem pole. There is no end in destroying it.
+D:$It is a Moai piled up like a totem pole.
+D:$  There is no end in destroying it.
 D:トーテムポール状に積み上がったモアイだ。倒してもきりがない。
 
 # プチモアイのみ召喚
@@ -23250,7 +23265,8 @@ F:HURT_ROCK | IM_ELEC | RES_PLAS | RES_GRAV | RES_TELE
 F:ONLY_ITEM | DROP_2D2 | DROP_GOOD | DROP_GREAT
 F:NONLIVING | NO_CONF | NO_STUN | NO_SLEEP | NO_FEAR
 S:1_IN_2 | S_KIN | HOLD | CONF | BLIND | HEAL
-D:$It is a mighty thug from the Bacterian army. It summons many small Moais.
+D:$It is a mighty thug from the Bacterian army.
+D:$  It summons many small Moais.
 D:バクテリアン軍が放った強大な刺客だ。それは大量のプチモアイを生み出す。
 
 # テストプレイした結果、戦士&レンジャーなら毒針なしでも刺さった
@@ -23351,8 +23367,10 @@ F:EVIL | FEMALE | UNIQUE | RES_LITE | RES_TIME | RES_DARK | RES_NETH
 F:IM_COLD | IM_POIS | IM_ACID | IM_ELEC | IM_FIRE | RES_TELE
 S:1_IN_5 | 
 S:S_MONSTERS | SCARE | BA_DARK | BA_NETH | BR_POIS
-D:$This sacred and untouchable female monster is half a nymph and half a snake, becoming the mother of many monsters.
-D:この半分がニンフで半分は蛇の神聖にして手の付けられない女怪は、数々のモンスターの母となった。
+D:$This sacred and untouchable female monster is half a nymph
+D:$ and half a snake, becoming the mother of many monsters.
+D:この半分がニンフで半分は蛇の神聖にして手の付けられない女怪は、
+D:数々のモンスターの母となった。
 
 N:1170:ハリモグラ
 E:Echidna
@@ -23362,9 +23380,11 @@ W:1:3:0:6:0:0
 B:CRUSH:HURT:3d1
 F:RAND_50 | WILD_GRASS | WILD_WOOD |
 F:ANIMAL | DROP_SKELETON | DROP_CORPSE
-D:$It is relative of platypus and was thought to be a composite of reptiles and mammals, 
+D:$It is relative of platypus and was thought
+D:$ to be a composite of reptiles and mammals,
 D:$ so it was named after the Greek monster.
-D:それはカモノハシの類縁で、爬虫類と哺乳類の合成と考えられたためギリシアの怪物にちなんで英名を名付けられた。
+D:それはカモノハシの類縁で、爬虫類と哺乳類の合成と考えられたため
+D:ギリシアの怪物にちなんで英名を名付けられた。
 
 N:1171:虚界の魔獣『ジェノサイバー』
 E:Genocyber the Vajura Beast
@@ -24047,7 +24067,7 @@ D:$  It lightly turns the town guard into an ice statue.
 D:冥界から舞い戻ってきたドラゴンの一体だ。
 D:街の衛兵ごときは軽く氷像にしてしまう。
 
-N:1205:å\8e\9få\88\9dへの裏切り『オダハヴィーング』
+N:1205:å§\8bç¥\96への裏切り『オダハヴィーング』
 E:Odahviing, the betrayer of Alduin
 G:d:s
 I:115:30d40:20:95:30
@@ -24434,7 +24454,7 @@ N:1228:グレーター・ファルメル・スクルカー
 E:Greater falmer skulker
 G:h:W
 I:115:22d22:15:70:50
-W:25:3:0:700:0:0
+W:33:3:0:700:0:0
 B:SHOOT:HURT:11d9
 B:SLASH:POISON:14d10
 F:FORCE_MAXHP | EVIL | DROP_CORPSE | DROP_SKELETON | BASH_DOOR
@@ -25311,7 +25331,7 @@ N:1277:破壊の怨念『久遠』
 E:Kuwon, the dream exchanger
 G:f:y
 I:120:70d30:80:65:5
-W:41:2:0:6500:0:0
+W:45:2:0:6500:0:0
 B:CLAW:HURT:9d12
 B:CLAW:ELEC:15d12
 B:PUNCH:HURT:9d12
@@ -25356,7 +25376,7 @@ N:1279:紅衣の修行僧
 E:Crimson monk
 G:p:R
 I:115:55d11:20:49:5
-W:36:3:0:800:2500:1278
+W:36:3:0:800:2500:1280
 B:KICK:FIRE:15d5
 B:HIT:FIRE:15d5
 B:KICK:CONFUSE:5d4
diff --git a/src/art-definition/art-accessory-types.h b/src/art-definition/art-accessory-types.h
new file mode 100644 (file)
index 0000000..37b02de
--- /dev/null
@@ -0,0 +1,37 @@
+#pragma once
+
+typedef enum art_lite_type {
+       ART_GALADRIEL = 1,
+    ART_ELENDIL = 2,
+    ART_JUDGE = 3,
+    ART_EDISON = 7,
+    ART_PALANTIR = 15,
+    ART_STONE_LORE = 17,
+    ART_FLY_STONE = 147,
+    ART_ORB_OF_FATE = 245,
+} art_lite_type;
+
+typedef enum art_amulet_type {
+    ART_CARLAMMAS = 4,
+    ART_INGWE = 5,
+    ART_DWARVES = 6,
+    ART_FARAMIR = 18,
+    ART_BOROMIR = 143,
+    ART_MAGATAMA = 149,
+    ART_INROU = 166,
+    ART_NIGHT = 215,
+    ART_SACRED_KNIGHTS = 217,
+    ART_HELL = 218,
+    ART_CHARMED = 219,
+    ART_GOGO = 220,
+} art_amulet_type;
+
+typedef enum art_ring_type {
+    ART_FRAKIR = 8,
+    ART_TULKAS = 9,
+    ART_NARYA = 10,
+    ART_NENYA = 11,
+    ART_VILYA = 12,
+    ART_POWER = 13,
+    ART_AHO = 14,
+} art_ring_type;
diff --git a/src/art-definition/art-armor-types.h b/src/art-definition/art-armor-types.h
new file mode 100644 (file)
index 0000000..f328ce1
--- /dev/null
@@ -0,0 +1,33 @@
+#pragma once
+
+typedef enum art_dragon_armor_type {
+       ART_RAZORBACK = 129,
+    ART_BLADETURNER = 130,
+    ART_SEIRYU = 201,
+} art_dragon_type;
+
+typedef enum art_hard_armor_type {
+    ART_SOULKEEPER = 19,
+    ART_ISILDUR = 20,
+    ART_ROHIRRIM = 21,
+    ART_LOHENGRIN = 22,
+    ART_JULIAN = 23,
+    ART_ARVEDUI = 24,
+    ART_CASPANION = 25,
+    ART_GILES = 168,
+    ART_MORLOK = 203,
+    ART_VETERAN = 206,
+} art_hard_armor_type;
+
+typedef enum art_soft_armor_type {
+    ART_SHIVA_JACKET = 26,
+    ART_HITHLOMIR = 27,
+    ART_THALKETTOTH = 28,
+    ART_HIMRING = 127,
+    ART_ICANUS = 131,
+    ART_NAMAKE_ARMOR = 183,
+    ART_GHB = 192,
+    ART_DASAI = 200,
+    ART_KESHO = 204,
+    ART_MILIM = 246,
+} art_soft_armor_type;
diff --git a/src/art-definition/art-bow-types.h b/src/art-definition/art-bow-types.h
new file mode 100644 (file)
index 0000000..5226519
--- /dev/null
@@ -0,0 +1,17 @@
+#pragma once
+
+typedef enum art_bow_type {
+       ART_CRIMSON = 16,
+    ART_BELTHRONDING = 124,
+    ART_BARD = 125,
+    ART_BRAND = 126,
+    ART_BUCKLAND = 134,
+    ART_YOICHI = 148,
+    ART_HARAD = 180,
+    ART_NAMAKE_BOW = 182,
+    ART_ROBIN_HOOD = 221,
+    ART_HELLFIRE = 222,
+} art_bow_type;
+
+/* Arrows */
+#define ART_BARD_ARROW 153
diff --git a/src/art-definition/art-protector-types.h b/src/art-definition/art-protector-types.h
new file mode 100644 (file)
index 0000000..8c605f2
--- /dev/null
@@ -0,0 +1,61 @@
+#pragma once
+
+typedef enum art_shield_type {
+       ART_THORIN = 30,
+    ART_CELEGORM = 31,
+    ART_ANARION = 32,
+    ART_GIL_GALAD = 138,
+    ART_YENDOR = 141,
+    ART_YATA = 151,
+    ART_EARENDIL = 186,
+    ART_PERSEUS = 197,
+} art_shield_type;
+
+typedef enum art_helm_type {
+    ART_INDRA = 33,
+    ART_CHAOS = 34,
+    ART_BERUTHIEL = 35,
+    ART_THRANDUIL = 36,
+    ART_THENGEL = 37,
+    ART_HAMMERHAND = 38,
+    ART_DOR = 39,
+    ART_HOLHENNETH = 40,
+    ART_TERROR = 41,
+    ART_AMBER = 42,
+    ART_NUMENOR = 132,
+    ART_STONEMASK = 146,
+} art_helm_type;
+
+typedef enum art_cloak_type {
+    ART_JACK = 43,
+    ART_COLLUIN = 44,
+    ART_HOLCOLLETH = 45,
+    ART_THINGOL = 46,
+    ART_THORONGIL = 47,
+    ART_COLANNON = 48,
+    ART_LUTHIEN = 49,
+    ART_TUOR = 50,
+    ART_MOOK = 205,
+    ART_HEAVENLY_MAIDEN = 233,
+} art_cloak_type;
+
+typedef enum art_glove_type {
+    ART_CAMBELEG = 52,
+    ART_CAMMITHRIM = 53,
+    ART_PAURHACH = 54,
+    ART_CORWIN = 55,
+    ART_PAURAEGEN = 56,
+    ART_PAURNEN = 57,
+    ART_THANOS = 58,
+    ART_FINGOLFIN = 59,
+    ART_PAURNIMMEN = 185,
+} art_glove_type;
+
+typedef enum art_boots_type {
+    ART_FEANOR = 60,
+    ART_FLORA = 61,
+    ART_THROR = 62,
+    ART_SHIVA_BOOTS = 63,
+    ART_GLASS = 165,
+    ART_GETA = 210,
+} art_boots_type;
diff --git a/src/art-definition/art-sword-types.h b/src/art-definition/art-sword-types.h
new file mode 100644 (file)
index 0000000..82515fb
--- /dev/null
@@ -0,0 +1,66 @@
+#pragma once
+
+typedef enum artifact_sword_type {
+       ART_MAEDHROS = 64,
+    ART_CAINE = 65,
+    ART_NARTHANC = 66,
+    ART_NIMTHANC = 67,
+    ART_DETHANC = 68,
+    ART_RILIA = 69,
+    ART_FIONA = 70,
+    ART_CALRIS = 71,
+    ART_GRAYSWANDIR = 72,
+    ART_GLAMDRING = 73,
+    ART_NOTHUNG = 74,
+    ART_ORCRIST = 75,
+    ART_GURTHANG = 76,
+    ART_ZARCUTHRA = 77,
+    ART_TWILIGHT = 78,
+    ART_GONDRICAM = 79,
+    ART_CRISDURIAN = 80,
+    ART_AGLARANG = 81,
+    ART_RINGIL = 82,
+    ART_ANDURIL = 83,
+    ART_WEREWINDLE = 84,
+    ART_CHAINSWORD = 85,
+    ART_FORASGIL = 86,
+    ART_CARETH = 87,
+    ART_STING = 88,
+    ART_SOULSWORD = 89,
+    ART_MERLIN = 90,
+    ART_DOOMCALLER = 91,
+    ART_VORPAL_BLADE = 92,
+    ART_SLAYER = 123,
+    ART_KUSANAGI = 128,
+    ART_HURIN = 133,
+    ART_AZAGHAL = 135,
+    ART_NOVA = 137,
+    ART_CHARIOT = 140,
+    ART_WORPAL_BLADE = 142,
+    ART_MURAMASA = 144,
+    ART_ZANTETSU = 150,
+    ART_SOULCRUSH = 154,
+    ART_FALIS = 155,
+    ART_HRUNTING = 156,
+    ART_ANUBIS = 158,
+    ART_GURENKI = 160,
+    ART_TAILBITER = 167,
+    ART_MUSASI_KATANA = 171,
+    ART_MUSASI_WAKIZASI = 172,
+    ART_QUICKTHORN = 174,
+    ART_TINYTHORN = 175,
+    ART_EXCALIBUR = 176,
+    ART_EXCALIPUR = 177,
+    ART_EXCALIBUR_J = 179,
+    ART_ARUNRUTH = 184,
+    ART_HAKABUSA = 189,
+    ART_STORMBRINGER = 190,
+    ART_NARSIL = 191,
+    ART_KANNU = 193,
+    ART_GRIMTOOTH = 196,
+    ART_KAMUI = 198,
+    ART_GOURYU = 207,
+    ART_EOWYN = 216,
+    ART_NANACHO = 248,
+    ART_ROBINTON = 251,
+} artifact_sword_type;
diff --git a/src/art-definition/art-weapon-types.h b/src/art-definition/art-weapon-types.h
new file mode 100644 (file)
index 0000000..cd027c1
--- /dev/null
@@ -0,0 +1,69 @@
+#pragma once
+
+/* Digging */
+#define ART_NAIN 211
+
+typedef enum art_polearm_type {
+       ART_THEODEN = 93,
+    ART_PAIN = 94,
+    ART_OSONDIR = 95,
+    ART_TIL = 96,
+    ART_RUNESPEAR = 97,
+    ART_DESTINY = 98,
+    ART_HAGEN = 99,
+    ART_EORLINGAS = 100,
+    ART_DURIN = 101,
+    ART_EONWE = 102,
+    ART_BALLI = 103,
+    ART_LOTHARANG = 104,
+    ART_DWARVES_AXE = 105,
+    ART_BARUKKHELED = 106,
+    ART_WRATH = 107,
+    ART_ULMO = 108,
+    ART_AVAVIR = 109,
+    ART_BENKEI = 152,
+    ART_TAIKOBO = 159,
+    ART_TONBO = 161,
+    ART_GAEBOLG = 163,
+    ART_ARRYU = 164,
+    ART_AEGLOS = 187,
+    ART_BLOOD = 199,
+    ART_NUMAHOKO = 202,
+} art_polearm_type;
+
+/* The sword of the Dawn */
+#define ART_DAWN 110
+
+typedef enum art_hafted_type {
+    ART_GROND = 111,
+    ART_TOTILA = 112,
+    ART_THUNDERFIST = 113,
+    ART_BLOODSPIKE = 114,
+    ART_FIRESTAR = 115,
+    ART_TARATOL = 116,
+    ART_AULE = 117,
+    ART_NAR = 118,
+    ART_ERIRIL = 119,
+    ART_GANDALF = 120,
+    ART_DEATHWREAKER = 121,
+    ART_TURMIL = 122,
+    ART_MJOLLNIR = 136,
+    ART_WINBLOWS = 139,
+    ART_XIAOLONG = 145,
+    ART_NYOIBOU = 157,
+    ART_JONES = 162,
+    ART_HYOUSIGI = 169,
+    ART_MATOI = 170,
+    ART_IRON_BALL = 173,
+    ART_SAMSON = 178,
+    ART_NAMAKE_HAMMER = 181,
+    ART_BOLISHOI = 188,
+    ART_SHUTEN_DOJI = 194,
+    ART_G_HAMMER = 195,
+    ART_AEGISFANG = 208,
+    ART_HERMIT = 209,
+    ART_GOTHMOG = 212,
+    ART_JIZO = 213,
+    ART_FUNDIN = 214,
+    ART_AESCULAPIUS = 225,
+} art_hafted_type;
diff --git a/src/art-definition/random-art-effects.h b/src/art-definition/random-art-effects.h
new file mode 100644 (file)
index 0000000..ee6bc99
--- /dev/null
@@ -0,0 +1,134 @@
+#pragma once
+
+typedef enum random_art_activation_type {
+       ACT_SUNLIGHT = 1,
+    ACT_BO_MISS_1 = 2,
+    ACT_BA_POIS_1 = 3,
+    ACT_BO_ELEC_1 = 4,
+    ACT_BO_ACID_1 = 5,
+    ACT_BO_COLD_1 = 6,
+    ACT_BO_FIRE_1 = 7,
+    ACT_BA_COLD_1 = 8,
+    ACT_BA_FIRE_1 = 9,
+    ACT_HYPODYNAMIA_1 = 10,
+    ACT_BA_COLD_2 = 11,
+    ACT_BA_ELEC_2 = 12,
+    ACT_HYPODYNAMIA_2 = 13,
+    ACT_DRAIN_1 = 14,
+    ACT_BO_MISS_2 = 15,
+    ACT_BA_FIRE_3 = 16,
+    ACT_BA_COLD_3 = 17,
+    ACT_BA_ELEC_3 = 18,
+    ACT_WHIRLWIND = 19,
+    ACT_DRAIN_2 = 20,
+    ACT_CALL_CHAOS = 21,
+    ACT_ROCKET = 22,
+    ACT_DISP_EVIL = 23,
+    ACT_BA_MISS_3 = 24,
+    ACT_DISP_GOOD = 25,
+    ACT_BO_MANA = 26,
+    ACT_BA_FIRE_2 = 27,
+    ACT_BA_WATER = 28,
+    ACT_BA_STAR = 29,
+    ACT_BA_DARK = 30,
+    ACT_BA_MANA = 31,
+    ACT_PESTICIDE = 32,
+    ACT_BLINDING_LIGHT = 33,
+    ACT_BIZARRE = 34,
+    ACT_CAST_BA_STAR = 35,
+    ACT_BLADETURNER = 36,
+    ACT_BA_ACID_1 = 37,
+    ACT_BR_FIRE = 38,
+    ACT_BR_COLD = 39,
+    ACT_BR_DRAGON = 40,
+    ACT_BA_FIRE_4 = 41,
+    ACT_BA_NUKE_1 = 42,
+    /* 42 - 50 unused */
+    ACT_CONFUSE = 51,
+    ACT_SLEEP = 52,
+    ACT_QUAKE = 53,
+    ACT_TERROR = 54,
+    ACT_TELE_AWAY = 55,
+    ACT_BANISH_EVIL = 56,
+    ACT_GENOCIDE = 57,
+    ACT_MASS_GENO = 58,
+    ACT_SCARE_AREA = 59,
+    ACT_AGGRAVATE = 60,
+    /* 59 - 64 unused */
+    ACT_CHARM_ANIMAL = 65,
+    ACT_CHARM_UNDEAD = 66,
+    ACT_CHARM_OTHER = 67,
+    ACT_CHARM_ANIMALS = 68,
+    ACT_CHARM_OTHERS = 69,
+    ACT_SUMMON_ANIMAL = 70,
+    ACT_SUMMON_PHANTOM = 71,
+    ACT_SUMMON_ELEMENTAL = 72,
+    ACT_SUMMON_DEMON = 73,
+    ACT_SUMMON_UNDEAD = 74,
+    ACT_SUMMON_HOUND = 75,
+    ACT_SUMMON_DAWN = 76,
+    ACT_SUMMON_OCTOPUS = 77,
+    ACT_CHOIR_SINGS = 80,
+    ACT_CURE_LW = 81,
+    ACT_CURE_MW = 82,
+    ACT_CURE_POISON = 83,
+    ACT_REST_EXP = 84,
+    ACT_REST_ALL = 85,
+    ACT_CURE_700 = 86,
+    ACT_CURE_1000 = 87,
+    ACT_CURING = 88,
+    ACT_CURE_MANA_FULL = 89,
+    ACT_ESP = 91,
+    ACT_BERSERK = 92,
+    ACT_PROT_EVIL = 93,
+    ACT_RESIST_ALL = 94,
+    ACT_SPEED = 95,
+    ACT_XTRA_SPEED = 96,
+    ACT_WRAITH = 97,
+    ACT_INVULN = 98,
+    ACT_HERO = 99,
+    ACT_HERO_SPEED = 100,
+    ACT_RESIST_ACID = 101,
+    ACT_RESIST_FIRE = 102,
+    ACT_RESIST_COLD = 103,
+    ACT_RESIST_ELEC = 104,
+    ACT_RESIST_POIS = 105,
+    ACT_LIGHT = 111,
+    ACT_MAP_LIGHT = 112,
+    ACT_DETECT_ALL = 113,
+    ACT_DETECT_XTRA = 114,
+    ACT_ID_FULL = 115,
+    ACT_ID_PLAIN = 116,
+    ACT_RUNE_EXPLO = 117,
+    ACT_RUNE_PROT = 118,
+    ACT_SATIATE = 119,
+    ACT_DEST_DOOR = 120,
+    ACT_STONE_MUD = 121,
+    ACT_RECHARGE = 122,
+    ACT_ALCHEMY = 123,
+    ACT_DIM_DOOR = 124,
+    ACT_TELEPORT = 125,
+    ACT_RECALL = 126,
+    ACT_JUDGE = 127,
+    ACT_TELEKINESIS = 128,
+    ACT_DETECT_UNIQUE = 129,
+    ACT_ESCAPE = 130,
+    ACT_DISP_CURSE_XTRA = 131,
+    ACT_BRAND_FIRE_BOLTS = 132,
+    ACT_RECHARGE_XTRA = 133,
+    ACT_LORE = 134,
+    ACT_SHIKOFUMI = 135,
+    ACT_PHASE_DOOR = 136,
+    ACT_DETECT_ALL_MONS = 137,
+    ACT_ULTIMATE_RESIST = 138,
+    ACT_FALLING_STAR = 246,
+    ACT_STRAIN_HASTE = 247,
+    ACT_TELEPORT_LEVEL = 248,
+    ACT_GRAND_CROSS = 249,
+    ACT_CAST_OFF = 250,
+    ACT_FISHING = 251,
+    ACT_INROU = 252,
+    ACT_MURAMASA = 253,
+    ACT_BLOODY_MOON = 254,
+    ACT_CRIMSON = 255,
+} random_art_activation_type;
diff --git a/src/core/status-reseter.c b/src/core/status-reseter.c
new file mode 100644 (file)
index 0000000..a861627
--- /dev/null
@@ -0,0 +1,93 @@
+#include "core/status-reseter.h"
+#include "core/speed-table.h"
+#include "monster/monster-status-setter.h"
+#include "player/attack-defense-types.h"
+#include "player/player-race.h"
+
+/*!
+ * @brief プレイヤーの全ての時限効果をリセットする。 / reset timed flags
+ * @return なし
+ */
+void reset_tim_flags(player_type *creature_ptr)
+{
+    creature_ptr->fast = 0; /* Timed -- Fast */
+    creature_ptr->lightspeed = 0;
+    creature_ptr->slow = 0; /* Timed -- Slow */
+    creature_ptr->blind = 0; /* Timed -- Blindness */
+    creature_ptr->paralyzed = 0; /* Timed -- Paralysis */
+    creature_ptr->confused = 0; /* Timed -- Confusion */
+    creature_ptr->afraid = 0; /* Timed -- Fear */
+    creature_ptr->image = 0; /* Timed -- Hallucination */
+    creature_ptr->poisoned = 0; /* Timed -- Poisoned */
+    creature_ptr->cut = 0; /* Timed -- Cut */
+    creature_ptr->stun = 0; /* Timed -- Stun */
+
+    creature_ptr->protevil = 0; /* Timed -- Protection */
+    creature_ptr->invuln = 0; /* Timed -- Invulnerable */
+    creature_ptr->ult_res = 0;
+    creature_ptr->hero = 0; /* Timed -- Heroism */
+    creature_ptr->shero = 0; /* Timed -- Super Heroism */
+    creature_ptr->shield = 0; /* Timed -- Shield Spell */
+    creature_ptr->blessed = 0; /* Timed -- Blessed */
+    creature_ptr->tim_invis = 0; /* Timed -- Invisibility */
+    creature_ptr->tim_infra = 0; /* Timed -- Infra Vision */
+    creature_ptr->tim_regen = 0; /* Timed -- Regeneration */
+    creature_ptr->tim_stealth = 0; /* Timed -- Stealth */
+    creature_ptr->tim_esp = 0;
+    creature_ptr->wraith_form = 0; /* Timed -- Wraith Form */
+    creature_ptr->tim_levitation = 0;
+    creature_ptr->tim_sh_touki = 0;
+    creature_ptr->tim_sh_fire = 0;
+    creature_ptr->tim_sh_holy = 0;
+    creature_ptr->tim_eyeeye = 0;
+    creature_ptr->magicdef = 0;
+    creature_ptr->resist_magic = 0;
+    creature_ptr->tsuyoshi = 0;
+    creature_ptr->tim_pass_wall = 0;
+    creature_ptr->tim_res_nether = 0;
+    creature_ptr->tim_res_time = 0;
+    creature_ptr->tim_mimic = 0;
+    creature_ptr->mimic_form = 0;
+    creature_ptr->tim_reflect = 0;
+    creature_ptr->multishadow = 0;
+    creature_ptr->dustrobe = 0;
+    creature_ptr->action = ACTION_NONE;
+
+    creature_ptr->oppose_acid = 0; /* Timed -- oppose acid */
+    creature_ptr->oppose_elec = 0; /* Timed -- oppose lightning */
+    creature_ptr->oppose_fire = 0; /* Timed -- oppose heat */
+    creature_ptr->oppose_cold = 0; /* Timed -- oppose cold */
+    creature_ptr->oppose_pois = 0; /* Timed -- oppose poison */
+
+    creature_ptr->word_recall = 0;
+    creature_ptr->alter_reality = 0;
+    creature_ptr->sutemi = FALSE;
+    creature_ptr->counter = FALSE;
+    creature_ptr->ele_attack = 0;
+    creature_ptr->ele_immune = 0;
+    creature_ptr->special_attack = 0L;
+    creature_ptr->special_defense = 0L;
+
+    while (creature_ptr->energy_need < 0)
+        creature_ptr->energy_need += ENERGY_NEED();
+
+    creature_ptr->timewalk = FALSE;
+
+    if (is_specific_player_race(creature_ptr, RACE_BALROG) && (creature_ptr->lev > 44))
+        creature_ptr->oppose_fire = 1;
+    if ((creature_ptr->pclass == CLASS_NINJA) && (creature_ptr->lev > 44))
+        creature_ptr->oppose_pois = 1;
+    if (creature_ptr->pclass == CLASS_BERSERKER)
+        creature_ptr->shero = 1;
+
+    if (creature_ptr->riding) {
+        (void)set_monster_fast(creature_ptr, creature_ptr->riding, 0);
+        (void)set_monster_slow(creature_ptr, creature_ptr->riding, 0);
+        (void)set_monster_invulner(creature_ptr, creature_ptr->riding, 0, FALSE);
+    }
+
+    if (creature_ptr->pclass == CLASS_BARD) {
+        SINGING_SONG_EFFECT(creature_ptr) = 0;
+        SINGING_SONG_ID(creature_ptr) = 0;
+    }
+}
diff --git a/src/core/status-reseter.h b/src/core/status-reseter.h
new file mode 100644 (file)
index 0000000..fcaf6b5
--- /dev/null
@@ -0,0 +1,5 @@
+#pragma once
+
+#include "system/angband.h"
+
+void reset_tim_flags(player_type *creature_ptr);
diff --git a/src/io/chuukei.c b/src/io/chuukei.c
new file mode 100644 (file)
index 0000000..4b9966c
--- /dev/null
@@ -0,0 +1,938 @@
+/*!
+    @file chuukei.c
+    @brief 中継機能の実装
+    @date 2014/01/02
+    @author
+    2014 Deskull rearranged comment for Doxygen.
+ */
+
+#include "io/chuukei.h"
+#include "cmd-io/cmd-dump.h"
+#include "cmd-visual/cmd-draw.h"
+#include "core/asking-player.h"
+#include "io/files-util.h"
+#include "io/inet.h"
+#include "io/signal-handlers.h"
+#include "term/gameterm.h"
+#include "util/angband-files.h"
+#include "view/display-messages.h"
+#ifdef JP
+#include "locale/japanese.h"
+#endif
+
+#include <ctype.h>
+#include <stdarg.h>
+#include <stdio.h>
+#ifdef WINDOWS
+#include <windows.h>
+#endif
+
+#ifdef CHUUKEI
+#if defined(WINDOWS)
+#include <winsock.h>
+#else
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+#include <setjmp.h>
+#include <signal.h>
+#endif
+
+#define MAX_HOSTNAME 256
+#endif
+
+#define RINGBUF_SIZE 1024 * 1024
+#define FRESH_QUEUE_SIZE 4096
+#ifdef WINDOWS
+#define WAIT 100
+#else
+#define WAIT 100 * 1000 /* ブラウズ側のウエイト(us単位) */
+#endif
+#define DEFAULT_DELAY 50
+#define RECVBUF_SIZE 1024
+
+#ifdef CHUUKEI
+bool chuukei_server;
+bool chuukei_client;
+char *server_name;
+int server_port;
+#endif
+
+static long epoch_time; /* バッファ開始時刻 */
+static int browse_delay; /* 表示するまでの時間(100ms単位)(この間にラグを吸収する) */
+#ifdef CHUUKEI
+static int sd; /* ソケットのファイルディスクリプタ */
+static long time_diff; /* プレイ側との時間のずれ(これを見ながらディレイを調整していく) */
+static int server_port;
+static GAME_TEXT server_name[MAX_HOSTNAME];
+#endif
+
+static int movie_fd;
+static int movie_mode;
+
+#ifdef CHUUKEI
+#ifdef WINDOWS
+#define close closesocket
+#endif
+#endif
+
+/* 描画する時刻を覚えておくキュー構造体 */
+static struct {
+    int time[FRESH_QUEUE_SIZE];
+    int next;
+    int tail;
+} fresh_queue;
+
+/* リングバッファ構造体 */
+static struct {
+    char *buf;
+    int wptr;
+    int rptr;
+    int inlen;
+} ring;
+
+/*
+ * Original hooks
+ */
+static errr (*old_xtra_hook)(int n, int v);
+static errr (*old_curs_hook)(int x, int y);
+static errr (*old_bigcurs_hook)(int x, int y);
+static errr (*old_wipe_hook)(int x, int y, int n);
+static errr (*old_text_hook)(int x, int y, int n, TERM_COLOR a, concptr s);
+
+static void disable_chuukei_server(void)
+{
+    term_type *t = angband_term[0];
+#ifdef CHUUKEI
+    chuukei_server = FALSE;
+#endif /* CHUUKEI */
+    t->xtra_hook = old_xtra_hook;
+    t->curs_hook = old_curs_hook;
+    t->bigcurs_hook = old_bigcurs_hook;
+    t->wipe_hook = old_wipe_hook;
+    t->text_hook = old_text_hook;
+}
+
+/* ANSI Cによればstatic変数は0で初期化されるが一応初期化する */
+static errr init_buffer(void)
+{
+    fresh_queue.next = fresh_queue.tail = 0;
+    ring.wptr = ring.rptr = ring.inlen = 0;
+    fresh_queue.time[0] = 0;
+    ring.buf = malloc(RINGBUF_SIZE);
+    if (ring.buf == NULL)
+        return -1;
+
+    return 0;
+}
+
+/* 現在の時間を100ms単位で取得する */
+static long get_current_time(void)
+{
+#ifdef WINDOWS
+    return timeGetTime() / 100;
+#else
+    struct timeval tv;
+    gettimeofday(&tv, NULL);
+
+    return (tv.tv_sec * 10 + tv.tv_usec / 100000);
+#endif
+}
+
+/* リングバッファ構造体に buf の内容を加える */
+static errr insert_ringbuf(char *buf)
+{
+    int len;
+    len = strlen(buf) + 1; /* +1は終端文字分 */
+
+    if (movie_mode) {
+        fd_write(movie_fd, buf, len);
+#ifdef CHUUKEI
+        if (!chuukei_server)
+            return 0;
+#else
+        return 0;
+#endif
+    }
+
+    /* バッファをオーバー */
+    if (ring.inlen + len >= RINGBUF_SIZE) {
+#ifdef CHUUKEI
+        if (chuukei_server)
+            disable_chuukei_server();
+        else
+            chuukei_client = FALSE;
+
+        prt("送受信バッファが溢れました。サーバとの接続を切断します。", 0, 0);
+        inkey();
+
+        close(sd);
+#endif
+        return -1;
+    }
+
+    /* バッファの終端までに収まる */
+    if (ring.wptr + len < RINGBUF_SIZE) {
+        memcpy(ring.buf + ring.wptr, buf, len);
+        ring.wptr += len;
+    }
+    /* バッファの終端までに収まらない(ピッタリ収まる場合も含む) */
+    else {
+        int head = RINGBUF_SIZE - ring.wptr; /* 前半 */
+        int tail = len - head; /* 後半 */
+
+        memcpy(ring.buf + ring.wptr, buf, head);
+        memcpy(ring.buf, buf + head, tail);
+        ring.wptr = tail;
+    }
+
+    ring.inlen += len;
+
+    /* Success */
+    return 0;
+}
+
+#ifdef CHUUKEI
+void flush_ringbuf(void)
+{
+    fd_set fdset;
+    struct timeval tv;
+
+    if (!chuukei_server)
+        return;
+
+    if (ring.inlen == 0)
+        return;
+
+    tv.tv_sec = 0;
+    tv.tv_usec = 0;
+
+    FD_ZERO(&fdset);
+    FD_SET(sd, &fdset);
+
+    while (TRUE) {
+        fd_set tmp_fdset;
+        int result;
+
+        tmp_fdset = fdset;
+
+        /* ソケットにデータを書き込めるかどうか調べる */
+        select(sd + 1, (fd_set *)NULL, &tmp_fdset, (fd_set *)NULL, &tv);
+
+        /* 書き込めなければ戻る */
+        if (FD_ISSET(sd, &tmp_fdset) == 0)
+            break;
+
+        result = send(sd, ring.buf + ring.rptr, ((ring.wptr > ring.rptr) ? ring.wptr : RINGBUF_SIZE) - ring.rptr, 0);
+
+        if (result <= 0) {
+            /* サーバとの接続断? */
+            if (chuukei_server)
+                disable_chuukei_server();
+
+            prt("サーバとの接続が切断されました。", 0, 0);
+            inkey();
+            close(sd);
+
+            return;
+        }
+
+        ring.rptr += result;
+        ring.inlen -= result;
+
+        if (ring.rptr == RINGBUF_SIZE)
+            ring.rptr = 0;
+        if (ring.inlen == 0)
+            break;
+    }
+}
+
+static int read_chuukei_prf(concptr prf_name)
+{
+    char buf[1024];
+    FILE *fp;
+
+    path_build(buf, sizeof(buf), ANGBAND_DIR_XTRA, prf_name);
+    fp = angband_fopen(buf, "r");
+
+    if (!fp)
+        return -1;
+
+    /* 初期化 */
+    server_port = -1;
+    server_name[0] = 0;
+    browse_delay = DEFAULT_DELAY;
+
+    while (0 == angband_fgets(fp, buf, sizeof(buf))) {
+        /* サーバ名 */
+        if (!strncmp(buf, "server:", 7)) {
+            strncpy(server_name, buf + 7, MAX_HOSTNAME - 1);
+            server_name[MAX_HOSTNAME - 1] = '\0';
+        }
+
+        /* ポート番号 */
+        if (!strncmp(buf, "port:", 5)) {
+            server_port = atoi(buf + 5);
+        }
+
+        /* ディレイ */
+        if (!strncmp(buf, "delay:", 6)) {
+            browse_delay = atoi(buf + 6);
+        }
+    }
+
+    angband_fclose(fp);
+
+    /* prfファイルが完全でない */
+    if (server_port == -1 || server_name[0] == 0)
+        return -1;
+
+    return 0;
+}
+
+int connect_chuukei_server(char *prf_name)
+{
+#ifdef WINDOWS
+    WSADATA wsaData;
+    WORD wVersionRequested = (WORD)((1) | (1 << 8));
+#endif
+
+    struct sockaddr_in ask;
+    struct hostent *hp;
+
+    if (read_chuukei_prf(prf_name) < 0) {
+        printf("Wrong prf file\n");
+        return -1;
+    }
+
+    if (init_buffer() < 0) {
+        printf("Malloc error\n");
+        return -1;
+    }
+
+#ifdef WINDOWS
+    if (WSAStartup(wVersionRequested, &wsaData)) {
+        msg_print("Report: WSAStartup failed.");
+        return -1;
+    }
+#endif
+
+    printf("server = %s\nport = %d\n", server_name, server_port);
+
+    if ((hp = gethostbyname(server_name)) != NULL) {
+        memset(&ask, 0, sizeof(ask));
+        memcpy(&ask.sin_addr, hp->h_addr_list[0], hp->h_length);
+    } else {
+        if ((ask.sin_addr.s_addr = inet_addr(server_name)) == 0) {
+            printf("Bad hostname\n");
+            return -1;
+        }
+    }
+
+    ask.sin_family = AF_INET;
+    ask.sin_port = htons((unsigned short)server_port);
+
+#ifndef WINDOWS
+    if ((sd = socket(PF_INET, SOCK_STREAM, 0)) < 0)
+#else
+    if ((sd = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
+#endif
+    {
+        printf("Can't create socket\n");
+        return -1;
+    }
+
+    if (connect(sd, (struct sockaddr *)&ask, sizeof(ask)) < 0) {
+        close(sd);
+        printf("Can't connect %s port %d\n", server_name, server_port);
+        return -1;
+    }
+
+    return 0;
+}
+#endif /* CHUUKEI */
+
+/* strが同じ文字の繰り返しかどうか調べる */
+static bool string_is_repeat(char *str, int len)
+{
+    char c = str[0];
+    int i;
+
+    if (len < 2)
+        return FALSE;
+#ifdef JP
+    if (iskanji(c))
+        return FALSE;
+#endif
+
+    for (i = 1; i < len; i++) {
+#ifdef JP
+        if (c != str[i] || iskanji(str[i]))
+            return FALSE;
+#else
+        if (c != str[i])
+            return FALSE;
+#endif
+    }
+
+    return TRUE;
+}
+
+static errr send_text_to_chuukei_server(TERM_LEN x, TERM_LEN y, int len, TERM_COLOR col, concptr str)
+{
+    char buf[1024];
+    char buf2[1024];
+
+    strncpy(buf2, str, len);
+    buf2[len] = '\0';
+
+    if (len == 1) {
+        sprintf(buf, "s%c%c%c%c", x + 1, y + 1, col, buf2[0]);
+    } else if (string_is_repeat(buf2, len)) {
+        int i;
+        for (i = len; i > 0; i -= 127) {
+            sprintf(buf, "n%c%c%c%c%c", x + 1, y + 1, MIN(i, 127), col, buf2[0]);
+        }
+    } else {
+#if defined(SJIS) && defined(JP)
+        sjis2euc(buf2);
+#endif
+        sprintf(buf, "t%c%c%c%c%s", x + 1, y + 1, len, col, buf2);
+    }
+
+    insert_ringbuf(buf);
+
+    return (*old_text_hook)(x, y, len, col, str);
+}
+
+static errr send_wipe_to_chuukei_server(int x, int y, int len)
+{
+    char buf[1024];
+
+    sprintf(buf, "w%c%c%c", x + 1, y + 1, len);
+
+    insert_ringbuf(buf);
+
+    return (*old_wipe_hook)(x, y, len);
+}
+
+static errr send_xtra_to_chuukei_server(int n, int v)
+{
+    char buf[1024];
+
+    if (n == TERM_XTRA_CLEAR || n == TERM_XTRA_FRESH || n == TERM_XTRA_SHAPE) {
+        sprintf(buf, "x%c", n + 1);
+
+        insert_ringbuf(buf);
+
+        if (n == TERM_XTRA_FRESH) {
+            sprintf(buf, "d%ld", get_current_time() - epoch_time);
+            insert_ringbuf(buf);
+        }
+    }
+
+    /* Verify the hook */
+    if (!old_xtra_hook)
+        return -1;
+
+    return (*old_xtra_hook)(n, v);
+}
+
+static errr send_curs_to_chuukei_server(int x, int y)
+{
+    char buf[1024];
+
+    sprintf(buf, "c%c%c", x + 1, y + 1);
+
+    insert_ringbuf(buf);
+
+    return (*old_curs_hook)(x, y);
+}
+
+static errr send_bigcurs_to_chuukei_server(int x, int y)
+{
+    char buf[1024];
+
+    sprintf(buf, "C%c%c", x + 1, y + 1);
+
+    insert_ringbuf(buf);
+
+    return (*old_bigcurs_hook)(x, y);
+}
+
+/*
+ * Prepare z-term hooks to call send_*_to_chuukei_server()'s
+ */
+void prepare_chuukei_hooks(void)
+{
+    term_type *t0 = angband_term[0];
+
+    /* Save original z-term hooks */
+    old_xtra_hook = t0->xtra_hook;
+    old_curs_hook = t0->curs_hook;
+    old_bigcurs_hook = t0->bigcurs_hook;
+    old_wipe_hook = t0->wipe_hook;
+    old_text_hook = t0->text_hook;
+
+    /* Prepare z-term hooks */
+    t0->xtra_hook = send_xtra_to_chuukei_server;
+    t0->curs_hook = send_curs_to_chuukei_server;
+    t0->bigcurs_hook = send_bigcurs_to_chuukei_server;
+    t0->wipe_hook = send_wipe_to_chuukei_server;
+    t0->text_hook = send_text_to_chuukei_server;
+}
+
+/*
+ * Prepare z-term hooks to call send_*_to_chuukei_server()'s
+ */
+void prepare_movie_hooks(player_type *player_ptr)
+{
+    char buf[1024];
+    char tmp[80];
+
+    if (movie_mode) {
+        movie_mode = 0;
+#ifdef CHUUKEI
+        if (!chuukei_server)
+            disable_chuukei_server();
+#else
+        disable_chuukei_server();
+#endif
+        fd_close(movie_fd);
+        msg_print(_("録画を終了しました。", "Stopped recording."));
+    } else {
+        sprintf(tmp, "%s.amv", player_ptr->base_name);
+        if (get_string(_("ムービー記録ファイル: ", "Movie file name: "), tmp, 80)) {
+            int fd;
+
+            path_build(buf, sizeof(buf), ANGBAND_DIR_USER, tmp);
+
+            fd = fd_open(buf, O_RDONLY);
+
+            /* Existing file */
+            if (fd >= 0) {
+                char out_val[160];
+                (void)fd_close(fd);
+
+                /* Build query */
+                (void)sprintf(out_val, _("現存するファイルに上書きしますか? (%s)", "Replace existing file %s? "), buf);
+
+                /* Ask */
+                if (!get_check(out_val))
+                    return;
+
+                movie_fd = fd_open(buf, O_WRONLY | O_TRUNC);
+            } else {
+                movie_fd = fd_make(buf, 0644);
+            }
+
+            if (!movie_fd) {
+                msg_print(_("ファイルを開けません!", "Can not open file."));
+                return;
+            }
+
+            movie_mode = 1;
+#ifdef CHUUKEI
+            if (!chuukei_server)
+                prepare_chuukei_hooks();
+#else
+            prepare_chuukei_hooks();
+#endif
+            do_cmd_redraw(player_ptr);
+        }
+    }
+}
+
+#ifdef CHUUKEI
+static int handle_timestamp_data(int timestamp)
+{
+    long current_time = get_current_time();
+
+    /* 描画キューは空かどうか? */
+    if (fresh_queue.tail == fresh_queue.next) {
+        /* バッファリングし始めの時間を保存しておく */
+        epoch_time = current_time;
+        epoch_time += browse_delay;
+        epoch_time -= timestamp;
+        time_diff = current_time - timestamp;
+    }
+
+    /* 描画キューに保存し、保存位置を進める */
+    fresh_queue.time[fresh_queue.tail] = timestamp;
+    fresh_queue.tail++;
+
+    /* キューの最後尾に到達したら先頭に戻す */
+    fresh_queue.tail %= FRESH_QUEUE_SIZE;
+
+    if (fresh_queue.tail == fresh_queue.next) {
+        /* 描画キュー溢れ */
+        prt("描画タイミングキューが溢れました。サーバとの接続を切断します。", 0, 0);
+        inkey();
+        close(sd);
+
+        return -1;
+    }
+
+    /* プレイ側とのディレイを調整 */
+    if (time_diff != current_time - timestamp) {
+        long old_time_diff = time_diff;
+        time_diff = current_time - timestamp;
+        epoch_time -= (old_time_diff - time_diff);
+    }
+
+    /* Success */
+    return 0;
+}
+#endif /* CHUUKEI */
+
+static int handle_movie_timestamp_data(int timestamp)
+{
+    static int initialized = FALSE;
+
+    /* 描画キューは空かどうか? */
+    if (!initialized) {
+        /* バッファリングし始めの時間を保存しておく */
+        epoch_time = get_current_time();
+        epoch_time += browse_delay;
+        epoch_time -= timestamp;
+        // time_diff = current_time - timestamp;
+        initialized = TRUE;
+    }
+
+    /* 描画キューに保存し、保存位置を進める */
+    fresh_queue.time[fresh_queue.tail] = timestamp;
+    fresh_queue.tail++;
+
+    /* キューの最後尾に到達したら先頭に戻す */
+    fresh_queue.tail %= FRESH_QUEUE_SIZE;
+
+    /* Success */
+    return 0;
+}
+
+#ifdef CHUUKEI
+static int read_sock(void)
+{
+    static char recv_buf[RECVBUF_SIZE];
+    static int remain_bytes = 0;
+    int recv_bytes;
+    int i;
+
+    /* 前回残ったデータの後につづけて配信サーバからデータ受信 */
+    recv_bytes = recv(sd, recv_buf + remain_bytes, RECVBUF_SIZE - remain_bytes, 0);
+
+    if (recv_bytes <= 0)
+        return -1;
+
+    /* 前回残ったデータ量に今回読んだデータ量を追加 */
+    remain_bytes += recv_bytes;
+
+    for (i = 0; i < remain_bytes; i++) {
+        /* データのくぎり('\0')を探す */
+        if (recv_buf[i] == '\0') {
+            /* 'd'で始まるデータ(タイムスタンプ)の場合は
+               描画キューに保存する処理を呼ぶ */
+            if ((recv_buf[0] == 'd') && (handle_timestamp_data(atoi(recv_buf + 1)) < 0))
+                return -1;
+
+            /* 受信データを保存 */
+            if (insert_ringbuf(recv_buf) < 0)
+                return -1;
+
+            /* 次のデータ移行をrecv_bufの先頭に移動 */
+            memmove(recv_buf, recv_buf + i + 1, remain_bytes - i - 1);
+
+            remain_bytes -= (i + 1);
+            i = 0;
+        }
+    }
+
+    return 0;
+}
+#endif
+
+static int read_movie_file(void)
+{
+    static char recv_buf[RECVBUF_SIZE];
+    static int remain_bytes = 0;
+    int recv_bytes;
+    int i;
+
+    recv_bytes = read(movie_fd, recv_buf + remain_bytes, RECVBUF_SIZE - remain_bytes);
+
+    if (recv_bytes <= 0)
+        return -1;
+
+    /* 前回残ったデータ量に今回読んだデータ量を追加 */
+    remain_bytes += recv_bytes;
+
+    for (i = 0; i < remain_bytes; i++) {
+        /* データのくぎり('\0')を探す */
+        if (recv_buf[i] == '\0') {
+            /* 'd'で始まるデータ(タイムスタンプ)の場合は
+               描画キューに保存する処理を呼ぶ */
+            if ((recv_buf[0] == 'd') && (handle_movie_timestamp_data(atoi(recv_buf + 1)) < 0))
+                return -1;
+
+            /* 受信データを保存 */
+            if (insert_ringbuf(recv_buf) < 0)
+                return -1;
+
+            /* 次のデータ移行をrecv_bufの先頭に移動 */
+            memmove(recv_buf, recv_buf + i + 1, remain_bytes - i - 1);
+
+            remain_bytes -= (i + 1);
+            i = 0;
+        }
+    }
+
+    return 0;
+}
+
+#ifndef WINDOWS
+/* Win版の床の中点と壁の豆腐をピリオドとシャープにする。*/
+static void win2unix(int col, char *buf)
+{
+    char wall;
+    if (col == 9)
+        wall = '%';
+    else
+        wall = '#';
+
+    while (*buf) {
+#ifdef JP
+        if (iskanji(*buf)) {
+            buf += 2;
+            continue;
+        }
+#endif
+        if (*buf == 127)
+            *buf = wall;
+        else if (*buf == 31)
+            *buf = '.';
+        buf++;
+    }
+}
+#endif
+
+static bool get_nextbuf(char *buf)
+{
+    char *ptr = buf;
+
+    while (TRUE) {
+        *ptr = ring.buf[ring.rptr++];
+        ring.inlen--;
+        if (ring.rptr == RINGBUF_SIZE)
+            ring.rptr = 0;
+        if (*ptr++ == '\0')
+            break;
+    }
+
+    if (buf[0] == 'd')
+        return FALSE;
+
+    return TRUE;
+}
+
+/* プレイホストのマップが大きいときクライアントのマップもリサイズする */
+static void update_term_size(int x, int y, int len)
+{
+    int ox, oy;
+    int nx, ny;
+    term_get_size(&ox, &oy);
+    nx = ox;
+    ny = oy;
+
+    /* 横方向のチェック */
+    if (x + len > ox)
+        nx = x + len;
+    /* 縦方向のチェック */
+    if (y + 1 > oy)
+        ny = y + 1;
+
+    if (nx != ox || ny != oy)
+        term_resize(nx, ny);
+}
+
+static bool flush_ringbuf_client(void)
+{
+    char buf[1024];
+
+    /* 書くデータなし */
+    if (fresh_queue.next == fresh_queue.tail)
+        return FALSE;
+
+    /* まだ書くべき時でない */
+    if (fresh_queue.time[fresh_queue.next] > get_current_time() - epoch_time)
+        return FALSE;
+
+    /* 時間情報(区切り)が得られるまで書く */
+    while (get_nextbuf(buf)) {
+        char id;
+        int x, y, len;
+        TERM_COLOR col;
+        int i;
+        unsigned char tmp1, tmp2, tmp3, tmp4;
+        char *mesg;
+
+        sscanf(buf, "%c%c%c%c%c", &id, &tmp1, &tmp2, &tmp3, &tmp4);
+        x = tmp1 - 1;
+        y = tmp2 - 1;
+        len = tmp3;
+        col = tmp4;
+        if (id == 's') {
+            col = tmp3;
+            mesg = &buf[4];
+        } else
+            mesg = &buf[5];
+#ifndef WINDOWS
+        win2unix(col, mesg);
+#endif
+
+        switch (id) {
+        case 't': /* 通常 */
+#if defined(SJIS) && defined(JP)
+            euc2sjis(mesg);
+#endif
+            update_term_size(x, y, len);
+            (void)((*angband_term[0]->text_hook)(x, y, len, (byte)col, mesg));
+            strncpy(&Term->scr->c[y][x], mesg, len);
+            for (i = x; i < x + len; i++) {
+                Term->scr->a[y][i] = col;
+            }
+            break;
+
+        case 'n': /* 繰り返し */
+            for (i = 1; i < len; i++) {
+                mesg[i] = mesg[0];
+            }
+            mesg[i] = '\0';
+            update_term_size(x, y, len);
+            (void)((*angband_term[0]->text_hook)(x, y, len, (byte)col, mesg));
+            strncpy(&Term->scr->c[y][x], mesg, len);
+            for (i = x; i < x + len; i++) {
+                Term->scr->a[y][i] = col;
+            }
+            break;
+
+        case 's': /* 一文字 */
+            update_term_size(x, y, 1);
+            (void)((*angband_term[0]->text_hook)(x, y, 1, (byte)col, mesg));
+            strncpy(&Term->scr->c[y][x], mesg, 1);
+            Term->scr->a[y][x] = col;
+            break;
+
+        case 'w':
+            update_term_size(x, y, len);
+            (void)((*angband_term[0]->wipe_hook)(x, y, len));
+            break;
+
+        case 'x':
+            if (x == TERM_XTRA_CLEAR)
+                term_clear();
+            (void)((*angband_term[0]->xtra_hook)(x, 0));
+            break;
+
+        case 'c':
+            update_term_size(x, y, 1);
+            (void)((*angband_term[0]->curs_hook)(x, y));
+            break;
+        case 'C':
+            update_term_size(x, y, 1);
+            (void)((*angband_term[0]->bigcurs_hook)(x, y));
+            break;
+        }
+    }
+
+    fresh_queue.next++;
+    if (fresh_queue.next == FRESH_QUEUE_SIZE)
+        fresh_queue.next = 0;
+    return TRUE;
+}
+
+#ifdef CHUUKEI
+void browse_chuukei()
+{
+    fd_set fdset;
+    struct timeval tv;
+
+    tv.tv_sec = 0;
+    tv.tv_usec = WAIT;
+
+    FD_ZERO(&fdset);
+    FD_SET(sd, &fdset);
+
+    term_clear();
+    term_fresh();
+    term_xtra(TERM_XTRA_REACT, 0);
+
+    while (TRUE) {
+        fd_set tmp_fdset;
+        struct timeval tmp_tv;
+
+        if (flush_ringbuf_client())
+            continue;
+
+        tmp_fdset = fdset;
+        tmp_tv = tv;
+
+        /* ソケットにデータが来ているかどうか調べる */
+        select(sd + 1, &tmp_fdset, (fd_set *)NULL, (fd_set *)NULL, &tmp_tv);
+        if (FD_ISSET(sd, &tmp_fdset) == 0) {
+            term_xtra(TERM_XTRA_FLUSH, 0);
+            continue;
+        }
+
+        if (read_sock() < 0) {
+            chuukei_client = FALSE;
+        }
+
+        /* 接続が切れた状態で書くべきデータがなくなっていたら終了 */
+        if (!chuukei_client && fresh_queue.next == fresh_queue.tail)
+            break;
+    }
+}
+#endif /* CHUUKEI */
+
+void prepare_browse_movie_aux(concptr filename)
+{
+    movie_fd = fd_open(filename, O_RDONLY);
+
+    browsing_movie = TRUE;
+
+    init_buffer();
+}
+
+void prepare_browse_movie(concptr filename)
+{
+    char buf[1024];
+    path_build(buf, sizeof(buf), ANGBAND_DIR_USER, filename);
+
+    prepare_browse_movie_aux(buf);
+}
+
+void browse_movie(void)
+{
+    term_clear();
+    term_fresh();
+    term_xtra(TERM_XTRA_REACT, 0);
+
+    while (read_movie_file() == 0) {
+        while (fresh_queue.next != fresh_queue.tail) {
+            if (!flush_ringbuf_client()) {
+                term_xtra(TERM_XTRA_FLUSH, 0);
+
+                /* ソケットにデータが来ているかどうか調べる */
+#ifdef WINDOWS
+                Sleep(WAIT);
+#else
+                usleep(WAIT);
+#endif
+            }
+        }
+    }
+}
diff --git a/src/io/chuukei.h b/src/io/chuukei.h
new file mode 100644 (file)
index 0000000..f9a1b6f
--- /dev/null
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "system/angband.h"
+
+#ifdef CHUUKEI
+extern bool chuukei_server;
+extern bool chuukei_client;
+
+int connect_chuukei_server(char *server_string);
+void browse_chuukei(void);
+void flush_ringbuf(void);
+void prepare_chuukei_hooks(void);
+#endif
+
+void prepare_movie_hooks(player_type *player_ptr);
+void prepare_browse_movie_aux(concptr filename);
+void prepare_browse_movie(concptr filename);
+void browse_movie(void);
index 6bb588a..ae57ecf 100644 (file)
@@ -35,8 +35,8 @@ const arena_type arena_info[MAX_ARENA_MONS + 2] = {
     { MON_ULTRA_PALADIN, TV_STAFF, SV_STAFF_DISPEL_EVIL },
     { MON_BARNEY, TV_RING, SV_RING_RES_CHAOS },
     { MON_TROLL_KING, TV_SCROLL, SV_SCROLL_MASS_GENOCIDE },
-    { MON_BARON_HELL, TV_POTION, SV_SCROLL_RUNE_OF_PROTECTION },
-    { MON_FALLEN_ANGEL, TV_SCROLL, SV_POTION_AUGMENTATION },
+    { MON_BARON_HELL, TV_SCROLL, SV_SCROLL_RUNE_OF_PROTECTION },
+    { MON_FALLEN_ANGEL, TV_POTION, SV_POTION_AUGMENTATION },
     { MON_ANCIENT_CRISTAL_DRAGON, TV_WAND, SV_WAND_DRAGON_FIRE },
     { MON_BRONZE_LICH, TV_STAFF, SV_STAFF_DESTRUCTION },
     { MON_DROLEM, TV_POTION, SV_POTION_STAR_HEALING },
diff --git a/src/player/selfinfo.c b/src/player/selfinfo.c
new file mode 100644 (file)
index 0000000..faf4034
--- /dev/null
@@ -0,0 +1,1430 @@
+/*!
+ * @file selfinfo.c
+ * @brief 自己分析処理/ Self knowledge
+ * @date 2018/09/07
+ * @author
+ * <pre>
+ * Copyright (c) 1997 Ben Harrison, 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.  Other copyrights may also apply.
+ * </pre>
+ * 2018 Deskull
+ * @details
+ * spell2s.cから分離
+ */
+
+#include "player/selfinfo.h"
+#include "inventory/inventory-slot-types.h"
+#include "io/input-key-acceptor.h"
+#include "mutation/mutation-flag-types.h"
+#include "object-enchant/tr-types.h"
+#include "object-enchant/trc-types.h"
+#include "object/object-flags.h"
+#include "player/attack-defense-types.h"
+#include "player/avatar.h"
+#include "player/player-class.h"
+#include "player/player-race-types.h"
+#include "player/player-race.h"
+#include "player/player-status-table.h"
+#include "realm/realm-names-table.h"
+#include "realm/realm-song-numbers.h"
+#include "status/element-resistance.h"
+#include "term/screen-processor.h"
+#include "util/bit-flags-calculator.h"
+#include "player/player-status-flags.h"
+
+/*!
+ * @brief 自己分析処理(Nethackからのアイデア) / self-knowledge... idea from nethack.
+ * @return なし
+ * @details
+ * <pre>
+ * Useful for determining powers and
+ * resistences of items.  It saves the screen, clears it, then starts listing
+ * attributes, a screenful at a time.  (There are a LOT of attributes to
+ * list.  It will probably take 2 or 3 screens for a powerful character whose
+ * using several artifacts...) -CFT
+ *
+ * It is now a lot more efficient. -BEN-
+ *
+ * See also "identify_fully()".
+ *
+ * Use the "show_file()" method, perhaps.
+ * </pre>
+ */
+void self_knowledge(player_type *creature_ptr)
+{
+    int i = 0, j, k;
+
+    int v_nr = 0;
+    char v_string[8][128];
+    char s_string[6][128];
+
+    BIT_FLAGS flgs[TR_FLAG_SIZE];
+
+    object_type *o_ptr;
+
+    char Dummy[80];
+    char buf[2][80];
+
+    concptr info[220];
+
+    PLAYER_LEVEL plev = creature_ptr->lev;
+
+    int percent;
+
+    for (j = 0; j < TR_FLAG_SIZE; j++)
+        flgs[j] = 0L;
+
+    creature_ptr->knowledge |= (KNOW_STAT | KNOW_HPRATE);
+
+    strcpy(Dummy, "");
+
+    percent
+        = (int)(((long)creature_ptr->player_hp[PY_MAX_LEVEL - 1] * 200L) / (2 * creature_ptr->hitdie + ((PY_MAX_LEVEL - 1 + 3) * (creature_ptr->hitdie + 1))));
+
+    sprintf(Dummy, _("現在の体力ランク : %d/100", "Your current Life Rating is %d/100."), percent);
+    strcpy(buf[0], Dummy);
+    info[i++] = buf[0];
+    info[i++] = "";
+
+    chg_virtue(creature_ptr, V_KNOWLEDGE, 1);
+    chg_virtue(creature_ptr, V_ENLIGHTEN, 1);
+
+    /* Acquire item flags from equipment */
+    for (k = INVEN_RARM; k < INVEN_TOTAL; k++) {
+        u32b tflgs[TR_FLAG_SIZE];
+
+        o_ptr = &creature_ptr->inventory_list[k];
+        if (!o_ptr->k_idx)
+            continue;
+        object_flags(creature_ptr, o_ptr, tflgs);
+
+        /* Extract flags */
+        for (j = 0; j < TR_FLAG_SIZE; j++)
+            flgs[j] |= tflgs[j];
+    }
+
+    info[i++] = _("能力の最大値", "Limits of maximum stats");
+
+    for (v_nr = 0; v_nr < A_MAX; v_nr++) {
+        char stat_desc[80];
+
+        sprintf(stat_desc, "%s 18/%d", stat_names[v_nr], creature_ptr->stat_max_max[v_nr] - 18);
+
+        strcpy(s_string[v_nr], stat_desc);
+
+        info[i++] = s_string[v_nr];
+    }
+    info[i++] = "";
+
+    sprintf(Dummy, _("現在の属性 : %s(%ld)", "Your alignment : %s(%ld)"), your_alignment(creature_ptr), (long int)creature_ptr->align);
+    strcpy(buf[1], Dummy);
+    info[i++] = buf[1];
+    for (v_nr = 0; v_nr < 8; v_nr++) {
+        GAME_TEXT vir_name[20];
+        char vir_desc[80];
+        int tester = creature_ptr->virtues[v_nr];
+
+        strcpy(vir_name, virtue[(creature_ptr->vir_types[v_nr]) - 1]);
+
+        sprintf(vir_desc, _("おっと。%sの情報なし。", "Oops. No info about %s."), vir_name);
+        if (tester < -100)
+            sprintf(vir_desc, _("[%s]の対極 (%d)", "You are the polar opposite of %s (%d)."), vir_name, tester);
+        else if (tester < -80)
+            sprintf(vir_desc, _("[%s]の大敵 (%d)", "You are an arch-enemy of %s (%d)."), vir_name, tester);
+        else if (tester < -60)
+            sprintf(vir_desc, _("[%s]の強敵 (%d)", "You are a bitter enemy of %s (%d)."), vir_name, tester);
+        else if (tester < -40)
+            sprintf(vir_desc, _("[%s]の敵 (%d)", "You are an enemy of %s (%d)."), vir_name, tester);
+        else if (tester < -20)
+            sprintf(vir_desc, _("[%s]の罪者 (%d)", "You have sinned against %s (%d)."), vir_name, tester);
+        else if (tester < 0)
+            sprintf(vir_desc, _("[%s]の迷道者 (%d)", "You have strayed from the path of %s (%d)."), vir_name, tester);
+        else if (tester == 0)
+            sprintf(vir_desc, _("[%s]の中立者 (%d)", "You are neutral to %s (%d)."), vir_name, tester);
+        else if (tester < 20)
+            sprintf(vir_desc, _("[%s]の小徳者 (%d)", "You are somewhat virtuous in %s (%d)."), vir_name, tester);
+        else if (tester < 40)
+            sprintf(vir_desc, _("[%s]の中徳者 (%d)", "You are virtuous in %s (%d)."), vir_name, tester);
+        else if (tester < 60)
+            sprintf(vir_desc, _("[%s]の高徳者 (%d)", "You are very virtuous in %s (%d)."), vir_name, tester);
+        else if (tester < 80)
+            sprintf(vir_desc, _("[%s]の覇者 (%d)", "You are a champion of %s (%d)."), vir_name, tester);
+        else if (tester < 100)
+            sprintf(vir_desc, _("[%s]の偉大な覇者 (%d)", "You are a great champion of %s (%d)."), vir_name, tester);
+        else
+            sprintf(vir_desc, _("[%s]の具現者 (%d)", "You are the living embodiment of %s (%d)."), vir_name, tester);
+
+        strcpy(v_string[v_nr], vir_desc);
+
+        info[i++] = v_string[v_nr];
+    }
+    info[i++] = "";
+
+    /* Racial powers... */
+    if (creature_ptr->mimic_form) {
+        switch (creature_ptr->mimic_form) {
+        case MIMIC_DEMON:
+        case MIMIC_DEMON_LORD:
+            sprintf(Dummy, _("あなたは %d ダメージの地獄か火炎のブレスを吐くことができる。(%d MP)", "You can nether breathe, dam. %d (cost %d)."), 3 * plev,
+                10 + plev / 3);
+
+            info[i++] = Dummy;
+            break;
+        case MIMIC_VAMPIRE:
+            if (plev > 1) {
+                sprintf(Dummy, _("あなたは敵から %d-%d HP の生命力を吸収できる。(%d MP)", "You can steal life from a foe, dam. %d-%d (cost %d)."),
+                    plev + MAX(1, plev / 10), plev + plev * MAX(1, plev / 10), 1 + (plev / 3));
+                info[i++] = Dummy;
+            }
+            break;
+        }
+    } else {
+        switch (creature_ptr->prace) {
+        case RACE_NIBELUNG:
+        case RACE_DWARF:
+            if (plev > 4)
+                info[i++] = _("あなたは罠とドアと階段を感知できる。(5 MP)", "You can find traps, doors and stairs (cost 5).");
+            break;
+        case RACE_HOBBIT:
+            if (plev > 14) {
+                info[i++] = _("あなたは食料を生成できる。(10 MP)", "You can produce food (cost 10).");
+            }
+            break;
+        case RACE_GNOME:
+            if (plev > 4) {
+                sprintf(Dummy, _("あなたは範囲 %d 以内にテレポートできる。(%d MP)", "You can teleport, range %d (cost %d)."), (1 + plev), (5 + (plev / 5)));
+                info[i++] = Dummy;
+            }
+            break;
+        case RACE_HALF_ORC:
+            if (plev > 2)
+                info[i++] = _("あなたは恐怖を除去できる。(5 MP)", "You can remove fear (cost 5).");
+            break;
+        case RACE_HALF_TROLL:
+            if (plev > 9)
+                info[i++] = _("あなたは狂暴化することができる。(12 MP) ", "You can enter a berserk fury (cost 12).");
+            break;
+        case RACE_AMBERITE:
+            if (plev > 29)
+                info[i++] = _("あなたはシャドウシフトすることができる。(50 MP)", "You can Shift Shadows (cost 50).");
+
+            if (plev > 39)
+                info[i++] = _("あなたは「パターン」を心に描いて歩くことができる。(75 MP)", "You can mentally Walk the Pattern (cost 75).");
+
+            break;
+        case RACE_BARBARIAN:
+            if (plev > 7)
+                info[i++] = _("あなたは狂暴化することができる。(10 MP) ", "You can enter a berserk fury (cost 10).");
+
+            break;
+        case RACE_HALF_OGRE:
+            if (plev > 24)
+                info[i++] = _("あなたは爆発のルーンを仕掛けることができる。(35 MP)", "You can set an Explosive Rune (cost 35).");
+
+            break;
+        case RACE_HALF_GIANT:
+            if (plev > 19)
+                info[i++] = _("あなたは石の壁を壊すことができる。(10 MP)", "You can break stone walls (cost 10).");
+            break;
+        case RACE_HALF_TITAN:
+            if (plev > 34)
+                info[i++] = _("あなたはモンスターをスキャンすることができる。(20 MP)", "You can probe monsters (cost 20).");
+            break;
+        case RACE_CYCLOPS:
+            if (plev > 19) {
+                sprintf(Dummy, _("あなたは %d ダメージの岩石を投げることができる。(15 MP)", "You can throw a boulder, dam. %d (cost 15)."), 3 * plev);
+                info[i++] = Dummy;
+            }
+            break;
+        case RACE_YEEK:
+            if (plev > 14)
+                info[i++] = _("あなたは恐怖を呼び起こす叫び声を発することができる。(15 MP)", "You can make a terrifying scream (cost 15).");
+            break;
+        case RACE_KLACKON:
+            if (plev > 8) {
+                sprintf(Dummy, _("あなたは %d ダメージの酸を吹きかけることができる。(9 MP)", "You can spit acid, dam. %d (cost 9)."), plev);
+                info[i++] = Dummy;
+            }
+            break;
+        case RACE_KOBOLD:
+            if (plev > 11) {
+                sprintf(Dummy, _("あなたは %d ダメージの毒矢を投げることができる。(8 MP)", "You can throw a dart of poison, dam. %d (cost 8)."), plev);
+                info[i++] = Dummy;
+            }
+            break;
+        case RACE_DARK_ELF:
+            if (plev > 1) {
+                sprintf(Dummy, _("あなたは %d ダメージのマジック・ミサイルの呪文を使える。(2 MP)", "You can cast a Magic Missile, dam %d (cost 2)."),
+                    (3 + ((plev - 1) / 5)));
+                info[i++] = Dummy;
+            }
+            break;
+        case RACE_DRACONIAN:
+            sprintf(Dummy, _("あなたは %d ダメージのブレスを吐くことができる。(%d MP)", "You can breathe, dam. %d (cost %d)."), 2 * plev, plev);
+            info[i++] = Dummy;
+            break;
+        case RACE_MIND_FLAYER:
+            if (plev > 14)
+                sprintf(Dummy, _("あなたは %d ダメージの精神攻撃をすることができる。(12 MP)", "You can mind blast your enemies, dam %d (cost 12)."), plev);
+            info[i++] = Dummy;
+            break;
+        case RACE_IMP:
+            if (plev > 29) {
+                sprintf(Dummy, _("あなたは %d ダメージのファイア・ボールの呪文を使える。(15 MP)", "You can cast a Fire Ball, dam. %d (cost 15)."), plev);
+                info[i++] = Dummy;
+            } else if (plev > 8) {
+                sprintf(Dummy, _("あなたは %d ダメージのファイア・ボルトの呪文を使える。(15 MP)", "You can cast a Fire Bolt, dam. %d (cost 15)."), plev);
+                info[i++] = Dummy;
+            }
+            break;
+        case RACE_GOLEM:
+            if (plev > 19)
+                info[i++] = _("あなたは d20+30 ターンの間肌を石に変化させられる。(15 MP)", "You can turn your skin to stone, dur d20+30 (cost 15).");
+            break;
+        case RACE_ZOMBIE:
+        case RACE_SKELETON:
+            if (plev > 29)
+                info[i++] = _("あなたは失った経験値を回復することができる。(30 MP)", "You can restore lost experience (cost 30).");
+            break;
+        case RACE_VAMPIRE:
+            if (plev > 1) {
+                sprintf(Dummy, _("あなたは敵から %d-%d HP の生命力を吸収できる。(%d MP)", "You can steal life from a foe, dam. %d-%d (cost %d)."),
+                    plev + MAX(1, plev / 10), plev + plev * MAX(1, plev / 10), 1 + (plev / 3));
+                info[i++] = Dummy;
+            }
+            break;
+        case RACE_SPECTRE:
+            if (plev > 3) {
+                info[i++] = _("あなたは泣き叫んで敵を恐怖させることができる。(3 MP)", "You can wail to terrify your enemies (cost 3).");
+            }
+            break;
+        case RACE_SPRITE:
+            if (plev > 11) {
+                info[i++] = _("あなたは敵を眠らせる魔法の粉を投げることができる。(12 MP)", "You can throw magical dust which induces sleep (cost 12).");
+            }
+            break;
+        case RACE_BALROG:
+            sprintf(Dummy, _("あなたは %d ダメージの地獄か火炎のブレスを吐くことができる。(%d MP)", "You can breathe nether, dam. %d (cost %d)."), 3 * plev,
+                10 + plev / 3);
+
+            info[i++] = Dummy;
+            break;
+        case RACE_KUTAR:
+            if (plev > 19)
+                info[i++] = _("あなたは d20+30 ターンの間横に伸びることができる。(15 MP)", "You can expand horizontally, dur d20+30 (cost 15).");
+            break;
+        case RACE_ANDROID:
+            if (plev < 10)
+                sprintf(
+                    Dummy, _("あなたは %d ダメージのレイガンを撃つことができる。(7 MP)", "You can fire a ray gun with damage %d (cost 7)."), (plev + 1) / 2);
+            else if (plev < 25)
+                sprintf(Dummy, _("あなたは %d ダメージのブラスターを撃つことができる。(13 MP)", "You can fire a blaster with damage %d (cost 13)."), plev);
+            else if (plev < 35)
+                sprintf(Dummy, _("あなたは %d ダメージのバズーカを撃つことができる。(26 MP)", "You can fire a bazooka with damage %d (cost 26)."), plev * 2);
+            else if (plev < 45)
+                sprintf(Dummy, _("あなたは %d ダメージのビームキャノンを撃つことができる。(40 MP)", "You can fire a beam cannon with damage %d (cost 40)."),
+                    plev * 2);
+            else
+                sprintf(Dummy, _("あなたは %d ダメージのロケットを撃つことができる。(60 MP)", "You can fire a rocket with damage %d (cost 60)."), plev * 5);
+
+            info[i++] = Dummy;
+            break;
+        default:
+            break;
+        }
+    }
+
+    switch (creature_ptr->pclass) {
+    case CLASS_WARRIOR:
+        if (plev > 39) {
+            info[i++] = _("あなたはランダムな方向に対して数回攻撃することができる。(75 MP)", "You can attack some random directions simultaneously (cost 75).");
+        }
+        break;
+    case CLASS_HIGH_MAGE:
+        if (creature_ptr->realm1 == REALM_HEX)
+            break;
+        /* Fall through */
+    case CLASS_MAGE:
+    case CLASS_SORCERER:
+        if (plev > 24) {
+            info[i++] = _("あなたはアイテムの魔力を吸収することができる。(1 MP)", "You can absorb charges from an item (cost 1).");
+        }
+        break;
+    case CLASS_PRIEST:
+        if (is_good_realm(creature_ptr->realm1)) {
+            if (plev > 34) {
+                info[i++] = _("あなたは武器を祝福することができる。(70 MP)", "You can bless a weapon (cost 70).");
+            }
+        } else {
+            if (plev > 41) {
+                info[i++] = _("あなたは周りのすべてのモンスターを攻撃することができる。(40 MP)", "You can damage all monsters in sight (cost 40).");
+            }
+        }
+        break;
+    case CLASS_ROGUE:
+        if (plev > 7) {
+            info[i++] = _("あなたは攻撃して即座に逃げることができる。(12 MP)", "You can hit a monster and teleport away simultaneously (cost 12).");
+        }
+        break;
+    case CLASS_RANGER:
+        if (plev > 14) {
+            info[i++] = _("あなたは怪物を調査することができる。(20 MP)", "You can probe monsters (cost 20).");
+        }
+        break;
+    case CLASS_PALADIN:
+        if (is_good_realm(creature_ptr->realm1)) {
+            if (plev > 29) {
+                info[i++] = _("あなたは聖なる槍を放つことができる。(30 MP)", "You can fire a holy spear (cost 30).");
+            }
+        } else {
+            if (plev > 29) {
+                info[i++] = _("あなたは生命力を減少させる槍を放つことができる。(30 MP)", "You can fire a spear which drains vitality (cost 30).");
+            }
+        }
+        break;
+    case CLASS_WARRIOR_MAGE:
+        if (plev > 24) {
+            info[i++] = _("あなたはHPをMPに変換することができる。(0 MP)", "You can convert HP to SP (cost 0).");
+            info[i++] = _("あなたはMPをHPに変換することができる。(0 MP)", "You can convert SP to HP (cost 0).");
+        }
+        break;
+    case CLASS_CHAOS_WARRIOR:
+        if (plev > 39) {
+            info[i++] = _("あなたは周囲に怪物を惑わす光を発生させることができる。(50 MP)", "You can radiate light which confuses nearby monsters (cost 50).");
+        }
+        break;
+    case CLASS_MONK:
+        if (plev > 24) {
+            info[i++] = _("あなたは構えることができる。(0 MP)", "You can assume a special stance (cost 0).");
+        }
+        if (plev > 29) {
+            info[i++] = _("あなたは通常の2倍の攻撃を行うことができる。(30 MP)", "You can perform two attacks at the same time (cost 30).");
+        }
+        break;
+    case CLASS_MINDCRAFTER:
+    case CLASS_FORCETRAINER:
+        if (plev > 14) {
+            info[i++] = _("あなたは精神を集中してMPを回復させることができる。(0 MP)", "You can concentrate to regenerate your mana (cost 0).");
+        }
+        break;
+    case CLASS_TOURIST:
+        info[i++] = _("あなたは写真を撮影することができる。(0 MP)", "You can take a photograph (cost 0).");
+        if (plev > 24) {
+            info[i++] = _("あなたはアイテムを完全に鑑定することができる。(20 MP)", "You can *identify* items (cost 20).");
+        }
+        break;
+    case CLASS_IMITATOR:
+        if (plev > 29) {
+            info[i++] = _("あなたは怪物の特殊攻撃をダメージ2倍でまねることができる。(100 MP)",
+                "You can imitate monster's special attacks with double damage (cost 100).");
+        }
+        break;
+    case CLASS_BEASTMASTER:
+        info[i++] = _("あなたは1体の生命のあるモンスターを支配することができる。(レベル/4 MP)", "You can dominate a monster (cost level/4).");
+        if (plev > 29) {
+            info[i++] = _("あなたは視界内の生命のあるモンスターを支配することができる。((レベル+20)/2 MP)",
+                "You can dominate living monsters in sight (cost (level+20)/4).");
+        }
+        break;
+    case CLASS_MAGIC_EATER:
+        info[i++] = _("あなたは杖/魔法棒/ロッドの魔力を自分のものにすることができる。", "You can absorb a staff, wand or rod itself.");
+        break;
+    case CLASS_RED_MAGE:
+        if (plev > 47) {
+            info[i++] = _("あなたは1ターンに2回魔法を唱えることができる。(20 MP)", "You can cast two spells simultaneously (cost 20).");
+        }
+        break;
+    case CLASS_SAMURAI: {
+        info[i++] = _("あなたは精神を集中して気合いを溜めることができる。", "You can concentrate to regenerate your mana.");
+    }
+        if (plev > 24) {
+            info[i++] = _("あなたは特殊な型で構えることができる。", "You can assume a special stance.");
+        }
+        break;
+    case CLASS_BLUE_MAGE:
+        info[i++] = _("あなたは相手に使われた魔法を学ぶことができる。", "You can study spells which your enemy casts on you.");
+        break;
+    case CLASS_CAVALRY:
+        if (plev > 9) {
+            info[i++] = _("あなたはモンスターに乗って無理矢理ペットにすることができる。", "You can ride on a hostile monster to forcibly turn it into a pet.");
+        }
+        break;
+    case CLASS_BERSERKER:
+        if (plev > 9) {
+            info[i++] = _("あなたは街とダンジョンの間を行き来することができる。", "You can travel between town and the depths.");
+        }
+        break;
+    case CLASS_MIRROR_MASTER:
+        info[i++] = _("あなたは鏡を作り出すことができる。(2 MP)", "You can create a Mirror (cost 2).");
+        info[i++] = _("あなたは鏡を割ることができる。(0 MP)", "You can break distant Mirrors (cost 0).");
+        break;
+    case CLASS_NINJA:
+        if (plev > 19) {
+            info[i++] = _("あなたは素早く移動することができる。", "You can walk extremely fast.");
+        }
+        break;
+    }
+
+    if (creature_ptr->muta1) {
+        if (creature_ptr->muta1 & MUT1_SPIT_ACID) {
+            info[i++] = _("あなたは酸を吹きかけることができる。(ダメージ レベルX1)", "You can spit acid (dam lvl).");
+        }
+        if (creature_ptr->muta1 & MUT1_BR_FIRE) {
+            info[i++] = _("あなたは炎のブレスを吐くことができる。(ダメージ レベルX2)", "You can breathe fire (dam lvl * 2).");
+        }
+        if (creature_ptr->muta1 & MUT1_HYPN_GAZE) {
+            info[i++] = _("あなたの睨みは催眠効果をもつ。", "Your gaze is hypnotic.");
+        }
+        if (creature_ptr->muta1 & MUT1_TELEKINES) {
+            info[i++] = _("あなたは念動力をもっている。", "You are telekinetic.");
+        }
+        if (creature_ptr->muta1 & MUT1_VTELEPORT) {
+            info[i++] = _("あなたは自分の意思でテレポートできる。", "You can teleport at will.");
+        }
+        if (creature_ptr->muta1 & MUT1_MIND_BLST) {
+            info[i++] = _("あなたは精神攻撃を行える。(ダメージ 3~12d3)", "You can Mind Blast your enemies (3 to 12d3 dam).");
+        }
+        if (creature_ptr->muta1 & MUT1_RADIATION) {
+            info[i++] = _("あなたは自分の意思で強い放射線を発生することができる。(ダメージ レベルX2)", "You can emit hard radiation at will (dam lvl * 2).");
+        }
+        if (creature_ptr->muta1 & MUT1_VAMPIRISM) {
+            info[i++] = _("あなたは吸血鬼のように敵から生命力を吸収することができる。(ダメージ レベルX2)",
+                "Like a vampire, you can drain life from a foe (dam lvl * 2).");
+        }
+        if (creature_ptr->muta1 & MUT1_SMELL_MET) {
+            info[i++] = _("あなたは近くにある貴金属をかぎ分けることができる。", "You can smell nearby precious metal.");
+        }
+        if (creature_ptr->muta1 & MUT1_SMELL_MON) {
+            info[i++] = _("あなたは近くのモンスターの存在をかぎ分けることができる。", "You can smell nearby monsters.");
+        }
+        if (creature_ptr->muta1 & MUT1_BLINK) {
+            info[i++] = _("あなたは短い距離をテレポートできる。", "You can teleport yourself short distances.");
+        }
+        if (creature_ptr->muta1 & MUT1_EAT_ROCK) {
+            info[i++] = _("あなたは硬い岩を食べることができる。", "You can consume solid rock.");
+        }
+        if (creature_ptr->muta1 & MUT1_SWAP_POS) {
+            info[i++] = _("あなたは他の者と場所を入れ替わることができる。", "You can switch locations with another being.");
+        }
+        if (creature_ptr->muta1 & MUT1_SHRIEK) {
+            info[i++] = _("あなたは身の毛もよだつ叫び声を発することができる。(ダメージ レベルX2)", "You can emit a horrible shriek (dam 2 * lvl).");
+        }
+        if (creature_ptr->muta1 & MUT1_ILLUMINE) {
+            info[i++] = _("あなたは明るい光を放つことができる。", "You can emit bright light.");
+        }
+        if (creature_ptr->muta1 & MUT1_DET_CURSE) {
+            info[i++] = _("あなたは邪悪な魔法の危険を感じとることができる。", "You can feel the danger of evil magic.");
+        }
+        if (creature_ptr->muta1 & MUT1_BERSERK) {
+            info[i++] = _("あなたは自分の意思で狂乱戦闘状態になることができる。", "You can drive yourself into a berserk frenzy.");
+        }
+        if (creature_ptr->muta1 & MUT1_POLYMORPH) {
+            info[i++] = _("あなたは自分の意志で変化できる。", "You can polymorph yourself at will.");
+        }
+        if (creature_ptr->muta1 & MUT1_MIDAS_TCH) {
+            info[i++] = _("あなたは通常アイテムを金に変えることができる。", "You can turn ordinary items to gold.");
+        }
+        if (creature_ptr->muta1 & MUT1_GROW_MOLD) {
+            info[i++] = _("あなたは周囲にキノコを生やすことができる。", "You can cause mold to grow near you.");
+        }
+        if (creature_ptr->muta1 & MUT1_RESIST) {
+            info[i++] = _("あなたは元素の攻撃に対して身を硬くすることができる。", "You can harden yourself to the ravages of the elements.");
+        }
+        if (creature_ptr->muta1 & MUT1_EARTHQUAKE) {
+            info[i++] = _("あなたは周囲のダンジョンを崩壊させることができる。", "You can bring down the dungeon around your ears.");
+        }
+        if (creature_ptr->muta1 & MUT1_EAT_MAGIC) {
+            info[i++] = _("あなたは魔法のエネルギーを自分の物として使用できる。", "You can consume magic energy for your own use.");
+        }
+        if (creature_ptr->muta1 & MUT1_WEIGH_MAG) {
+            info[i++] = _("あなたは自分に影響を与える魔法の力を感じることができる。", "You can feel the strength of the magics affecting you.");
+        }
+        if (creature_ptr->muta1 & MUT1_STERILITY) {
+            info[i++] = _("あなたは集団的生殖不能を起こすことができる。", "You can cause mass impotence.");
+        }
+        if (creature_ptr->muta1 & MUT1_HIT_AND_AWAY) {
+            info[i++] = _("あなたは攻撃した後身を守るため逃げることができる。", "You can run for your life after hitting something.");
+        }
+        if (creature_ptr->muta1 & MUT1_DAZZLE) {
+            info[i++] = _("あなたは混乱と盲目を引き起こす放射能を発生することができる。 ", "You can emit confusing, blinding radiation.");
+        }
+        if (creature_ptr->muta1 & MUT1_LASER_EYE) {
+            info[i++] = _("あなたは目からレーザー光線を発することができる。(ダメージ レベルX2)", "Your eyes can fire laser beams (dam 2 * lvl).");
+        }
+        if (creature_ptr->muta1 & MUT1_RECALL) {
+            info[i++] = _("あなたは街とダンジョンの間を行き来することができる。", "You can travel between town and the depths.");
+        }
+        if (creature_ptr->muta1 & MUT1_BANISH) {
+            info[i++] = _("あなたは邪悪なモンスターを地獄に落とすことができる。", "You can send evil creatures directly to Hell.");
+        }
+        if (creature_ptr->muta1 & MUT1_COLD_TOUCH) {
+            info[i++] = _("あなたは敵を触って凍らせることができる。(ダメージ レベルX3)", "You can freeze things with a touch (dam 3 * lvl).");
+        }
+        if (creature_ptr->muta1 & MUT1_LAUNCHER) {
+            info[i++] = _("あなたはアイテムを力強く投げることができる。", "You can hurl objects with great force.");
+        }
+    }
+
+    if (creature_ptr->muta2) {
+        if (creature_ptr->muta2 & MUT2_BERS_RAGE) {
+            info[i++] = _("あなたは狂戦士化の発作を起こす。", "You are subject to berserker fits.");
+        }
+        if (creature_ptr->muta2 & MUT2_COWARDICE) {
+            info[i++] = _("あなたは時々臆病になる。", "You are subject to cowardice.");
+        }
+        if (creature_ptr->muta2 & MUT2_RTELEPORT) {
+            info[i++] = _("あなたはランダムにテレポートする。", "You may randomly teleport.");
+        }
+        if (creature_ptr->muta2 & MUT2_ALCOHOL) {
+            info[i++] = _("あなたの体はアルコールを分泌する。", "Your body produces alcohol.");
+        }
+        if (creature_ptr->muta2 & MUT2_HALLU) {
+            info[i++] = _("あなたは幻覚を引き起こす精神錯乱に侵されている。", "You have a hallucinatory insanity.");
+        }
+        if (creature_ptr->muta2 & MUT2_FLATULENT) {
+            info[i++] = _("あなたは制御できない強烈な屁をこく。", "You are subject to uncontrollable flatulence.");
+        }
+        if (creature_ptr->muta2 & MUT2_PROD_MANA) {
+            info[i++] = _("あなたは制御不能な魔法のエネルギーを発している。", "You produce magical energy uncontrollably.");
+        }
+        if (creature_ptr->muta2 & MUT2_ATT_DEMON) {
+            info[i++] = _("あなたはデーモンを引きつける。", "You attract demons.");
+        }
+        if (creature_ptr->muta2 & MUT2_SCOR_TAIL) {
+            info[i++] = _("あなたはサソリの尻尾が生えている。(毒、ダメージ 3d7)", "You have a scorpion tail (poison, 3d7).");
+        }
+        if (creature_ptr->muta2 & MUT2_HORNS) {
+            info[i++] = _("あなたは角が生えている。(ダメージ 2d6)", "You have horns (dam. 2d6).");
+        }
+        if (creature_ptr->muta2 & MUT2_BEAK) {
+            info[i++] = _("あなたはクチバシが生えている。(ダメージ 2d4)", "You have a beak (dam. 2d4).");
+        }
+        if (creature_ptr->muta2 & MUT2_SPEED_FLUX) {
+            info[i++] = _("あなたはランダムに早く動いたり遅く動いたりする。", "You move faster or slower randomly.");
+        }
+        if (creature_ptr->muta2 & MUT2_BANISH_ALL) {
+            info[i++] = _("あなたは時々近くのモンスターを消滅させる。", "You sometimes cause nearby creatures to vanish.");
+        }
+        if (creature_ptr->muta2 & MUT2_EAT_LIGHT) {
+            info[i++] = _("あなたは時々周囲の光を吸収して栄養にする。", "You sometimes feed off of the light around you.");
+        }
+        if (creature_ptr->muta2 & MUT2_TRUNK) {
+            info[i++] = _("あなたは象のような鼻を持っている。(ダメージ 1d4)", "You have an elephantine trunk (dam 1d4).");
+        }
+        if (creature_ptr->muta2 & MUT2_ATT_ANIMAL) {
+            info[i++] = _("あなたは動物を引きつける。", "You attract animals.");
+        }
+        if (creature_ptr->muta2 & MUT2_TENTACLES) {
+            info[i++] = _("あなたは邪悪な触手を持っている。(ダメージ 2d5)", "You have evil looking tentacles (dam 2d5).");
+        }
+        if (creature_ptr->muta2 & MUT2_RAW_CHAOS) {
+            info[i++] = _("あなたはしばしば純カオスに包まれる。", "You occasionally are surrounded with raw chaos.");
+        }
+        if (creature_ptr->muta2 & MUT2_NORMALITY) {
+            info[i++] = _("あなたは変異していたが、回復してきている。", "You may be mutated, but you're recovering.");
+        }
+        if (creature_ptr->muta2 & MUT2_WRAITH) {
+            info[i++] = _("あなたの肉体は幽体化したり実体化したりする。", "You fade in and out of physical reality.");
+        }
+        if (creature_ptr->muta2 & MUT2_POLY_WOUND) {
+            info[i++] = _("あなたの健康はカオスの力に影響を受ける。", "Your health is subject to chaotic forces.");
+        }
+        if (creature_ptr->muta2 & MUT2_WASTING) {
+            info[i++] = _("あなたは衰弱する恐ろしい病気にかかっている。", "You have a horrible wasting disease.");
+        }
+        if (creature_ptr->muta2 & MUT2_ATT_DRAGON) {
+            info[i++] = _("あなたはドラゴンを引きつける。", "You attract dragons.");
+        }
+        if (creature_ptr->muta2 & MUT2_WEIRD_MIND) {
+            info[i++] = _("あなたの精神はランダムに拡大したり縮小したりしている。", "Your mind randomly expands and contracts.");
+        }
+        if (creature_ptr->muta2 & MUT2_NAUSEA) {
+            info[i++] = _("あなたの胃は非常に落ち着きがない。", "You have a seriously upset stomach.");
+        }
+        if (creature_ptr->muta2 & MUT2_CHAOS_GIFT) {
+            info[i++] = _("あなたはカオスの守護悪魔から褒美をうけとる。", "Chaos deities give you gifts.");
+        }
+        if (creature_ptr->muta2 & MUT2_WALK_SHAD) {
+            info[i++] = _("あなたはしばしば他の「影」に迷い込む。", "You occasionally stumble into other shadows.");
+        }
+        if (creature_ptr->muta2 & MUT2_WARNING) {
+            info[i++] = _("あなたは敵に関する警告を感じる。", "You receive warnings about your foes.");
+        }
+        if (creature_ptr->muta2 & MUT2_INVULN) {
+            info[i++] = _("あなたは時々負け知らずな気分になる。", "You occasionally feel invincible.");
+        }
+        if (creature_ptr->muta2 & MUT2_SP_TO_HP) {
+            info[i++] = _("あなたは時々血が筋肉にどっと流れる。", "Your blood sometimes rushes to your muscles.");
+        }
+        if (creature_ptr->muta2 & MUT2_HP_TO_SP) {
+            info[i++] = _("あなたは時々頭に血がどっと流れる。", "Your blood sometimes rushes to your head.");
+        }
+        if (creature_ptr->muta2 & MUT2_DISARM) {
+            info[i++] = _("あなたはよくつまづいて物を落とす。", "You occasionally stumble and drop things.");
+        }
+    }
+
+    if (creature_ptr->muta3) {
+        if (creature_ptr->muta3 & MUT3_HYPER_STR) {
+            info[i++] = _("あなたは超人的に強い。(腕力+4)", "You are superhumanly strong (+4 STR).");
+        }
+        if (creature_ptr->muta3 & MUT3_PUNY) {
+            info[i++] = _("あなたは虚弱だ。(腕力-4)", "You are puny (-4 STR).");
+        }
+        if (creature_ptr->muta3 & MUT3_HYPER_INT) {
+            info[i++] = _("あなたの脳は生体コンピュータだ。(知能&賢さ+4)", "Your brain is a living computer (+4 INT/WIS).");
+        }
+        if (creature_ptr->muta3 & MUT3_MORONIC) {
+            info[i++] = _("あなたは精神薄弱だ。(知能&賢さ-4)", "You are moronic (-4 INT/WIS).");
+        }
+        if (creature_ptr->muta3 & MUT3_RESILIENT) {
+            info[i++] = _("あなたは非常にタフだ。(耐久+4)", "You are very resilient (+4 CON).");
+        }
+        if (creature_ptr->muta3 & MUT3_XTRA_FAT) {
+            info[i++] = _("あなたは極端に太っている。(耐久+2,スピード-2)", "You are extremely fat (+2 CON, -2 speed).");
+        }
+        if (creature_ptr->muta3 & MUT3_ALBINO) {
+            info[i++] = _("あなたはアルビノだ。(耐久-4)", "You are an albino (-4 CON).");
+        }
+        if (creature_ptr->muta3 & MUT3_FLESH_ROT) {
+            info[i++] = _("あなたの肉体は腐敗している。(耐久-2,魅力-1)", "Your flesh is rotting (-2 CON, -1 CHR).");
+        }
+        if (creature_ptr->muta3 & MUT3_SILLY_VOI) {
+            info[i++] = _("あなたの声は間抜けなキーキー声だ。(魅力-4)", "Your voice is a silly squeak (-4 CHR).");
+        }
+        if (creature_ptr->muta3 & MUT3_BLANK_FAC) {
+            info[i++] = _("あなたはのっぺらぼうだ。(魅力-1)", "Your face is featureless (-1 CHR).");
+        }
+        if (creature_ptr->muta3 & MUT3_ILL_NORM) {
+            info[i++] = _("あなたは幻影に覆われている。", "Your appearance is masked with illusion.");
+        }
+        if (creature_ptr->muta3 & MUT3_XTRA_EYES) {
+            info[i++] = _("あなたは余分に二つの目を持っている。(探索+15)", "You have an extra pair of eyes (+15 search).");
+        }
+        if (creature_ptr->muta3 & MUT3_MAGIC_RES) {
+            info[i++] = _("あなたは魔法への耐性をもっている。", "You are resistant to magic.");
+        }
+        if (creature_ptr->muta3 & MUT3_XTRA_NOIS) {
+            info[i++] = _("あなたは変な音を発している。(隠密-3)", "You make a lot of strange noise (-3 stealth).");
+        }
+        if (creature_ptr->muta3 & MUT3_INFRAVIS) {
+            info[i++] = _("あなたは素晴らしい赤外線視力を持っている。(+3)", "You have remarkable infravision (+3).");
+        }
+        if (creature_ptr->muta3 & MUT3_XTRA_LEGS) {
+            info[i++] = _("あなたは余分に二本の足が生えている。(加速+3)", "You have an extra pair of legs (+3 speed).");
+        }
+        if (creature_ptr->muta3 & MUT3_SHORT_LEG) {
+            info[i++] = _("あなたの足は短い突起だ。(加速-3)", "Your legs are short stubs (-3 speed).");
+        }
+        if (creature_ptr->muta3 & MUT3_ELEC_TOUC) {
+            info[i++] = _("あなたの血管には電流が流れている。", "Electricity is running through your veins.");
+        }
+        if (creature_ptr->muta3 & MUT3_FIRE_BODY) {
+            info[i++] = _("あなたの体は炎につつまれている。", "Your body is enveloped in flames.");
+        }
+        if (creature_ptr->muta3 & MUT3_WART_SKIN) {
+            info[i++] = _("あなたの肌はイボに被われている。(魅力-2, AC+5)", "Your skin is covered with warts (-2 CHR, +5 AC).");
+        }
+        if (creature_ptr->muta3 & MUT3_SCALES) {
+            info[i++] = _("あなたの肌は鱗になっている。(魅力-1, AC+10)", "Your skin has turned into scales (-1 CHR, +10 AC).");
+        }
+        if (creature_ptr->muta3 & MUT3_IRON_SKIN) {
+            info[i++] = _("あなたの肌は鉄でできている。(器用-1, AC+25)", "Your skin is made of steel (-1 DEX, +25 AC).");
+        }
+        if (creature_ptr->muta3 & MUT3_WINGS) {
+            info[i++] = _("あなたは羽を持っている。", "You have wings.");
+        }
+        if (creature_ptr->muta3 & MUT3_FEARLESS) {
+            /* Unnecessary */
+        }
+        if (creature_ptr->muta3 & MUT3_REGEN) {
+            /* Unnecessary */
+        }
+        if (creature_ptr->muta3 & MUT3_ESP) {
+            /* Unnecessary */
+        }
+        if (creature_ptr->muta3 & MUT3_LIMBER) {
+            info[i++] = _("あなたの体は非常にしなやかだ。(器用+3)", "Your body is very limber (+3 DEX).");
+        }
+        if (creature_ptr->muta3 & MUT3_ARTHRITIS) {
+            info[i++] = _("あなたはいつも関節に痛みを感じている。(器用-3)", "Your joints ache constantly (-3 DEX).");
+        }
+        if (creature_ptr->muta3 & MUT3_VULN_ELEM) {
+            info[i++] = _("あなたは元素の攻撃に弱い。", "You are susceptible to damage from the elements.");
+        }
+        if (creature_ptr->muta3 & MUT3_MOTION) {
+            info[i++] = _("あなたの動作は正確で力強い。(隠密+1)", "Your movements are precise and forceful (+1 STL).");
+        }
+        if (have_good_luck(creature_ptr)) {
+            info[i++] = _("あなたは白いオーラにつつまれている。", "There is a white aura surrounding you.");
+        }
+        if (creature_ptr->muta3 & MUT3_BAD_LUCK) {
+            info[i++] = _("あなたは黒いオーラにつつまれている。", "There is a black aura surrounding you.");
+        }
+    }
+
+    if (creature_ptr->blind) {
+        info[i++] = _("あなたは目が見えない。", "You cannot see.");
+    }
+    if (creature_ptr->confused) {
+        info[i++] = _("あなたは混乱している。", "You are confused.");
+    }
+    if (creature_ptr->afraid) {
+        info[i++] = _("あなたは恐怖に侵されている。", "You are terrified.");
+    }
+    if (creature_ptr->cut) {
+        info[i++] = _("あなたは出血している。", "You are bleeding.");
+    }
+    if (creature_ptr->stun) {
+        info[i++] = _("あなたはもうろうとしている。", "You are stunned.");
+    }
+    if (creature_ptr->poisoned) {
+        info[i++] = _("あなたは毒に侵されている。", "You are poisoned.");
+    }
+    if (creature_ptr->image) {
+        info[i++] = _("あなたは幻覚を見ている。", "You are hallucinating.");
+    }
+    if (creature_ptr->cursed & TRC_TY_CURSE) {
+        info[i++] = _("あなたは邪悪な怨念に包まれている。", "You carry an ancient foul curse.");
+    }
+    if (creature_ptr->cursed & TRC_AGGRAVATE) {
+        info[i++] = _("あなたはモンスターを怒らせている。", "You aggravate monsters.");
+    }
+    if (creature_ptr->cursed & TRC_DRAIN_EXP) {
+        info[i++] = _("あなたは経験値を吸われている。", "You occasionally lose experience for no reason.");
+    }
+    if (creature_ptr->cursed & TRC_SLOW_REGEN) {
+        info[i++] = _("あなたの回復力は非常に遅い。", "You regenerate slowly.");
+    }
+    if (creature_ptr->cursed & TRC_ADD_L_CURSE) {
+        info[i++] = _("あなたの弱い呪いは増える。", "Your weak curses multiply."); /* 暫定的 -- henkma */
+    }
+    if (creature_ptr->cursed & TRC_ADD_H_CURSE) {
+        info[i++] = _("あなたの強い呪いは増える。", "Your heavy curses multiply."); /* 暫定的 -- henkma */
+    }
+    if (creature_ptr->cursed & TRC_CALL_ANIMAL) {
+        info[i++] = _("あなたは動物に狙われている。", "You attract animals.");
+    }
+    if (creature_ptr->cursed & TRC_CALL_DEMON) {
+        info[i++] = _("あなたは悪魔に狙われている。", "You attract demons.");
+    }
+    if (creature_ptr->cursed & TRC_CALL_DRAGON) {
+        info[i++] = _("あなたはドラゴンに狙われている。", "You attract dragons.");
+    }
+    if (creature_ptr->cursed & TRC_COWARDICE) {
+        info[i++] = _("あなたは時々臆病になる。", "You are subject to cowardice.");
+    }
+    if (creature_ptr->cursed & TRC_TELEPORT) {
+        info[i++] = _("あなたの位置はひじょうに不安定だ。", "Your position is very uncertain.");
+    }
+    if (creature_ptr->cursed & TRC_LOW_MELEE) {
+        info[i++] = _("あなたの武器は攻撃を外しやすい。", "Your weapon causes you to miss blows.");
+    }
+    if (creature_ptr->cursed & TRC_LOW_AC) {
+        info[i++] = _("あなたは攻撃を受けやすい。", "You are subject to be hit.");
+    }
+    if (creature_ptr->cursed & TRC_LOW_MAGIC) {
+        info[i++] = _("あなたは魔法を失敗しやすい。", "Your spells fail more frequently.");
+    }
+    if (creature_ptr->cursed & TRC_FAST_DIGEST) {
+        info[i++] = _("あなたはすぐお腹がへる。", "You have a good appetite.");
+    }
+    if (creature_ptr->cursed & TRC_DRAIN_HP) {
+        info[i++] = _("あなたは体力を吸われている。", "You occasionally lose hit points for no reason.");
+    }
+    if (creature_ptr->cursed & TRC_DRAIN_MANA) {
+        info[i++] = _("あなたは魔力を吸われている。", "You occasionally lose spell points for no reason.");
+    }
+    if (is_blessed(creature_ptr)) {
+        info[i++] = _("あなたは高潔さを感じている。", "You feel rightous.");
+    }
+    if (is_hero(creature_ptr)) {
+        info[i++] = _("あなたはヒーロー気分だ。", "You feel heroic.");
+    }
+    if (creature_ptr->shero) {
+        info[i++] = _("あなたは戦闘狂だ。", "You are in a battle rage.");
+    }
+    if (creature_ptr->protevil) {
+        info[i++] = _("あなたは邪悪なる存在から守られている。", "You are protected from evil.");
+    }
+    if (creature_ptr->shield) {
+        info[i++] = _("あなたは神秘のシールドで守られている。", "You are protected by a mystic shield.");
+    }
+    if (is_invuln(creature_ptr)) {
+        info[i++] = _("あなたは現在傷つかない。", "You are temporarily invulnerable.");
+    }
+    if (creature_ptr->wraith_form) {
+        info[i++] = _("あなたは一時的に幽体化している。", "You are temporarily incorporeal.");
+    }
+    if (creature_ptr->special_attack & ATTACK_CONFUSE) {
+        info[i++] = _("あなたの手は赤く輝いている。", "Your hands are glowing dull red.");
+    }
+    if (creature_ptr->special_attack & ATTACK_FIRE) {
+        info[i++] = _("あなたの手は火炎に覆われている。", "You can strike the enemy with flame.");
+    }
+    if (creature_ptr->special_attack & ATTACK_COLD) {
+        info[i++] = _("あなたの手は冷気に覆われている。", "You can strike the enemy with cold.");
+    }
+    if (creature_ptr->special_attack & ATTACK_ACID) {
+        info[i++] = _("あなたの手は酸に覆われている。", "You can strike the enemy with acid.");
+    }
+    if (creature_ptr->special_attack & ATTACK_ELEC) {
+        info[i++] = _("あなたの手は電撃に覆われている。", "You can strike the enemy with electoric shock.");
+    }
+    if (creature_ptr->special_attack & ATTACK_POIS) {
+        info[i++] = _("あなたの手は毒に覆われている。", "You can strike the enemy with poison.");
+    }
+    switch (creature_ptr->action) {
+    case ACTION_SEARCH:
+        info[i++] = _("あなたはひじょうに注意深く周囲を見渡している。", "You are looking around very carefully.");
+        break;
+    }
+    if (creature_ptr->new_spells) {
+        info[i++] = _("あなたは呪文や祈りを学ぶことができる。", "You can learn some spells/prayers.");
+    }
+    if (creature_ptr->word_recall) {
+        info[i++] = _("あなたはすぐに帰還するだろう。", "You will soon be recalled.");
+    }
+    if (creature_ptr->alter_reality) {
+        info[i++] = _("あなたはすぐにこの世界を離れるだろう。", "You will soon be altered.");
+    }
+    if (creature_ptr->see_infra) {
+        info[i++] = _("あなたの瞳は赤外線に敏感である。", "Your eyes are sensitive to infrared light.");
+    }
+    if (creature_ptr->see_inv) {
+        info[i++] = _("あなたは透明なモンスターを見ることができる。", "You can see invisible creatures.");
+    }
+    if (creature_ptr->levitation) {
+        info[i++] = _("あなたは飛ぶことができる。", "You can fly.");
+    }
+    if (creature_ptr->free_act) {
+        info[i++] = _("あなたは麻痺知らずの効果を持っている。", "You have free action.");
+    }
+    if (creature_ptr->regenerate) {
+        info[i++] = _("あなたは素早く体力を回復する。", "You regenerate quickly.");
+    }
+    if (creature_ptr->slow_digest) {
+        info[i++] = _("あなたは食欲が少ない。", "Your appetite is small.");
+    }
+    if (creature_ptr->telepathy) {
+        info[i++] = _("あなたはテレパシー能力を持っている。", "You have ESP.");
+    }
+    if (creature_ptr->esp_animal) {
+        info[i++] = _("あなたは自然界の生物の存在を感じる能力を持っている。", "You sense natural creatures.");
+    }
+    if (creature_ptr->esp_undead) {
+        info[i++] = _("あなたはアンデッドの存在を感じる能力を持っている。", "You sense undead.");
+    }
+    if (creature_ptr->esp_demon) {
+        info[i++] = _("あなたは悪魔の存在を感じる能力を持っている。", "You sense demons.");
+    }
+    if (creature_ptr->esp_orc) {
+        info[i++] = _("あなたはオークの存在を感じる能力を持っている。", "You sense orcs.");
+    }
+    if (creature_ptr->esp_troll) {
+        info[i++] = _("あなたはトロルの存在を感じる能力を持っている。", "You sense trolls.");
+    }
+    if (creature_ptr->esp_giant) {
+        info[i++] = _("あなたは巨人の存在を感じる能力を持っている。", "You sense giants.");
+    }
+    if (creature_ptr->esp_dragon) {
+        info[i++] = _("あなたはドラゴンの存在を感じる能力を持っている。", "You sense dragons.");
+    }
+    if (creature_ptr->esp_human) {
+        info[i++] = _("あなたは人間の存在を感じる能力を持っている。", "You sense humans.");
+    }
+    if (creature_ptr->esp_evil) {
+        info[i++] = _("あなたは邪悪な生き物の存在を感じる能力を持っている。", "You sense evil creatures.");
+    }
+    if (creature_ptr->esp_good) {
+        info[i++] = _("あなたは善良な生き物の存在を感じる能力を持っている。", "You sense good creatures.");
+    }
+    if (creature_ptr->esp_nonliving) {
+        info[i++] = _("あなたは活動する無生物体の存在を感じる能力を持っている。", "You sense non-living creatures.");
+    }
+    if (creature_ptr->esp_unique) {
+        info[i++] = _("あなたは特別な強敵の存在を感じる能力を持っている。", "You sense unique monsters.");
+    }
+    if (creature_ptr->hold_exp) {
+        info[i++] = _("あなたは自己の経験値をしっかりと維持する。", "You have a firm hold on your experience.");
+    }
+    if (creature_ptr->reflect) {
+        info[i++] = _("あなたは矢の呪文を反射する。", "You reflect bolt spells.");
+    }
+    if (creature_ptr->sh_fire) {
+        info[i++] = _("あなたは炎のオーラに包まれている。", "You are surrounded with a fiery aura.");
+    }
+    if (creature_ptr->sh_elec) {
+        info[i++] = _("あなたは電気に包まれている。", "You are surrounded with electricity.");
+    }
+    if (creature_ptr->sh_cold) {
+        info[i++] = _("あなたは冷気のオーラに包まれている。", "You are surrounded with an aura of coldness.");
+    }
+    if (creature_ptr->tim_sh_holy) {
+        info[i++] = _("あなたは聖なるオーラに包まれている。", "You are surrounded with a holy aura.");
+    }
+    if (creature_ptr->tim_sh_touki) {
+        info[i++] = _("あなたは闘気のオーラに包まれている。", "You are surrounded with an energy aura.");
+    }
+    if (creature_ptr->anti_magic) {
+        info[i++] = _("あなたは反魔法シールドに包まれている。", "You are surrounded by an anti-magic shell.");
+    }
+    if (creature_ptr->anti_tele) {
+        info[i++] = _("あなたはテレポートできない。", "You cannot teleport.");
+    }
+    if (creature_ptr->lite) {
+        info[i++] = _("あなたの身体は光っている。", "You are carrying a permanent light.");
+    }
+    if (creature_ptr->warning) {
+        info[i++] = _("あなたは行動の前に危険を察知することができる。", "You will be warned before dangerous actions.");
+    }
+    if (creature_ptr->dec_mana) {
+        info[i++] = _("あなたは少ない消費魔力で魔法を唱えることができる。", "You can cast spells with fewer mana points.");
+    }
+    if (creature_ptr->easy_spell) {
+        info[i++] = _("あなたは低い失敗率で魔法を唱えることができる。", "Fail rate of your magic is decreased.");
+    }
+    if (creature_ptr->heavy_spell) {
+        info[i++] = _("あなたは高い失敗率で魔法を唱えなければいけない。", "Fail rate of your magic is increased.");
+    }
+    if (creature_ptr->mighty_throw) {
+        info[i++] = _("あなたは強く物を投げる。", "You can throw objects powerfully.");
+    }
+
+    if (creature_ptr->immune_acid) {
+        info[i++] = _("あなたは酸に対する完全なる免疫を持っている。", "You are completely immune to acid.");
+    } else if (creature_ptr->resist_acid && is_oppose_acid(creature_ptr)) {
+        info[i++] = _("あなたは酸への強力な耐性を持っている。", "You resist acid exceptionally well.");
+    } else if (creature_ptr->resist_acid || is_oppose_acid(creature_ptr)) {
+        info[i++] = _("あなたは酸への耐性を持っている。", "You are resistant to acid.");
+    }
+
+    if (creature_ptr->immune_elec) {
+        info[i++] = _("あなたは電撃に対する完全なる免疫を持っている。", "You are completely immune to lightning.");
+    } else if (creature_ptr->resist_elec && is_oppose_elec(creature_ptr)) {
+        info[i++] = _("あなたは電撃への強力な耐性を持っている。", "You resist lightning exceptionally well.");
+    } else if (creature_ptr->resist_elec || is_oppose_elec(creature_ptr)) {
+        info[i++] = _("あなたは電撃への耐性を持っている。", "You are resistant to lightning.");
+    }
+
+    if (is_specific_player_race(creature_ptr, RACE_ANDROID) && !creature_ptr->immune_elec) {
+        info[i++] = _("あなたは電撃に弱い。", "You are susceptible to damage from lightning.");
+    }
+
+    if (creature_ptr->immune_fire) {
+        info[i++] = _("あなたは火に対する完全なる免疫を持っている。", "You are completely immune to fire.");
+    } else if (creature_ptr->resist_fire && is_oppose_fire(creature_ptr)) {
+        info[i++] = _("あなたは火への強力な耐性を持っている。", "You resist fire exceptionally well.");
+    } else if (creature_ptr->resist_fire || is_oppose_fire(creature_ptr)) {
+        info[i++] = _("あなたは火への耐性を持っている。", "You are resistant to fire.");
+    }
+
+    if (is_specific_player_race(creature_ptr, RACE_ENT) && !creature_ptr->immune_fire) {
+        info[i++] = _("あなたは火に弱い。", "You are susceptible to damage from fire.");
+    }
+
+    if (creature_ptr->immune_cold) {
+        info[i++] = _("あなたは冷気に対する完全なる免疫を持っている。", "You are completely immune to cold.");
+    } else if (creature_ptr->resist_cold && is_oppose_cold(creature_ptr)) {
+        info[i++] = _("あなたは冷気への強力な耐性を持っている。", "You resist cold exceptionally well.");
+    } else if (creature_ptr->resist_cold || is_oppose_cold(creature_ptr)) {
+        info[i++] = _("あなたは冷気への耐性を持っている。", "You are resistant to cold.");
+    }
+
+    if (creature_ptr->resist_pois && is_oppose_pois(creature_ptr)) {
+        info[i++] = _("あなたは毒への強力な耐性を持っている。", "You resist poison exceptionally well.");
+    } else if (creature_ptr->resist_pois || is_oppose_pois(creature_ptr)) {
+        info[i++] = _("あなたは毒への耐性を持っている。", "You are resistant to poison.");
+    }
+
+    if (creature_ptr->resist_lite) {
+        info[i++] = _("あなたは閃光への耐性を持っている。", "You are resistant to bright light.");
+    }
+
+    if (is_specific_player_race(creature_ptr, RACE_VAMPIRE) || is_specific_player_race(creature_ptr, RACE_S_FAIRY)
+        || (creature_ptr->mimic_form == MIMIC_VAMPIRE)) {
+        info[i++] = _("あなたは閃光に弱い。", "You are susceptible to damage from bright light.");
+    }
+
+    if (is_specific_player_race(creature_ptr, RACE_VAMPIRE) || (creature_ptr->mimic_form == MIMIC_VAMPIRE) || creature_ptr->wraith_form) {
+        info[i++] = _("あなたは暗黒に対する完全なる免疫を持っている。", "You are completely immune to darkness.");
+    }
+
+    else if (creature_ptr->resist_dark) {
+        info[i++] = _("あなたは暗黒への耐性を持っている。", "You are resistant to darkness.");
+    }
+    if (creature_ptr->resist_conf) {
+        info[i++] = _("あなたは混乱への耐性を持っている。", "You are resistant to confusion.");
+    }
+    if (creature_ptr->resist_sound) {
+        info[i++] = _("あなたは音波の衝撃への耐性を持っている。", "You are resistant to sonic attacks.");
+    }
+    if (creature_ptr->resist_disen) {
+        info[i++] = _("あなたは劣化への耐性を持っている。", "You are resistant to disenchantment.");
+    }
+    if (creature_ptr->resist_chaos) {
+        info[i++] = _("あなたはカオスの力への耐性を持っている。", "You are resistant to chaos.");
+    }
+    if (creature_ptr->resist_shard) {
+        info[i++] = _("あなたは破片の攻撃への耐性を持っている。", "You are resistant to blasts of shards.");
+    }
+    if (creature_ptr->resist_nexus) {
+        info[i++] = _("あなたは因果混乱の攻撃への耐性を持っている。", "You are resistant to nexus attacks.");
+    }
+
+    if (is_specific_player_race(creature_ptr, RACE_SPECTRE)) {
+        info[i++] = _("あなたは地獄の力を吸収できる。", "You can drain nether forces.");
+    } else if (creature_ptr->resist_neth) {
+        info[i++] = _("あなたは地獄の力への耐性を持っている。", "You are resistant to nether forces.");
+    }
+    if (creature_ptr->resist_fear) {
+        info[i++] = _("あなたは全く恐怖を感じない。", "You are completely fearless.");
+    }
+    if (creature_ptr->resist_blind) {
+        info[i++] = _("あなたの目は盲目への耐性を持っている。", "Your eyes are resistant to blindness.");
+    }
+    if (creature_ptr->resist_time) {
+        info[i++] = _("あなたは時間逆転への耐性を持っている。", "You are resistant to time.");
+    }
+
+    if (creature_ptr->sustain_str) {
+        info[i++] = _("あなたの腕力は維持されている。", "Your strength is sustained.");
+    }
+    if (creature_ptr->sustain_int) {
+        info[i++] = _("あなたの知能は維持されている。", "Your intelligence is sustained.");
+    }
+    if (creature_ptr->sustain_wis) {
+        info[i++] = _("あなたの賢さは維持されている。", "Your wisdom is sustained.");
+    }
+    if (creature_ptr->sustain_con) {
+        info[i++] = _("あなたの耐久力は維持されている。", "Your constitution is sustained.");
+    }
+    if (creature_ptr->sustain_dex) {
+        info[i++] = _("あなたの器用さは維持されている。", "Your dexterity is sustained.");
+    }
+    if (creature_ptr->sustain_chr) {
+        info[i++] = _("あなたの魅力は維持されている。", "Your charisma is sustained.");
+    }
+
+    if (has_flag(flgs, TR_STR)) {
+        info[i++] = _("あなたの腕力は装備によって影響を受けている。", "Your strength is affected by your equipment.");
+    }
+    if (has_flag(flgs, TR_INT)) {
+        info[i++] = _("あなたの知能は装備によって影響を受けている。", "Your intelligence is affected by your equipment.");
+    }
+    if (has_flag(flgs, TR_WIS)) {
+        info[i++] = _("あなたの賢さは装備によって影響を受けている。", "Your wisdom is affected by your equipment.");
+    }
+    if (has_flag(flgs, TR_DEX)) {
+        info[i++] = _("あなたの器用さは装備によって影響を受けている。", "Your dexterity is affected by your equipment.");
+    }
+    if (has_flag(flgs, TR_CON)) {
+        info[i++] = _("あなたの耐久力は装備によって影響を受けている。", "Your constitution is affected by your equipment.");
+    }
+    if (has_flag(flgs, TR_CHR)) {
+        info[i++] = _("あなたの魅力は装備によって影響を受けている。", "Your charisma is affected by your equipment.");
+    }
+
+    if (has_flag(flgs, TR_STEALTH)) {
+        info[i++] = _("あなたの隠密行動能力は装備によって影響を受けている。", "Your stealth is affected by your equipment.");
+    }
+    if (has_flag(flgs, TR_SEARCH)) {
+        info[i++] = _("あなたの探索能力は装備によって影響を受けている。", "Your searching ability is affected by your equipment.");
+    }
+    if (has_flag(flgs, TR_INFRA)) {
+        info[i++] = _("あなたの赤外線視力は装備によって影響を受けている。", "Your infravision is affected by your equipment.");
+    }
+    if (has_flag(flgs, TR_TUNNEL)) {
+        info[i++] = _("あなたの採掘能力は装備によって影響を受けている。", "Your digging ability is affected by your equipment.");
+    }
+    if (has_flag(flgs, TR_SPEED)) {
+        info[i++] = _("あなたのスピードは装備によって影響を受けている。", "Your speed is affected by your equipment.");
+    }
+    if (has_flag(flgs, TR_BLOWS)) {
+        info[i++] = _("あなたの攻撃速度は装備によって影響を受けている。", "Your attack speed is affected by your equipment.");
+    }
+
+    /* Access the current weapon */
+    o_ptr = &creature_ptr->inventory_list[INVEN_RARM];
+
+    /* Analyze the weapon */
+    if (o_ptr->k_idx) {
+        /* Indicate Blessing */
+        if (has_flag(flgs, TR_BLESSED)) {
+            info[i++] = _("あなたの武器は神の祝福を受けている。", "Your weapon has been blessed by the gods.");
+        }
+
+        if (has_flag(flgs, TR_CHAOTIC)) {
+            info[i++] = _("あなたの武器はログルスの徴の属性をもつ。", "Your weapon is branded with the Sign of Logrus.");
+        }
+
+        if (has_flag(flgs, TR_IMPACT)) {
+            info[i++] = _("あなたの武器は打撃で地震を発生することができる。", "The impact of your weapon can cause earthquakes.");
+        }
+
+        if (has_flag(flgs, TR_VORPAL)) {
+            info[i++] = _("あなたの武器は非常に鋭い。", "Your weapon is very sharp.");
+        }
+
+        if (has_flag(flgs, TR_VAMPIRIC)) {
+            info[i++] = _("あなたの武器は敵から生命力を吸収する。", "Your weapon drains life from your foes.");
+        }
+
+        /* Special "Attack Bonuses" */
+        if (has_flag(flgs, TR_BRAND_ACID)) {
+            info[i++] = _("あなたの武器は敵を溶かす。", "Your weapon melts your foes.");
+        }
+        if (has_flag(flgs, TR_BRAND_ELEC)) {
+            info[i++] = _("あなたの武器は敵を感電させる。", "Your weapon shocks your foes.");
+        }
+        if (has_flag(flgs, TR_BRAND_FIRE)) {
+            info[i++] = _("あなたの武器は敵を燃やす。", "Your weapon burns your foes.");
+        }
+        if (has_flag(flgs, TR_BRAND_COLD)) {
+            info[i++] = _("あなたの武器は敵を凍らせる。", "Your weapon freezes your foes.");
+        }
+        if (has_flag(flgs, TR_BRAND_POIS)) {
+            info[i++] = _("あなたの武器は敵を毒で侵す。", "Your weapon poisons your foes.");
+        }
+
+        /* Special "slay" flags */
+        if (has_flag(flgs, TR_KILL_ANIMAL)) {
+            info[i++] = _("あなたの武器は動物の天敵である。", "Your weapon is a great bane of animals.");
+        } else if (has_flag(flgs, TR_SLAY_ANIMAL)) {
+            info[i++] = _("あなたの武器は動物に対して強い力を発揮する。", "Your weapon strikes at animals with extra force.");
+        }
+        if (has_flag(flgs, TR_KILL_EVIL)) {
+            info[i++] = _("あなたの武器は邪悪なる存在の天敵である。", "Your weapon is a great bane of evil.");
+        } else if (has_flag(flgs, TR_SLAY_EVIL)) {
+            info[i++] = _("あなたの武器は邪悪なる存在に対して強い力を発揮する。", "Your weapon strikes at evil with extra force.");
+        }
+        if (has_flag(flgs, TR_KILL_HUMAN)) {
+            info[i++] = _("あなたの武器は人間の天敵である。", "Your weapon is a great bane of humans.");
+        } else if (has_flag(flgs, TR_SLAY_HUMAN)) {
+            info[i++] = _("あなたの武器は人間に対して特に強い力を発揮する。", "Your weapon is especially deadly against humans.");
+        }
+        if (has_flag(flgs, TR_KILL_UNDEAD)) {
+            info[i++] = _("あなたの武器はアンデッドの天敵である。", "Your weapon is a great bane of undead.");
+        } else if (has_flag(flgs, TR_SLAY_UNDEAD)) {
+            info[i++] = _("あなたの武器はアンデッドに対して神聖なる力を発揮する。", "Your weapon strikes at undead with holy wrath.");
+        }
+        if (has_flag(flgs, TR_KILL_DEMON)) {
+            info[i++] = _("あなたの武器はデーモンの天敵である。", "Your weapon is a great bane of demons.");
+        } else if (has_flag(flgs, TR_SLAY_DEMON)) {
+            info[i++] = _("あなたの武器はデーモンに対して神聖なる力を発揮する。", "Your weapon strikes at demons with holy wrath.");
+        }
+        if (has_flag(flgs, TR_KILL_ORC)) {
+            info[i++] = _("あなたの武器はオークの天敵である。", "Your weapon is a great bane of orcs.");
+        } else if (has_flag(flgs, TR_SLAY_ORC)) {
+            info[i++] = _("あなたの武器はオークに対して特に強い力を発揮する。", "Your weapon is especially deadly against orcs.");
+        }
+        if (has_flag(flgs, TR_KILL_TROLL)) {
+            info[i++] = _("あなたの武器はトロルの天敵である。", "Your weapon is a great bane of trolls.");
+        } else if (has_flag(flgs, TR_SLAY_TROLL)) {
+            info[i++] = _("あなたの武器はトロルに対して特に強い力を発揮する。", "Your weapon is especially deadly against trolls.");
+        }
+        if (has_flag(flgs, TR_KILL_GIANT)) {
+            info[i++] = _("あなたの武器は巨人の天敵である。", "Your weapon is a great bane of giants.");
+        } else if (has_flag(flgs, TR_SLAY_GIANT)) {
+            info[i++] = _("あなたの武器は巨人に対して特に強い力を発揮する。", "Your weapon is especially deadly against giants.");
+        }
+        /* Special "kill" flags */
+        if (has_flag(flgs, TR_KILL_DRAGON)) {
+            info[i++] = _("あなたの武器はドラゴンの天敵である。", "Your weapon is a great bane of dragons.");
+        } else if (has_flag(flgs, TR_SLAY_DRAGON)) {
+            info[i++] = _("あなたの武器はドラゴンに対して特に強い力を発揮する。", "Your weapon is especially deadly against dragons.");
+        }
+
+        if (has_flag(flgs, TR_FORCE_WEAPON)) {
+            info[i++] = _("あなたの武器はMPを使って攻撃する。", "Your weapon causes greate damages using your MP.");
+        }
+        if (has_flag(flgs, TR_THROW)) {
+            info[i++] = _("あなたの武器は投げやすい。", "Your weapon can be thrown well.");
+        }
+    }
+
+    screen_save();
+
+    /* Erase the screen */
+    for (k = 1; k < 24; k++)
+        prt("", k, 13);
+
+    /* Label the information */
+    prt(_("        あなたの状態:", "     Your Attributes:"), 1, 15);
+
+    /* We will print on top of the map (column 13) */
+    for (k = 2, j = 0; j < i; j++) {
+        /* Show the info */
+        prt(info[j], k++, 15);
+
+        /* Every 20 entries (lines 2 to 21), start over */
+        if ((k == 22) && (j + 1 < i)) {
+            prt(_("-- 続く --", "-- more --"), k, 15);
+            inkey();
+            for (; k > 2; k--)
+                prt("", k, 15);
+        }
+    }
+
+    /* Pause */
+    prt(_("[何かキーを押すとゲームに戻ります]", "[Press any key to continue]"), k, 13);
+    inkey();
+    screen_load();
+}
+
+/*!
+ * @brief 魔法効果時間のターン数に基づいて表現IDを返す。
+ * @param dur 効果ターン数
+ * @return 効果時間の表現ID
+ */
+static int report_magics_aux(int dur)
+{
+    if (dur <= 5) {
+        return 0;
+    } else if (dur <= 10) {
+        return 1;
+    } else if (dur <= 20) {
+        return 2;
+    } else if (dur <= 50) {
+        return 3;
+    } else if (dur <= 100) {
+        return 4;
+    } else if (dur <= 200) {
+        return 5;
+    } else {
+        return 6;
+    }
+}
+
+static concptr report_magic_durations[] = {
+#ifdef JP
+    "ごく短い間", "少しの間", "しばらくの間", "多少長い間", "長い間", "非常に長い間", "信じ難いほど長い間", "モンスターを攻撃するまで"
+#else
+    "for a short time", "for a little while", "for a while", "for a long while", "for a long time", "for a very long time", "for an incredibly long time",
+    "until you hit a monster"
+#endif
+
+};
+
+/*!
+ * @brief 現在の一時的効果一覧を返す / Report all currently active magical effects.
+ * @return なし
+ */
+void report_magics(player_type *creature_ptr)
+{
+    int i = 0, j, k;
+    char Dummy[80];
+    concptr info[128];
+    int info2[128];
+
+    if (creature_ptr->blind) {
+        info2[i] = report_magics_aux(creature_ptr->blind);
+        info[i++] = _("あなたは目が見えない", "You cannot see");
+    }
+    if (creature_ptr->confused) {
+        info2[i] = report_magics_aux(creature_ptr->confused);
+        info[i++] = _("あなたは混乱している", "You are confused");
+    }
+    if (creature_ptr->afraid) {
+        info2[i] = report_magics_aux(creature_ptr->afraid);
+        info[i++] = _("あなたは恐怖に侵されている", "You are terrified");
+    }
+    if (creature_ptr->poisoned) {
+        info2[i] = report_magics_aux(creature_ptr->poisoned);
+        info[i++] = _("あなたは毒に侵されている", "You are poisoned");
+    }
+    if (creature_ptr->image) {
+        info2[i] = report_magics_aux(creature_ptr->image);
+        info[i++] = _("あなたは幻覚を見ている", "You are hallucinating");
+    }
+    if (creature_ptr->blessed) {
+        info2[i] = report_magics_aux(creature_ptr->blessed);
+        info[i++] = _("あなたは高潔さを感じている", "You feel rightous");
+    }
+    if (creature_ptr->hero) {
+        info2[i] = report_magics_aux(creature_ptr->hero);
+        info[i++] = _("あなたはヒーロー気分だ", "You feel heroic");
+    }
+    if (creature_ptr->shero) {
+        info2[i] = report_magics_aux(creature_ptr->shero);
+        info[i++] = _("あなたは戦闘狂だ", "You are in a battle rage");
+    }
+    if (creature_ptr->protevil) {
+        info2[i] = report_magics_aux(creature_ptr->protevil);
+        info[i++] = _("あなたは邪悪なる存在から守られている", "You are protected from evil");
+    }
+    if (creature_ptr->shield) {
+        info2[i] = report_magics_aux(creature_ptr->shield);
+        info[i++] = _("あなたは神秘のシールドで守られている", "You are protected by a mystic shield");
+    }
+    if (creature_ptr->invuln) {
+        info2[i] = report_magics_aux(creature_ptr->invuln);
+        info[i++] = _("あなたは無敵だ", "You are invulnerable");
+    }
+    if (creature_ptr->wraith_form) {
+        info2[i] = report_magics_aux(creature_ptr->wraith_form);
+        info[i++] = _("あなたは幽体化している", "You are incorporeal");
+    }
+    if (creature_ptr->special_attack & ATTACK_CONFUSE) {
+        info2[i] = 7;
+        info[i++] = _("あなたの手は赤く輝いている", "Your hands are glowing dull red.");
+    }
+    if (creature_ptr->word_recall) {
+        info2[i] = report_magics_aux(creature_ptr->word_recall);
+        info[i++] = _("この後帰還の詔が発動する", "You are waiting to be recalled");
+    }
+    if (creature_ptr->alter_reality) {
+        info2[i] = report_magics_aux(creature_ptr->alter_reality);
+        info[i++] = _("この後現実変容が発動する", "You waiting to be altered");
+    }
+    if (creature_ptr->oppose_acid) {
+        info2[i] = report_magics_aux(creature_ptr->oppose_acid);
+        info[i++] = _("あなたは酸への耐性を持っている", "You are resistant to acid");
+    }
+    if (creature_ptr->oppose_elec) {
+        info2[i] = report_magics_aux(creature_ptr->oppose_elec);
+        info[i++] = _("あなたは電撃への耐性を持っている", "You are resistant to lightning");
+    }
+    if (creature_ptr->oppose_fire) {
+        info2[i] = report_magics_aux(creature_ptr->oppose_fire);
+        info[i++] = _("あなたは火への耐性を持っている", "You are resistant to fire");
+    }
+    if (creature_ptr->oppose_cold) {
+        info2[i] = report_magics_aux(creature_ptr->oppose_cold);
+        info[i++] = _("あなたは冷気への耐性を持っている", "You are resistant to cold");
+    }
+    if (creature_ptr->oppose_pois) {
+        info2[i] = report_magics_aux(creature_ptr->oppose_pois);
+        info[i++] = _("あなたは毒への耐性を持っている", "You are resistant to poison");
+    }
+    screen_save();
+
+    /* Erase the screen */
+    for (k = 1; k < 24; k++)
+        prt("", k, 13);
+
+    /* Label the information */
+    prt(_("    現在かかっている魔法     :", "     Your Current Magic:"), 1, 15);
+
+    /* We will print on top of the map (column 13) */
+    for (k = 2, j = 0; j < i; j++) {
+        /* Show the info */
+        sprintf(Dummy, _("%-28s : 期間 - %s ", "%s %s."), info[j], report_magic_durations[info2[j]]);
+        prt(Dummy, k++, 15);
+
+        /* Every 20 entries (lines 2 to 21), start over */
+        if ((k == 22) && (j + 1 < i)) {
+            prt(_("-- 続く --", "-- more --"), k, 15);
+            inkey();
+            for (; k > 2; k--)
+                prt("", k, 15);
+        }
+    }
+
+    /* Pause */
+    prt(_("[何かキーを押すとゲームに戻ります]", "[Press any key to continue]"), k, 13);
+    inkey();
+    screen_load();
+}
index 0326242..60b89da 100644 (file)
@@ -109,7 +109,7 @@ bool recharge(player_type *caster_ptr, int power)
         }
     }
 
-    if (!is_recharge_successful) {
+    if (is_recharge_successful) {
         return update_player(caster_ptr);
     }
 
index 0b4b374..dfab298 100644 (file)
@@ -407,7 +407,7 @@ void teleport_player(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode)
  */
 void teleport_player_away(MONSTER_IDX m_idx, player_type *target_ptr, POSITION dis, bool is_quantum_effect)
 {
-    if (!teleport_player_aux(target_ptr, dis, TELEPORT_PASSIVE, is_quantum_effect))
+    if (!teleport_player_aux(target_ptr, dis, is_quantum_effect, TELEPORT_PASSIVE))
         return;
 
     /* Monsters with teleport ability may follow the player */