if (user_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
item_tester_hook = item_tester_hook_activate;
if (creature_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Verify stairs */
if (creature_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Verify stairs */
if (creature_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Option: Pick a direction */
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Option: Pick a direction */
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Allow repeated command */
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Option: Pick a direction */
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Allow repeated command */
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Allow repeated command */
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Get a "repeated" direction */
if ((dir != 5) && (p_ptr->special_defense & KATA_MUSOU))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Hack -- In small scale wilderness it takes MUCH more time to move */
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Get a "repeated" direction */
void do_cmd_rest(void)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
if ((p_ptr->pclass == CLASS_BARD) && (SINGING_SONG_EFFECT(p_ptr) || INTERUPTING_SONG_EFFECT(p_ptr)))
{
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
q = _("どれを撃ちますか? ", "Fire which item? ");
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
if (shuriken >= 0)
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Restrict choices to food */
if (p_ptr->special_defense & KATA_MASK)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
if (!get_hissatsu_power(&n)) return;
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
if (p_ptr->blind || no_lite())
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Restrict the choices */
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
q = _("どれを装備からはずしますか? ", "Take off which item? ");
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
q = _("どのアイテムを落としますか? ", "Drop which item? ");
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Hack -- force destruction */
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* It is nothing */
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
item_tester_hook = item_tester_hook_use;
x = p_ptr->x + ddx[dir];
g_ptr = ¤t_floor_ptr->grid_array[y][x];
- if (p_ptr->special_defense & KATA_MUSOU) set_action(ACTION_NONE);
+ if (p_ptr->special_defense & KATA_MUSOU) set_action(p_ptr, ACTION_NONE);
if (p_ptr->riding)
{
msg_format(_("%sを起こした。", "You have waked %s up."), m_name);
}
- if (p_ptr->action == ACTION_KAMAE) set_action(ACTION_NONE);
+ if (p_ptr->action == ACTION_KAMAE) set_action(p_ptr, ACTION_NONE);
p_ptr->riding = g_ptr->m_idx;
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Restrict choices to potions */
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
if (cmd_limit_blind(p_ptr)) return;
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
if (p_ptr->pclass == CLASS_FORCETRAINER)
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
#ifdef JP
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
q = _("どの杖を使いますか? ", "Use which staff? ");
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
q = _("どのロッドを振りますか? ", "Zap which rod? ");
if (cmd_limit_arena(p_ptr)) return;
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
q = _("どの魔法棒で狙いますか? ", "Aim which wand? ");
/* Toggle search mode */
case 'S':
{
- if (p_ptr->action == ACTION_SEARCH) set_action(ACTION_NONE);
- else set_action(ACTION_SEARCH);
+ if (p_ptr->action == ACTION_SEARCH) set_action(p_ptr, ACTION_NONE);
+ else set_action(p_ptr, ACTION_SEARCH);
break;
}
if (!p_ptr->wild_mode) do_cmd_travel();
if (p_ptr->special_defense & KATA_MUSOU)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
break;
}
if ((p_ptr->chp == p_ptr->mhp) &&
(p_ptr->csp >= p_ptr->msp))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
}
!p_ptr->image && !p_ptr->word_recall &&
!p_ptr->alter_reality)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
}
}
/* Mana run out */
p_ptr->csp = 0;
p_ptr->csp_frac = 0;
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
else
{
{
if (p_ptr->csp < 3)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
else
{
/* Reduce rest count */
p_ptr->resting--;
- if (!p_ptr->resting) set_action(ACTION_NONE);
+ if (!p_ptr->resting) set_action(p_ptr, ACTION_NONE);
p_ptr->redraw |= (PR_STATE);
}
if ((p_ptr->special_defense & KATA_IAI) && ((mode != HISSATSU_IAI) || mdeath))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
return mdeath;
if (p_ptr->special_defense & KATA_IAI)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Assume we attacked */
* #ACTION_NONE / #ACTION_SEARCH / #ACTION_REST / #ACTION_LEARN / #ACTION_FISH / #ACTION_KAMAE / #ACTION_KATA / #ACTION_SING / #ACTION_HAYAGAKE / #ACTION_SPELL から選択。
* @return なし
*/
-void set_action(ACTION_IDX typ)
+void set_action(player_type *creature_ptr, ACTION_IDX typ)
{
- int prev_typ = p_ptr->action;
+ int prev_typ = creature_ptr->action;
if (typ == prev_typ)
{
case ACTION_SEARCH:
{
msg_print(_("探索をやめた。", "You no longer walk carefully."));
- p_ptr->redraw |= (PR_SPEED);
+ creature_ptr->redraw |= (PR_SPEED);
break;
}
case ACTION_REST:
{
- p_ptr->resting = 0;
+ creature_ptr->resting = 0;
break;
}
case ACTION_LEARN:
{
msg_print(_("学習をやめた。", "You stop Learning"));
- p_ptr->new_mane = FALSE;
+ creature_ptr->new_mane = FALSE;
break;
}
case ACTION_KAMAE:
{
msg_print(_("構えをといた。", "You stop assuming the posture."));
- p_ptr->special_defense &= ~(KAMAE_MASK);
+ creature_ptr->special_defense &= ~(KAMAE_MASK);
break;
}
case ACTION_KATA:
{
msg_print(_("型を崩した。", "You stop assuming the posture."));
- p_ptr->special_defense &= ~(KATA_MASK);
- p_ptr->update |= (PU_MONSTERS);
- p_ptr->redraw |= (PR_STATUS);
+ creature_ptr->special_defense &= ~(KATA_MASK);
+ creature_ptr->update |= (PU_MONSTERS);
+ creature_ptr->redraw |= (PR_STATUS);
break;
}
case ACTION_SING:
case ACTION_HAYAGAKE:
{
msg_print(_("足が重くなった。", "You are no longer walking extremely fast."));
- take_turn(p_ptr, 100);
+ take_turn(creature_ptr, 100);
break;
}
case ACTION_SPELL:
}
}
- p_ptr->action = typ;
+ creature_ptr->action = typ;
/* If we are requested other action, stop singing */
- if (prev_typ == ACTION_SING) stop_singing(p_ptr);
+ if (prev_typ == ACTION_SING) stop_singing(creature_ptr);
if (prev_typ == ACTION_SPELL) stop_hex_spell();
- switch (p_ptr->action)
+ switch (creature_ptr->action)
{
case ACTION_SEARCH:
{
msg_print(_("注意深く歩き始めた。", "You begin to walk carefully."));
- p_ptr->redraw |= (PR_SPEED);
+ creature_ptr->redraw |= (PR_SPEED);
break;
}
case ACTION_LEARN:
break;
}
}
- p_ptr->update |= (PU_BONUS);
- p_ptr->redraw |= (PR_STATE);
+ creature_ptr->update |= (PU_BONUS);
+ creature_ptr->redraw |= (PR_STATE);
}
/*!
/* effects.c */
-extern void set_action(ACTION_IDX typ);
+extern void set_action(player_type *creature_ptr, ACTION_IDX typ);
extern void reset_tim_flags(player_type *creature_ptr);
extern void dispel_player(player_type *creature_ptr);
extern bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, IDX p, bool do_dec);
(!p_ptr->levitation && have_flag(f_ptr->flags, FF_DEEP))))
{
msg_print(_("ここでは素早く動けない。", "You cannot run in here."));
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
if (p_ptr->prace == RACE_MERFOLK)
{
if ((p_ptr->action == ACTION_REST) || (p_ptr->action == ACTION_FISH) || (stop_search && (p_ptr->action == ACTION_SEARCH)))
{
/* Cancel */
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
/* Cancel running */
{
if (!(empty_hands_status & EMPTY_HAND_RARM))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
}
{
if (p_ptr->action == ACTION_KAMAE)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
else
msg_print(_("もともと構えていない。", "You are not assuming a posture."));
break;
}
}
- set_action(ACTION_KAMAE);
+ set_action(p_ptr, ACTION_KAMAE);
if (p_ptr->special_defense & (KAMAE_GENBU << new_kamae))
{
{
if (p_ptr->action == ACTION_KATA)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
else
msg_print(_("もともと構えていない。", "You are not assuming posture."));
break;
}
}
- set_action(ACTION_KATA);
+ set_action(p_ptr, ACTION_KATA);
if (p_ptr->special_defense & (KATA_IAI << new_kata))
{
{
if (p_ptr->action == ACTION_LEARN)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
else
{
- set_action(ACTION_LEARN);
+ set_action(p_ptr, ACTION_LEARN);
}
free_turn(p_ptr);
break;
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
switch (p_ptr->pclass)
CASTING_HEX_FLAGS(p_ptr) = 0;
CASTING_HEX_NUM(p_ptr) = 0;
- if (p_ptr->action == ACTION_SPELL) set_action(ACTION_NONE);
+ if (p_ptr->action == ACTION_SPELL) set_action(p_ptr, ACTION_NONE);
p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
p_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);
do_spell(REALM_HEX, spell, SPELL_STOP);
CASTING_HEX_FLAGS(p_ptr) &= ~(1L << spell);
CASTING_HEX_NUM(p_ptr)--;
- if (!SINGING_SONG_ID(p_ptr)) set_action(ACTION_NONE);
+ if (!SINGING_SONG_ID(p_ptr)) set_action(p_ptr, ACTION_NONE);
}
}
if (stop)
CASTING_HEX_FLAGS(p_ptr) |= 1L << (spell);
CASTING_HEX_NUM(p_ptr)++;
- if (p_ptr->action != ACTION_SPELL) set_action(ACTION_SPELL);
+ if (p_ptr->action != ACTION_SPELL) set_action(p_ptr, ACTION_SPELL);
}
if (!info)
/* Now the player is singing */
- set_action(ACTION_SING);
+ set_action(p_ptr, ACTION_SING);
p_ptr->update |= (PU_BONUS);
p_ptr->redraw |= (PR_STATUS);
/* The player is singing? */
if (!SINGING_SONG_EFFECT(creature_ptr)) return;
- /* Hack -- if called from set_action(), avoid recursive loop */
- if (creature_ptr->action == ACTION_SING) set_action(ACTION_NONE);
+ /* Hack -- if called from set_action(p_ptr, ), avoid recursive loop */
+ if (creature_ptr->action == ACTION_SING) set_action(p_ptr, ACTION_NONE);
/* Message text of each song or etc. */
do_spell(REALM_MUSIC, SINGING_SONG_ID(creature_ptr), SPELL_STOP);
free_turn(creature_ptr);
return FALSE;
}
- set_action(ACTION_FISH);
+ set_action(p_ptr, ACTION_FISH);
creature_ptr->redraw |= (PR_STATE);
return TRUE;
}
{
if (creature_ptr->action == ACTION_HAYAGAKE)
{
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
}
else
{
}
else
{
- set_action(ACTION_HAYAGAKE);
+ set_action(p_ptr, ACTION_HAYAGAKE);
}
}
creature_ptr->energy_use = 0;
if (hex_spelling_any()) stop_hex_spell_all();
/* Cancel any special action */
- set_action(ACTION_NONE);
+ set_action(p_ptr, ACTION_NONE);
/* Go into the global map */
p_ptr->wild_mode = TRUE;