#include "cmd-activate.h"
#include "object-hook.h"
#include "spells-summon.h"
+#include "sort.h"
+#include "projection.h"
+#include "artifact.h"
+#include "avatar.h"
+#include "spells-status.h"
+#include "realm-hex.h"
+#include "player-status.h"
/*!
* @brief ペット入りモンスターボールをソートするための比較関数
o_ptr = &o_list[0 - item];
}
- p_ptr->energy_use = 100;
+ take_turn(p_ptr, 100);;
/* Extract the item level */
lev = k_info[o_ptr->k_idx].level;
if (fail < USE_DEVICE) fail = USE_DEVICE;
if (chance < USE_DEVICE) chance = USE_DEVICE;
- if (world_player)
- {
- if (flush_failure) flush();
- msg_print(_("止まった時の中ではうまく働かないようだ。", "It shows no reaction."));
- sound(SOUND_FAIL);
- return;
- }
+ if(cmd_limit_time_walk(p_ptr)) return;
if (p_ptr->pclass == CLASS_BERSERKER) success = FALSE;
else if (chance > fail)
((o_ptr->sval == SV_LITE_TORCH) || (o_ptr->sval == SV_LITE_LANTERN)))
{
msg_print(_("燃料がない。", "It has no fuel."));
- p_ptr->energy_use = 0;
+ free_turn(p_ptr);
return;
}
{
IDX pet_ctr, i;
- IDX *who;
+ MONSTER_IDX *who;
int max_pet = 0;
u16b dummy_why;
/* Allocate the "who" array */
- C_MAKE(who, max_m_idx, IDX);
+ C_MAKE(who, max_m_idx, MONSTER_IDX);
/* Process the monsters (backwards) */
for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
o_ptr->xtra5 = (XTRA16)cap_maxhp;
if (cap_nickname)
{
- cptr t;
+ concptr t;
char *s;
char buf[80] = "";
if (o_ptr->inscription)
{
char buf[80];
- cptr t;
+ concptr t;
#ifndef JP
bool quote = FALSE;
#endif
void do_cmd_activate(void)
{
OBJECT_IDX item;
- cptr q, s;
+ concptr q, s;
+
+ if (p_ptr->wild_mode) return;
+ if (cmd_limit_arena(p_ptr)) return;
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
{
q = _("どのアイテムを始動させますか? ", "Activate which item? ");
s = _("始動できるアイテムを装備していない。", "You have nothing to activate.");
- if (!get_item(&item, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT))) return;
+ if (!choose_object(&item, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT))) return;
/* Activate the item */
do_cmd_activate_aux(item);
{
BIT_FLAGS flgs[TR_FLAG_SIZE]; /* for resistance flags */
int type[20];
- cptr name[20];
+ concptr name[20];
int i, t, n = 0;
DIRECTION dir;
PLAYER_LEVEL plev = p_ptr->lev;
int k, dummy = 0;
DIRECTION dir;
- cptr name = k_name + k_info[o_ptr->k_idx].name;
+ concptr name = k_name + k_info[o_ptr->k_idx].name;
const activation_type* const act_ptr = find_activation_info(o_ptr);
/* Paranoia */
case ACT_SUMMON_ANIMAL:
{
- (void)summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET));
+ (void)summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0');
break;
}
case ACT_SUMMON_PHANTOM:
{
msg_print(_("幻霊を召喚した。", "You summon a phantasmal servant."));
- (void)summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
+ (void)summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0');
break;
}
if (pet) mode |= PM_FORCE_PET;
else mode |= PM_NO_PET;
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), SUMMON_ELEMENTAL, mode))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), SUMMON_ELEMENTAL, mode, '\0'))
{
msg_print(_("エレメンタルが現れた...", "An elemental materializes..."));
if (pet)
if (pet) mode |= PM_FORCE_PET;
else mode |= (PM_ALLOW_UNIQUE | PM_NO_PET);
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), type, mode))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), type, mode, '\0'))
{
msg_print(_("冷たい風があなたの周りに吹き始めた。それは腐敗臭を運んでいる...",
"Cold winds begin to blow around you, carrying with them the stench of decay..."));
if (pet) mode |= PM_FORCE_PET;
else mode |= PM_NO_PET;
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((p_ptr->lev * 3) / 2), SUMMON_HOUND, mode))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((p_ptr->lev * 3) / 2), SUMMON_HOUND, mode, '\0'))
{
if (pet)
case ACT_SUMMON_DAWN:
{
msg_print(_("暁の師団を召喚した。", "You summon the Legion of the Dawn."));
- (void)summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
+ (void)summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0');
break;
}
case ACT_RECALL:
{
msg_print(_("やわらかな白色に輝いている...", "It glows soft white..."));
- if (!word_of_recall()) return FALSE;
+ if (!recall_player(p_ptr, randint0(21) + 15)) return FALSE;
break;
}
if (get_check(_("帰還の力を使いますか?", "Activate recall? ")))
{
- (void)word_of_recall();
+ (void)recall_player(p_ptr, randint0(21) + 15);
}
break;
INVENTORY_IDX inv;
int t;
OBJECT_IDX o_idx;
- char o_name[MAX_NLEN];
+ GAME_TEXT o_name[MAX_NLEN];
object_type forge;
/* Cast off activated item */
}
else if (cave[y][x].m_idx)
{
- char m_name[80];
+ GAME_TEXT m_name[MAX_NLEN];
monster_desc(m_name, &m_list[cave[y][x].m_idx], 0);
msg_format(_("%sが邪魔だ!", "%^s is stand in your way."), m_name);
- p_ptr->energy_use = 0;
+ free_turn(p_ptr);
return FALSE;
}
set_action(ACTION_FISH);
{
int count = 0, i;
monster_type *m_ptr;
- cptr kakusan = "";
+ concptr kakusan = "";
if (summon_named_creature(0, p_ptr->y, p_ptr->x, MON_SUKE, PM_FORCE_PET))
{
for (i = 0; i < 2; i++)
{
int tmp = randint0(11);
- if (tmp < 6) add_flag(o_ptr->art_flags, TR_STR + tmp);
+ if (tmp < A_MAX) add_flag(o_ptr->art_flags, TR_STR + tmp);
else add_flag(o_ptr->art_flags, TR_STEALTH + tmp - 6);
}
}