<ClCompile Include="..\..\src\status\element-resistance.c" />\r
<ClCompile Include="..\..\src\status\form-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
<ClCompile Include="..\..\src\view\display-map.c" />\r
<ClCompile Include="..\..\src\view\display-sub-windows.c" />\r
<ClInclude Include="..\..\src\status\element-resistance.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
<ClInclude Include="..\..\src\status\temporary-resistance.h" />\r
<ClInclude Include="..\..\src\system\alloc-entries.h" />\r
<ClInclude Include="..\..\src\term\screen-processor.h" />\r
<ClCompile Include="..\..\src\status\form-changer.c">
<Filter>status</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\status\experience.c">
+ <Filter>status</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\status\form-changer.h">
<Filter>status</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\status\experience.h">
+ <Filter>status</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
status/bad-status-setter.c status/bad-status-setter.h \
status/buff-setter.c status/buff-setter.h \
status/element-resistance.c status/element-resistance.h \
+ status/experience.c status/experience.h \
status/form-changer.c status/form-changer.h \
status/sight-setter.c status/sight-setter.h \
status/temporary-resistance.c status/temporary-resistance.h \
#include "spell/spells-summon.h"
#include "spell/spells-util.h"
#include "spell/technic-info-table.h"
+#include "status/experience.h"
#include "term/screen-processor.h"
#include "util/buffer-shaper.h"
#include "util/int-char-converter.h"
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
+#include "status/experience.h"
#include "status/form-changer.h"
#include "status/sight-setter.h"
#include "status/temporary-resistance.h"
#include "player/avatar.h"
#include "status/bad-status-setter.h"
#include "player/digestion-processor.h"
+#include "player/mimic-info-table.h"
#include "player/player-class.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "spell-realm/spells-hex.h"
#include "spell/spells-status.h"
#include "status/element-resistance.h"
-#include "player/mimic-info-table.h"
+#include "status/experience.h"
#include "sv-definition/sv-food-types.h"
#include "sv-definition/sv-other-types.h"
#include "util/string-processor.h"
#include "realm/realm-names-table.h"
#include "realm/realm-types.h"
#include "spell-kind/spells-perception.h"
+#include "status/experience.h"
#include "sv-definition/sv-lite-types.h"
#include "term/screen-processor.h"
#include "util/int-char-converter.h"
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
+#include "status/experience.h"
#include "status/form-changer.h"
#include "status/sight-setter.h"
#include "sv-definition/sv-potion-types.h"
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
+#include "status/experience.h"
#include "status/form-changer.h"
#include "store/rumor.h"
#include "sv-definition/sv-scroll-types.h"
#include "spell/spells-staff-only.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
+#include "status/experience.h"
#include "status/form-changer.h"
#include "sv-definition/sv-staff-types.h"
#include "term/screen-processor.h"
#include "spell-kind/spells-teleport.h"
#include "spell/spells-status.h"
#include "spell/spell-types.h"
+#include "status/experience.h"
#include "sv-definition/sv-other-types.h"
#include "sv-definition/sv-rod-types.h"
#include "status/form-changer.h"
#include "spell-kind/spells-teleport.h"
#include "spell/spells-status.h"
#include "spell/spell-types.h"
+#include "status/experience.h"
#include "sv-definition/sv-wand-types.h"
#include "term/screen-processor.h"
#include "view/display-messages.h"
#include "object/object-info.h"
#include "perception/object-perception.h"
#include "player/avatar.h"
-#include "status/bad-status-setter.h"
#include "player/player-effects.h"
#include "player/player-move.h"
#include "player/player-personalities-types.h"
#include "specific-object/torch.h"
#include "spell-kind/spells-teleport.h"
#include "spell-realm/spells-hex.h"
+#include "status/bad-status-setter.h"
+#include "status/experience.h"
#include "sv-definition/sv-bow-types.h"
#include "system/system-variables.h"
#include "term/screen-processor.h"
#include "spell/spells-status.h"
#include "spell/spells3.h"
#include "status/element-resistance.h"
+#include "status/experience.h"
#include "system/object-type-definition.h"
#include "view/display-messages.h"
#include "world/world.h"
#include "grid/grid.h"
#include "io/input-key-requester.h"
#include "io/write-diary.h"
-#include "status/bad-status-setter.h"
#include "player/player-damage.h"
-#include "player/player-effects.h"
#include "player/player-move.h"
#include "player/player-race-types.h"
#include "player/player-race.h"
#include "spell/spells-status.h"
#include "spell-kind/spells-teleport.h"
+#include "status/bad-status-setter.h"
+#include "status/experience.h"
#include "view/display-messages.h"
/*!
#include "spell/spells-status.h"
#include "spell/spell-types.h"
#include "spell/spells3.h"
+#include "status/experience.h"
#include "term/screen-processor.h"
#include "util/int-char-converter.h"
#include "view/display-messages.h"
#include "mind/mind-mirror-master.h"
#include "monster-race/monster-race.h"
#include "monster-race/race-indice-types.h"
-#include "status/bad-status-setter.h"
#include "player/player-effects.h"
+#include "status/bad-status-setter.h"
+#include "status/experience.h"
#include "view/display-messages.h"
void process_blind_attack(player_type *target_ptr, monap_type *monap_ptr)
#include "spell/spells3.h"
#include "status/bad-status-setter.h"
#include "status/element-resistance.h"
+#include "status/experience.h"
#include "system/object-type-definition.h"
#include "view/display-messages.h"
#include "object/object-info.h"
#include "player/avatar.h"
#include "player/mimic-info-table.h"
-#include "player/player-effects.h"
+#include "status/experience.h"
#include "view/display-messages.h"
#include "world/world-object.h"
#include "mspell/mspell-mask-definitions.h"
#include "object-enchant/object-curse.h"
#include "player/avatar.h"
-#include "player/player-effects.h"
#include "player/player-personalities-types.h"
#include "player/special-defense-types.h"
#include "spell-kind/spells-random.h"
#include "spell/spells-summon.h"
+#include "status/experience.h"
#include "view/display-messages.h"
#include "world/world.h"
#include "spell/spell-types.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
+#include "status/experience.h"
#include "term/screen-processor.h"
#include "util/int-char-converter.h"
#include "view/display-messages.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
#include "spell/spell-types.h"
+#include "status/experience.h"
#include "view/display-messages.h"
#ifdef JP
}
/*
- * Restores any drained experience
- */
-bool restore_level(player_type *creature_ptr)
-{
- if (creature_ptr->exp < creature_ptr->max_exp) {
- msg_print(_("経験値が戻ってきた気がする。", "You feel your experience returning."));
- creature_ptr->exp = creature_ptr->max_exp;
- check_experience(creature_ptr);
- return TRUE;
- }
-
- return FALSE;
-}
-
-/*
* Forget everything
*/
bool lose_all_info(player_type *creature_ptr)
}
}
-/*
- * Gain experience
- */
-void gain_exp_64(player_type *creature_ptr, s32b amount, u32b amount_frac)
-{
- if (creature_ptr->is_dead)
- return;
- if (creature_ptr->prace == RACE_ANDROID)
- return;
-
- s64b_add(&(creature_ptr->exp), &(creature_ptr->exp_frac), amount, amount_frac);
-
- if (creature_ptr->exp < creature_ptr->max_exp) {
- creature_ptr->max_exp += amount / 5;
- }
-
- check_experience(creature_ptr);
-}
-
-/*
- * Gain experience
- */
-void gain_exp(player_type *creature_ptr, s32b amount) { gain_exp_64(creature_ptr, amount, 0L); }
-
void calc_android_exp(player_type *creature_ptr)
{
u32b total_exp = 0;
creature_ptr->exp = creature_ptr->max_exp = total_exp;
check_experience(creature_ptr);
}
-
-/*
- * Lose experience
- */
-void lose_exp(player_type *creature_ptr, s32b amount)
-{
- if (creature_ptr->prace == RACE_ANDROID)
- return;
- if (amount > creature_ptr->exp)
- amount = creature_ptr->exp;
-
- creature_ptr->exp -= amount;
-
- check_experience(creature_ptr);
-}
-
-/*
- * Drain experience
- * If resisted to draining, return FALSE
- */
-bool drain_exp(player_type *creature_ptr, s32b drain, s32b slip, int hold_exp_prob)
-{
- if (creature_ptr->prace == RACE_ANDROID)
- return FALSE;
-
- if (creature_ptr->hold_exp && (randint0(100) < hold_exp_prob)) {
- msg_print(_("しかし自己の経験値を守りきった!", "You keep hold of your experience!"));
- return FALSE;
- }
-
- if (creature_ptr->hold_exp) {
- msg_print(_("経験値を少し吸い取られた気がする!", "You feel your experience slipping away!"));
- lose_exp(creature_ptr, slip);
- } else {
- msg_print(_("経験値が体から吸い取られた気がする!", "You feel your experience draining away!"));
- lose_exp(creature_ptr, drain);
- }
-
- return TRUE;
-}
-
bool do_dec_stat(player_type *creature_ptr, int stat);
bool do_res_stat(player_type *creature_ptr, int stat);
bool do_inc_stat(player_type *creature_ptr, int stat);
-bool restore_level(player_type *creature_ptr);
bool lose_all_info(player_type *creature_ptr);
-void gain_exp_64(player_type *creature_ptr, s32b amount, u32b amount_frac);
-void gain_exp(player_type *creature_ptr, s32b amount);
void calc_android_exp(player_type *creature_ptr);
-void lose_exp(player_type *creature_ptr, s32b amount);
-bool drain_exp(player_type *creature_ptr, s32b drain, s32b slip, int hold_exp_prob);
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 "spell/spells-status.h"
#include "spell/spells-summon.h"
#include "status/buff-setter.h"
+#include "status/experience.h"
#include "status/form-changer.h"
#include "status/element-resistance.h"
#include "floor/floor.h"
#include "io/targeting.h"
#include "player/digestion-processor.h"
-#include "player/player-effects.h"
#include "spell-kind/spells-curse-removal.h"
#include "spell-kind/spells-detection.h"
#include "spell-kind/spells-floor.h"
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
+#include "status/experience.h"
#include "status/temporary-resistance.h"
/*!
#include "spell/spells-status.h"
#include "spell/spell-types.h"
#include "spell/spells3.h"
+#include "status/experience.h"
#include "view/display-messages.h"
/*!
#include "spell/spells-summon.h"
#include "spell/spell-types.h"
#include "spell/spells3.h"
+#include "status/experience.h"
#include "view/display-messages.h"
/*!
#include "spell-kind/spells-teleport.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
+#include "status/experience.h"
#include "view/display-messages.h"
/*!
#include "spell-kind/spells-launcher.h"
#include "spell-kind/spells-teleport.h"
#include "spell/spell-types.h"
+#include "status/experience.h"
#include "status/form-changer.h"
#include "status/sight-setter.h"
#include "util/bit-flags-calculator.h"
#include "spell/spells-summon.h"
#include "spell/technic-info-table.h"
#include "status/bad-status-setter.h"
+#include "status/experience.h"
#include "term/screen-processor.h"
#include "term/term-color-types.h"
#include "util/bit-flags-calculator.h"
--- /dev/null
+#include "status/experience.h"
+#include "view/display-messages.h"
+
+/*
+ * Gain experience
+ */
+void gain_exp_64(player_type *creature_ptr, s32b amount, u32b amount_frac)
+{
+ if (creature_ptr->is_dead)
+ return;
+ if (creature_ptr->prace == RACE_ANDROID)
+ return;
+
+ s64b_add(&(creature_ptr->exp), &(creature_ptr->exp_frac), amount, amount_frac);
+
+ if (creature_ptr->exp < creature_ptr->max_exp) {
+ creature_ptr->max_exp += amount / 5;
+ }
+
+ check_experience(creature_ptr);
+}
+
+/*
+ * Gain experience
+ */
+void gain_exp(player_type *creature_ptr, s32b amount) { gain_exp_64(creature_ptr, amount, 0L); }
+
+/*
+ * Lose experience
+ */
+void lose_exp(player_type *creature_ptr, s32b amount)
+{
+ if (creature_ptr->prace == RACE_ANDROID)
+ return;
+ if (amount > creature_ptr->exp)
+ amount = creature_ptr->exp;
+
+ creature_ptr->exp -= amount;
+
+ check_experience(creature_ptr);
+}
+
+/*
+ * Restores any drained experience
+ */
+bool restore_level(player_type *creature_ptr)
+{
+ if (creature_ptr->exp < creature_ptr->max_exp) {
+ msg_print(_("経験値が戻ってきた気がする。", "You feel your experience returning."));
+ creature_ptr->exp = creature_ptr->max_exp;
+ check_experience(creature_ptr);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/*
+ * Drain experience
+ * If resisted to draining, return FALSE
+ */
+bool drain_exp(player_type *creature_ptr, s32b drain, s32b slip, int hold_exp_prob)
+{
+ if (creature_ptr->prace == RACE_ANDROID)
+ return FALSE;
+
+ if (creature_ptr->hold_exp && (randint0(100) < hold_exp_prob)) {
+ msg_print(_("しかし自己の経験値を守りきった!", "You keep hold of your experience!"));
+ return FALSE;
+ }
+
+ if (creature_ptr->hold_exp) {
+ msg_print(_("経験値を少し吸い取られた気がする!", "You feel your experience slipping away!"));
+ lose_exp(creature_ptr, slip);
+ } else {
+ msg_print(_("経験値が体から吸い取られた気がする!", "You feel your experience draining away!"));
+ lose_exp(creature_ptr, drain);
+ }
+
+ return TRUE;
+}
--- /dev/null
+#pragma once
+
+#include "system/angband.h"
+
+void gain_exp_64(player_type *creature_ptr, s32b amount, u32b amount_frac);
+void gain_exp(player_type *creature_ptr, s32b amount);
+bool restore_level(player_type *creature_ptr);
+void lose_exp(player_type *creature_ptr, s32b amount);
+bool drain_exp(player_type *creature_ptr, s32b drain, s32b slip, int hold_exp_prob);
#include "player/digestion-processor.h"
#include "player/patron.h"
#include "player/player-class.h"
-#include "player/player-effects.h"
#include "player/player-race-types.h"
#include "player/player-skill.h"
#include "player/player-status.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
#include "spell/spells-util.h"
+#include "status/experience.h"
#include "system/alloc-entries.h"
#include "system/angband-version.h"
#include "term/screen-processor.h"