/*!
* @brief フロアの指定された位置に固定アーティファクトを生成する。 / Create the artifact of the specified number
* @details 固定アーティファクト構造体から基本ステータスをコピーした後、所定の座標でdrop_item()で落とす。
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param a_idx 生成する固定アーティファクト構造体のID
* @param y アイテムを落とす地点のy座標
* @param x アイテムを落とす地点のx座標
* 仮に2個以上存在可能かつ装備品以外の固定アーティファクトが作成されれば
* drop_near()関数の返り値は信用できなくなる.
*/
-bool create_named_art(ARTIFACT_IDX a_idx, POSITION y, POSITION x)
+bool create_named_art(player_type *player_ptr, ARTIFACT_IDX a_idx, POSITION y, POSITION x)
{
object_type forge;
object_type *q_ptr;
random_artifact_resistance(q_ptr, a_ptr);
/* Drop the artifact from heaven */
- return drop_near(q_ptr, -1, y, x) ? TRUE : FALSE;
+ return drop_near(player_ptr, q_ptr, -1, y, x) ? TRUE : FALSE;
}
/*対邪平均ダメージの計算処理*/
ARTIFACT_IDX i;
/* No artifacts in the town */
- if (!current_floor_ptr->dun_level) return (FALSE);
+ if (!p_ptr->current_floor_ptr->dun_level) return (FALSE);
/* Paranoia -- no "plural" artifacts */
if (o_ptr->number != 1) return (FALSE);
if (a_ptr->sval != o_ptr->sval) continue;
/* XXX XXX Enforce minimum "depth" (loosely) */
- if (a_ptr->level > current_floor_ptr->dun_level)
+ if (a_ptr->level > p_ptr->current_floor_ptr->dun_level)
{
/* Acquire the "out-of-depth factor" */
- int d = (a_ptr->level - current_floor_ptr->dun_level) * 2;
+ int d = (a_ptr->level - p_ptr->current_floor_ptr->dun_level) * 2;
/* Roll for out-of-depth creation */
if (!one_in_(d)) continue;
KIND_OBJECT_IDX k_idx = 0;
/*! @note 地上ではキャンセルする / No artifacts in the town */
- if (!current_floor_ptr->dun_level) return (FALSE);
+ if (!p_ptr->current_floor_ptr->dun_level) return (FALSE);
/*! @note get_obj_num_hookによる指定がある場合は生成をキャンセルする / Themed object */
if (get_obj_num_hook) return (FALSE);
/*! @note アーティファクト生成階が現在に対して足りない場合は高確率で1/(不足階層*2)を満たさないと生成リストに加えられない /
* XXX XXX Enforce minimum "depth" (loosely) */
- if (a_ptr->level > current_floor_ptr->object_level)
+ if (a_ptr->level > p_ptr->current_floor_ptr->object_level)
{
/* @note / Acquire the "out-of-depth factor". Roll for out-of-depth creation. */
- int d = (a_ptr->level - current_floor_ptr->object_level) * 2;
+ int d = (a_ptr->level - p_ptr->current_floor_ptr->object_level) * 2;
if (!one_in_(d)) continue;
}
/*! @note INSTA_ART型固定アーティファクトのベースアイテムもチェック対象とする。ベースアイテムの生成階層が足りない場合1/(不足階層*5) を満たさないと除外される。 /
* Find the base object. XXX XXX Enforce minimum "object" level (loosely). Acquire the "out-of-depth factor". Roll for out-of-depth creation. */
k_idx = lookup_kind(a_ptr->tval, a_ptr->sval);
- if (k_info[k_idx].level > current_floor_ptr->object_level)
+ if (k_info[k_idx].level > p_ptr->current_floor_ptr->object_level)
{
- int d = (k_info[k_idx].level - current_floor_ptr->object_level) * 5;
+ int d = (k_info[k_idx].level - p_ptr->current_floor_ptr->object_level) * 5;
if (!one_in_(d)) continue;
}