1 #include "spell-realm/spells-trump.h"
2 #include "avatar/avatar.h"
3 #include "monster-floor/monster-summon.h"
4 #include "monster-floor/place-monster-types.h"
5 #include "mutation/mutation-investor-remover.h"
6 #include "player-base/player-class.h"
7 #include "spell-kind/earthquake.h"
8 #include "spell-kind/spells-charm.h"
9 #include "spell-kind/spells-floor.h"
10 #include "spell-kind/spells-lite.h"
11 #include "spell-kind/spells-neighbor.h"
12 #include "spell-kind/spells-random.h"
13 #include "spell-kind/spells-sight.h"
14 #include "spell-kind/spells-teleport.h"
15 #include "spell/spells-status.h"
16 #include "spell/spells-summon.h"
17 #include "spell/summon-types.h"
18 #include "status/base-status.h"
19 #include "status/buff-setter.h"
20 #include "status/experience.h"
21 #include "system/floor-type-definition.h"
22 #include "system/player-type-definition.h"
23 #include "target/target-getter.h"
24 #include "view/display-messages.h"
27 * @brief トランプ領域の「シャッフル」の効果をランダムに決めて処理する。
28 * @param player_ptr プレイヤーへの参照ポインタ
30 void cast_shuffle(PlayerType *player_ptr)
32 PLAYER_LEVEL plev = player_ptr->lev;
35 int vir = virtue_number(player_ptr, V_CHANCE);
38 PlayerClass pc(player_ptr);
39 auto is_good_shuffle = PlayerClass(player_ptr).equals(PlayerClassType::ROGUE);
40 is_good_shuffle |= PlayerClass(player_ptr).equals(PlayerClassType::HIGH_MAGE);
41 is_good_shuffle |= PlayerClass(player_ptr).equals(PlayerClassType::SORCERER);
43 die = (randint1(110)) + plev / 5;
48 if (player_ptr->virtues[vir - 1] > 0) {
49 while (randint1(400) < player_ptr->virtues[vir - 1])
52 while (randint1(400) < (0 - player_ptr->virtues[vir - 1]))
57 msg_print(_("あなたはカードを切って一枚引いた...", "You shuffle the deck and draw a card..."));
60 chg_virtue(player_ptr, V_CHANCE, 1);
63 auto *floor_ptr = player_ptr->current_floor_ptr;
65 msg_print(_("なんてこった!《死》だ!", "Oh no! It's Death!"));
67 for (i = 0; i < randint1(3); i++) {
68 activate_hi_summon(player_ptr, player_ptr->y, player_ptr->x, false);
75 msg_print(_("なんてこった!《悪魔》だ!", "Oh no! It's the Devil!"));
76 summon_specific(player_ptr, 0, player_ptr->y, player_ptr->x, floor_ptr->dun_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
82 msg_print(_("なんてこった!《吊られた男》だ!", "Oh no! It's the Hanged Man."));
83 activate_ty_curse(player_ptr, false, &count);
88 msg_print(_("《不調和の剣》だ。", "It's the swords of discord."));
89 aggravate_monsters(player_ptr, 0);
94 msg_print(_("《愚者》だ。", "It's the Fool."));
95 do_dec_stat(player_ptr, A_INT);
96 do_dec_stat(player_ptr, A_WIS);
101 msg_print(_("奇妙なモンスターの絵だ。", "It's the picture of a strange monster."));
102 trump_summoning(player_ptr, 1, false, player_ptr->y, player_ptr->x, (floor_ptr->dun_level * 3 / 2),
103 SUMMON_UNIQUE + randint1(6), PM_ALLOW_GROUP | PM_ALLOW_UNIQUE);
108 msg_print(_("《月》だ。", "It's the Moon."));
109 unlite_area(player_ptr, 10, 3);
114 msg_print(_("《運命の輪》だ。", "It's the Wheel of Fortune."));
115 wild_magic(player_ptr, randint0(32));
120 msg_print(_("テレポート・カードだ。", "It's a teleport trump card."));
121 teleport_player(player_ptr, 10, TELEPORT_PASSIVE);
126 msg_print(_("《正義》だ。", "It's Justice."));
127 set_blessed(player_ptr, player_ptr->lev, false);
132 msg_print(_("テレポート・カードだ。", "It's a teleport trump card."));
133 teleport_player(player_ptr, 100, TELEPORT_PASSIVE);
138 msg_print(_("テレポート・カードだ。", "It's a teleport trump card."));
139 teleport_player(player_ptr, 200, TELEPORT_PASSIVE);
144 msg_print(_("《塔》だ。", "It's the Tower."));
145 wall_breaker(player_ptr);
150 msg_print(_("《節制》だ。", "It's Temperance."));
151 sleep_monsters_touch(player_ptr);
156 msg_print(_("《塔》だ。", "It's the Tower."));
157 earthquake(player_ptr, player_ptr->y, player_ptr->x, 5, 0);
162 msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
163 trump_summoning(player_ptr, 1, true, player_ptr->y, player_ptr->x, (floor_ptr->dun_level * 3 / 2), SUMMON_MOLD, 0L);
168 msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
169 trump_summoning(player_ptr, 1, true, player_ptr->y, player_ptr->x, (floor_ptr->dun_level * 3 / 2), SUMMON_BAT, 0L);
174 msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
175 trump_summoning(player_ptr, 1, true, player_ptr->y, player_ptr->x, (floor_ptr->dun_level * 3 / 2), SUMMON_VORTEX, 0L);
180 msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
181 trump_summoning(player_ptr, 1, true, player_ptr->y, player_ptr->x, (floor_ptr->dun_level * 3 / 2), SUMMON_COIN_MIMIC, 0L);
186 msg_print(_("《恋人》だ。", "It's the Lovers."));
188 if (get_aim_dir(player_ptr, &dir)) {
189 charm_monster(player_ptr, dir, std::min<short>(player_ptr->lev, 20));
196 msg_print(_("《隠者》だ。", "It's the Hermit."));
197 wall_stone(player_ptr);
202 msg_print(_("《審判》だ。", "It's Judgement."));
203 roll_hitdice(player_ptr, SPOP_NONE);
204 lose_all_mutations(player_ptr);
209 msg_print(_("《太陽》だ。", "It's the Sun."));
210 chg_virtue(player_ptr, V_KNOWLEDGE, 1);
211 chg_virtue(player_ptr, V_ENLIGHTEN, 1);
212 wiz_lite(player_ptr, false);
216 msg_print(_("《世界》だ。", "It's the World."));
217 if (player_ptr->exp >= PY_MAX_EXP) {
221 int32_t ee = (player_ptr->exp / 25) + 1;
224 msg_print(_("更に経験を積んだような気がする。", "You feel more experienced."));
225 gain_exp(player_ptr, ee);
228 void become_living_trump(PlayerType *player_ptr)
230 /* 1/7 Teleport control and 6/7 Random teleportation (uncontrolled) */
231 MUTATION_IDX mutation = one_in_(7) ? 12 : 77;
232 if (gain_mutation(player_ptr, mutation))
233 msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));