| 4012 | } |
| 4013 | |
| 4014 | bool enough_mp(int minimum, bool suppress_msg, bool abort_macros) |
| 4015 | { |
| 4016 | ASSERT(!crawl_state.game_is_arena()); |
| 4017 | |
| 4018 | if (you.has_mutation(MUT_HP_CASTING)) |
| 4019 | return enough_hp(minimum, suppress_msg, abort_macros); |
| 4020 | |
| 4021 | if (you.magic_points < minimum) |
| 4022 | { |
| 4023 | if (!suppress_msg) |
| 4024 | { |
| 4025 | if (get_real_mp(true) < minimum) |
| 4026 | mpr("You don't have enough magic capacity."); |
| 4027 | else |
| 4028 | mpr("You don't have enough magic at the moment."); |
| 4029 | } |
| 4030 | if (abort_macros) |
| 4031 | { |
| 4032 | crawl_state.cancel_cmd_again(); |
| 4033 | crawl_state.cancel_cmd_repeat(); |
| 4034 | } |
| 4035 | return false; |
| 4036 | } |
| 4037 | |
| 4038 | return true; |
| 4039 | } |
| 4040 | |
| 4041 | void inc_mp(int mp_gain, bool silent) |
| 4042 | { |
no test coverage detected