1 #include "player-info/weapon-effect-info.h"
2 #include "inventory/inventory-slot-types.h"
3 #include "object-enchant/tr-types.h"
4 #include "player-info/self-info-util.h"
5 #include "util/bit-flags-calculator.h"
7 static void set_weapon_bless_info(self_info_type *self_ptr)
9 if (has_flag(self_ptr->flags, TR_BLESSED))
10 self_ptr->info[self_ptr->line++] = _("あなたの武器は神の祝福を受けている。", "Your weapon has been blessed by the gods.");
12 if (has_flag(self_ptr->flags, TR_CHAOTIC))
13 self_ptr->info[self_ptr->line++] = _("あなたの武器はログルスの徴の属性をもつ。", "Your weapon is branded with the Sign of Logrus.");
15 if (has_flag(self_ptr->flags, TR_IMPACT))
16 self_ptr->info[self_ptr->line++] = _("あなたの武器は打撃で地震を発生することができる。", "The impact of your weapon can cause earthquakes.");
18 if (has_flag(self_ptr->flags, TR_VORPAL))
19 self_ptr->info[self_ptr->line++] = _("あなたの武器は非常に鋭い。", "Your weapon is very sharp.");
21 if (has_flag(self_ptr->flags, TR_VAMPIRIC))
22 self_ptr->info[self_ptr->line++] = _("あなたの武器は敵から生命力を吸収する。", "Your weapon drains life from your foes.");
25 static void set_brand_attack_info(self_info_type *self_ptr)
27 if (has_flag(self_ptr->flags, TR_BRAND_ACID))
28 self_ptr->info[self_ptr->line++] = _("あなたの武器は敵を溶かす。", "Your weapon melts your foes.");
30 if (has_flag(self_ptr->flags, TR_BRAND_ELEC))
31 self_ptr->info[self_ptr->line++] = _("あなたの武器は敵を感電させる。", "Your weapon shocks your foes.");
33 if (has_flag(self_ptr->flags, TR_BRAND_FIRE))
34 self_ptr->info[self_ptr->line++] = _("あなたの武器は敵を燃やす。", "Your weapon burns your foes.");
36 if (has_flag(self_ptr->flags, TR_BRAND_COLD))
37 self_ptr->info[self_ptr->line++] = _("あなたの武器は敵を凍らせる。", "Your weapon freezes your foes.");
39 if (has_flag(self_ptr->flags, TR_BRAND_POIS))
40 self_ptr->info[self_ptr->line++] = _("あなたの武器は敵を毒で侵す。", "Your weapon poisons your foes.");
43 static void set_slay_info(self_info_type *self_ptr)
45 if (has_flag(self_ptr->flags, TR_KILL_ANIMAL))
46 self_ptr->info[self_ptr->line++] = _("あなたの武器は動物の天敵である。", "Your weapon is a great bane of animals.");
47 else if (has_flag(self_ptr->flags, TR_SLAY_ANIMAL))
48 self_ptr->info[self_ptr->line++] = _("あなたの武器は動物に対して強い力を発揮する。", "Your weapon strikes at animals with extra force.");
50 if (has_flag(self_ptr->flags, TR_KILL_EVIL))
51 self_ptr->info[self_ptr->line++] = _("あなたの武器は邪悪なる存在の天敵である。", "Your weapon is a great bane of evil.");
52 else if (has_flag(self_ptr->flags, TR_SLAY_EVIL))
53 self_ptr->info[self_ptr->line++] = _("あなたの武器は邪悪なる存在に対して強い力を発揮する。", "Your weapon strikes at evil with extra force.");
55 if (has_flag(self_ptr->flags, TR_KILL_HUMAN))
56 self_ptr->info[self_ptr->line++] = _("あなたの武器は人間の天敵である。", "Your weapon is a great bane of humans.");
57 else if (has_flag(self_ptr->flags, TR_SLAY_HUMAN))
58 self_ptr->info[self_ptr->line++] = _("あなたの武器は人間に対して特に強い力を発揮する。", "Your weapon is especially deadly against humans.");
60 if (has_flag(self_ptr->flags, TR_KILL_UNDEAD))
61 self_ptr->info[self_ptr->line++] = _("あなたの武器はアンデッドの天敵である。", "Your weapon is a great bane of undead.");
62 else if (has_flag(self_ptr->flags, TR_SLAY_UNDEAD))
63 self_ptr->info[self_ptr->line++] = _("あなたの武器はアンデッドに対して神聖なる力を発揮する。", "Your weapon strikes at undead with holy wrath.");
65 if (has_flag(self_ptr->flags, TR_KILL_DEMON))
66 self_ptr->info[self_ptr->line++] = _("あなたの武器はデーモンの天敵である。", "Your weapon is a great bane of demons.");
67 else if (has_flag(self_ptr->flags, TR_SLAY_DEMON))
68 self_ptr->info[self_ptr->line++] = _("あなたの武器はデーモンに対して神聖なる力を発揮する。", "Your weapon strikes at demons with holy wrath.");
70 if (has_flag(self_ptr->flags, TR_KILL_ORC))
71 self_ptr->info[self_ptr->line++] = _("あなたの武器はオークの天敵である。", "Your weapon is a great bane of orcs.");
72 else if (has_flag(self_ptr->flags, TR_SLAY_ORC))
73 self_ptr->info[self_ptr->line++] = _("あなたの武器はオークに対して特に強い力を発揮する。", "Your weapon is especially deadly against orcs.");
75 if (has_flag(self_ptr->flags, TR_KILL_TROLL))
76 self_ptr->info[self_ptr->line++] = _("あなたの武器はトロルの天敵である。", "Your weapon is a great bane of trolls.");
77 else if (has_flag(self_ptr->flags, TR_SLAY_TROLL))
78 self_ptr->info[self_ptr->line++] = _("あなたの武器はトロルに対して特に強い力を発揮する。", "Your weapon is especially deadly against trolls.");
80 if (has_flag(self_ptr->flags, TR_KILL_GIANT))
81 self_ptr->info[self_ptr->line++] = _("あなたの武器は巨人の天敵である。", "Your weapon is a great bane of giants.");
82 else if (has_flag(self_ptr->flags, TR_SLAY_GIANT))
83 self_ptr->info[self_ptr->line++] = _("あなたの武器は巨人に対して特に強い力を発揮する。", "Your weapon is especially deadly against giants.");
85 if (has_flag(self_ptr->flags, TR_KILL_DRAGON))
86 self_ptr->info[self_ptr->line++] = _("あなたの武器はドラゴンの天敵である。", "Your weapon is a great bane of dragons.");
87 else if (has_flag(self_ptr->flags, TR_SLAY_DRAGON))
88 self_ptr->info[self_ptr->line++] = _("あなたの武器はドラゴンに対して特に強い力を発揮する。", "Your weapon is especially deadly against dragons.");
91 void set_weapon_effect_info(player_type *creature_ptr, self_info_type *self_ptr)
93 object_type *o_ptr = &creature_ptr->inventory_list[INVEN_RARM];
94 if (o_ptr->k_idx == 0)
97 set_weapon_bless_info(self_ptr);
98 set_brand_attack_info(self_ptr);
99 set_slay_info(self_ptr);
100 if (has_flag(self_ptr->flags, TR_FORCE_WEAPON))
101 self_ptr->info[self_ptr->line++] = _("あなたの武器はMPを使って攻撃する。", "Your weapon causes greate damages using your MP.");
103 if (has_flag(self_ptr->flags, TR_THROW))
104 self_ptr->info[self_ptr->line++] = _("あなたの武器は投げやすい。", "Your weapon can be thrown well.");