1 #include "mind/mind-monk.h"
2 #include "action/action-limited.h"
3 #include "core/player-redraw-types.h"
4 #include "core/player-update-types.h"
5 #include "io/input-key-acceptor.h"
6 #include "mind/stances-table.h"
7 #include "player/attack-defense-types.h"
8 #include "player/special-defense-types.h"
9 #include "status/action-setter.h"
10 #include "system/player-type-definition.h"
11 #include "term/screen-processor.h"
12 #include "util/int-char-converter.h"
13 #include "view/display-messages.h"
15 static void set_stance(player_type *creature_ptr, const int new_stance)
17 set_action(creature_ptr, ACTION_KAMAE);
18 if (creature_ptr->special_defense & (KAMAE_GENBU << new_stance)) {
19 msg_print(_("構え直した。", "You reassume a stance."));
23 creature_ptr->special_defense &= ~(KAMAE_MASK);
24 creature_ptr->update |= PU_BONUS;
25 creature_ptr->redraw |= PR_STATE;
26 msg_format(_("%sの構えをとった。", "You assume the %s stance."), monk_stances[new_stance].desc);
27 creature_ptr->special_defense |= (KAMAE_GENBU << new_stance);
32 * @return 構えを変化させたらTRUE、構え不能かキャンセルしたらFALSEを返す。
34 bool choose_monk_stance(player_type *creature_ptr)
36 if (cmd_limit_confused(creature_ptr))
40 prt(_(" a) 構えをとく", " a) No form"), 2, 20);
41 for (int i = 0; i < MAX_KAMAE; i++) {
42 if (creature_ptr->lev >= monk_stances[i].min_level) {
44 sprintf(buf, " %c) %-12s %s", I2A(i + 1), monk_stances[i].desc, monk_stances[i].info);
50 prt(_(" どの構えをとりますか?", " Choose Stance: "), 1, 14);
54 char choice = inkey();
55 if (choice == ESCAPE) {
60 if ((choice == 'a') || (choice == 'A')) {
61 if (creature_ptr->action == ACTION_KAMAE) {
62 set_action(creature_ptr, ACTION_NONE);
64 msg_print(_("もともと構えていない。", "You are not in a special stance."));
69 if ((choice == 'b') || (choice == 'B')) {
72 } else if (((choice == 'c') || (choice == 'C')) && (creature_ptr->lev > 29)) {
75 } else if (((choice == 'd') || (choice == 'D')) && (creature_ptr->lev > 34)) {
78 } else if (((choice == 'e') || (choice == 'E')) && (creature_ptr->lev > 39)) {
84 set_stance(creature_ptr, new_stance);
85 creature_ptr->redraw |= PR_STATE;