1 #include "system/angband.h"
2 #include "player/digestion-processor.h"
3 #include "world/world.h"
4 #include "realm/realm-song.h"
5 #include "player/player-damage.h"
6 #include "player/player-effects.h"
7 #include "monster/creature.h"
8 #include "player/player-move.h"
11 * @brief 10ゲームターンが進行するごとにプレイヤーの腹を減らす
12 * @param creature_ptr プレーヤーへの参照ポインタ
15 void starve_player(player_type* creature_ptr)
17 if (creature_ptr->phase_out)
20 if (creature_ptr->food >= PY_FOOD_MAX) {
21 (void)set_food(creature_ptr, creature_ptr->food - 100);
22 } else if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 5))) {
23 int digestion = SPEED_TO_ENERGY(creature_ptr->pspeed);
24 if (creature_ptr->regenerate)
26 if (creature_ptr->special_defense & (KAMAE_MASK | KATA_MASK))
28 if (creature_ptr->cursed & TRC_FAST_DIGEST)
31 if (creature_ptr->slow_digest)
39 (void)set_food(creature_ptr, creature_ptr->food - digestion);
42 if ((creature_ptr->food >= PY_FOOD_FAINT))
45 if (!creature_ptr->paralyzed && (randint0(100) < 10)) {
46 msg_print(_("あまりにも空腹で気絶してしまった。", "You faint from the lack of food."));
47 disturb(creature_ptr, TRUE, TRUE);
48 (void)set_paralyzed(creature_ptr, creature_ptr->paralyzed + 1 + randint0(5));
51 if (creature_ptr->food < PY_FOOD_STARVE) {
52 HIT_POINT dam = (PY_FOOD_STARVE - creature_ptr->food) / 10;
53 if (!IS_INVULN(creature_ptr))
54 take_hit(creature_ptr, DAMAGE_LOSELIFE, dam, _("空腹", "starvation"), -1);