#include "angband.h"
+#include "util.h"
+
#include "cmd-spell.h"
+#include "mutation.h"
+#include "spells.h"
+#include "spells-summon.h"
+#include "spells-status.h"
+#include "player-effects.h"
+#include "player-class.h"
+#include "targeting.h"
/*!
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
+concptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
bool fail = (mode == SPELL_FAIL) ? TRUE : FALSE;
- static const char s_random[] = _("ランダム", "random");
DIRECTION dir;
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
switch (spell)
{
if (desc) return _("カードの占いをする。", "Causes random effects.");
{
- if (info) return s_random;
+ if (info) return KWD_RANDOM;
if (cast)
{
{
int base = 25;
- int sides = 30;
+ DICE_SID sides = 30;
if (info) return info_duration(base, sides);
if (desc) return _("アイテムを自分の足元へ移動させる。", "Pulls a distant item close to you.");
{
- int weight = plev * 15;
+ WEIGHT weight = plev * 15;
if (info) return info_weight(weight);
{
int base = 15;
- int sides = 20;
+ DICE_SID sides = 20;
if (info) return info_delay(base, sides);
if (cast)
{
- if (!word_of_recall()) return NULL;
+ if (!recall_player(p_ptr, randint0(21) + 15)) return NULL;
}
}
break;
if (name) return _("人間トランプ", "Living Trump");
if (desc) return _("ランダムにテレポートする突然変異か、自分の意思でテレポートする突然変異が身につく。",
"Gives mutation which makes you teleport randomly or makes you able to teleport at will.");
-
- {
- if (cast)
- {
- int mutation;
-
- if (one_in_(7))
- /* Teleport control */
- mutation = 12;
- else
- /* Random teleportation (uncontrolled) */
- mutation = 77;
-
- /* Gain the mutation */
- if (gain_random_mutation(mutation))
- {
- msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
- }
- }
- }
+ if (cast) become_living_trump(p_ptr);
break;
case 23:
"Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
{
- int rad = DETECT_RAD_DEFAULT;
+ POSITION rad = DETECT_RAD_DEFAULT;
if (info) return info_radius(rad);
{
HIT_POINT dam = plev * 2;
- int rad = 2;
+ POSITION rad = 2;
if (info) return info_multi_damage(dam);