5 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
7 * This software may be copied and distributed for educational, research,
8 * and not for profit purposes provided that this copyright and statement
9 * are included in all such copies. Other copyrights may also apply.
11 * 2013 Deskull rearranged comment for Doxygen.
14 #include "status/action-setter.h"
15 #include "core/player-redraw-types.h"
16 #include "core/player-update-types.h"
17 #include "player/attack-defense-types.h"
18 #include "player/special-defense-types.h"
19 #include "spell-realm/spells-hex.h"
20 #include "view/display-messages.h"
23 * @brief プレイヤーの継続行動を設定する。
24 * @param typ 継続行動のID\n
25 * #ACTION_NONE / #ACTION_SEARCH / #ACTION_REST / #ACTION_LEARN / #ACTION_FISH / #ACTION_KAMAE / #ACTION_KATA / #ACTION_SING / #ACTION_HAYAGAKE / #ACTION_SPELL
29 void set_action(player_type *creature_ptr, ACTION_IDX typ)
31 int prev_typ = creature_ptr->action;
32 if (typ == prev_typ) {
38 msg_print(_("探索をやめた。", "You no longer walk carefully."));
39 creature_ptr->redraw |= (PR_SPEED);
43 creature_ptr->resting = 0;
47 msg_print(_("学習をやめた。", "You stop learning."));
48 creature_ptr->new_mane = FALSE;
52 msg_print(_("構えをといた。", "You stop assuming the special stance."));
53 creature_ptr->special_defense &= ~(KAMAE_MASK);
57 msg_print(_("型を崩した。", "You stop assuming the special stance."));
58 creature_ptr->special_defense &= ~(KATA_MASK);
59 creature_ptr->update |= (PU_MONSTERS);
60 creature_ptr->redraw |= (PR_STATUS);
64 msg_print(_("歌うのをやめた。", "You stop singing."));
67 case ACTION_HAYAGAKE: {
68 msg_print(_("足が重くなった。", "You are no longer walking extremely fast."));
69 take_turn(creature_ptr, 100);
73 msg_print(_("呪文の詠唱を中断した。", "You stopped casting."));
78 creature_ptr->action = typ;
80 /* If we are requested other action, stop singing */
81 if (prev_typ == ACTION_SING)
82 stop_singing(creature_ptr);
84 if (prev_typ == ACTION_SPELL)
85 stop_hex_spell(creature_ptr);
87 switch (creature_ptr->action) {
89 msg_print(_("注意深く歩き始めた。", "You begin to walk carefully."));
90 creature_ptr->redraw |= (PR_SPEED);
94 msg_print(_("学習を始めた。", "You begin learning"));
98 msg_print(_("水面に糸を垂らした...", "You begin fishing..."));
101 case ACTION_HAYAGAKE: {
102 msg_print(_("足が羽のように軽くなった。", "You begin to walk extremely fast."));
110 creature_ptr->update |= (PU_BONUS);
111 creature_ptr->redraw |= (PR_STATE);