#include "angband.h"
#include "chest.h"
-
+#include "object-hook.h"
/*!
* @brief フロア脱出時に出戻りが不可能だった場合に警告を加える処理
* @details
* Note that artifacts never break, see the "drop_near()" function.
*/
-static int breakage_chance(object_type *o_ptr)
+static PERCENTAGE breakage_chance(object_type *o_ptr)
{
- int archer_bonus = (p_ptr->pclass == CLASS_ARCHER ? (p_ptr->lev-1)/7 + 4: 0);
+ PERCENTAGE archer_bonus = (p_ptr->pclass == CLASS_ARCHER ? (PERCENTAGE)(p_ptr->lev-1)/7 + 4: 0);
/* Examine the snipe type */
if (snipe_type)
void do_cmd_fire_aux(int item, object_type *j_ptr)
{
int dir;
- int i, j, y, x, ny, nx, ty, tx, prev_y, prev_x;
+ int i, y, x, ny, nx, ty, tx, prev_y, prev_x;
int tdam_base, tdis, thits, tmul;
int bonus, chance;
int cur_dis, visible;
+ PERCENTAGE j;
object_type forge;
object_type *q_ptr;
}
}
-/*!
- * @brief オブジェクトが投射可能な武器かどうかを返す。
- * @param o_ptr 判定するオブジェクトの構造体参照ポインタ
- * @return 投射可能な武器ならばTRUE
- */
-static bool item_tester_hook_boomerang(object_type *o_ptr)
-{
- if ((o_ptr->tval==TV_DIGGING) || (o_ptr->tval == TV_SWORD) || (o_ptr->tval == TV_POLEARM) || (o_ptr->tval == TV_HAFTED)) return (TRUE);
-
- /* Assume not */
- return (FALSE);
-}
-
/*!
* @brief 投射処理メインルーチン /
{
DIRECTION dir;
OBJECT_IDX item;
- int i, j, y, x, ty, tx, prev_y, prev_x;
+ int i, y, x, ty, tx, prev_y, prev_x;
int ny[19], nx[19];
int chance, tdam, tdis;
int mul, div, dd, ds;
int cur_dis, visible;
+ PERCENTAGE j;
object_type forge;
object_type *q_ptr;