1 #include "player/digestion-processor.h"
2 #include "core/speed-table.h"
3 #include "object-enchant/trc-types.h"
4 #include "player/player-damage.h"
5 #include "status/bad-status-setter.h"
6 #include "player/player-effects.h"
7 #include "player/player-move.h"
8 #include "player/special-defense-types.h"
9 #include "view/display-messages.h"
10 #include "world/world.h"
13 * @brief 10ゲームターンが進行するごとにプレイヤーの腹を減らす
14 * @param creature_ptr プレーヤーへの参照ポインタ
17 void starve_player(player_type *creature_ptr)
19 if (creature_ptr->phase_out)
22 if (creature_ptr->food >= PY_FOOD_MAX) {
23 (void)set_food(creature_ptr, creature_ptr->food - 100);
24 } else if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 5))) {
25 int digestion = SPEED_TO_ENERGY(creature_ptr->pspeed);
26 if (creature_ptr->regenerate)
28 if (creature_ptr->special_defense & (KAMAE_MASK | KATA_MASK))
30 if (creature_ptr->cursed & TRC_FAST_DIGEST)
33 if (creature_ptr->slow_digest)
41 (void)set_food(creature_ptr, creature_ptr->food - digestion);
44 if ((creature_ptr->food >= PY_FOOD_FAINT))
47 if (!creature_ptr->paralyzed && (randint0(100) < 10)) {
48 msg_print(_("あまりにも空腹で気絶してしまった。", "You faint from the lack of food."));
49 disturb(creature_ptr, TRUE, TRUE);
50 (void)set_paralyzed(creature_ptr, creature_ptr->paralyzed + 1 + randint0(5));
53 if (creature_ptr->food < PY_FOOD_STARVE) {
54 HIT_POINT dam = (PY_FOOD_STARVE - creature_ptr->food) / 10;
55 if (!is_invuln(creature_ptr))
56 take_hit(creature_ptr, DAMAGE_LOSELIFE, dam, _("空腹", "starvation"), -1);