OSDN Git Service

[Refactor] #37353 Moved some functions from object-hook.c/h to hool-weapon.c/h
authorHourier <hourier@users.sourceforge.jp>
Sun, 28 Jun 2020 07:37:57 +0000 (16:37 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 28 Jun 2020 07:37:57 +0000 (16:37 +0900)
22 files changed:
src/autopick/autopick-destroyer.c
src/autopick/autopick-entry.c
src/autopick/autopick-matcher.c
src/cmd-action/cmd-pet.c
src/cmd-building/cmd-building.c
src/cmd-item/cmd-smith.c
src/inventory/inventory-object.c
src/knowledge/knowledge-inventory.c
src/object-enchant/artifact.c
src/object-enchant/object-curse.c
src/object-hook/hook-perception.c
src/object-hook/hook-weapon.c
src/object-hook/hook-weapon.h
src/object/object-hook.c
src/object/object-hook.h
src/perception/identification.c
src/player-attack/player-attack.c
src/player/player-effects.c
src/player/player-status.c
src/spell-kind/spells-perception.c
src/spell/spells-object.c
src/spell/spells3.c

index 77853a8..5843494 100644 (file)
@@ -12,6 +12,7 @@
 #include "monster-race/monster-race.h"
 #include "object-enchant/object-ego.h"
 #include "object-enchant/special-object-flags.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-flavor.h"
 #include "object/object-hook.h"
 #include "object/object-mark-types.h"
index ef668c1..168a8f0 100644 (file)
@@ -11,6 +11,7 @@
 #include "object-enchant/object-ego.h"
 #include "object-enchant/special-object-flags.h"
 #include "object-hook/hook-bow.h"
+#include "object-hook/hook-weapon.h"
 #include "object/item-use-flags.h"
 #include "object/object-flavor.h"
 #include "object/object-hook.h"
index 1486cd4..7775dd0 100644 (file)
@@ -15,6 +15,7 @@
 #include "object-hook/hook-armor.h"
 #include "object-hook/hook-bow.h"
 #include "object-hook/hook-checker.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-hook.h"
 #include "object/object-kind.h"
 #include "object/object-stack.h"
index 785a1ec..28f1a58 100644 (file)
@@ -28,7 +28,7 @@
 #include "monster/monster-info.h"
 #include "monster/monster-status.h"
 #include "monster/smart-learn-types.h"
-#include "object/object-hook.h"
+#include "object-hook/hook-weapon.h"
 #include "pet/pet-util.h"
 #include "player/player-class.h"
 #include "player/player-damage.h"
index e148a23..1d58afc 100644 (file)
@@ -48,6 +48,7 @@
 #include "mutation/mutation.h"
 #include "object-hook/hook-armor.h"
 #include "object-hook/hook-bow.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-flavor.h"
 #include "object/object-hook.h"
 #include "player/avatar.h"
index 332636b..431f361 100644 (file)
@@ -19,6 +19,7 @@
 #include "object-enchant/tr-types.h"
 #include "object-enchant/trc-types.h"
 #include "object-hook/hook-armor.h"
+#include "object-hook/hook-weapon.h"
 #include "object/item-use-flags.h"
 #include "object/object-flags.h" // todo 相互参照している.
 #include "object/object-flavor.h"
index 157582f..380d6c6 100644 (file)
@@ -1,8 +1,8 @@
 #include "inventory/inventory-object.h"
 #include "floor/floor-object.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-flavor.h"
 #include "object/object-generator.h"
-#include "object/object-hook.h"
 #include "object/object-mark-types.h"
 #include "object/object-stack.h"
 #include "object/object-value.h"
index 81b6c5d..a121b3b 100644 (file)
@@ -10,6 +10,7 @@
 #include "io-dump/dump-util.h"
 #include "object-enchant/special-object-flags.h"
 #include "object-enchant/tr-types.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-flags.h"
 #include "object/object-flavor.h"
 #include "object/object-hook.h"
index 6ac4e32..be8fe59 100644 (file)
@@ -33,6 +33,7 @@
 #include "object-enchant/trg-types.h"
 #include "object-hook/hook-armor.h"
 #include "object-hook/hook-checker.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-flags.h"
 #include "object/object-flavor.h"
 #include "object/object-generator.h"
index 230cb49..5fccdfa 100644 (file)
@@ -4,6 +4,7 @@
 #include "object-enchant/trc-types.h"
 #include "object-hook/hook-armor.h"
 #include "object-hook/hook-checker.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-flags.h"
 #include "object/object-flavor.h"
 #include "object/object-hook.h"
index 12717c8..944b503 100644 (file)
@@ -1,4 +1,5 @@
 #include "object-hook/hook-perception.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-hook.h"
 #include "perception/object-perception.h"
 #include "system/object-type-definition.h"
index a38b566..a0f77b9 100644 (file)
@@ -1,6 +1,11 @@
 #include "object-hook/hook-weapon.h"
+#include "object-enchant/tr-types.h"
+#include "object-hook/hook-armor.h"
+#include "object/object-flags.h"
+#include "player/player-skill.h"
 #include "sv-definition/sv-weapon-types.h"
 #include "system/object-type-definition.h"
+#include "util/bit-flags-calculator.h"
 
 /*!
  * @brief 武器匠の「武器」鑑定対象になるかを判定する。/ Hook to specify "weapon"
@@ -98,3 +103,205 @@ bool item_tester_hook_mochikae(player_type *player_ptr, object_type *o_ptr)
 
     return FALSE;
 }
+
+/*!
+ * @brief オブジェクトがプレイヤーの職業に応じた適正武器か否かを返す / Favorite weapons
+ * @param o_ptr 対象のオブジェクト構造体ポインタ
+ * @return オブジェクトが適正武器ならばTRUEを返す
+ */
+bool object_is_favorite(player_type *player_ptr, object_type *o_ptr)
+{
+    /* Only melee weapons match */
+    if (!(o_ptr->tval == TV_POLEARM || o_ptr->tval == TV_SWORD || o_ptr->tval == TV_DIGGING || o_ptr->tval == TV_HAFTED)) {
+        return FALSE;
+    }
+
+    /* Favorite weapons are varied depend on the class */
+    switch (player_ptr->pclass) {
+    case CLASS_PRIEST: {
+        BIT_FLAGS flgs[TR_FLAG_SIZE];
+        object_flags_known(player_ptr, o_ptr, flgs);
+
+        if (!have_flag(flgs, TR_BLESSED) && !(o_ptr->tval == TV_HAFTED))
+            return FALSE;
+        break;
+    }
+
+    case CLASS_MONK:
+    case CLASS_FORCETRAINER:
+        /* Icky to wield? */
+        if (!(s_info[player_ptr->pclass].w_max[o_ptr->tval - TV_WEAPON_BEGIN][o_ptr->sval]))
+            return FALSE;
+        break;
+
+    case CLASS_BEASTMASTER:
+    case CLASS_CAVALRY: {
+        BIT_FLAGS flgs[TR_FLAG_SIZE];
+        object_flags_known(player_ptr, o_ptr, flgs);
+
+        /* Is it known to be suitable to using while riding? */
+        if (!(have_flag(flgs, TR_RIDING)))
+            return FALSE;
+
+        break;
+    }
+
+    case CLASS_NINJA:
+        /* Icky to wield? */
+        if (s_info[player_ptr->pclass].w_max[o_ptr->tval - TV_WEAPON_BEGIN][o_ptr->sval] <= WEAPON_EXP_BEGINNER)
+            return FALSE;
+        break;
+
+    default:
+        /* All weapons are okay for non-special classes */
+        return TRUE;
+    }
+
+    return TRUE;
+}
+
+/*!
+ * @brief オブジェクトが武器として装備できるかどうかを返す / Check if an object is weapon (including bows and ammo)
+ * @param o_ptr 対象のオブジェクト構造体ポインタ
+ * @return 武器として使えるならばTRUEを返す
+ */
+bool object_is_weapon(player_type *player_ptr, object_type *o_ptr)
+{
+    /* Unused */
+    (void)player_ptr;
+
+    if (TV_WEAPON_BEGIN <= o_ptr->tval && o_ptr->tval <= TV_WEAPON_END)
+        return TRUE;
+
+    return FALSE;
+}
+
+/*!
+ * @brief オブジェクトが武器や矢弾として使用できるかを返す / Check if an object is weapon (including bows and ammo)
+ * Rare weapons/aromors including Blade of Chaos, Dragon armors, etc.
+ * @param o_ptr 対象のオブジェクト構造体ポインタ
+ * @return 武器や矢弾として使えるならばTRUEを返す
+ */
+bool object_is_weapon_ammo(object_type *o_ptr)
+{
+    if (TV_MISSILE_BEGIN <= o_ptr->tval && o_ptr->tval <= TV_WEAPON_END)
+        return TRUE;
+
+    return FALSE;
+}
+
+/*!
+ * @brief オブジェクトが武器、防具、矢弾として使用できるかを返す / Check if an object is weapon, armour or ammo
+ * @param o_ptr 対象のオブジェクト構造体ポインタ
+ * @return 武器、防具、矢弾として使えるならばTRUEを返す
+ */
+bool object_is_weapon_armour_ammo(player_type *player_ptr, object_type *o_ptr)
+{
+    /* Unused */
+    (void)player_ptr;
+
+    if (object_is_weapon_ammo(o_ptr) || object_is_armour(player_ptr, o_ptr))
+        return TRUE;
+
+    return FALSE;
+}
+
+/*!
+ * @brief オブジェクトが近接武器として装備できるかを返す / Melee weapons
+ * @param o_ptr 対象のオブジェクト構造体ポインタ
+ * @return 近接武器として使えるならばTRUEを返す
+ */
+bool object_is_melee_weapon(object_type *o_ptr)
+{
+    if (TV_DIGGING <= o_ptr->tval && o_ptr->tval <= TV_SWORD)
+        return TRUE;
+
+    return FALSE;
+}
+
+/*!
+ * @brief オブジェクトが装備可能であるかを返す / Wearable including all weapon, all armour, bow, light source, amulet, and ring
+ * @param o_ptr 対象のオブジェクト構造体ポインタ
+ * @return 装備可能ならばTRUEを返す
+ */
+bool object_is_wearable(object_type *o_ptr)
+{
+    if (TV_WEARABLE_BEGIN <= o_ptr->tval && o_ptr->tval <= TV_WEARABLE_END)
+        return TRUE;
+
+    return FALSE;
+}
+
+/*!
+ * @brief オブジェクトが装備品であるかを返す(object_is_wearableに矢弾を含む) / Equipment including all wearable objects and ammo
+ * @param o_ptr 対象のオブジェクト構造体ポインタ
+ * @return 装備品ならばTRUEを返す
+ */
+bool object_is_equipment(object_type *o_ptr)
+{
+    if (TV_EQUIP_BEGIN <= o_ptr->tval && o_ptr->tval <= TV_EQUIP_END)
+        return TRUE;
+
+    return FALSE;
+}
+
+/*!
+ * @brief オブジェクトが強化不能武器であるかを返す / Poison needle can not be enchanted
+ * @param o_ptr 対象のオブジェクト構造体ポインタ
+ * @return 強化不能ならばTRUEを返す
+ */
+bool object_refuse_enchant_weapon(object_type *o_ptr)
+{
+    if (o_ptr->tval == TV_SWORD && o_ptr->sval == SV_POISON_NEEDLE)
+        return TRUE;
+
+    return FALSE;
+}
+
+/*!
+ * @brief オブジェクトが強化可能武器であるかを返す /
+ * Check if an object is weapon (including bows and ammo) and allows enchantment
+ * @param o_ptr 対象のオブジェクト構造体ポインタ
+ * @return 強化可能ならばTRUEを返す
+ */
+bool object_allow_enchant_weapon(player_type *player_ptr, object_type *o_ptr)
+{
+    /* Unused */
+    (void)player_ptr;
+
+    if (object_is_weapon_ammo(o_ptr) && !object_refuse_enchant_weapon(o_ptr))
+        return TRUE;
+
+    return FALSE;
+}
+
+/*!
+ * @brief オブジェクトが強化可能な近接武器であるかを返す /
+ * Check if an object is melee weapon and allows enchantment
+ * @param o_ptr 対象のオブジェクト構造体ポインタ
+ * @return 強化可能な近接武器ならばTRUEを返す
+ */
+bool object_allow_enchant_melee_weapon(player_type *player_ptr, object_type *o_ptr)
+{
+    /* Unused */
+    (void)player_ptr;
+
+    if (object_is_melee_weapon(o_ptr) && !object_refuse_enchant_weapon(o_ptr))
+        return TRUE;
+
+    return FALSE;
+}
+
+/*!
+ * @brief オブジェクトが両手持ち可能な武器かを返す /
+ * Check if an object is melee weapon and allows wielding with two-hands
+ * @param o_ptr 対象のオブジェクト構造体ポインタ
+ * @return 両手持ち可能ならばTRUEを返す
+ */
+bool object_allow_two_hands_wielding(object_type *o_ptr)
+{
+    if (object_is_melee_weapon(o_ptr) && ((o_ptr->weight > 99) || (o_ptr->tval == TV_POLEARM)))
+        return TRUE;
+
+    return FALSE;
+}
index 8b6c2e2..dde9a4c 100644 (file)
@@ -7,3 +7,14 @@ bool item_tester_hook_melee_weapon(player_type *player_ptr, object_type *o_ptr);
 bool item_tester_hook_broken_weapon(player_type *player_ptr, object_type *o_ptr);
 bool item_tester_hook_boomerang(player_type *player_ptr, object_type *o_ptr);
 bool item_tester_hook_mochikae(player_type *player_ptr, object_type *o_ptr);
+bool object_is_favorite(player_type *player_ptr, object_type *o_ptr);
+bool object_is_weapon(player_type *player_ptr, object_type *o_ptr);
+bool object_is_weapon_ammo(object_type *o_ptr);
+bool object_is_weapon_armour_ammo(player_type *player_ptr, object_type *o_ptr);
+bool object_is_melee_weapon(object_type *o_ptr);
+bool object_is_wearable(object_type *o_ptr);
+bool object_is_equipment(object_type *o_ptr);
+bool object_refuse_enchant_weapon(object_type *o_ptr);
+bool object_allow_enchant_weapon(player_type *player_ptr, object_type *o_ptr);
+bool object_allow_enchant_melee_weapon(player_type *player_ptr, object_type *o_ptr);
+bool object_allow_two_hands_wielding(object_type *o_ptr);
index 1c70dbd..9862d6f 100644 (file)
@@ -20,6 +20,7 @@
 #include "object-enchant/trg-types.h"
 #include "object-hook/hook-armor.h"
 #include "object-hook/hook-checker.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-flags.h"
 #include "object/object-info.h"
 #include "object/object-kind.h"
@@ -27,7 +28,6 @@
 #include "player/mimic-info-table.h"
 #include "player/player-class.h"
 #include "player/player-race-types.h"
-#include "player/player-skill.h"
 #include "realm/realm-names-table.h"
 #include "sv-definition/sv-armor-types.h"
 #include "sv-definition/sv-lite-types.h"
@@ -371,62 +371,6 @@ bool object_is_bounty(player_type *player_ptr, object_type *o_ptr)
 }
 
 /*!
- * @brief オブジェクトがプレイヤーの職業に応じた適正武器か否かを返す / Favorite weapons
- * @param o_ptr 対象のオブジェクト構造体ポインタ
- * @return オブジェクトが適正武器ならばTRUEを返す
- */
-bool object_is_favorite(player_type *player_ptr, object_type *o_ptr)
-{
-    /* Only melee weapons match */
-    if (!(o_ptr->tval == TV_POLEARM || o_ptr->tval == TV_SWORD || o_ptr->tval == TV_DIGGING || o_ptr->tval == TV_HAFTED)) {
-        return FALSE;
-    }
-
-    /* Favorite weapons are varied depend on the class */
-    switch (player_ptr->pclass) {
-    case CLASS_PRIEST: {
-        BIT_FLAGS flgs[TR_FLAG_SIZE];
-        object_flags_known(player_ptr, o_ptr, flgs);
-
-        if (!have_flag(flgs, TR_BLESSED) && !(o_ptr->tval == TV_HAFTED))
-            return FALSE;
-        break;
-    }
-
-    case CLASS_MONK:
-    case CLASS_FORCETRAINER:
-        /* Icky to wield? */
-        if (!(s_info[player_ptr->pclass].w_max[o_ptr->tval - TV_WEAPON_BEGIN][o_ptr->sval]))
-            return FALSE;
-        break;
-
-    case CLASS_BEASTMASTER:
-    case CLASS_CAVALRY: {
-        BIT_FLAGS flgs[TR_FLAG_SIZE];
-        object_flags_known(player_ptr, o_ptr, flgs);
-
-        /* Is it known to be suitable to using while riding? */
-        if (!(have_flag(flgs, TR_RIDING)))
-            return FALSE;
-
-        break;
-    }
-
-    case CLASS_NINJA:
-        /* Icky to wield? */
-        if (s_info[player_ptr->pclass].w_max[o_ptr->tval - TV_WEAPON_BEGIN][o_ptr->sval] <= WEAPON_EXP_BEGINNER)
-            return FALSE;
-        break;
-
-    default:
-        /* All weapons are okay for non-special classes */
-        return TRUE;
-    }
-
-    return TRUE;
-}
-
-/*!
  * @brief オブジェクトがレアアイテムかどうかを返す /
  * Rare weapons/aromors including Blade of Chaos, Dragon armors, etc.
  * @param o_ptr 対象のオブジェクト構造体ポインタ
@@ -492,138 +436,6 @@ bool object_is_rare(object_type *o_ptr)
 }
 
 /*!
- * @brief オブジェクトが武器として装備できるかどうかを返す / Check if an object is weapon (including bows and ammo)
- * @param o_ptr 対象のオブジェクト構造体ポインタ
- * @return 武器として使えるならばTRUEを返す
- */
-bool object_is_weapon(player_type *player_ptr, object_type *o_ptr)
-{
-    /* Unused */
-    (void)player_ptr;
-
-    if (TV_WEAPON_BEGIN <= o_ptr->tval && o_ptr->tval <= TV_WEAPON_END)
-        return TRUE;
-
-    return FALSE;
-}
-
-/*!
- * @brief オブジェクトが武器や矢弾として使用できるかを返す / Check if an object is weapon (including bows and ammo)
- * Rare weapons/aromors including Blade of Chaos, Dragon armors, etc.
- * @param o_ptr 対象のオブジェクト構造体ポインタ
- * @return 武器や矢弾として使えるならばTRUEを返す
- */
-bool object_is_weapon_ammo(object_type *o_ptr)
-{
-    if (TV_MISSILE_BEGIN <= o_ptr->tval && o_ptr->tval <= TV_WEAPON_END)
-        return TRUE;
-
-    return FALSE;
-}
-
-/*!
- * @brief オブジェクトが武器、防具、矢弾として使用できるかを返す / Check if an object is weapon, armour or ammo
- * @param o_ptr 対象のオブジェクト構造体ポインタ
- * @return 武器、防具、矢弾として使えるならばTRUEを返す
- */
-bool object_is_weapon_armour_ammo(player_type *player_ptr, object_type *o_ptr)
-{
-    /* Unused */
-    (void)player_ptr;
-
-    if (object_is_weapon_ammo(o_ptr) || object_is_armour(player_ptr, o_ptr))
-        return TRUE;
-
-    return FALSE;
-}
-
-/*!
- * @brief オブジェクトが近接武器として装備できるかを返す / Melee weapons
- * @param o_ptr 対象のオブジェクト構造体ポインタ
- * @return 近接武器として使えるならばTRUEを返す
- */
-bool object_is_melee_weapon(object_type *o_ptr)
-{
-    if (TV_DIGGING <= o_ptr->tval && o_ptr->tval <= TV_SWORD)
-        return TRUE;
-
-    return FALSE;
-}
-
-/*!
- * @brief オブジェクトが装備可能であるかを返す / Wearable including all weapon, all armour, bow, light source, amulet, and ring
- * @param o_ptr 対象のオブジェクト構造体ポインタ
- * @return 装備可能ならばTRUEを返す
- */
-bool object_is_wearable(object_type *o_ptr)
-{
-    if (TV_WEARABLE_BEGIN <= o_ptr->tval && o_ptr->tval <= TV_WEARABLE_END)
-        return TRUE;
-
-    return FALSE;
-}
-
-/*!
- * @brief オブジェクトが装備品であるかを返す(object_is_wearableに矢弾を含む) / Equipment including all wearable objects and ammo
- * @param o_ptr 対象のオブジェクト構造体ポインタ
- * @return 装備品ならばTRUEを返す
- */
-bool object_is_equipment(object_type *o_ptr)
-{
-    if (TV_EQUIP_BEGIN <= o_ptr->tval && o_ptr->tval <= TV_EQUIP_END)
-        return TRUE;
-
-    return FALSE;
-}
-
-/*!
- * @brief オブジェクトが強化不能武器であるかを返す / Poison needle can not be enchanted
- * @param o_ptr 対象のオブジェクト構造体ポインタ
- * @return 強化不能ならばTRUEを返す
- */
-bool object_refuse_enchant_weapon(object_type *o_ptr)
-{
-    if (o_ptr->tval == TV_SWORD && o_ptr->sval == SV_POISON_NEEDLE)
-        return TRUE;
-
-    return FALSE;
-}
-
-/*!
- * @brief オブジェクトが強化可能武器であるかを返す /
- * Check if an object is weapon (including bows and ammo) and allows enchantment
- * @param o_ptr 対象のオブジェクト構造体ポインタ
- * @return 強化可能ならばTRUEを返す
- */
-bool object_allow_enchant_weapon(player_type *player_ptr, object_type *o_ptr)
-{
-    /* Unused */
-    (void)player_ptr;
-
-    if (object_is_weapon_ammo(o_ptr) && !object_refuse_enchant_weapon(o_ptr))
-        return TRUE;
-
-    return FALSE;
-}
-
-/*!
- * @brief オブジェクトが強化可能な近接武器であるかを返す /
- * Check if an object is melee weapon and allows enchantment
- * @param o_ptr 対象のオブジェクト構造体ポインタ
- * @return 強化可能な近接武器ならばTRUEを返す
- */
-bool object_allow_enchant_melee_weapon(player_type *player_ptr, object_type *o_ptr)
-{
-    /* Unused */
-    (void)player_ptr;
-
-    if (object_is_melee_weapon(o_ptr) && !object_refuse_enchant_weapon(o_ptr))
-        return TRUE;
-
-    return FALSE;
-}
-
-/*!
  * @brief オブジェクトが鍛冶師のエッセンス付加済みかを返す /
  * Check if an object is made by a smith's special ability
  * @param o_ptr 対象のオブジェクト構造体ポインタ
@@ -686,20 +498,6 @@ bool object_is_nameless(player_type *player_ptr, object_type *o_ptr)
 }
 
 /*!
- * @brief オブジェクトが両手持ち可能な武器かを返す /
- * Check if an object is melee weapon and allows wielding with two-hands
- * @param o_ptr 対象のオブジェクト構造体ポインタ
- * @return 両手持ち可能ならばTRUEを返す
- */
-bool object_allow_two_hands_wielding(object_type *o_ptr)
-{
-    if (object_is_melee_weapon(o_ptr) && ((o_ptr->weight > 99) || (o_ptr->tval == TV_POLEARM)))
-        return TRUE;
-
-    return FALSE;
-}
-
-/*!
  * @brief オブジェクトが松明に束ねられるかどうかを判定する
  * An "item_tester_hook" for refilling torches
  * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
index 2917959..043ae48 100644 (file)
@@ -20,22 +20,11 @@ bool item_tester_refill_lantern(player_type *player_ptr, object_type *o_ptr);
 
 bool object_is_potion(object_type *o_ptr);
 bool object_is_bounty(player_type *player_ptr, object_type *o_ptr);
-bool object_is_favorite(player_type *player_ptr, object_type *o_ptr);
 bool object_is_rare(object_type *o_ptr);
-bool object_is_weapon(player_type *player_ptr, object_type *o_ptr);
-bool object_is_weapon_ammo(object_type *o_ptr);
-bool object_is_weapon_armour_ammo(player_type *player_ptr, object_type *o_ptr);
-bool object_is_melee_weapon(object_type *o_ptr);
-bool object_is_wearable(object_type *o_ptr);
-bool object_is_equipment(object_type *o_ptr);
-bool object_refuse_enchant_weapon(object_type *o_ptr);
-bool object_allow_enchant_weapon(player_type *player_ptr, object_type *o_ptr);
-bool object_allow_enchant_melee_weapon(player_type *player_ptr, object_type *o_ptr);
 bool object_is_smith(player_type *player_ptr, object_type *o_ptr);
 bool object_is_artifact(object_type *o_ptr);
 bool object_is_random_artifact(object_type *o_ptr);
 bool object_is_nameless(player_type *player_ptr, object_type *o_ptr);
-bool object_allow_two_hands_wielding(object_type *o_ptr);
 bool object_can_refill_torch(player_type *player_ptr, object_type *o_ptr);
 bool can_player_destroy_object(player_type *player_ptr, object_type *o_ptr);
 bool object_is_quest_target(player_type *player_ptr, object_type *o_ptr);
index 3bfae0f..abfd17e 100644 (file)
@@ -9,12 +9,12 @@
 #include "object-enchant/object-ego.h"
 #include "object-enchant/tr-types.h"
 #include "object-enchant/trc-types.h"
+#include "object-hook/hook-checker.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-flags.h"
 #include "object/object-flavor.h"
-#include "object-hook/hook-checker.h"
-#include "object/object-hook.h"
-#include "object/object-kind.h"
 #include "object/object-info.h"
+#include "object/object-kind.h"
 #include "sv-definition/sv-amulet-types.h"
 #include "sv-definition/sv-other-types.h"
 #include "sv-definition/sv-ring-types.h"
index 83ae40b..0793c79 100644 (file)
@@ -25,9 +25,9 @@
 #include "monster/monster-info.h"
 #include "object-enchant/tr-types.h"
 #include "object-enchant/vorpal-weapon.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-flags.h"
 #include "object/object-flavor.h"
-#include "object/object-hook.h"
 #include "player-attack/attack-chaos-effect.h"
 #include "player-attack/blood-sucking-processor.h"
 #include "player-attack/player-attack-util.h"
index 4ce9ba5..9112376 100644 (file)
@@ -42,6 +42,7 @@
 #include "object-enchant/special-object-flags.h"
 #include "object-enchant/trg-types.h"
 #include "object-hook/hook-checker.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-generator.h"
 #include "object/object-hook.h"
 #include "object/object-kind.h"
index a0d8407..74cf169 100644 (file)
@@ -44,8 +44,8 @@
 #include "object-enchant/trc-types.h"
 #include "object-hook/hook-armor.h"
 #include "object-hook/hook-checker.h"
+#include "object-hook/hook-weapon.h"
 #include "object/object-flags.h"
-#include "object/object-hook.h"
 #include "object/object-mark-types.h"
 #include "object/object-info.h"
 #include "perception/object-perception.h"
index 8f40e75..4f6d770 100644 (file)
@@ -7,6 +7,7 @@
 #include "io/write-diary.h"
 #include "object-enchant/special-object-flags.h"
 #include "object-hook/hook-perception.h"
+#include "object-hook/hook-weapon.h"
 #include "object/item-use-flags.h"
 #include "object/object-flavor.h"
 #include "object/object-hook.h"
index ac97c9b..3b8ce95 100644 (file)
@@ -32,6 +32,7 @@
 #include "object-hook/hook-armor.h"
 #include "object-hook/hook-bow.h"
 #include "object-hook/hook-checker.h"
+#include "object-hook/hook-weapon.h"
 #include "object/item-use-flags.h"
 #include "object/object-flags.h"
 #include "object/object-flavor.h"
index 9221345..8665ed6 100644 (file)
@@ -67,6 +67,7 @@
 #include "object-enchant/tr-types.h"
 #include "object-enchant/trc-types.h"
 #include "object-hook/hook-perception.h"
+#include "object-hook/hook-weapon.h"
 #include "object/item-use-flags.h"
 #include "object/object-flavor.h"
 #include "object/object-generator.h"