1 #include "object-hook/hook-perception.h"
2 #include "object-hook/hook-weapon.h"
3 #include "perception/object-perception.h"
4 #include "system/item-entity.h"
5 #include "system/player-type-definition.h"
8 * @brief アイテムが並の価値のアイテムかどうか判定する /
9 * Check if an object is nameless weapon or armour
10 * @param o_ptr 判定するアイテムの情報参照ポインタ
13 bool object_is_nameless_weapon_armour(const ItemEntity *o_ptr)
15 /* Require weapon or armour */
16 if (!o_ptr->is_weapon_armour_ammo()) {
20 /* Require nameless object if the object is well known */
21 if (o_ptr->is_known() && !o_ptr->is_nameless()) {
29 * @brief アイテムが未鑑定かを判定する /
30 * @param o_ptr 判定するアイテムの情報参照ポインタ
31 * @return 実際に未鑑定ならばTRUEを返す
33 bool object_is_not_identified(const ItemEntity *o_ptr)
35 return !o_ptr->is_known();
39 * @brief アイテムが未鑑定の武器防具かを判定する /
40 * @param o_ptr 判定するアイテムの情報参照ポインタ
41 * @return 実際に未鑑定の武器防具ならばTRUEを返す
43 bool object_is_not_identified_weapon_armor(const ItemEntity *o_ptr)
45 if (!object_is_not_identified(o_ptr)) {
49 return o_ptr->is_weapon_armour_ammo();
53 * @brief アイテムが未*鑑定*かを判定する /
54 * @param o_ptr 判定するアイテムの情報参照ポインタ
55 * @return 実際に未*鑑定*ならばTRUEを返す
57 bool object_is_not_fully_identified(const ItemEntity *o_ptr)
59 return !o_ptr->is_known() || !o_ptr->is_fully_known();
63 * @brief アイテムが未*鑑定*の武器防具かを判定する /
64 * @param o_ptr 判定するアイテムの情報参照ポインタ
65 * @return 実際に未*鑑定*の武器防具ならばTRUEを返す
67 bool object_is_not_fully_identified_weapon_armour(const ItemEntity *o_ptr)
69 if (!object_is_not_fully_identified(o_ptr)) {
73 return o_ptr->is_weapon_armour_ammo();