<ClCompile Include="..\..\src\spell\spell-info.c" />\r
<ClCompile Include="..\..\src\status\element-resistance.c" />\r
<ClCompile Include="..\..\src\status\form-changer.c" />\r
+ <ClCompile Include="..\..\src\status\shape-changer.c" />\r
<ClCompile Include="..\..\src\status\sight-setter.c" />\r
<ClCompile Include="..\..\src\status\experience.c" />\r
<ClCompile Include="..\..\src\status\temporary-resistance.c" />\r
<ClInclude Include="..\..\src\spell-realm\spells-chaos.h" />\r
<ClInclude Include="..\..\src\spell\spell-info.h" />\r
<ClInclude Include="..\..\src\status\element-resistance.h" />\r
+ <ClInclude Include="..\..\src\status\shape-changer.h" />\r
<ClInclude Include="..\..\src\status\sight-setter.h" />\r
<ClInclude Include="..\..\src\status\form-changer.h" />\r
<ClInclude Include="..\..\src\status\experience.h" />\r
<ClCompile Include="..\..\src\mspell\mspell-dispel.c">
<Filter>mspell</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\status\shape-changer.c">
+ <Filter>status</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\mspell\mspell-dispel.h">
<Filter>mspell</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\status\shape-changer.h">
+ <Filter>status</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
status/element-resistance.c status/element-resistance.h \
status/experience.c status/experience.h \
status/form-changer.c status/form-changer.h \
+ status/shape-changer.c status/shape-changer.h \
status/sight-setter.c status/sight-setter.h \
status/temporary-resistance.c status/temporary-resistance.h \
\
#include "realm/realm-types.h"
#include "spell-kind/spells-perception.h"
#include "status/experience.h"
+#include "status/shape-changer.h"
#include "sv-definition/sv-lite-types.h"
#include "term/screen-processor.h"
#include "util/int-char-converter.h"
#include "mutation/mutation.h"
#include "object/object-broken.h"
#include "player/player-damage.h"
-#include "player/player-effects.h"
#include "player/player-race-types.h"
#include "player/player-race.h"
#include "spell-kind/spells-teleport.h"
#include "status/base-status.h"
#include "status/element-resistance.h"
#include "status/experience.h"
+#include "status/shape-changer.h"
#include "system/object-type-definition.h"
#include "view/display-messages.h"
#include "world/world.h"
#include "object/lite-processor.h"
#include "player/digestion-processor.h"
#include "player/player-damage.h"
-#include "player/player-effects.h"
#include "player/player-move.h"
#include "realm/realm-types.h"
#include "spell-kind/spells-floor.h"
#include "status/body-improvement.h"
#include "status/buff-setter.h"
#include "status/form-changer.h"
+#include "status/shape-changer.h"
#include "status/sight-setter.h"
#include "store/store-owners.h"
#include "store/store-util.h"
#include "player/avatar.h"
#include "player/player-class.h"
#include "player/player-damage.h"
-#include "player/player-effects.h"
#include "player/player-personalities-types.h"
#include "player/player-race-types.h"
#include "player/selfinfo.h"
#include "spell/spell-types.h"
#include "spell/spells3.h"
#include "status/element-resistance.h"
+#include "status/shape-changer.h"
#include "system/object-type-definition.h"
#include "view/display-messages.h"
#include "object/object-kind-hook.h"
#include "player/player-class.h"
#include "player/player-damage.h"
-#include "player/player-effects.h"
#include "player/player-race-types.h"
#include "player/player-status.h"
#include "spell-kind/spells-floor.h"
#include "spell/spell-types.h"
#include "status/base-status.h"
#include "status/experience.h"
+#include "status/shape-changer.h"
#include "view/display-messages.h"
#ifdef JP
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATE);
}
-
-void do_poly_wounds(player_type *creature_ptr)
-{
- s16b wounds = creature_ptr->cut;
- s16b hit_p = (creature_ptr->mhp - creature_ptr->chp);
- s16b change = damroll(creature_ptr->lev, 5);
- bool Nasty_effect = one_in_(5);
- if (!(wounds || hit_p || Nasty_effect))
- return;
-
- msg_print(_("傷がより軽いものに変化した。", "Your wounds are polymorphed into less serious ones."));
- hp_player(creature_ptr, change);
- if (Nasty_effect) {
- msg_print(_("新たな傷ができた!", "A new wound was created!"));
- take_hit(creature_ptr, DAMAGE_LOSELIFE, change / 2, _("変化した傷", "a polymorphed wound"), -1);
- set_cut(creature_ptr, change);
- } else {
- set_cut(creature_ptr, creature_ptr->cut - (change / 2));
- }
-}
-
-/*
- * Change player race
- */
-void change_race(player_type *creature_ptr, player_race_type new_race, concptr effect_msg)
-{
- concptr title = race_info[new_race].title;
- int old_race = creature_ptr->prace;
-#ifdef JP
- msg_format("あなたは%s%sに変化した!", effect_msg, title);
-#else
- msg_format("You turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
-#endif
-
- chg_virtue(creature_ptr, V_CHANCE, 2);
- if (creature_ptr->prace < 32) {
- creature_ptr->old_race1 |= 1L << creature_ptr->prace;
- } else {
- creature_ptr->old_race2 |= 1L << (creature_ptr->prace - 32);
- }
-
- creature_ptr->prace = new_race;
- rp_ptr = &race_info[creature_ptr->prace];
- creature_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
-
- bool is_special_class = creature_ptr->pclass == CLASS_MONK;
- is_special_class |= creature_ptr->pclass == CLASS_FORCETRAINER;
- is_special_class |= creature_ptr->pclass == CLASS_NINJA;
- bool is_special_race = creature_ptr->prace == RACE_KLACKON;
- is_special_race |= creature_ptr->prace == RACE_SPRITE;
- if (is_special_class && is_special_race)
- creature_ptr->expfact -= 15;
-
- get_height_weight(creature_ptr);
-
- if (creature_ptr->pclass == CLASS_SORCERER)
- creature_ptr->hitdie = rp_ptr->r_mhp / 2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
- else
- creature_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
-
- roll_hitdice(creature_ptr, 0L);
- check_experience(creature_ptr);
- creature_ptr->redraw |= (PR_BASIC);
- creature_ptr->update |= (PU_BONUS);
- handle_stuff(creature_ptr);
-
- if (old_race != creature_ptr->prace)
- autopick_load_pref(creature_ptr, FALSE);
-
- lite_spot(creature_ptr, creature_ptr->y, creature_ptr->x);
-}
-
-void do_poly_self(player_type *creature_ptr)
-{
- int power = creature_ptr->lev;
-
- msg_print(_("あなたは変化の訪れを感じた...", "You feel a change coming over you..."));
- chg_virtue(creature_ptr, V_CHANCE, 1);
-
- if ((power > randint0(20)) && one_in_(3) && (creature_ptr->prace != RACE_ANDROID)) {
- char effect_msg[80] = "";
- player_race_type new_race;
-
- power -= 10;
- if ((power > randint0(5)) && one_in_(4)) {
- power -= 2;
- if (creature_ptr->psex == SEX_MALE) {
- creature_ptr->psex = SEX_FEMALE;
- sp_ptr = &sex_info[creature_ptr->psex];
- sprintf(effect_msg, _("女性の", "female "));
- } else {
- creature_ptr->psex = SEX_MALE;
- sp_ptr = &sex_info[creature_ptr->psex];
- sprintf(effect_msg, _("男性の", "male "));
- }
- }
-
- if ((power > randint0(30)) && one_in_(5)) {
- int tmp = 0;
- power -= 15;
- while (tmp < A_MAX) {
- if (one_in_(2)) {
- (void)dec_stat(creature_ptr, tmp, randint1(6) + 6, one_in_(3));
- power -= 1;
- }
- tmp++;
- }
-
- (void)dec_stat(creature_ptr, A_CHR, randint1(6), TRUE);
-
- if (effect_msg[0]) {
- char tmp_msg[10];
- sprintf(tmp_msg, _("%s", "%s "), effect_msg);
- sprintf(effect_msg, _("奇形の%s", "deformed %s "), tmp_msg);
- } else {
- sprintf(effect_msg, _("奇形の", "deformed "));
- }
- }
-
- while ((power > randint0(20)) && one_in_(10)) {
- power -= 10;
-
- if (!lose_mutation(creature_ptr, 0))
- msg_print(_("奇妙なくらい普通になった気がする。", "You feel oddly normal."));
- }
-
- do {
- new_race = (player_race_type)randint0(MAX_RACES);
- } while ((new_race == creature_ptr->prace) || (new_race == RACE_ANDROID));
-
- change_race(creature_ptr, new_race, effect_msg);
- }
-
- if ((power > randint0(30)) && one_in_(6)) {
- int tmp = 0;
- power -= 20;
- msg_format(_("%sの構成が変化した!", "Your internal organs are rearranged!"), creature_ptr->prace == RACE_ANDROID ? "機械" : "内臓");
-
- while (tmp < A_MAX) {
- (void)dec_stat(creature_ptr, tmp, randint1(6) + 6, one_in_(3));
- tmp++;
- }
- if (one_in_(6)) {
- msg_print(_("現在の姿で生きていくのは困難なようだ!", "You find living difficult in your present form!"));
- take_hit(creature_ptr, DAMAGE_LOSELIFE, damroll(randint1(10), creature_ptr->lev), _("致命的な突然変異", "a lethal mutation"), -1);
-
- power -= 10;
- }
- }
-
- if ((power > randint0(20)) && one_in_(4)) {
- power -= 10;
-
- get_max_stats(creature_ptr);
- roll_hitdice(creature_ptr, 0L);
- }
-
- while ((power > randint0(15)) && one_in_(3)) {
- power -= 7;
- (void)gain_mutation(creature_ptr, 0);
- }
-
- if (power > randint0(5)) {
- power -= 5;
- do_poly_wounds(creature_ptr);
- }
-
- while (power > 0) {
- status_shuffle(creature_ptr);
- power--;
- }
-}
#include "system/angband.h"
void set_action(player_type *creature_ptr, ACTION_IDX typ);
-void do_poly_self(player_type *creature_ptr);
-void do_poly_wounds(player_type *creature_ptr);
-void change_race(player_type *creature_ptr, player_race_type new_race, concptr effect_msg);
#include "effect/effect-characteristics.h"
#include "io/targeting.h"
#include "player/player-class.h"
-#include "player/player-effects.h"
#include "spell/process-effect.h"
#include "spell/spells-diceroll.h"
#include "spell-kind/spells-random.h"
#include "spell/spells-summon.h"
#include "spell/spell-types.h"
#include "spell/spells3.h"
+#include "status/shape-changer.h"
#include "view/display-messages.h"
/*!
--- /dev/null
+#include "status/shape-changer.h"
+#include "autopick/autopick-reader-writer.h"
+#include "birth/birth-body-spec.h"
+#include "birth/birth-stat.h"
+#include "core/hp-mp-processor.h"
+#include "core/stuff-handler.h"
+#include "grid/grid.h"
+#include "mutation/mutation.h"
+#include "player/avatar.h"
+#include "player/player-class.h"
+#include "player/player-damage.h"
+#include "player/player-personality.h"
+#include "player/player-sex.h"
+#include "player/race-info-table.h"
+#include "spell/spells-status.h"
+#include "status/bad-status-setter.h"
+#include "status/base-status.h"
+#include "view/display-messages.h"
+
+void do_poly_wounds(player_type *creature_ptr)
+{
+ s16b wounds = creature_ptr->cut;
+ s16b hit_p = (creature_ptr->mhp - creature_ptr->chp);
+ s16b change = damroll(creature_ptr->lev, 5);
+ bool Nasty_effect = one_in_(5);
+ if (!(wounds || hit_p || Nasty_effect))
+ return;
+
+ msg_print(_("傷がより軽いものに変化した。", "Your wounds are polymorphed into less serious ones."));
+ hp_player(creature_ptr, change);
+ if (Nasty_effect) {
+ msg_print(_("新たな傷ができた!", "A new wound was created!"));
+ take_hit(creature_ptr, DAMAGE_LOSELIFE, change / 2, _("変化した傷", "a polymorphed wound"), -1);
+ set_cut(creature_ptr, change);
+ } else {
+ set_cut(creature_ptr, creature_ptr->cut - (change / 2));
+ }
+}
+
+/*
+ * Change player race
+ */
+void change_race(player_type *creature_ptr, player_race_type new_race, concptr effect_msg)
+{
+ concptr title = race_info[new_race].title;
+ int old_race = creature_ptr->prace;
+#ifdef JP
+ msg_format("あなたは%s%sに変化した!", effect_msg, title);
+#else
+ msg_format("You turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
+#endif
+
+ chg_virtue(creature_ptr, V_CHANCE, 2);
+ if (creature_ptr->prace < 32) {
+ creature_ptr->old_race1 |= 1L << creature_ptr->prace;
+ } else {
+ creature_ptr->old_race2 |= 1L << (creature_ptr->prace - 32);
+ }
+
+ creature_ptr->prace = new_race;
+ rp_ptr = &race_info[creature_ptr->prace];
+ creature_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
+
+ bool is_special_class = creature_ptr->pclass == CLASS_MONK;
+ is_special_class |= creature_ptr->pclass == CLASS_FORCETRAINER;
+ is_special_class |= creature_ptr->pclass == CLASS_NINJA;
+ bool is_special_race = creature_ptr->prace == RACE_KLACKON;
+ is_special_race |= creature_ptr->prace == RACE_SPRITE;
+ if (is_special_class && is_special_race)
+ creature_ptr->expfact -= 15;
+
+ get_height_weight(creature_ptr);
+
+ if (creature_ptr->pclass == CLASS_SORCERER)
+ creature_ptr->hitdie = rp_ptr->r_mhp / 2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
+ else
+ creature_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
+
+ roll_hitdice(creature_ptr, 0L);
+ check_experience(creature_ptr);
+ creature_ptr->redraw |= (PR_BASIC);
+ creature_ptr->update |= (PU_BONUS);
+ handle_stuff(creature_ptr);
+
+ if (old_race != creature_ptr->prace)
+ autopick_load_pref(creature_ptr, FALSE);
+
+ lite_spot(creature_ptr, creature_ptr->y, creature_ptr->x);
+}
+
+void do_poly_self(player_type *creature_ptr)
+{
+ int power = creature_ptr->lev;
+
+ msg_print(_("あなたは変化の訪れを感じた...", "You feel a change coming over you..."));
+ chg_virtue(creature_ptr, V_CHANCE, 1);
+
+ if ((power > randint0(20)) && one_in_(3) && (creature_ptr->prace != RACE_ANDROID)) {
+ char effect_msg[80] = "";
+ player_race_type new_race;
+
+ power -= 10;
+ if ((power > randint0(5)) && one_in_(4)) {
+ power -= 2;
+ if (creature_ptr->psex == SEX_MALE) {
+ creature_ptr->psex = SEX_FEMALE;
+ sp_ptr = &sex_info[creature_ptr->psex];
+ sprintf(effect_msg, _("女性の", "female "));
+ } else {
+ creature_ptr->psex = SEX_MALE;
+ sp_ptr = &sex_info[creature_ptr->psex];
+ sprintf(effect_msg, _("男性の", "male "));
+ }
+ }
+
+ if ((power > randint0(30)) && one_in_(5)) {
+ int tmp = 0;
+ power -= 15;
+ while (tmp < A_MAX) {
+ if (one_in_(2)) {
+ (void)dec_stat(creature_ptr, tmp, randint1(6) + 6, one_in_(3));
+ power -= 1;
+ }
+ tmp++;
+ }
+
+ (void)dec_stat(creature_ptr, A_CHR, randint1(6), TRUE);
+
+ if (effect_msg[0]) {
+ char tmp_msg[10];
+ sprintf(tmp_msg, _("%s", "%s "), effect_msg);
+ sprintf(effect_msg, _("奇形の%s", "deformed %s "), tmp_msg);
+ } else {
+ sprintf(effect_msg, _("奇形の", "deformed "));
+ }
+ }
+
+ while ((power > randint0(20)) && one_in_(10)) {
+ power -= 10;
+
+ if (!lose_mutation(creature_ptr, 0))
+ msg_print(_("奇妙なくらい普通になった気がする。", "You feel oddly normal."));
+ }
+
+ do {
+ new_race = (player_race_type)randint0(MAX_RACES);
+ } while ((new_race == creature_ptr->prace) || (new_race == RACE_ANDROID));
+
+ change_race(creature_ptr, new_race, effect_msg);
+ }
+
+ if ((power > randint0(30)) && one_in_(6)) {
+ int tmp = 0;
+ power -= 20;
+ msg_format(_("%sの構成が変化した!", "Your internal organs are rearranged!"), creature_ptr->prace == RACE_ANDROID ? "機械" : "内臓");
+
+ while (tmp < A_MAX) {
+ (void)dec_stat(creature_ptr, tmp, randint1(6) + 6, one_in_(3));
+ tmp++;
+ }
+ if (one_in_(6)) {
+ msg_print(_("現在の姿で生きていくのは困難なようだ!", "You find living difficult in your present form!"));
+ take_hit(creature_ptr, DAMAGE_LOSELIFE, damroll(randint1(10), creature_ptr->lev), _("致命的な突然変異", "a lethal mutation"), -1);
+
+ power -= 10;
+ }
+ }
+
+ if ((power > randint0(20)) && one_in_(4)) {
+ power -= 10;
+
+ get_max_stats(creature_ptr);
+ roll_hitdice(creature_ptr, 0L);
+ }
+
+ while ((power > randint0(15)) && one_in_(3)) {
+ power -= 7;
+ (void)gain_mutation(creature_ptr, 0);
+ }
+
+ if (power > randint0(5)) {
+ power -= 5;
+ do_poly_wounds(creature_ptr);
+ }
+
+ while (power > 0) {
+ status_shuffle(creature_ptr);
+ power--;
+ }
+}
--- /dev/null
+#pragma once
+
+#include "system/angband.h"
+
+void do_poly_self(player_type *creature_ptr);
+void do_poly_wounds(player_type *creature_ptr);
+void change_race(player_type *creature_ptr, player_race_type new_race, concptr effect_msg);