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"
7 bool comvert_hp_to_mp(player_type *creature_ptr)
9 int gain_sp = take_hit(creature_ptr, DAMAGE_USELIFE, creature_ptr->lev, _("HPからMPへの無謀な変換", "thoughtless conversion from HP to SP"), -1) / 5;
11 msg_print(_("変換に失敗した。", "You failed to convert."));
12 creature_ptr->redraw |= (PR_HP | PR_MANA);
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;
22 creature_ptr->redraw |= (PR_HP | PR_MANA);
26 bool comvert_mp_to_hp(player_type *creature_ptr)
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);
32 msg_print(_("変換に失敗した。", "You failed to convert."));
35 creature_ptr->redraw |= (PR_HP | PR_MANA);