OSDN Git Service

Merge branch 'master' of https://github.com/hengband/hengband
[hengbandforosx/hengbandosx.git] / src / effect / effect-monster-curse.cpp
1 #include "effect/effect-monster-curse.h"
2 #include "effect/effect-monster-util.h"
3 #include "monster-race/monster-race.h"
4 #include "monster-race/race-indice-types.h"
5 #include "system/monster-entity.h"
6 #include "system/monster-race-info.h"
7 #include "view/display-messages.h"
8
9 ProcessResult effect_monster_curse_1(EffectMonster *em_ptr)
10 {
11     if (em_ptr->seen) {
12         em_ptr->obvious = true;
13     }
14     if (!em_ptr->who) {
15         msg_format(_("%sを指差して呪いをかけた。", "You point at %s and curse."), em_ptr->m_name);
16     }
17     if (randint0(100 + (em_ptr->caster_lev / 2)) < (em_ptr->r_ptr->level + 35)) {
18         em_ptr->note = _("には効果がなかった。", " is unaffected.");
19         em_ptr->dam = 0;
20     }
21
22     return ProcessResult::PROCESS_CONTINUE;
23 }
24
25 ProcessResult effect_monster_curse_2(EffectMonster *em_ptr)
26 {
27     if (em_ptr->seen) {
28         em_ptr->obvious = true;
29     }
30     if (!em_ptr->who) {
31         msg_format(_("%sを指差して恐ろしげに呪いをかけた。", "You point at %s and curse horribly."), em_ptr->m_name);
32     }
33
34     if (randint0(100 + (em_ptr->caster_lev / 2)) < (em_ptr->r_ptr->level + 35)) {
35         em_ptr->note = _("には効果がなかった。", " is unaffected.");
36         em_ptr->dam = 0;
37     }
38
39     return ProcessResult::PROCESS_CONTINUE;
40 }
41
42 ProcessResult effect_monster_curse_3(EffectMonster *em_ptr)
43 {
44     if (em_ptr->seen) {
45         em_ptr->obvious = true;
46     }
47     if (!em_ptr->who) {
48         msg_format(_("%sを指差し、恐ろしげに呪文を唱えた!", "You point at %s, incanting terribly!"), em_ptr->m_name);
49     }
50
51     if (randint0(100 + (em_ptr->caster_lev / 2)) < (em_ptr->r_ptr->level + 35)) {
52         em_ptr->note = _("には効果がなかった。", " is unaffected.");
53         em_ptr->dam = 0;
54     }
55
56     return ProcessResult::PROCESS_CONTINUE;
57 }
58
59 ProcessResult effect_monster_curse_4(EffectMonster *em_ptr)
60 {
61     if (em_ptr->seen) {
62         em_ptr->obvious = true;
63     }
64     if (!em_ptr->who) {
65         msg_format(_("%sの秘孔を突いて、「お前は既に死んでいる」と叫んだ。",
66                        "You point at %s, screaming the word, 'DIE!'."),
67             em_ptr->m_name);
68     }
69
70     if ((randint0(100 + (em_ptr->caster_lev / 2)) < (em_ptr->r_ptr->level + 35)) && ((em_ptr->who <= 0) || (em_ptr->m_caster_ptr->r_idx != MonsterRaceId::KENSHIROU))) {
71         em_ptr->note = _("には効果がなかった。", " is unaffected.");
72         em_ptr->dam = 0;
73     }
74
75     return ProcessResult::PROCESS_CONTINUE;
76 }