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"
9 #include "object/trc-types.h"
12 * @brief 10ゲームターンが進行するごとにプレイヤーの腹を減らす
13 * @param creature_ptr プレーヤーへの参照ポインタ
16 void starve_player(player_type* creature_ptr)
18 if (creature_ptr->phase_out)
21 if (creature_ptr->food >= PY_FOOD_MAX) {
22 (void)set_food(creature_ptr, creature_ptr->food - 100);
23 } else if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 5))) {
24 int digestion = SPEED_TO_ENERGY(creature_ptr->pspeed);
25 if (creature_ptr->regenerate)
27 if (creature_ptr->special_defense & (KAMAE_MASK | KATA_MASK))
29 if (creature_ptr->cursed & TRC_FAST_DIGEST)
32 if (creature_ptr->slow_digest)
40 (void)set_food(creature_ptr, creature_ptr->food - digestion);
43 if ((creature_ptr->food >= PY_FOOD_FAINT))
46 if (!creature_ptr->paralyzed && (randint0(100) < 10)) {
47 msg_print(_("あまりにも空腹で気絶してしまった。", "You faint from the lack of food."));
48 disturb(creature_ptr, TRUE, TRUE);
49 (void)set_paralyzed(creature_ptr, creature_ptr->paralyzed + 1 + randint0(5));
52 if (creature_ptr->food < PY_FOOD_STARVE) {
53 HIT_POINT dam = (PY_FOOD_STARVE - creature_ptr->food) / 10;
54 if (!IS_INVULN(creature_ptr))
55 take_hit(creature_ptr, DAMAGE_LOSELIFE, dam, _("空腹", "starvation"), -1);