OSDN Git Service

Merge pull request #3532 from sikabane-works/release/3.0.0.87-alpha
[hengbandforosx/hengbandosx.git] / src / blue-magic / blue-magic-summon.cpp
1 /*!
2  * @file blue-magic-summon.cpp
3  * @brief 青魔法の召喚系スペル定義
4  */
5
6 #include "blue-magic/blue-magic-summon.h"
7 #include "blue-magic/blue-magic-util.h"
8 #include "monster-floor/monster-summon.h"
9 #include "monster-floor/place-monster-types.h"
10 #include "spell/spells-summon.h"
11 #include "spell/summon-types.h"
12 #include "system/player-type-definition.h"
13 #include "view/display-messages.h"
14
15 bool cast_blue_summon_kin(PlayerType *player_ptr, bmc_type *bmc_ptr)
16 {
17     msg_print(_("援軍を召喚した。", "You summon one of your kin."));
18     for (int k = 0; k < 1; k++) {
19         if (summon_kin_player(player_ptr, bmc_ptr->summon_lev, player_ptr->y, player_ptr->x, (bmc_ptr->pet ? PM_FORCE_PET : PM_NONE))) {
20             if (!bmc_ptr->pet) {
21                 msg_print(_("召喚された仲間は怒っている!", "The summoned companion is angry!"));
22             }
23         } else {
24             bmc_ptr->no_trump = true;
25         }
26     }
27
28     return true;
29 }
30
31 bool cast_blue_summon_cyber(PlayerType *player_ptr, bmc_type *bmc_ptr)
32 {
33     msg_print(_("サイバーデーモンを召喚した!", "You summon a Cyberdemon!"));
34     for (int k = 0; k < 1; k++) {
35         if (summon_specific(player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_CYBER, bmc_ptr->p_mode)) {
36             if (!bmc_ptr->pet) {
37                 msg_print(_("召喚されたサイバーデーモンは怒っている!", "The summoned Cyberdemon is angry!"));
38             }
39         } else {
40             bmc_ptr->no_trump = true;
41         }
42     }
43
44     return true;
45 }
46
47 bool cast_blue_summon_monster(PlayerType *player_ptr, bmc_type *bmc_ptr)
48 {
49     msg_print(_("仲間を召喚した。", "You summon help."));
50     for (int k = 0; k < 1; k++) {
51         if (summon_specific(player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_NONE, bmc_ptr->p_mode)) {
52             if (!bmc_ptr->pet) {
53                 msg_print(_("召喚されたモンスターは怒っている!", "The summoned monster is angry!"));
54             }
55         } else {
56             bmc_ptr->no_trump = true;
57         }
58     }
59
60     return true;
61 }
62
63 bool cast_blue_summon_monsters(PlayerType *player_ptr, bmc_type *bmc_ptr)
64 {
65     msg_print(_("モンスターを召喚した!", "You summon monsters!"));
66     for (int k = 0; k < bmc_ptr->plev / 15 + 2; k++) {
67         if (summon_specific(player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_NONE, (bmc_ptr->p_mode | bmc_ptr->u_mode))) {
68             if (!bmc_ptr->pet) {
69                 msg_print(_("召喚されたモンスターは怒っている!", "The summoned monsters are angry!"));
70             }
71         } else {
72             bmc_ptr->no_trump = true;
73         }
74     }
75
76     return true;
77 }
78
79 bool cast_blue_summon_ant(PlayerType *player_ptr, bmc_type *bmc_ptr)
80 {
81     msg_print(_("アリを召喚した。", "You summon ants."));
82     if (summon_specific(
83             player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_ANT, (PM_ALLOW_GROUP | bmc_ptr->p_mode))) {
84         if (!bmc_ptr->pet) {
85             msg_print(_("召喚されたアリは怒っている!", "The summoned ants are angry!"));
86         }
87     } else {
88         bmc_ptr->no_trump = true;
89     }
90
91     return true;
92 }
93
94 bool cast_blue_summon_spider(PlayerType *player_ptr, bmc_type *bmc_ptr)
95 {
96     msg_print(_("蜘蛛を召喚した。", "You summon spiders."));
97     if (summon_specific(
98             player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_SPIDER, (PM_ALLOW_GROUP | bmc_ptr->p_mode))) {
99         if (!bmc_ptr->pet) {
100             msg_print(_("召喚された蜘蛛は怒っている!", "The summoned spiders are angry!"));
101         }
102     } else {
103         bmc_ptr->no_trump = true;
104     }
105
106     return true;
107 }
108
109 bool cast_blue_summon_hound(PlayerType *player_ptr, bmc_type *bmc_ptr)
110 {
111     msg_print(_("ハウンドを召喚した。", "You summon hounds."));
112     if (summon_specific(
113             player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_HOUND, (PM_ALLOW_GROUP | bmc_ptr->p_mode))) {
114         if (!bmc_ptr->pet) {
115             msg_print(_("召喚されたハウンドは怒っている!", "The summoned hounds are angry!"));
116         }
117     } else {
118         bmc_ptr->no_trump = true;
119     }
120
121     return true;
122 }
123
124 bool cast_blue_summon_hydra(PlayerType *player_ptr, bmc_type *bmc_ptr)
125 {
126     msg_print(_("ヒドラを召喚した。", "You summon a hydras."));
127     if (summon_specific(
128             player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_HYDRA, (bmc_ptr->g_mode | bmc_ptr->p_mode))) {
129         if (!bmc_ptr->pet) {
130             msg_print(_("召喚されたヒドラは怒っている!", "The summoned hydras are angry!"));
131         }
132     } else {
133         bmc_ptr->no_trump = true;
134     }
135
136     return true;
137 }
138
139 bool cast_blue_summon_angel(PlayerType *player_ptr, bmc_type *bmc_ptr)
140 {
141     msg_print(_("天使を召喚した!", "You summon an angel!"));
142     if (summon_specific(
143             player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_ANGEL, (bmc_ptr->g_mode | bmc_ptr->p_mode))) {
144         if (!bmc_ptr->pet) {
145             msg_print(_("召喚された天使は怒っている!", "The summoned angel is angry!"));
146         }
147     } else {
148         bmc_ptr->no_trump = true;
149     }
150
151     return true;
152 }
153
154 bool cast_blue_summon_demon(PlayerType *player_ptr, bmc_type *bmc_ptr)
155 {
156     msg_print(_("混沌の宮廷から悪魔を召喚した!", "You summon a demon from the Courts of Chaos!"));
157     if (summon_specific(
158             player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_DEMON, (bmc_ptr->g_mode | bmc_ptr->p_mode))) {
159         if (!bmc_ptr->pet) {
160             msg_print(_("召喚されたデーモンは怒っている!", "The summoned demon is angry!"));
161         }
162     } else {
163         bmc_ptr->no_trump = true;
164     }
165
166     return true;
167 }
168
169 bool cast_blue_summon_undead(PlayerType *player_ptr, bmc_type *bmc_ptr)
170 {
171     msg_print(_("アンデッドの強敵を召喚した!", "You summon an undead adversary!"));
172     if (summon_specific(
173             player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_UNDEAD, (bmc_ptr->g_mode | bmc_ptr->p_mode))) {
174         if (!bmc_ptr->pet) {
175             msg_print(_("召喚されたアンデッドは怒っている!", "The summoned undead is angry!"));
176         }
177     } else {
178         bmc_ptr->no_trump = true;
179     }
180
181     return true;
182 }
183
184 bool cast_blue_summon_dragon(PlayerType *player_ptr, bmc_type *bmc_ptr)
185 {
186     msg_print(_("ドラゴンを召喚した!", "You summon a dragon!"));
187     if (summon_specific(
188             player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_DRAGON, (bmc_ptr->g_mode | bmc_ptr->p_mode))) {
189         if (!bmc_ptr->pet) {
190             msg_print(_("召喚されたドラゴンは怒っている!", "The summoned dragon is angry!"));
191         }
192     } else {
193         bmc_ptr->no_trump = true;
194     }
195
196     return true;
197 }
198
199 bool cast_blue_summon_high_undead(PlayerType *player_ptr, bmc_type *bmc_ptr)
200 {
201     msg_print(_("強力なアンデッドを召喚した!", "You summon a greater undead!"));
202     if (summon_specific(player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_HI_UNDEAD,
203             (bmc_ptr->g_mode | bmc_ptr->p_mode | bmc_ptr->u_mode))) {
204         if (!bmc_ptr->pet) {
205             msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead is angry!"));
206         }
207     } else {
208         bmc_ptr->no_trump = true;
209     }
210
211     return true;
212 }
213
214 bool cast_blue_summon_high_dragon(PlayerType *player_ptr, bmc_type *bmc_ptr)
215 {
216     msg_print(_("古代ドラゴンを召喚した!", "You summon an ancient dragon!"));
217     if (summon_specific(player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_HI_DRAGON,
218             (bmc_ptr->g_mode | bmc_ptr->p_mode | bmc_ptr->u_mode))) {
219         if (!bmc_ptr->pet) {
220             msg_print(_("召喚された古代ドラゴンは怒っている!", "The summoned ancient dragon is angry!"));
221         }
222     } else {
223         bmc_ptr->no_trump = true;
224     }
225
226     return true;
227 }
228
229 bool cast_blue_summon_amberite(PlayerType *player_ptr, bmc_type *bmc_ptr)
230 {
231     msg_print(_("アンバーの王族を召喚した!", "You summon a Lord of Amber!"));
232     if (summon_specific(player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_AMBERITES,
233             (bmc_ptr->g_mode | bmc_ptr->p_mode | bmc_ptr->u_mode))) {
234         if (!bmc_ptr->pet) {
235             msg_print(_("召喚されたアンバーの王族は怒っている!", "The summoned Lord of Amber is angry!"));
236         }
237     } else {
238         bmc_ptr->no_trump = true;
239     }
240
241     return true;
242 }
243
244 bool cast_blue_summon_unique(PlayerType *player_ptr, bmc_type *bmc_ptr)
245 {
246     int count = 0;
247     msg_print(_("特別な強敵を召喚した!", "You summon a special opponent!"));
248     for (int k = 0; k < 1; k++) {
249         if (summon_specific(player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_UNIQUE,
250                 (bmc_ptr->g_mode | bmc_ptr->p_mode | PM_ALLOW_UNIQUE))) {
251             count++;
252             if (!bmc_ptr->pet) {
253                 msg_print(_("召喚されたユニーク・モンスターは怒っている!", "The summoned special opponent is angry!"));
254             }
255         }
256     }
257
258     for (int k = count; k < 1; k++) {
259         if (summon_specific(player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_HI_UNDEAD,
260                 (bmc_ptr->g_mode | bmc_ptr->p_mode | PM_ALLOW_UNIQUE))) {
261             count++;
262             if (!bmc_ptr->pet) {
263                 msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead is angry!"));
264             }
265         }
266     }
267
268     if (!count) {
269         bmc_ptr->no_trump = true;
270     }
271
272     return true;
273 }