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 *si_ptr)
9 if (has_flag(si_ptr->flags, TR_BLESSED))
10 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\90_
\82Ì
\8fj
\95\9f\82ð
\8eó
\82¯
\82Ä
\82¢
\82é
\81B", "Your weapon has been blessed by the gods.");
12 if (has_flag(si_ptr->flags, TR_CHAOTIC))
13 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\83\8d\83O
\83\8b\83X
\82Ì
\92¥
\82Ì
\91®
\90«
\82ð
\82à
\82Â
\81B", "Your weapon is branded with the Sign of Logrus.");
15 if (has_flag(si_ptr->flags, TR_IMPACT))
16 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\91Å
\8c\82\82Å
\92n
\90k
\82ð
\94
\90¶
\82·
\82é
\82±
\82Æ
\82ª
\82Å
\82«
\82é
\81B", "The impact of your weapon can cause earthquakes.");
18 if (has_flag(si_ptr->flags, TR_VORPAL))
19 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\94ñ
\8fí
\82É
\89s
\82¢
\81B", "Your weapon is very sharp.");
21 if (has_flag(si_ptr->flags, TR_VAMPIRIC))
22 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\93G
\82©
\82ç
\90¶
\96½
\97Í
\82ð
\8bz
\8eû
\82·
\82é
\81B", "Your weapon drains life from your foes.");
25 static void set_brand_attack_info(self_info_type *si_ptr)
27 if (has_flag(si_ptr->flags, TR_BRAND_ACID))
28 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\93G
\82ð
\97n
\82©
\82·
\81B", "Your weapon melts your foes.");
30 if (has_flag(si_ptr->flags, TR_BRAND_ELEC))
31 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\93G
\82ð
\8a´
\93d
\82³
\82¹
\82é
\81B", "Your weapon shocks your foes.");
33 if (has_flag(si_ptr->flags, TR_BRAND_FIRE))
34 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\93G
\82ð
\94R
\82â
\82·
\81B", "Your weapon burns your foes.");
36 if (has_flag(si_ptr->flags, TR_BRAND_COLD))
37 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\93G
\82ð
\93\80\82ç
\82¹
\82é
\81B", "Your weapon freezes your foes.");
39 if (has_flag(si_ptr->flags, TR_BRAND_POIS))
40 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\93G
\82ð
\93Å
\82Å
\90N
\82·
\81B", "Your weapon poisons your foes.");
43 static void set_slay_info(self_info_type *si_ptr)
45 if (has_flag(si_ptr->flags, TR_KILL_ANIMAL))
46 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\93®
\95¨
\82Ì
\93V
\93G
\82Å
\82 \82é
\81B", "Your weapon is a great bane of animals.");
47 else if (has_flag(si_ptr->flags, TR_SLAY_ANIMAL))
48 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\93®
\95¨
\82É
\91Î
\82µ
\82Ä
\8b
\82¢
\97Í
\82ð
\94
\8aö
\82·
\82é
\81B", "Your weapon strikes at animals with extra force.");
50 if (has_flag(si_ptr->flags, TR_KILL_EVIL))
51 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\8e×
\88«
\82È
\82é
\91¶
\8dÝ
\82Ì
\93V
\93G
\82Å
\82 \82é
\81B", "Your weapon is a great bane of evil.");
52 else if (has_flag(si_ptr->flags, TR_SLAY_EVIL))
53 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\8e×
\88«
\82È
\82é
\91¶
\8dÝ
\82É
\91Î
\82µ
\82Ä
\8b
\82¢
\97Í
\82ð
\94
\8aö
\82·
\82é
\81B", "Your weapon strikes at evil with extra force.");
55 if (has_flag(si_ptr->flags, TR_KILL_HUMAN))
56 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\90l
\8aÔ
\82Ì
\93V
\93G
\82Å
\82 \82é
\81B", "Your weapon is a great bane of humans.");
57 else if (has_flag(si_ptr->flags, TR_SLAY_HUMAN))
58 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\90l
\8aÔ
\82É
\91Î
\82µ
\82Ä
\93Á
\82É
\8b
\82¢
\97Í
\82ð
\94
\8aö
\82·
\82é
\81B", "Your weapon is especially deadly against humans.");
60 if (has_flag(si_ptr->flags, TR_KILL_UNDEAD))
61 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\83A
\83\93\83f
\83b
\83h
\82Ì
\93V
\93G
\82Å
\82 \82é
\81B", "Your weapon is a great bane of undead.");
62 else if (has_flag(si_ptr->flags, TR_SLAY_UNDEAD))
63 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\83A
\83\93\83f
\83b
\83h
\82É
\91Î
\82µ
\82Ä
\90_
\90¹
\82È
\82é
\97Í
\82ð
\94
\8aö
\82·
\82é
\81B", "Your weapon strikes at undead with holy wrath.");
65 if (has_flag(si_ptr->flags, TR_KILL_DEMON))
66 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\83f
\81[
\83\82\83\93\82Ì
\93V
\93G
\82Å
\82 \82é
\81B", "Your weapon is a great bane of demons.");
67 else if (has_flag(si_ptr->flags, TR_SLAY_DEMON))
68 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\83f
\81[
\83\82\83\93\82É
\91Î
\82µ
\82Ä
\90_
\90¹
\82È
\82é
\97Í
\82ð
\94
\8aö
\82·
\82é
\81B", "Your weapon strikes at demons with holy wrath.");
70 if (has_flag(si_ptr->flags, TR_KILL_ORC))
71 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\83I
\81[
\83N
\82Ì
\93V
\93G
\82Å
\82 \82é
\81B", "Your weapon is a great bane of orcs.");
72 else if (has_flag(si_ptr->flags, TR_SLAY_ORC))
73 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\83I
\81[
\83N
\82É
\91Î
\82µ
\82Ä
\93Á
\82É
\8b
\82¢
\97Í
\82ð
\94
\8aö
\82·
\82é
\81B", "Your weapon is especially deadly against orcs.");
75 if (has_flag(si_ptr->flags, TR_KILL_TROLL))
76 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\83g
\83\8d\83\8b\82Ì
\93V
\93G
\82Å
\82 \82é
\81B", "Your weapon is a great bane of trolls.");
77 else if (has_flag(si_ptr->flags, TR_SLAY_TROLL))
78 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\83g
\83\8d\83\8b\82É
\91Î
\82µ
\82Ä
\93Á
\82É
\8b
\82¢
\97Í
\82ð
\94
\8aö
\82·
\82é
\81B", "Your weapon is especially deadly against trolls.");
80 if (has_flag(si_ptr->flags, TR_KILL_GIANT))
81 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\8b\90\90l
\82Ì
\93V
\93G
\82Å
\82 \82é
\81B", "Your weapon is a great bane of giants.");
82 else if (has_flag(si_ptr->flags, TR_SLAY_GIANT))
83 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\8b\90\90l
\82É
\91Î
\82µ
\82Ä
\93Á
\82É
\8b
\82¢
\97Í
\82ð
\94
\8aö
\82·
\82é
\81B", "Your weapon is especially deadly against giants.");
85 if (has_flag(si_ptr->flags, TR_KILL_DRAGON))
86 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\83h
\83\89\83S
\83\93\82Ì
\93V
\93G
\82Å
\82 \82é
\81B", "Your weapon is a great bane of dragons.");
87 else if (has_flag(si_ptr->flags, TR_SLAY_DRAGON))
88 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\83h
\83\89\83S
\83\93\82É
\91Î
\82µ
\82Ä
\93Á
\82É
\8b
\82¢
\97Í
\82ð
\94
\8aö
\82·
\82é
\81B", "Your weapon is especially deadly against dragons.");
91 void set_weapon_effect_info(player_type *creature_ptr, self_info_type *si_ptr)
93 object_type *o_ptr = &creature_ptr->inventory_list[INVEN_RARM];
94 if (o_ptr->k_idx == 0)
97 set_weapon_bless_info(si_ptr);
98 set_brand_attack_info(si_ptr);
99 set_slay_info(si_ptr);
100 if (has_flag(si_ptr->flags, TR_FORCE_WEAPON))
101 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82ÍMP
\82ð
\8eg
\82Á
\82Ä
\8dU
\8c\82\82·
\82é
\81B", "Your weapon causes greate damages using your MP.");
103 if (has_flag(si_ptr->flags, TR_THROW))
104 si_ptr->info[si_ptr->line++] = _("
\82 \82È
\82½
\82Ì
\95\90\8aí
\82Í
\93\8a\82°
\82â
\82·
\82¢
\81B", "Your weapon can be thrown well.");