OSDN Git Service

[Fix] #41487 SoundとMusicを間違えていたので修正 / Resolved the typo
[hengband/hengband.git] / src / monster-attack / monster-attack-player.c
index 4bb35d5..724bd07 100644 (file)
 #include "combat/aura-counterattack.h"
 #include "combat/combat-options-type.h"
 #include "combat/hallucination-attacks-table.h"
+#include "core/disturbance.h"
+#include "core/player-update-types.h"
+#include "dungeon/dungeon-flag-types.h"
 #include "dungeon/dungeon.h"
 #include "effect/effect-characteristics.h"
+#include "effect/effect-processor.h"
+#include "inventory/inventory-slot-types.h"
 #include "main/sound-definitions-table.h"
+#include "main/sound-of-music.h"
 #include "mind/mind-ninja.h"
 #include "mind/mind-samurai.h"
 #include "monster-attack/monster-attack-describer.h"
 #include "monster-attack/monster-attack-effect.h"
 #include "monster-attack/monster-attack-switcher.h"
 #include "monster-attack/monster-attack-util.h"
+#include "monster-race/monster-race.h"
+#include "monster-race/race-flags1.h"
+#include "monster-race/race-flags3.h"
+#include "monster/monster-describer.h"
 #include "monster/monster-description-types.h"
+#include "monster/monster-info.h"
 #include "monster/monster-status.h"
-#include "monster/monster2.h"
 #include "monster/smart-learn-types.h"
-#include "object/object-hook.h"
+#include "object-hook/hook-armor.h"
+#include "object/item-tester-hooker.h"
 #include "pet/pet-fall-off.h"
+#include "player/attack-defense-types.h"
 #include "player/player-damage.h"
-#include "player/player-effects.h"
-#include "player/player-move.h"
 #include "player/player-skill.h"
+#include "player/special-defense-types.h"
 #include "realm/realm-hex-numbers.h"
 #include "spell-kind/spells-teleport.h"
+#include "spell-realm/spells-crusade.h"
 #include "spell-realm/spells-hex.h"
-#include "spell/process-effect.h"
-#include "spell/spells-type.h"
+#include "spell/spell-types.h"
+#include "status/action-setter.h"
+#include "status/bad-status-setter.h"
+#include "system/floor-type-definition.h"
+#include "view/display-messages.h"
 
 static bool check_no_blow(player_type *target_ptr, monap_type *monap_ptr)
 {
@@ -258,7 +273,7 @@ static void describe_attack_evasion(player_type *target_ptr, monap_type *monap_p
 
 static void gain_armor_exp(player_type *target_ptr, monap_type *monap_ptr)
 {
-    if (!object_is_armour(&target_ptr->inventory_list[INVEN_RARM]) && !object_is_armour(&target_ptr->inventory_list[INVEN_LARM]))
+    if (!object_is_armour(target_ptr, &target_ptr->inventory_list[INVEN_MAIN_HAND]) && !object_is_armour(target_ptr, &target_ptr->inventory_list[INVEN_SUB_HAND]))
         return;
 
     int cur = target_ptr->skill_exp[GINOU_SHIELD];
@@ -376,11 +391,12 @@ static bool process_monster_blows(player_type *target_ptr, monap_type *monap_ptr
         power = mbe_info[monap_ptr->effect].power;
         monap_ptr->ac = target_ptr->ac + target_ptr->to_a;
         if ((monap_ptr->effect == RBE_NONE)
-            || check_hit_from_monster_to_player(target_ptr, power, monap_ptr->rlev, monster_stunned_remaining(monap_ptr->m_ptr)))
+            || check_hit_from_monster_to_player(target_ptr, power, monap_ptr->rlev, monster_stunned_remaining(monap_ptr->m_ptr))) {
             if (!process_monster_attack_hit(target_ptr, monap_ptr))
                 continue;
             else
                 process_monster_attack_evasion(target_ptr, monap_ptr);
+        }
 
         increase_blow_type_seen(target_ptr, monap_ptr);
         check_fall_off_horse(target_ptr, monap_ptr);
@@ -407,7 +423,7 @@ static void eyes_on_eyes(player_type *target_ptr, monap_type *monap_ptr)
 #ifdef JP
     msg_format("攻撃が%s自身を傷つけた!", monap_ptr->m_name);
 #else
-    GAME_TEXT m_name_self[80];
+    GAME_TEXT m_name_self[MAX_MONSTER_NAME];
     monster_desc(target_ptr, m_name_self, monap_ptr->m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE | MD_OBJECTIVE);
     msg_format("The attack of %s has wounded %s!", monap_ptr->m_name, m_name_self);
 #endif
@@ -457,7 +473,8 @@ bool make_attack_normal(player_type *target_ptr, MONSTER_IDX m_idx)
 {
     monap_type tmp_monap;
     monap_type *monap_ptr = initialize_monap_type(target_ptr, &tmp_monap, m_idx);
-    check_no_blow(target_ptr, monap_ptr);
+    if (!check_no_blow(target_ptr, monap_ptr))
+        return FALSE;
 
     monster_race *r_ptr = &r_info[monap_ptr->m_ptr->r_idx];
     monap_ptr->rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
@@ -480,4 +497,4 @@ bool make_attack_normal(player_type *target_ptr, MONSTER_IDX m_idx)
 
     postprocess_monster_blows(target_ptr, monap_ptr);
     return TRUE;
-}
+}
\ No newline at end of file