OSDN Git Service

Reworded English description for sniper's exploding arrow ability.
[hengband/hengband.git] / src / mind / mind-weaponsmith.c
1 #include "mind/mind-weaponsmith.h"
2 #include "object-hook/hook-weapon.h"
3 #include "sv-definition/sv-weapon-types.h"
4 #include "system/object-type-definition.h"
5
6 /*!
7  * @brief エッセンスの付加可能な武器や矢弾かを返す
8  * @param o_ptr チェックしたいオブジェクトの構造体参照ポインタ
9  * @return エッセンスの付加可能な武器か矢弾ならばTRUEを返す。
10  */
11 bool item_tester_hook_melee_ammo(player_type *player_ptr, object_type *o_ptr)
12 {
13     /* Unused */
14     (void)player_ptr;
15
16     switch (o_ptr->tval) {
17     case TV_HAFTED:
18     case TV_POLEARM:
19     case TV_DIGGING:
20     case TV_BOLT:
21     case TV_ARROW:
22     case TV_SHOT: {
23         return TRUE;
24     }
25     case TV_SWORD: {
26         if (o_ptr->sval != SV_POISON_NEEDLE)
27             return TRUE;
28     }
29     }
30
31     return FALSE;
32 }
33
34 /*!
35  * @brief オブジェクトが鍛冶師のエッセンス付加済みかを返す /
36  * Check if an object is made by a smith's special ability
37  * @param o_ptr 対象のオブジェクト構造体ポインタ
38  * @return エッセンス付加済みならばTRUEを返す
39  */
40 bool object_is_smith(player_type *player_ptr, object_type *o_ptr)
41 {
42     /* Unused */
43     (void)player_ptr;
44
45     if (object_is_weapon_armour_ammo(player_ptr, o_ptr) && o_ptr->xtra3)
46         return TRUE;
47
48     return FALSE;
49 }