#include "market/poker.h"
#include "monster-race/monster-race.h"
#include "mutation/mutation-flag-types.h"
-#include "mutation/mutation.h"
+#include "mutation/mutation-investor-remover.h"
#include "object-hook/hook-armor.h"
#include "object-hook/hook-bow.h"
#include "object-hook/hook-weapon.h"
#include "core/player-update-types.h"
#include "core/stuff-handler.h"
#include "mutation/gain-mutation-switcher.h"
+#include "mutation/lose-mutation-switcher.h"
#include "mutation/mutation-flag-types.h"
#include "mutation/mutation-util.h"
#include "mutation/mutation.h" // todo calc_mutant_regenerate_mod() が相互依存している、後で消す.
handle_stuff(creature_ptr);
return TRUE;
}
+
+/*!
+ * @brief プレイヤーから突然変異を取り除く
+ * @param choose_mut 取り除きたい突然変異のID、0ならばランダムに消去
+ * @return なし
+ */
+bool lose_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut)
+{
+ glm_type tmp_glm;
+ glm_type *glm_ptr = initialize_glm_type(&tmp_glm, choose_mut);
+ int attempts_left = 20;
+ if (glm_ptr->choose_mut)
+ attempts_left = 1;
+
+ while (attempts_left--) {
+ switch_lose_mutation(creature_ptr, glm_ptr);
+ if (glm_ptr->muta_class && glm_ptr->muta_which) {
+ if (*(glm_ptr->muta_class) & glm_ptr->muta_which) {
+ glm_ptr->muta_chosen = TRUE;
+ }
+ }
+
+ if (glm_ptr->muta_chosen)
+ break;
+ }
+
+ if (!glm_ptr->muta_chosen)
+ return FALSE;
+
+ msg_print(glm_ptr->muta_desc);
+ if (glm_ptr->muta_class != NULL)
+ *glm_ptr->muta_class &= ~(glm_ptr->muta_which);
+
+ creature_ptr->update |= PU_BONUS;
+ handle_stuff(creature_ptr);
+ creature_ptr->mutant_regenerate_mod = calc_mutant_regenerate_mod(creature_ptr);
+ return TRUE;
+}
+
+void lose_all_mutations(player_type *creature_ptr)
+{
+ if (creature_ptr->muta1 || creature_ptr->muta2 || creature_ptr->muta3) {
+ chg_virtue(creature_ptr, V_CHANCE, -5);
+ msg_print(_("全ての突然変異が治った。", "You are cured of all mutations."));
+ creature_ptr->muta1 = creature_ptr->muta2 = creature_ptr->muta3 = 0;
+ creature_ptr->update |= PU_BONUS;
+ handle_stuff(creature_ptr);
+ creature_ptr->mutant_regenerate_mod = calc_mutant_regenerate_mod(creature_ptr);
+ }
+}
#include "system/angband.h"
bool gain_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut);
+bool lose_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut);
+void lose_all_mutations(player_type *creature_ptr);
#include "monster-race/monster-race.h"
#include "monster/monster-status.h"
#include "mutation/mutation-flag-types.h"
-#include "mutation/mutation.h"
+#include "mutation/mutation-investor-remover.h"
#include "object-hook/hook-checker.h"
#include "object-hook/hook-enchant.h"
#include "object/lite-processor.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-info.h"
#include "monster/smart-learn-types.h"
-#include "mutation/gain-mutation-switcher.h"
-#include "mutation/lose-mutation-switcher.h"
#include "mutation/mutation-flag-types.h"
#include "mutation/mutation-investor-remover.h" // todo 相互依存している、このファイルからの依存はOK.
#include "mutation/mutation-techniques.h"
#include "system/object-type-definition.h"
#include "target/target-getter.h"
#include "view/display-messages.h"
-
-/*!
- * @brief プレイヤーから突然変異を取り除く
- * @param choose_mut 取り除きたい突然変異のID、0ならばランダムに消去
- * @return なし
- */
-bool lose_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut)
-{
- glm_type tmp_glm;
- glm_type *glm_ptr = initialize_glm_type(&tmp_glm, choose_mut);
- int attempts_left = 20;
- if (glm_ptr->choose_mut)
- attempts_left = 1;
-
- while (attempts_left--) {
- switch_lose_mutation(creature_ptr, glm_ptr);
- if (glm_ptr->muta_class && glm_ptr->muta_which) {
- if (*(glm_ptr->muta_class)&glm_ptr->muta_which) {
- glm_ptr->muta_chosen = TRUE;
- }
- }
-
- if (glm_ptr->muta_chosen)
- break;
- }
-
- if (!glm_ptr->muta_chosen)
- return FALSE;
-
- msg_print(glm_ptr->muta_desc);
- if (glm_ptr->muta_class != NULL)
- *glm_ptr->muta_class &= ~(glm_ptr->muta_which);
-
- creature_ptr->update |= PU_BONUS;
- handle_stuff(creature_ptr);
- creature_ptr->mutant_regenerate_mod = calc_mutant_regenerate_mod(creature_ptr);
- return TRUE;
-}
-
-void lose_all_mutations(player_type *creature_ptr)
-{
- if (creature_ptr->muta1 || creature_ptr->muta2 || creature_ptr->muta3) {
- chg_virtue(creature_ptr, V_CHANCE, -5);
- msg_print(_("全ての突然変異が治った。", "You are cured of all mutations."));
- creature_ptr->muta1 = creature_ptr->muta2 = creature_ptr->muta3 = 0;
- creature_ptr->update |= PU_BONUS;
- handle_stuff(creature_ptr);
- creature_ptr->mutant_regenerate_mod = calc_mutant_regenerate_mod(creature_ptr);
- }
-}
-
/*!
* @brief 現在プレイヤー得ている突然変異の数を返す。
* @return 現在得ている突然変異の数
#include "system/angband.h"
-bool lose_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut);
-void lose_all_mutations(player_type *creature_ptr);
int calc_mutant_regenerate_mod(player_type *creature_ptr);
bool exe_mutation_power(player_type *creature_ptr, int power);
void become_living_trump(player_type *creature_ptr);
#include "main/sound-definitions-table.h"
#include "main/sound-of-music.h"
#include "mutation/mutation-investor-remover.h"
-#include "mutation/mutation.h"
#include "object/object-broken.h"
#include "object/object-generator.h"
#include "object/object-info.h"
#include "spell-realm/spells-trump.h"
#include "monster-floor/monster-summon.h"
#include "monster-floor/place-monster-types.h"
-#include "mutation/mutation.h"
+#include "mutation/mutation-investor-remover.h"
#include "player/avatar.h"
#include "spell-kind/earthquake.h"
#include "spell-kind/spells-charm.h"
#include "game-option/disturbance-options.h"
#include "grid/grid.h"
#include "mutation/mutation-investor-remover.h"
-#include "mutation/mutation.h"
#include "player/avatar.h"
#include "player/player-class.h"
#include "player/player-damage.h"