#include "io/write-diary.h"
#include "market/building-actions-table.h"
#include "status/bad-status-setter.h"
+#include "player/digestion-processor.h"
#include "player/eldritch-horror.h"
-#include "player/player-effects.h"
#include "player/player-race-types.h"
#include "player/player-race.h"
#include "store/rumor.h"
#include "player/avatar.h"
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
+#include "player/digestion-processor.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "player/player-race-types.h"
#include "player/avatar.h"
#include "status/bad-status-setter.h"
#include "player/mimic-info-table.h"
+#include "player/digestion-processor.h"
#include "player/player-class.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "main/sound-of-music.h"
#include "mutation/mutation.h"
#include "object-hook/hook-expendable.h"
+#include "object/item-tester-hooker.h"
#include "object/item-use-flags.h"
#include "object/object-broken.h"
#include "object/object-generator.h"
-#include "object/item-tester-hooker.h"
#include "object/object-info.h"
#include "object/object-kind.h"
#include "perception/object-perception.h"
#include "player/avatar.h"
-#include "status/bad-status-setter.h"
+#include "player/digestion-processor.h"
#include "player/eldritch-horror.h"
#include "player/mimic-info-table.h"
-#include "status/buff-setter.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 "spell/spells3.h"
+#include "status/bad-status-setter.h"
+#include "status/buff-setter.h"
#include "status/sight-setter.h"
#include "sv-definition/sv-potion-types.h"
#include "term/screen-processor.h"
#include "monster-floor/monster-summon.h"
#include "monster-floor/place-monster-types.h"
#include "object-hook/hook-expendable.h"
+#include "object/item-tester-hooker.h"
#include "object/item-use-flags.h"
#include "object/object-flavor.h"
-#include "object/item-tester-hooker.h"
#include "object/object-info.h"
#include "object/object-kind.h"
#include "perception/object-perception.h"
#include "player/avatar.h"
-#include "status/bad-status-setter.h"
-#include "status/buff-setter.h"
+#include "player/digestion-processor.h"
#include "player/player-class.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-teleport.h"
#include "spell-realm/spells-hex.h"
+#include "spell/spell-types.h"
#include "spell/spells-object.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
-#include "spell/spell-types.h"
#include "spell/spells3.h"
+#include "status/bad-status-setter.h"
+#include "status/buff-setter.h"
#include "store/rumor.h"
#include "sv-definition/sv-scroll-types.h"
#include "term/screen-processor.h"
#include "floor/floor.h"
#include "grid/grid.h"
#include "io/targeting.h"
+#include "player/digestion-processor.h"
#include "player/player-effects.h"
#include "spell-kind/spells-specific-bolt.h"
#include "view/display-messages.h"
#include "object-hook/hook-checker.h"
#include "object-hook/hook-enchant.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 "player/digestion-processor.h"
#include "core/speed-table.h"
+#include "core/stuff-handler.h"
+#include "floor/wild.h"
+#include "game-option/disturbance-options.h"
#include "object-enchant/trc-types.h"
+#include "player/avatar.h"
#include "player/player-damage.h"
-#include "status/bad-status-setter.h"
-#include "player/player-effects.h"
#include "player/player-move.h"
#include "player/special-defense-types.h"
+#include "status/bad-status-setter.h"
#include "view/display-messages.h"
#include "world/world.h"
take_hit(creature_ptr, DAMAGE_LOSELIFE, dam, _("空腹", "starvation"), -1);
}
}
+
+/*!
+ * @brief 空腹状態をセットする / Set "food", notice observable changes
+ * @param v 継続時間
+ * @return ステータスに影響を及ぼす変化があった場合TRUEを返す
+ * @details
+ * Set "", notice observable changes\n
+ *\n
+ * The "food" variable can get as large as 20000, allowing the
+ * addition of the most "filling" item, Elvish Waybread, which adds
+ * 7500 food units, without overflowing the 32767 maximum limit.\n
+ *\n
+ * Perhaps we should disturb the player with various messages,
+ * especially messages about hunger status changes. \n
+ *\n
+ * Digestion of food is handled in "dungeon.c", in which, normally,
+ * the player digests about 20 food units per 100 game turns, more
+ * when "fast", more when "regenerating", less with "slow digestion",
+ * but when the player is "gorged", he digests 100 food units per 10
+ * game turns, or a full 1000 food units per 100 game turns.\n
+ *\n
+ * Note that the player's speed is reduced by 10 units while gorged,
+ * so if the player eats a single food ration (5000 food units) when
+ * full (15000 food units), he will be gorged for (5000/100)*10 = 500
+ * game turns, or 500/(100/5) = 25 player turns (if nothing else is
+ * affecting the player speed).\n
+ */
+bool set_food(player_type *creature_ptr, TIME_EFFECT v)
+{
+ int old_aux, new_aux;
+
+ bool notice = FALSE;
+ v = (v > 20000) ? 20000 : (v < 0) ? 0 : v;
+ if (creature_ptr->food < PY_FOOD_FAINT) {
+ old_aux = 0;
+ } else if (creature_ptr->food < PY_FOOD_WEAK) {
+ old_aux = 1;
+ } else if (creature_ptr->food < PY_FOOD_ALERT) {
+ old_aux = 2;
+ } else if (creature_ptr->food < PY_FOOD_FULL) {
+ old_aux = 3;
+ } else if (creature_ptr->food < PY_FOOD_MAX) {
+ old_aux = 4;
+ } else {
+ old_aux = 5;
+ }
+
+ if (v < PY_FOOD_FAINT) {
+ new_aux = 0;
+ } else if (v < PY_FOOD_WEAK) {
+ new_aux = 1;
+ } else if (v < PY_FOOD_ALERT) {
+ new_aux = 2;
+ } else if (v < PY_FOOD_FULL) {
+ new_aux = 3;
+ } else if (v < PY_FOOD_MAX) {
+ new_aux = 4;
+ } else {
+ new_aux = 5;
+ }
+
+ if (old_aux < 1 && new_aux > 0)
+ chg_virtue(creature_ptr, V_PATIENCE, 2);
+ else if (old_aux < 3 && (old_aux != new_aux))
+ chg_virtue(creature_ptr, V_PATIENCE, 1);
+ if (old_aux == 2)
+ chg_virtue(creature_ptr, V_TEMPERANCE, 1);
+ if (old_aux == 0)
+ chg_virtue(creature_ptr, V_TEMPERANCE, -1);
+
+ if (new_aux > old_aux) {
+ switch (new_aux) {
+ case 1:
+ msg_print(_("まだ空腹で倒れそうだ。", "You are still weak."));
+ break;
+ case 2:
+ msg_print(_("まだ空腹だ。", "You are still hungry."));
+ break;
+ case 3:
+ msg_print(_("空腹感がおさまった。", "You are no longer hungry."));
+ break;
+ case 4:
+ msg_print(_("満腹だ!", "You are full!"));
+ break;
+
+ case 5:
+ msg_print(_("食べ過ぎだ!", "You have gorged yourself!"));
+ chg_virtue(creature_ptr, V_HARMONY, -1);
+ chg_virtue(creature_ptr, V_PATIENCE, -1);
+ chg_virtue(creature_ptr, V_TEMPERANCE, -2);
+ break;
+ }
+
+ notice = TRUE;
+ } else if (new_aux < old_aux) {
+ switch (new_aux) {
+ case 0:
+ msg_print(_("あまりにも空腹で気を失ってしまった!", "You are getting faint from hunger!"));
+ break;
+ case 1:
+ msg_print(_("お腹が空いて倒れそうだ。", "You are getting weak from hunger!"));
+ break;
+ case 2:
+ msg_print(_("お腹が空いてきた。", "You are getting hungry."));
+ break;
+ case 3:
+ msg_print(_("満腹感がなくなった。", "You are no longer full."));
+ break;
+ case 4:
+ msg_print(_("やっとお腹がきつくなくなった。", "You are no longer gorged."));
+ break;
+ }
+
+ if (creature_ptr->wild_mode && (new_aux < 2)) {
+ change_wild_mode(creature_ptr, FALSE);
+ }
+
+ notice = TRUE;
+ }
+
+ creature_ptr->food = v;
+ if (!notice)
+ return FALSE;
+
+ if (disturb_state)
+ disturb(creature_ptr, FALSE, FALSE);
+ creature_ptr->update |= (PU_BONUS);
+ creature_ptr->redraw |= (PR_HUNGER);
+ handle_stuff(creature_ptr);
+
+ return TRUE;
+}
#include "system/angband.h"
void starve_player(player_type* creature_ptr);
+bool set_food(player_type *creature_ptr, TIME_EFFECT v);
}
/*!
- * @brief 空腹状態をセットする / Set "food", notice observable changes
- * @param v 継続時間
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- * @details
- * Set "", notice observable changes\n
- *\n
- * The "food" variable can get as large as 20000, allowing the
- * addition of the most "filling" item, Elvish Waybread, which adds
- * 7500 food units, without overflowing the 32767 maximum limit.\n
- *\n
- * Perhaps we should disturb the player with various messages,
- * especially messages about hunger status changes. \n
- *\n
- * Digestion of food is handled in "dungeon.c", in which, normally,
- * the player digests about 20 food units per 100 game turns, more
- * when "fast", more when "regenerating", less with "slow digestion",
- * but when the player is "gorged", he digests 100 food units per 10
- * game turns, or a full 1000 food units per 100 game turns.\n
- *\n
- * Note that the player's speed is reduced by 10 units while gorged,
- * so if the player eats a single food ration (5000 food units) when
- * full (15000 food units), he will be gorged for (5000/100)*10 = 500
- * game turns, or 500/(100/5) = 25 player turns (if nothing else is
- * affecting the player speed).\n
- */
-bool set_food(player_type *creature_ptr, TIME_EFFECT v)
-{
- int old_aux, new_aux;
-
- bool notice = FALSE;
- v = (v > 20000) ? 20000 : (v < 0) ? 0 : v;
- if (creature_ptr->food < PY_FOOD_FAINT) {
- old_aux = 0;
- } else if (creature_ptr->food < PY_FOOD_WEAK) {
- old_aux = 1;
- } else if (creature_ptr->food < PY_FOOD_ALERT) {
- old_aux = 2;
- } else if (creature_ptr->food < PY_FOOD_FULL) {
- old_aux = 3;
- } else if (creature_ptr->food < PY_FOOD_MAX) {
- old_aux = 4;
- } else {
- old_aux = 5;
- }
-
- if (v < PY_FOOD_FAINT) {
- new_aux = 0;
- } else if (v < PY_FOOD_WEAK) {
- new_aux = 1;
- } else if (v < PY_FOOD_ALERT) {
- new_aux = 2;
- } else if (v < PY_FOOD_FULL) {
- new_aux = 3;
- } else if (v < PY_FOOD_MAX) {
- new_aux = 4;
- } else {
- new_aux = 5;
- }
-
- if (old_aux < 1 && new_aux > 0)
- chg_virtue(creature_ptr, V_PATIENCE, 2);
- else if (old_aux < 3 && (old_aux != new_aux))
- chg_virtue(creature_ptr, V_PATIENCE, 1);
- if (old_aux == 2)
- chg_virtue(creature_ptr, V_TEMPERANCE, 1);
- if (old_aux == 0)
- chg_virtue(creature_ptr, V_TEMPERANCE, -1);
-
- if (new_aux > old_aux) {
- switch (new_aux) {
- case 1:
- msg_print(_("まだ空腹で倒れそうだ。", "You are still weak."));
- break;
- case 2:
- msg_print(_("まだ空腹だ。", "You are still hungry."));
- break;
- case 3:
- msg_print(_("空腹感がおさまった。", "You are no longer hungry."));
- break;
- case 4:
- msg_print(_("満腹だ!", "You are full!"));
- break;
-
- case 5:
- msg_print(_("食べ過ぎだ!", "You have gorged yourself!"));
- chg_virtue(creature_ptr, V_HARMONY, -1);
- chg_virtue(creature_ptr, V_PATIENCE, -1);
- chg_virtue(creature_ptr, V_TEMPERANCE, -2);
- break;
- }
-
- notice = TRUE;
- } else if (new_aux < old_aux) {
- switch (new_aux) {
- case 0:
- msg_print(_("あまりにも空腹で気を失ってしまった!", "You are getting faint from hunger!"));
- break;
- case 1:
- msg_print(_("お腹が空いて倒れそうだ。", "You are getting weak from hunger!"));
- break;
- case 2:
- msg_print(_("お腹が空いてきた。", "You are getting hungry."));
- break;
- case 3:
- msg_print(_("満腹感がなくなった。", "You are no longer full."));
- break;
- case 4:
- msg_print(_("やっとお腹がきつくなくなった。", "You are no longer gorged."));
- break;
- }
-
- if (creature_ptr->wild_mode && (new_aux < 2)) {
- change_wild_mode(creature_ptr, FALSE);
- }
-
- notice = TRUE;
- }
-
- creature_ptr->food = v;
- if (!notice)
- return FALSE;
-
- if (disturb_state)
- disturb(creature_ptr, FALSE, FALSE);
- creature_ptr->update |= (PU_BONUS);
- creature_ptr->redraw |= (PR_HUNGER);
- handle_stuff(creature_ptr);
-
- return TRUE;
-}
-
-/*!
* @brief プレイヤーの基本能力値を増加させる / Increases a stat by one randomized level -RAK-
* @param stat 上昇させるステータスID
* @return 実際に上昇した場合TRUEを返す。
bool set_oppose_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_oppose_cold(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_oppose_pois(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
-bool set_food(player_type *creature_ptr, TIME_EFFECT v);
bool inc_stat(player_type *creature_ptr, int stat);
bool dec_stat(player_type *creature_ptr, int stat, int amount, int permanent);
bool res_stat(player_type *creature_ptr, int stat);
#include "system/angband.h"
-#include "art-definition/art-bow-types.h"
#include "player/player-status.h"
+#include "art-definition/art-bow-types.h"
#include "art-definition/art-sword-types.h"
#include "art-definition/art-weapon-types.h"
#include "autopick/autopick-reader-writer.h"
#include "market/arena-info-table.h"
#include "mind/mind-force-trainer.h"
#include "mind/mind-ninja.h"
+#include "monster-floor/monster-remover.h"
+#include "monster-race/monster-race-hook.h"
+#include "monster-race/monster-race.h"
#include "monster-race/race-flags1.h"
#include "monster-race/race-flags2.h"
#include "monster-race/race-flags3.h"
#include "monster-race/race-flags7.h"
-#include "monster-race/monster-race-hook.h"
-#include "monster-race/monster-race.h"
#include "monster/monster-info.h"
-#include "monster-floor/monster-remover.h"
#include "monster/monster-status.h"
#include "monster/monster-update.h"
#include "monster/smart-learn-types.h"
#include "object-hook/hook-checker.h"
#include "object-hook/hook-weapon.h"
#include "object/object-flags.h"
-#include "object/object-mark-types.h"
#include "object/object-info.h"
+#include "object/object-mark-types.h"
#include "perception/object-perception.h"
#include "pet/pet-util.h"
#include "player/avatar.h"
+#include "player/digestion-processor.h"
#include "player/mimic-info-table.h"
#include "player/patron.h"
#include "player/player-class.h"
#include "monster-floor/monster-summon.h"
#include "monster-floor/place-monster-types.h"
#include "player/avatar.h"
-#include "status/bad-status-setter.h"
+#include "player/digestion-processor.h"
#include "player/player-effects.h"
#include "player/player-status.h"
#include "spell-kind/spells-beam.h"
#include "spell-kind/spells-detection.h"
-#include "spell/spells-diceroll.h"
#include "spell-kind/spells-floor.h"
#include "spell-kind/spells-launcher.h"
#include "spell-kind/spells-lite.h"
#include "spell-kind/spells-perception.h"
#include "spell-kind/spells-recall.h"
+#include "spell-kind/spells-teleport.h"
+#include "spell/spell-types.h"
+#include "spell/spells-diceroll.h"
#include "spell/spells-object.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
-#include "spell-kind/spells-teleport.h"
-#include "spell/spell-types.h"
+#include "status/bad-status-setter.h"
#include "status/sight-setter.h"
#include "view/display-messages.h"
#include "monster-floor/monster-summon.h"
#include "monster-floor/place-monster-types.h"
#include "mutation/mutation.h"
-#include "status/buff-setter.h"
+#include "player/digestion-processor.h"
#include "player/player-effects.h"
#include "player/player-status.h"
#include "player/selfinfo.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
#include "spell/spells3.h"
+#include "status/buff-setter.h"
#include "status/sight-setter.h"
#include "view/display-messages.h"
#include "effect/effect-characteristics.h"
#include "io/targeting.h"
#include "player/avatar.h"
-#include "status/buff-setter.h"
+#include "player/digestion-processor.h"
#include "player/player-class.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-specific-bolt.h"
#include "spell/process-effect.h"
+#include "spell/spell-types.h"
#include "spell/spells-diceroll.h"
#include "spell/spells-object.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
-#include "spell/spell-types.h"
+#include "status/buff-setter.h"
/*!
* @brief 暗黒領域魔法の各処理を行う
#include "cmd-action/cmd-spell.h"
#include "floor/floor.h"
#include "io/targeting.h"
-#include "status/bad-status-setter.h"
-#include "status/buff-setter.h"
+#include "player/digestion-processor.h"
#include "player/player-effects.h"
#include "player/player-status.h"
#include "spell-kind/spells-curse-removal.h"
#include "spell-kind/spells-floor.h"
#include "spell-kind/spells-genocide.h"
#include "spell-kind/spells-grid.h"
-#include "spell-kind/spells-lite.h"
#include "spell-kind/spells-launcher.h"
+#include "spell-kind/spells-lite.h"
#include "spell-kind/spells-neighbor.h"
#include "spell-kind/spells-perception.h"
#include "spell-kind/spells-recall.h"
#include "spell-kind/spells-sight.h"
-#include "spell/spells-status.h"
#include "spell/spell-types.h"
+#include "spell/spells-status.h"
#include "spell/spells3.h"
+#include "status/bad-status-setter.h"
+#include "status/buff-setter.h"
/*!
* @brief 生命領域魔法の各処理を行う
#include "object-enchant/trc-types.h"
#include "object-hook/hook-enchant.h"
#include "object-hook/hook-expendable.h"
-#include "object-hook/hook-perception.h"
#include "object-hook/hook-magic.h"
+#include "object-hook/hook-perception.h"
#include "object-hook/hook-weapon.h"
+#include "object/item-tester-hooker.h"
#include "object/item-use-flags.h"
#include "object/object-flavor.h"
#include "object/object-generator.h"
-#include "object/item-tester-hooker.h"
#include "object/object-info.h"
#include "object/object-kind.h"
#include "object/object-mark-types.h"
#include "perception/identification.h"
#include "perception/object-perception.h"
#include "player/avatar.h"
-#include "status/bad-status-setter.h"
+#include "player/digestion-processor.h"
#include "player/player-class.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "spell/spells-execution.h"
#include "spell/spells-summon.h"
#include "spell/technic-info-table.h"
+#include "status/bad-status-setter.h"
#include "term/screen-processor.h"
#include "term/term-color-types.h"
#include "util/bit-flags-calculator.h"
#include "object/object-kind.h"
#include "object/object-value.h"
#include "perception/object-perception.h"
+#include "player/digestion-processor.h"
#include "player/patron.h"
#include "player/player-class.h"
#include "player/player-effects.h"