1 #include "spell-realm/spells-trump.h"
2 #include "monster-floor/monster-summon.h"
3 #include "monster-floor/place-monster-types.h"
4 #include "mutation/mutation-investor-remover.h"
5 #include "player-info/avatar.h"
6 #include "spell-kind/earthquake.h"
7 #include "spell-kind/spells-charm.h"
8 #include "spell-kind/spells-floor.h"
9 #include "spell-kind/spells-lite.h"
10 #include "spell-kind/spells-neighbor.h"
11 #include "spell-kind/spells-random.h"
12 #include "spell-kind/spells-sight.h"
13 #include "spell-kind/spells-teleport.h"
14 #include "spell/spells-status.h"
15 #include "spell/spells-summon.h"
16 #include "spell/summon-types.h"
17 #include "status/base-status.h"
18 #include "status/buff-setter.h"
19 #include "status/experience.h"
20 #include "system/floor-type-definition.h"
21 #include "target/target-getter.h"
22 #include "view/display-messages.h"
25 * @brief トランプ領域の「シャッフル」の効果をランダムに決めて処理する。
26 * @param caster_ptr プレーヤーへの参照ポインタ
29 void cast_shuffle(player_type *caster_ptr)
31 PLAYER_LEVEL plev = caster_ptr->lev;
34 int vir = virtue_number(caster_ptr, V_CHANCE);
37 if ((caster_ptr->pclass == CLASS_ROGUE) || (caster_ptr->pclass == CLASS_HIGH_MAGE) || (caster_ptr->pclass == CLASS_SORCERER))
38 die = (randint1(110)) + plev / 5;
43 if (caster_ptr->virtues[vir - 1] > 0) {
44 while (randint1(400) < caster_ptr->virtues[vir - 1])
47 while (randint1(400) < (0 - caster_ptr->virtues[vir - 1]))
52 msg_print(_("あなたはカードを切って一枚引いた...", "You shuffle the deck and draw a card..."));
55 chg_virtue(caster_ptr, V_CHANCE, 1);
58 floor_type *floor_ptr = caster_ptr->current_floor_ptr;
60 msg_print(_("なんてこった!《死》だ!", "Oh no! It's Death!"));
62 for (i = 0; i < randint1(3); i++) {
63 activate_hi_summon(caster_ptr, caster_ptr->y, caster_ptr->x, FALSE);
70 msg_print(_("なんてこった!《悪魔》だ!", "Oh no! It's the Devil!"));
71 summon_specific(caster_ptr, 0, caster_ptr->y, caster_ptr->x, floor_ptr->dun_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
77 msg_print(_("なんてこった!《吊られた男》だ!", "Oh no! It's the Hanged Man."));
78 activate_ty_curse(caster_ptr, FALSE, &count);
83 msg_print(_("《不調和の剣》だ。", "It's the swords of discord."));
84 aggravate_monsters(caster_ptr, 0);
89 msg_print(_("《愚者》だ。", "It's the Fool."));
90 do_dec_stat(caster_ptr, A_INT);
91 do_dec_stat(caster_ptr, A_WIS);
96 msg_print(_("奇妙なモンスターの絵だ。", "It's the picture of a strange monster."));
98 caster_ptr, 1, FALSE, caster_ptr->y, caster_ptr->x, (floor_ptr->dun_level * 3 / 2), (32 + randint1(6)), PM_ALLOW_GROUP | PM_ALLOW_UNIQUE);
103 msg_print(_("《月》だ。", "It's the Moon."));
104 unlite_area(caster_ptr, 10, 3);
109 msg_print(_("《運命の輪》だ。", "It's the Wheel of Fortune."));
110 wild_magic(caster_ptr, randint0(32));
115 msg_print(_("テレポート・カードだ。", "It's a teleport trump card."));
116 teleport_player(caster_ptr, 10, TELEPORT_PASSIVE);
121 msg_print(_("《正義》だ。", "It's Justice."));
122 set_blessed(caster_ptr, caster_ptr->lev, FALSE);
127 msg_print(_("テレポート・カードだ。", "It's a teleport trump card."));
128 teleport_player(caster_ptr, 100, TELEPORT_PASSIVE);
133 msg_print(_("テレポート・カードだ。", "It's a teleport trump card."));
134 teleport_player(caster_ptr, 200, TELEPORT_PASSIVE);
139 msg_print(_("《塔》だ。", "It's the Tower."));
140 wall_breaker(caster_ptr);
145 msg_print(_("《節制》だ。", "It's Temperance."));
146 sleep_monsters_touch(caster_ptr);
151 msg_print(_("《塔》だ。", "It's the Tower."));
152 earthquake(caster_ptr, caster_ptr->y, caster_ptr->x, 5, 0);
157 msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
158 trump_summoning(caster_ptr, 1, TRUE, caster_ptr->y, caster_ptr->x, (floor_ptr->dun_level * 3 / 2), SUMMON_MOLD, 0L);
163 msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
164 trump_summoning(caster_ptr, 1, TRUE, caster_ptr->y, caster_ptr->x, (floor_ptr->dun_level * 3 / 2), SUMMON_BAT, 0L);
169 msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
170 trump_summoning(caster_ptr, 1, TRUE, caster_ptr->y, caster_ptr->x, (floor_ptr->dun_level * 3 / 2), SUMMON_VORTEX, 0L);
175 msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
176 trump_summoning(caster_ptr, 1, TRUE, caster_ptr->y, caster_ptr->x, (floor_ptr->dun_level * 3 / 2), SUMMON_COIN_MIMIC, 0L);
181 msg_print(_("《恋人》だ。", "It's the Lovers."));
183 if (get_aim_dir(caster_ptr, &dir)) {
184 charm_monster(caster_ptr, dir, MIN(caster_ptr->lev, 20));
191 msg_print(_("《隠者》だ。", "It's the Hermit."));
192 wall_stone(caster_ptr);
197 msg_print(_("《審判》だ。", "It's the Judgement."));
198 roll_hitdice(caster_ptr, 0L);
199 lose_all_mutations(caster_ptr);
204 msg_print(_("《太陽》だ。", "It's the Sun."));
205 chg_virtue(caster_ptr, V_KNOWLEDGE, 1);
206 chg_virtue(caster_ptr, V_ENLIGHTEN, 1);
207 wiz_lite(caster_ptr, FALSE);
211 msg_print(_("《世界》だ。", "It's the World."));
212 if (caster_ptr->exp >= PY_MAX_EXP) {
216 s32b ee = (caster_ptr->exp / 25) + 1;
219 msg_print(_("更に経験を積んだような気がする。", "You feel more experienced."));
220 gain_exp(caster_ptr, ee);
223 void become_living_trump(player_type *creature_ptr)
225 /* 1/7 Teleport control and 6/7 Random teleportation (uncontrolled) */
226 MUTATION_IDX mutation = one_in_(7) ? 12 : 77;
227 if (gain_mutation(creature_ptr, mutation))
228 msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));