#include "monster/monster-death.h"
#include "monster/monster-status.h"
#include "monster/monster-info.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "mspell/monster-spell.h"
#include "object-enchant/artifact.h"
#include "monster-race/monster-race-hook.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster-util.h"
#include "monster/monster2.h"
#include "monster/place-monster-types.h"
#include "grid/grid.h"
#include "grid/trap.h"
#include "main/sound-definitions-table.h"
-#include "monster/monster2.h"
+#include "monster/monster-update.h"
#include "player/player-effects.h"
#include "room/rooms.h"
#include "spell/process-effect.h" // 暫定、後で消す.
#include "monster-race/race-flags7.h"
#include "monster/monster-description-types.h"
#include "monster/monster-death.h"
-#include "monster/monster-status.h"
#include "monster/monster-info.h"
+#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "object-enchant/special-object-flags.h"
#include "object/object-generator.h"
#include "monster-race/race-flags1.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster-util.h"
#include "monster/monster-info.h"
#include "monster/monster2.h"
#include "monster/monster-description-types.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster-info.h"
#include "monster/monster2.h"
#include "monster/smart-learn-types.h"
#include "floor/floor-object.h"
#include "grid/grid.h"
#include "grid/trap.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "monster/place-monster-types.h"
#include "object-enchant/artifact.h"
#include "grid/trap.h"
#include "monster/monster-status.h"
#include "monster/monster-info.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "object/object-flavor.h"
#include "object/object-hook.h"
#include "monster/monster-description-types.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "monster/smart-learn-types.h"
#include "object-enchant/object-curse.h"
#include "monster-race/race-flags-resistance.h"
#include "monster-race/race-indice-types.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "object-enchant/trc-types.h"
#include "object/object-generator.h"
#include "monster/monster-description-types.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-processor.h"
+#include "monster/monster-update.h"
#include "monster/monster-util.h"
#include "monster/monster-info.h"
#include "monster/monster2.h"
*/
#include "monster/monster-update.h"
+#include "dungeon/dungeon.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/race-indice-types.h"
#include "monster/monster-info.h"
+#include "monster/monster-flag-types.h"
+#include "monster/monster-status.h"
#include "monster/monster2.h"
+#include "player/eldritch-horror.h"
#include "player/player-move.h"
/*!
target_ptr->window |= (PW_MONSTER);
}
}
+
+/*!
+ * @brief モンスターの各情報を更新する / This function updates the monster record of the given monster
+ * @param m_idx 更新するモンスター情報のID
+ * @param full プレイヤーとの距離更新を行うならばtrue
+ * @return なし
+ */
+void update_monster(player_type *subject_ptr, MONSTER_IDX m_idx, bool full)
+{
+ monster_type *m_ptr = &subject_ptr->current_floor_ptr->m_list[m_idx];
+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
+
+ bool do_disturb = disturb_move;
+
+ POSITION fy = m_ptr->fy;
+ POSITION fx = m_ptr->fx;
+
+ bool flag = FALSE;
+ bool easy = FALSE;
+ bool in_darkness = (d_info[subject_ptr->dungeon_idx].flags1 & DF1_DARKNESS) && !subject_ptr->see_nocto;
+ if (disturb_high) {
+ monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
+ if (ap_r_ptr->r_tkills && ap_r_ptr->level >= subject_ptr->lev)
+ do_disturb = TRUE;
+ }
+
+ POSITION distance;
+ if (full) {
+ int dy = (subject_ptr->y > fy) ? (subject_ptr->y - fy) : (fy - subject_ptr->y);
+ int dx = (subject_ptr->x > fx) ? (subject_ptr->x - fx) : (fx - subject_ptr->x);
+
+ distance = (dy > dx) ? (dy + (dx >> 1)) : (dx + (dy >> 1));
+ if (distance > 255)
+ distance = 255;
+ if (!distance)
+ distance = 1;
+
+ m_ptr->cdis = distance;
+ } else {
+ distance = m_ptr->cdis;
+ }
+
+ if (m_ptr->mflag2 & (MFLAG2_MARK))
+ flag = TRUE;
+
+ if (distance <= (in_darkness ? MAX_SIGHT / 2 : MAX_SIGHT)) {
+ if (!in_darkness || (distance <= MAX_SIGHT / 4)) {
+ if (subject_ptr->special_defense & KATA_MUSOU) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image) {
+ if (r_ptr->flags2 & (RF2_SMART))
+ r_ptr->r_flags2 |= (RF2_SMART);
+ if (r_ptr->flags2 & (RF2_STUPID))
+ r_ptr->r_flags2 |= (RF2_STUPID);
+ }
+ } else if (subject_ptr->telepathy) {
+ if (r_ptr->flags2 & (RF2_EMPTY_MIND)) {
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
+ } else if (r_ptr->flags2 & (RF2_WEIRD_MIND)) {
+ if ((m_idx % 10) == 5) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image) {
+ r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
+ if (r_ptr->flags2 & (RF2_SMART))
+ r_ptr->r_flags2 |= (RF2_SMART);
+ if (r_ptr->flags2 & (RF2_STUPID))
+ r_ptr->r_flags2 |= (RF2_STUPID);
+ }
+ }
+ } else {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image) {
+ if (r_ptr->flags2 & (RF2_SMART))
+ r_ptr->r_flags2 |= (RF2_SMART);
+ if (r_ptr->flags2 & (RF2_STUPID))
+ r_ptr->r_flags2 |= (RF2_STUPID);
+ }
+ }
+ }
+
+ if ((subject_ptr->esp_animal) && (r_ptr->flags3 & (RF3_ANIMAL))) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags3 |= (RF3_ANIMAL);
+ }
+
+ if ((subject_ptr->esp_undead) && (r_ptr->flags3 & (RF3_UNDEAD))) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags3 |= (RF3_UNDEAD);
+ }
+
+ if ((subject_ptr->esp_demon) && (r_ptr->flags3 & (RF3_DEMON))) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags3 |= (RF3_DEMON);
+ }
+
+ if ((subject_ptr->esp_orc) && (r_ptr->flags3 & (RF3_ORC))) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags3 |= (RF3_ORC);
+ }
+
+ if ((subject_ptr->esp_troll) && (r_ptr->flags3 & (RF3_TROLL))) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags3 |= (RF3_TROLL);
+ }
+
+ if ((subject_ptr->esp_giant) && (r_ptr->flags3 & (RF3_GIANT))) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags3 |= (RF3_GIANT);
+ }
+
+ if ((subject_ptr->esp_dragon) && (r_ptr->flags3 & (RF3_DRAGON))) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags3 |= (RF3_DRAGON);
+ }
+
+ if ((subject_ptr->esp_human) && (r_ptr->flags2 & (RF2_HUMAN))) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags2 |= (RF2_HUMAN);
+ }
+
+ if ((subject_ptr->esp_evil) && (r_ptr->flags3 & (RF3_EVIL))) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags3 |= (RF3_EVIL);
+ }
+
+ if ((subject_ptr->esp_good) && (r_ptr->flags3 & (RF3_GOOD))) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags3 |= (RF3_GOOD);
+ }
+
+ if ((subject_ptr->esp_nonliving) && ((r_ptr->flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING)) == RF3_NONLIVING)) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags3 |= (RF3_NONLIVING);
+ }
+
+ if ((subject_ptr->esp_unique) && (r_ptr->flags1 & (RF1_UNIQUE))) {
+ flag = TRUE;
+ if (is_original_ap(m_ptr) && !subject_ptr->image)
+ r_ptr->r_flags1 |= (RF1_UNIQUE);
+ }
+ }
+
+ if (player_has_los_bold(subject_ptr, fy, fx) && !subject_ptr->blind) {
+ bool do_invisible = FALSE;
+ bool do_cold_blood = FALSE;
+
+ if (subject_ptr->concent >= CONCENT_RADAR_THRESHOLD) {
+ easy = flag = TRUE;
+ }
+
+ if (distance <= subject_ptr->see_infra) {
+ if ((r_ptr->flags2 & (RF2_COLD_BLOOD | RF2_AURA_FIRE)) == RF2_COLD_BLOOD) {
+ do_cold_blood = TRUE;
+ } else {
+ easy = flag = TRUE;
+ }
+ }
+
+ if (player_can_see_bold(subject_ptr, fy, fx)) {
+ if (r_ptr->flags2 & (RF2_INVISIBLE)) {
+ do_invisible = TRUE;
+ if (subject_ptr->see_inv) {
+ easy = flag = TRUE;
+ }
+ } else {
+ easy = flag = TRUE;
+ }
+ }
+
+ if (flag) {
+ if (is_original_ap(m_ptr) && !subject_ptr->image) {
+ if (do_invisible)
+ r_ptr->r_flags2 |= (RF2_INVISIBLE);
+ if (do_cold_blood)
+ r_ptr->r_flags2 |= (RF2_COLD_BLOOD);
+ }
+ }
+ }
+ }
+
+ /* The monster is now visible */
+ if (flag) {
+ if (!m_ptr->ml) {
+ m_ptr->ml = TRUE;
+ lite_spot(subject_ptr, fy, fx);
+
+ if (subject_ptr->health_who == m_idx)
+ subject_ptr->redraw |= (PR_HEALTH);
+ if (subject_ptr->riding == m_idx)
+ subject_ptr->redraw |= (PR_UHEALTH);
+
+ if (!subject_ptr->image) {
+ if ((m_ptr->ap_r_idx == MON_KAGE) && (r_info[MON_KAGE].r_sights < MAX_SHORT))
+ r_info[MON_KAGE].r_sights++;
+ else if (is_original_ap(m_ptr) && (r_ptr->r_sights < MAX_SHORT))
+ r_ptr->r_sights++;
+ }
+
+ if (r_info[m_ptr->ap_r_idx].flags2 & RF2_ELDRITCH_HORROR) {
+ sanity_blast(subject_ptr, m_ptr, FALSE);
+ }
+
+ if (disturb_near
+ && (projectable(subject_ptr, m_ptr->fy, m_ptr->fx, subject_ptr->y, subject_ptr->x)
+ && projectable(subject_ptr, subject_ptr->y, subject_ptr->x, m_ptr->fy, m_ptr->fx))) {
+ if (disturb_pets || is_hostile(m_ptr))
+ disturb(subject_ptr, TRUE, TRUE);
+ }
+ }
+ }
+
+ /* The monster is not visible */
+ else {
+ if (m_ptr->ml) {
+ m_ptr->ml = FALSE;
+ lite_spot(subject_ptr, fy, fx);
+
+ if (subject_ptr->health_who == m_idx)
+ subject_ptr->redraw |= (PR_HEALTH);
+ if (subject_ptr->riding == m_idx)
+ subject_ptr->redraw |= (PR_UHEALTH);
+ if (do_disturb) {
+ if (disturb_pets || is_hostile(m_ptr))
+ disturb(subject_ptr, TRUE, TRUE);
+ }
+ }
+ }
+
+ /* The monster is now easily visible */
+ if (easy) {
+ if (!(m_ptr->mflag & (MFLAG_VIEW))) {
+ m_ptr->mflag |= (MFLAG_VIEW);
+ if (do_disturb) {
+ if (disturb_pets || is_hostile(m_ptr))
+ disturb(subject_ptr, TRUE, TRUE);
+ }
+ }
+
+ return;
+ }
+
+ /* The monster is not easily visible */
+ /* Change */
+ if (!(m_ptr->mflag & (MFLAG_VIEW)))
+ return;
+
+ /* Mark as not easily visible */
+ m_ptr->mflag &= ~(MFLAG_VIEW);
+
+ if (do_disturb) {
+ if (disturb_pets || is_hostile(m_ptr))
+ disturb(subject_ptr, TRUE, TRUE);
+ }
+}
+
+/*!
+ * @param player_ptr プレーヤーへの参照ポインタ
+ * @brief 単純に生存している全モンスターの更新処理を行う / This function simply updates all the (non-dead) monsters (see above).
+ * @param full 距離更新を行うならtrue
+ * @return なし
+ */
+void update_monsters(player_type *player_ptr, bool full)
+{
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
+ for (MONSTER_IDX i = 1; i < floor_ptr->m_max; i++) {
+ monster_type *m_ptr = &floor_ptr->m_list[i];
+ if (!monster_is_valid(m_ptr))
+ continue;
+ update_monster(player_ptr, i, full);
+ }
+}
void update_player_type(player_type *target_ptr, turn_flags *turn_flags_ptr, monster_race *r_ptr);
void update_monster_race_flags(player_type *target_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr);
void update_player_window(player_type *target_ptr, old_race_flags *old_race_flags_ptr);
+void update_monster(player_type *subject_ptr, MONSTER_IDX m_idx, bool full);
+void update_monsters(player_type *player_ptr, bool full);
#include "monster/monster-flag-types.h"
#include "monster/monster-info.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster-util.h"
#include "monster/place-monster-types.h"
#include "monster/smart-learn-types.h"
}
/*!
- * @brief モンスターの各情報を更新する / This function updates the monster record of the given monster
- * @param m_idx 更新するモンスター情報のID
- * @param full プレイヤーとの距離更新を行うならばtrue
- * @return なし
- */
-void update_monster(player_type *subject_ptr, MONSTER_IDX m_idx, bool full)
-{
- monster_type *m_ptr = &subject_ptr->current_floor_ptr->m_list[m_idx];
- monster_race *r_ptr = &r_info[m_ptr->r_idx];
-
- bool do_disturb = disturb_move;
-
- POSITION fy = m_ptr->fy;
- POSITION fx = m_ptr->fx;
-
- bool flag = FALSE;
- bool easy = FALSE;
- bool in_darkness = (d_info[subject_ptr->dungeon_idx].flags1 & DF1_DARKNESS) && !subject_ptr->see_nocto;
- if (disturb_high) {
- monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
- if (ap_r_ptr->r_tkills && ap_r_ptr->level >= subject_ptr->lev)
- do_disturb = TRUE;
- }
-
- POSITION distance;
- if (full) {
- int dy = (subject_ptr->y > fy) ? (subject_ptr->y - fy) : (fy - subject_ptr->y);
- int dx = (subject_ptr->x > fx) ? (subject_ptr->x - fx) : (fx - subject_ptr->x);
-
- distance = (dy > dx) ? (dy + (dx >> 1)) : (dx + (dy >> 1));
- if (distance > 255)
- distance = 255;
- if (!distance)
- distance = 1;
-
- m_ptr->cdis = distance;
- } else {
- distance = m_ptr->cdis;
- }
-
- if (m_ptr->mflag2 & (MFLAG2_MARK))
- flag = TRUE;
-
- if (distance <= (in_darkness ? MAX_SIGHT / 2 : MAX_SIGHT)) {
- if (!in_darkness || (distance <= MAX_SIGHT / 4)) {
- if (subject_ptr->special_defense & KATA_MUSOU) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image) {
- if (r_ptr->flags2 & (RF2_SMART))
- r_ptr->r_flags2 |= (RF2_SMART);
- if (r_ptr->flags2 & (RF2_STUPID))
- r_ptr->r_flags2 |= (RF2_STUPID);
- }
- } else if (subject_ptr->telepathy) {
- if (r_ptr->flags2 & (RF2_EMPTY_MIND)) {
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
- } else if (r_ptr->flags2 & (RF2_WEIRD_MIND)) {
- if ((m_idx % 10) == 5) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image) {
- r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
- if (r_ptr->flags2 & (RF2_SMART))
- r_ptr->r_flags2 |= (RF2_SMART);
- if (r_ptr->flags2 & (RF2_STUPID))
- r_ptr->r_flags2 |= (RF2_STUPID);
- }
- }
- } else {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image) {
- if (r_ptr->flags2 & (RF2_SMART))
- r_ptr->r_flags2 |= (RF2_SMART);
- if (r_ptr->flags2 & (RF2_STUPID))
- r_ptr->r_flags2 |= (RF2_STUPID);
- }
- }
- }
-
- if ((subject_ptr->esp_animal) && (r_ptr->flags3 & (RF3_ANIMAL))) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags3 |= (RF3_ANIMAL);
- }
-
- if ((subject_ptr->esp_undead) && (r_ptr->flags3 & (RF3_UNDEAD))) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags3 |= (RF3_UNDEAD);
- }
-
- if ((subject_ptr->esp_demon) && (r_ptr->flags3 & (RF3_DEMON))) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags3 |= (RF3_DEMON);
- }
-
- if ((subject_ptr->esp_orc) && (r_ptr->flags3 & (RF3_ORC))) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags3 |= (RF3_ORC);
- }
-
- if ((subject_ptr->esp_troll) && (r_ptr->flags3 & (RF3_TROLL))) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags3 |= (RF3_TROLL);
- }
-
- if ((subject_ptr->esp_giant) && (r_ptr->flags3 & (RF3_GIANT))) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags3 |= (RF3_GIANT);
- }
-
- if ((subject_ptr->esp_dragon) && (r_ptr->flags3 & (RF3_DRAGON))) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags3 |= (RF3_DRAGON);
- }
-
- if ((subject_ptr->esp_human) && (r_ptr->flags2 & (RF2_HUMAN))) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags2 |= (RF2_HUMAN);
- }
-
- if ((subject_ptr->esp_evil) && (r_ptr->flags3 & (RF3_EVIL))) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags3 |= (RF3_EVIL);
- }
-
- if ((subject_ptr->esp_good) && (r_ptr->flags3 & (RF3_GOOD))) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags3 |= (RF3_GOOD);
- }
-
- if ((subject_ptr->esp_nonliving) && ((r_ptr->flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING)) == RF3_NONLIVING)) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags3 |= (RF3_NONLIVING);
- }
-
- if ((subject_ptr->esp_unique) && (r_ptr->flags1 & (RF1_UNIQUE))) {
- flag = TRUE;
- if (is_original_ap(m_ptr) && !subject_ptr->image)
- r_ptr->r_flags1 |= (RF1_UNIQUE);
- }
- }
-
- if (player_has_los_bold(subject_ptr, fy, fx) && !subject_ptr->blind) {
- bool do_invisible = FALSE;
- bool do_cold_blood = FALSE;
-
- if (subject_ptr->concent >= CONCENT_RADAR_THRESHOLD) {
- easy = flag = TRUE;
- }
-
- if (distance <= subject_ptr->see_infra) {
- if ((r_ptr->flags2 & (RF2_COLD_BLOOD | RF2_AURA_FIRE)) == RF2_COLD_BLOOD) {
- do_cold_blood = TRUE;
- } else {
- easy = flag = TRUE;
- }
- }
-
- if (player_can_see_bold(subject_ptr, fy, fx)) {
- if (r_ptr->flags2 & (RF2_INVISIBLE)) {
- do_invisible = TRUE;
- if (subject_ptr->see_inv) {
- easy = flag = TRUE;
- }
- } else {
- easy = flag = TRUE;
- }
- }
-
- if (flag) {
- if (is_original_ap(m_ptr) && !subject_ptr->image) {
- if (do_invisible)
- r_ptr->r_flags2 |= (RF2_INVISIBLE);
- if (do_cold_blood)
- r_ptr->r_flags2 |= (RF2_COLD_BLOOD);
- }
- }
- }
- }
-
- /* The monster is now visible */
- if (flag) {
- if (!m_ptr->ml) {
- m_ptr->ml = TRUE;
- lite_spot(subject_ptr, fy, fx);
-
- if (subject_ptr->health_who == m_idx)
- subject_ptr->redraw |= (PR_HEALTH);
- if (subject_ptr->riding == m_idx)
- subject_ptr->redraw |= (PR_UHEALTH);
-
- if (!subject_ptr->image) {
- if ((m_ptr->ap_r_idx == MON_KAGE) && (r_info[MON_KAGE].r_sights < MAX_SHORT))
- r_info[MON_KAGE].r_sights++;
- else if (is_original_ap(m_ptr) && (r_ptr->r_sights < MAX_SHORT))
- r_ptr->r_sights++;
- }
-
- if (r_info[m_ptr->ap_r_idx].flags2 & RF2_ELDRITCH_HORROR) {
- sanity_blast(subject_ptr, m_ptr, FALSE);
- }
-
- if (disturb_near
- && (projectable(subject_ptr, m_ptr->fy, m_ptr->fx, subject_ptr->y, subject_ptr->x)
- && projectable(subject_ptr, subject_ptr->y, subject_ptr->x, m_ptr->fy, m_ptr->fx))) {
- if (disturb_pets || is_hostile(m_ptr))
- disturb(subject_ptr, TRUE, TRUE);
- }
- }
- }
-
- /* The monster is not visible */
- else {
- if (m_ptr->ml) {
- m_ptr->ml = FALSE;
- lite_spot(subject_ptr, fy, fx);
-
- if (subject_ptr->health_who == m_idx)
- subject_ptr->redraw |= (PR_HEALTH);
- if (subject_ptr->riding == m_idx)
- subject_ptr->redraw |= (PR_UHEALTH);
- if (do_disturb) {
- if (disturb_pets || is_hostile(m_ptr))
- disturb(subject_ptr, TRUE, TRUE);
- }
- }
- }
-
- /* The monster is now easily visible */
- if (easy) {
- if (!(m_ptr->mflag & (MFLAG_VIEW))) {
- m_ptr->mflag |= (MFLAG_VIEW);
- if (do_disturb) {
- if (disturb_pets || is_hostile(m_ptr))
- disturb(subject_ptr, TRUE, TRUE);
- }
- }
-
- return;
- }
-
- /* The monster is not easily visible */
- /* Change */
- if (!(m_ptr->mflag & (MFLAG_VIEW)))
- return;
-
- /* Mark as not easily visible */
- m_ptr->mflag &= ~(MFLAG_VIEW);
-
- if (do_disturb) {
- if (disturb_pets || is_hostile(m_ptr))
- disturb(subject_ptr, TRUE, TRUE);
- }
-}
-
-/*!
- * @param player_ptr プレーヤーへの参照ポインタ
- * @brief 単純に生存している全モンスターの更新処理を行う / This function simply updates all the (non-dead) monsters (see above).
- * @param full 距離更新を行うならtrue
- * @return なし
- */
-void update_monsters(player_type *player_ptr, bool full)
-{
- floor_type *floor_ptr = player_ptr->current_floor_ptr;
- for (MONSTER_IDX i = 1; i < floor_ptr->m_max; i++) {
- monster_type *m_ptr = &floor_ptr->m_list[i];
- if (!monster_is_valid(m_ptr))
- continue;
- update_monster(player_ptr, i, full);
- }
-}
-
-/*!
* todo ここにplayer_typeを追加すると関数ポインタ周りの収拾がつかなくなるので保留
* @param player_ptr プレーヤーへの参照ポインタ
* @brief カメレオンの王の変身対象となるモンスターかどうか判定する / Hack -- the index of the summoning monster
#define GMN_ARENA 0x00000001 //!< 賭け闘技場向け生成
MONRACE_IDX get_mon_num(player_type *player_ptr, DEPTH level, BIT_FLAGS option);
-void update_monster(player_type *subject_ptr, MONSTER_IDX m_idx, bool full);
-void update_monsters(player_type *player_ptr, bool full);
bool multiply_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
bool summon_specific(player_type *player_ptr, MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int type, BIT_FLAGS mode);
bool summon_named_creature(player_type *player_ptr, MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode);
#include "monster-race/race-flags2.h"
#include "monster-race/race-flags7.h"
#include "monster-race/race-flags8.h"
-#include "monster/monster-status.h"
#include "monster/monster-info.h"
+#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "mspell/monster-spell.h"
#include "object-enchant/special-object-flags.h"
#include "monster-race/monster-race-hook.h"
#include "monster-race/monster-race.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "monster/smart-learn-types.h"
#include "mutation/mutation.h"
#include "monster-race/race-flags7.h"
#include "monster-race/monster-race-hook.h"
#include "monster/monster-info.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "object-enchant/tr-types.h"
#include "object/object-flags.h"
#include "monster-race/race-flags2.h"
#include "monster/monster-description-types.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "monster/smart-learn-types.h"
#include "player/player-damage.h"
#include "monster-race/monster-race-hook.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "object/object-hook.h"
#include "object/object-mark-types.h"
#include "grid/grid.h"
#include "monster-race/race-flags2.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "player/player-effects.h"
#include "spell/process-effect.h"
#include "monster-race/race-flags7.h"
#include "monster/monster-description-types.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster-info.h"
#include "monster/monster2.h"
#include "monster/smart-learn-types.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-processor.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster-util.h"
#include "monster/monster2.h"
#include "monster/place-monster-types.h"
#include "monster-race/race-flags2.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-status.h"
+#include "monster/monster-update.h"
#include "monster/monster2.h"
#include "monster/smart-learn-types.h"
#include "object/object-flavor.h"