OSDN Git Service

Reworded English description for sniper's exploding arrow ability.
[hengband/hengband.git] / src / mind / mind-warrior-mage.c
1 #include "mind/mind-warrior-mage.h"
2 #include "core/hp-mp-processor.h"
3 #include "core/player-redraw-types.h"
4 #include "player/player-damage.h"
5 #include "view/display-messages.h"
6
7 bool comvert_hp_to_mp(player_type *creature_ptr)
8 {
9     int gain_sp = take_hit(creature_ptr, DAMAGE_USELIFE, creature_ptr->lev, _("HPからMPへの無謀な変換", "thoughtless conversion from HP to SP"), -1) / 5;
10     if (!gain_sp) {
11         msg_print(_("変換に失敗した。", "You failed to convert."));
12         creature_ptr->redraw |= (PR_HP | PR_MANA);
13         return TRUE;
14     }
15
16     creature_ptr->csp += gain_sp;
17     if (creature_ptr->csp > creature_ptr->msp) {
18         creature_ptr->csp = creature_ptr->msp;
19         creature_ptr->csp_frac = 0;
20     }
21
22     creature_ptr->redraw |= (PR_HP | PR_MANA);
23     return TRUE;
24 }
25
26 bool comvert_mp_to_hp(player_type *creature_ptr)
27 {
28     if (creature_ptr->csp >= creature_ptr->lev / 5) {
29         creature_ptr->csp -= creature_ptr->lev / 5;
30         hp_player(creature_ptr, creature_ptr->lev);
31     } else {
32         msg_print(_("変換に失敗した。", "You failed to convert."));
33     }
34
35     creature_ptr->redraw |= (PR_HP | PR_MANA);
36     return TRUE;
37 }