Hengband  2.1.4
 全て データ構造 ファイル 関数 変数 型定義 マクロ定義 ページ
データ構造 | マクロ定義 | 関数 | 変数
object2.c

オブジェクトの実装 / Object code, part 2 [詳細]

#include "angband.h"
#include "kajitips.h"
object2.cのインクルード依存関係図

データ構造

struct  amuse_type
 
struct  essence_type
 エッセンス情報の構造体 / A structure for smithing [詳細]
 

マクロ定義

#define MAX_STACK_SIZE   99
 
#define AMS_NOTHING   0x00 /* No restriction */
 
#define AMS_NO_UNIQUE   0x01 /* Don't make the amusing object of uniques */
 
#define AMS_FIXED_ART   0x02 /* Make a fixed artifact based on the amusing object */
 
#define AMS_MULTIPLE   0x04 /* Drop 1-3 objects for one type */
 
#define AMS_PILE   0x08 /* Drop 1-99 pile objects for one type */
 
#define MAX_NORMAL_TRAPS   18
 
#define WARNING_AWARE_RANGE   12
 

関数

void excise_object_idx (int o_idx)
 床上、モンスター所持でスタックされたアイテムを削除しスタックを補完する / Excise a dungeon object from any stacks [詳細]
 
void delete_object_idx (int o_idx)
 オブジェクトを削除する / Delete a dungeon object [詳細]
 
void delete_object (int y, int x)
 フロアにマスに落ちているオブジェクトを全て削除する / Deletes all objects at given location Delete a dungeon object [詳細]
 
static void compact_objects_aux (int i1, int i2)
 グローバルオブジェクト配列に対し指定範囲のオブジェクトを整理してIDの若い順に寄せる / Move an object from index i1 to index i2 in the object list [詳細]
 
void compact_objects (int size)
 グローバルオブジェクト配列から優先度の低いものを削除し、データを圧縮する。 / Compact and Reorder the object list. [詳細]
 
void wipe_o_list (void)
 グローバルオブジェクト配列を初期化する / Delete all the items when player leaves the level [詳細]
 
s16b o_pop (void)
 グローバルオブジェクト配列から空きを取得する / Acquires and returns the index of a "free" object. [詳細]
 
static errr get_obj_num_prep (void)
 オブジェクト生成テーブルに生成制約を加える / Apply a "object restriction function" to the "object allocation table" [詳細]
 
s16b get_obj_num (int level)
 オブジェクト生成テーブルからアイテムを取得する / Choose an object kind that seems "appropriate" to the given level [詳細]
 
void object_known (object_type *o_ptr)
 オブジェクトを鑑定済にする / Known is true when the "attributes" of an object are "known". [詳細]
 
void object_aware (object_type *o_ptr)
 オブジェクトを*鑑定*済にする / The player is now aware of the effects of the given object. [詳細]
 
void object_tried (object_type *o_ptr)
 オブジェクトを試行済にする / Something has been "sampled" [詳細]
 
static s32b object_value_base (object_type *o_ptr)
 未鑑定なベースアイテムの基本価格を返す / Return the "value" of an "unknown" item Make a guess at the value of non-aware items [詳細]
 
s32b flag_cost (object_type *o_ptr, int plusses)
 オブジェクトのフラグ類から価格を算出する / Return the value of the flags the object has... [詳細]
 
s32b object_value_real (object_type *o_ptr)
 オブジェクトの真の価格を算出する / Return the value of the flags the object has... [詳細]
 
s32b object_value (object_type *o_ptr)
 オブジェクト価格算出のメインルーチン / Return the price of an item including plusses (and charges) [詳細]
 
bool can_player_destroy_object (object_type *o_ptr)
 破壊可能なアイテムかを返す / Determines whether an object can be destroyed, and makes fake inscription. [詳細]
 
void distribute_charges (object_type *o_ptr, object_type *q_ptr, int amt)
 魔法棒やロッドのスロット分割時に使用回数を分配する / Distribute charges of rods or wands. [詳細]
 
void reduce_charges (object_type *o_ptr, int amt)
 魔法棒やロッドの使用回数を減らす / [詳細]
 
int object_similar_part (object_type *o_ptr, object_type *j_ptr)
 両オブジェクトをスロットに重ね合わせ可能な最大数を返す。 Determine if an item can partly absorb a second item. [詳細]
 
bool object_similar (object_type *o_ptr, object_type *j_ptr)
 両オブジェクトをスロットに重ねることができるかどうかを返す。 Determine if an item can absorb a second item. [詳細]
 
void object_absorb (object_type *o_ptr, object_type *j_ptr)
 両オブジェクトをスロットに重ね合わせる。 Allow one item to "absorb" another, assuming they are similar [詳細]
 
s16b lookup_kind (int tval, int sval)
 tvalとsvalに対応するベースアイテムのIDを返す。 Find the index of the object_kind with the given tval and sval [詳細]
 
void object_wipe (object_type *o_ptr)
 オブジェクトを初期化する Wipe an object clean. [詳細]
 
void object_copy (object_type *o_ptr, object_type *j_ptr)
 オブジェクトを複製する Wipe an object clean. [詳細]
 
void object_prep (object_type *o_ptr, int k_idx)
 オブジェクト構造体にベースアイテムを作成する Prepare an object based on an object kind. [詳細]
 
s16b m_bonus (int max, int level)
 上質以上のオブジェクトに与えるための各種ボーナスを正規乱数も加えて算出する。 Help determine an "enchantment bonus" for an object. [詳細]
 
static void object_mention (object_type *o_ptr)
 デバッグ時にアイテム生成情報をメッセージに出力する / Cheat – describe a created object for the user [詳細]
 
static bool make_artifact_special (object_type *o_ptr)
 INSTA_ART型の固定アーティファクトの生成を確率に応じて試行する。 Mega-Hack – Attempt to create one of the "Special Objects". [詳細]
 
static bool make_artifact (object_type *o_ptr)
 非INSTA_ART型の固定アーティファクトの生成を確率に応じて試行する。 Mega-Hack – Attempt to create one of the "Special Objects" [詳細]
 
static byte get_random_ego (byte slot, bool good)
 アイテムのエゴをレア度の重みに合わせてランダムに選択する Choose random ego type [詳細]
 
static void a_m_aux_1 (object_type *o_ptr, int level, int power)
 武器系オブジェクトに生成ランクごとの強化を与えるサブルーチン Apply magic to an item known to be a "weapon" [詳細]
 
static void dragon_resist (object_type *o_ptr)
 ドラゴン装備にランダムな耐性を与える [詳細]
 
static bool add_esp_strong (object_type *o_ptr)
 オブジェクトにランダムな強いESPを与える [詳細]
 
static void add_esp_weak (object_type *o_ptr, bool extra)
 オブジェクトにランダムな弱いESPを与える [詳細]
 
static void a_m_aux_2 (object_type *o_ptr, int level, int power)
 防具系オブジェクトに生成ランクごとの強化を与えるサブルーチン Apply magic to an item known to be "armor" [詳細]
 
static void a_m_aux_3 (object_type *o_ptr, int level, int power)
 装飾品系オブジェクトに生成ランクごとの強化を与えるサブルーチン Apply magic to an item known to be a "ring" or "amulet" [詳細]
 
static bool item_monster_okay (int r_idx)
 モンスターが人形のベースにできるかを返す [詳細]
 
static void a_m_aux_4 (object_type *o_ptr, int level, int power)
 その他雑多のオブジェクトに生成ランクごとの強化を与えるサブルーチン Apply magic to an item known to be "boring" [詳細]
 
void apply_magic (object_type *o_ptr, int lev, u32b mode)
 生成されたベースアイテムに魔法的な強化を与えるメインルーチン Complete the "creation" of an object by applying "magic" to the item [詳細]
 
static bool kind_is_good (int k_idx)
 ベースアイテムが上質として扱われるかどうかを返す。 Hack – determine if a template is "good" [詳細]
 
bool make_object (object_type *j_ptr, u32b mode)
 生成階に応じたベースアイテムの生成を行う。 Attempt to make an object (normal or good/great) [詳細]
 
void place_object (int y, int x, u32b mode)
 フロアの指定位置に生成階に応じたベースアイテムの生成を行う。 Attempt to place an object (normal or good/great) at the given location. [詳細]
 
bool make_gold (object_type *j_ptr)
 生成階に応じた財宝オブジェクトの生成を行う。 Make a treasure object [詳細]
 
void place_gold (int y, int x)
 フロアの指定位置に生成階に応じた財宝オブジェクトの生成を行う。 Places a treasure (Gold or Gems) at given location [詳細]
 
s16b drop_near (object_type *j_ptr, int chance, int y, int x)
 生成済のオブジェクトをフロアの所定の位置に落とす。 Let an object fall to the ground at or near a location. [詳細]
 
void acquirement (int y1, int x1, int num, bool great, bool special, bool known)
 獲得ドロップを行う。 Scatter some "great" objects near the player [詳細]
 
void amusement (int y1, int x1, int num, bool known)
 誰得ドロップを行う。 [詳細]
 
void init_normal_traps (void)
 タグに従って、基本トラップテーブルを初期化する / Initialize arrays for normal traps [詳細]
 
s16b choose_random_trap (void)
 基本トラップをランダムに選択する / Get random trap [詳細]
 
void disclose_grid (int y, int x)
 マスに存在するトラップを秘匿する / Disclose an invisible trap [詳細]
 
void place_trap (int y, int x)
 マスをトラップを配置する / The location must be a legal, naked, floor grid. [詳細]
 
void inven_item_charges (int item)
 魔道具の使用回数の残量を示すメッセージを表示する / Describe the charges on an item in the inventory. [詳細]
 
void inven_item_describe (int item)
 アイテムの残り所持数メッセージを表示する / Describe an item in the inventory. [詳細]
 
void inven_item_increase (int item, int num)
 アイテムの残り所持数メッセージを表示する / Increase the "number" of an item in the inventory [詳細]
 
void inven_item_optimize (int item)
 所持アイテムスロットから所持数のなくなったアイテムを消去する / Erase an inventory slot if it has no more items [詳細]
 
void floor_item_charges (int item)
 床上の魔道具の残り残量メッセージを表示する / Describe the charges on an item on the floor. [詳細]
 
void floor_item_describe (int item)
 床上のアイテムの残り数メッセージを表示する / Describe the charges on an item on the floor. [詳細]
 
void floor_item_increase (int item, int num)
 床上のアイテムの数を増やす / Increase the "number" of an item on the floor [詳細]
 
void floor_item_optimize (int item)
 床上の数の無くなったアイテムスロットを消去する / Optimize an item on the floor (destroy "empty" items) [詳細]
 
bool inven_carry_okay (object_type *o_ptr)
 アイテムを拾う際にザックから溢れずに済むかを判定する / Check if we have space for an item in the pack without overflow [詳細]
 
bool object_sort_comp (object_type *o_ptr, s32b o_value, object_type *j_ptr)
 オブジェクトを定義された基準に従いソートするための関数 / Check if we have space for an item in the pack without overflow [詳細]
 
s16b inven_carry (object_type *o_ptr)
 オブジェクトをプレイヤーが拾って所持スロットに納めるメインルーチン / Add an item to the players inventory, and return the slot used. [詳細]
 
s16b inven_takeoff (int item, int amt)
 装備スロットからオブジェクトを外すメインルーチン / Take off (some of) a non-cursed equipment item [詳細]
 
void inven_drop (int item, int amt)
 所持スロットから床下にオブジェクトを落とすメインルーチン / Drop (some of) a non-cursed inventory/equipment item [詳細]
 
void combine_pack (void)
 プレイヤーの所持スロットに存在するオブジェクトをまとめなおす / Combine items in the pack [詳細]
 
void reorder_pack (void)
 プレイヤーの所持スロットに存在するオブジェクトを並び替える / Reorder items in the pack [詳細]
 
void display_koff (int k_idx)
 現在アクティブになっているウィンドウにオブジェクトの詳細を表示する / Hack – display an object kind in the current window [詳細]
 
object_typechoose_warning_item (void)
 警告を放つアイテムを選択する / Choose one of items that have warning flag Calculate spell damages [詳細]
 
static void spell_damcalc (monster_type *m_ptr, int typ, int dam, int *max)
 警告基準を定めるために魔法の効果属性に基づいて最大魔法ダメージを計算する / Calculate spell damages [詳細]
 
void spell_damcalc_by_spellnum (int spell_num, int typ, int m_idx, int *max)
 警告基準を定めるために魔法の効果属性に基づいて最大魔法ダメージを計算する。 / Calculate spell damages [詳細]
 
static int blow_damcalc (monster_type *m_ptr, monster_blow *blow_ptr)
 警告基準を定めるためにモンスターの打撃最大ダメージを算出する / Calculate blow damages [詳細]
 
bool process_warning (int xx, int yy)
 プレイヤーが特定地点へ移動した場合に警告を発する処理 / Examine the grid (xx,yy) and warn the player if there are any danger [詳細]
 
static bool item_tester_hook_melee_ammo (object_type *o_ptr)
 エッセンスの付加可能な武器や矢弾かを返す [詳細]
 
static void display_essence (void)
 所持しているエッセンス一覧を表示する [詳細]
 
static void drain_essence (void)
 エッセンスの抽出処理 [詳細]
 
static int choose_essence (void)
 付加するエッセンスの大別を選択する [詳細]
 
static void add_essence (int mode)
 エッセンスを実際に付加する [詳細]
 
static void erase_essence (void)
 エッセンスを消去する [詳細]
 
void do_cmd_kaji (bool only_browse)
 鍛冶コマンドのメインルーチン [詳細]
 
void torch_flags (object_type *o_ptr, u32b *flgs)
 投擲時たいまつに投げやすい/焼棄/アンデッドスレイの特別効果を返す。 Torches have special abilities when they are flaming. [詳細]
 
void torch_dice (object_type *o_ptr, int *dd, int *ds)
 投擲時たいまつにダイスを与える。 Torches have special abilities when they are flaming. [詳細]
 
void torch_lost_fuel (object_type *o_ptr)
 投擲時命中したたいまつの寿命を縮める。 Torches have special abilities when they are flaming. [詳細]
 

変数

amuse_type amuse_info []
 
static s16b normal_traps [MAX_NORMAL_TRAPS]
 
static essence_type essence_info []
 エッセンス情報テーブル Smithing type data for Weapon smith [詳細]
 
cptr essence_name []
 エッセンス名テーブル / Essense names for Weapon smith [詳細]
 

説明

オブジェクトの実装 / Object code, part 2

日付
2014/01/11
作者
Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke

This software may be copied and distributed for educational, research,
and not for profit purposes provided that this copyright and statement
are included in all such copies. Other copyrights may also apply.
2014 Deskull rearranged comment for Doxygen.

マクロ定義

#define AMS_FIXED_ART   0x02 /* Make a fixed artifact based on the amusing object */
#define AMS_MULTIPLE   0x04 /* Drop 1-3 objects for one type */
#define AMS_NO_UNIQUE   0x01 /* Don't make the amusing object of uniques */
#define AMS_NOTHING   0x00 /* No restriction */
#define AMS_PILE   0x08 /* Drop 1-99 pile objects for one type */
#define MAX_NORMAL_TRAPS   18
#define MAX_STACK_SIZE   99
#define WARNING_AWARE_RANGE   12

関数

static void a_m_aux_1 ( object_type o_ptr,
int  level,
int  power 
)
static

武器系オブジェクトに生成ランクごとの強化を与えるサブルーチン Apply magic to an item known to be a "weapon"

引数
o_ptr強化を与えたいオブジェクトの構造体参照ポインタ
level生成基準階
power生成ランク
戻り値
なし

Hack – note special base damage dice boosting
Hack – note special processing for weapon/digger

関数の呼び出しグラフ:

呼出しグラフ:

static void a_m_aux_2 ( object_type o_ptr,
int  level,
int  power 
)
static

防具系オブジェクトに生成ランクごとの強化を与えるサブルーチン Apply magic to an item known to be "armor"

引数
o_ptr強化を与えたいオブジェクトの構造体参照ポインタ
level生成基準階
power生成ランク
戻り値
なし

Hack – note special processing for crown/helm
Hack – note special processing for robe of permanence

関数の呼び出しグラフ:

呼出しグラフ:

static void a_m_aux_3 ( object_type o_ptr,
int  level,
int  power 
)
static

装飾品系オブジェクトに生成ランクごとの強化を与えるサブルーチン Apply magic to an item known to be a "ring" or "amulet"

引数
o_ptr強化を与えたいオブジェクトの構造体参照ポインタ
level生成基準階
power生成ランク
戻り値
なし

Hack – note special "pval boost" code for ring of speed
Hack – note that some items must be cursed (or blessed)

関数の呼び出しグラフ:

呼出しグラフ:

static void a_m_aux_4 ( object_type o_ptr,
int  level,
int  power 
)
static

その他雑多のオブジェクトに生成ランクごとの強化を与えるサブルーチン Apply magic to an item known to be "boring"

引数
o_ptr強化を与えたいオブジェクトの構造体参照ポインタ
level生成基準階
power生成ランク
戻り値
なし

Hack – note the special code for various items

関数の呼び出しグラフ:

呼出しグラフ:

void acquirement ( int  y1,
int  x1,
int  num,
bool  great,
bool  special,
bool  known 
)

獲得ドロップを行う。 Scatter some "great" objects near the player

引数
y1配置したいフロアのY座標
x1配置したいフロアのX座標
num獲得の処理回数
greatTRUEならば必ず高級品以上を落とす
specialTRUEならば必ず特別品を落とす
knownTRUEならばオブジェクトが必ず*鑑定*済になる
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool add_esp_strong ( object_type o_ptr)
static

オブジェクトにランダムな強いESPを与える

引数
o_ptr強化を与えたいオブジェクトの構造体参照ポインタ
戻り値
なし

呼出しグラフ:

static void add_esp_weak ( object_type o_ptr,
bool  extra 
)
static

オブジェクトにランダムな弱いESPを与える

引数
o_ptr強化を与えたいオブジェクトの構造体参照ポインタ
extraTRUEならばESPの最大付与数が増える(TRUE -> 3+1d6 / FALSE -> 1d3)
戻り値
なし

呼出しグラフ:

static void add_essence ( int  mode)
static

エッセンスを実際に付加する

引数
modeエッセンスの大別ID
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void amusement ( int  y1,
int  x1,
int  num,
bool  known 
)

誰得ドロップを行う。

引数
y1配置したいフロアのY座標
x1配置したいフロアのX座標
num誰得の処理回数
knownTRUEならばオブジェクトが必ず*鑑定*済になる
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void apply_magic ( object_type o_ptr,
int  lev,
u32b  mode 
)

生成されたベースアイテムに魔法的な強化を与えるメインルーチン Complete the "creation" of an object by applying "magic" to the item

引数
o_ptr強化を与えたいオブジェクトの構造体参照ポインタ
lev生成基準階
mode生成オプション
戻り値
なし

This includes not only rolling for random bonuses, but also putting the
finishing touches on ego-items and artifacts, giving charges to wands and
staffs, giving fuel to lites, and placing traps on chests.

In particular, note that "Instant Artifacts", if "created" by an external
routine, must pass through this function to complete the actual creation.

The base "chance" of the item being "good" increases with the "level"
parameter, which is usually derived from the dungeon level, being equal
to the level plus 10, up to a maximum of 75. If "good" is true, then
the object is guaranteed to be "good". If an object is "good", then
the chance that the object will be "great" (ego-item or artifact), also
increases with the "level", being equal to half the level, plus 5, up to
a maximum of 20. If "great" is true, then the object is guaranteed to be
"great". At dungeon level 65 and below, 15/100 objects are "great".

If the object is not "good", there is a chance it will be "cursed", and
if it is "cursed", there is a chance it will be "broken". These chances
are related to the "good" / "great" chances above.

Otherwise "normal" rings and amulets will be "good" half the time and
"cursed" half the time, unless the ring/amulet is always good or cursed.

If "okay" is true, and the object is going to be "great", then there is
a chance that an artifact will be created. This is true even if both the
"good" and "great" arguments are false. As a total hack, if "great" is
true, then the item gets 3 extra "attempts" to become an artifact.

関数の呼び出しグラフ:

呼出しグラフ:

static int blow_damcalc ( monster_type m_ptr,
monster_blow blow_ptr 
)
static

警告基準を定めるためにモンスターの打撃最大ダメージを算出する / Calculate blow damages

引数
m_ptr打撃を行使するモンスターの構造体参照ポインタ
blow_ptrモンスターの打撃能力の構造体参照ポインタ
戻り値
算出された最大ダメージを返す。

関数の呼び出しグラフ:

呼出しグラフ:

bool can_player_destroy_object ( object_type o_ptr)

破壊可能なアイテムかを返す / Determines whether an object can be destroyed, and makes fake inscription.

引数
o_ptr破壊可能かを確認したいオブジェクトの構造体参照ポインタ
戻り値
オブジェクトが破壊可能ならばTRUEを返す

関数の呼び出しグラフ:

呼出しグラフ:

static int choose_essence ( void  )
static

付加するエッセンスの大別を選択する

戻り値
選んだエッセンスの大別ID

関数の呼び出しグラフ:

呼出しグラフ:

s16b choose_random_trap ( void  )

基本トラップをランダムに選択する / Get random trap

戻り値
選択したトラップのID

XXX XXX XXX This routine should be redone to reflect trap "level".
That is, it does not make sense to have spiked pits at 50 feet.
Actually, it is not this routine, but the "trap instantiation"
code, which should also check for "trap doors" on quest levels.

関数の呼び出しグラフ:

呼出しグラフ:

object_type* choose_warning_item ( void  )

警告を放つアイテムを選択する / Choose one of items that have warning flag Calculate spell damages

戻り値
警告を行う

関数の呼び出しグラフ:

呼出しグラフ:

void combine_pack ( void  )

プレイヤーの所持スロットに存在するオブジェクトをまとめなおす / Combine items in the pack

戻り値
なし

Note special handling of the "overflow" slot

関数の呼び出しグラフ:

呼出しグラフ:

void compact_objects ( int  size)

グローバルオブジェクト配列から優先度の低いものを削除し、データを圧縮する。 / Compact and Reorder the object list.

引数
size最低でも減らしたいオブジェクト数の水準
戻り値
なし

(危険なので使用には注意すること) This function can be very dangerous, use with caution!

When actually "compacting" objects, we base the saving throw on a
combination of object level, distance from player, and current
"desperation".

After "compacting" (if needed), we "reorder" the objects into a more
compact order, and we reset the allocation info, and the "live" array.

関数の呼び出しグラフ:

呼出しグラフ:

static void compact_objects_aux ( int  i1,
int  i2 
)
static

グローバルオブジェクト配列に対し指定範囲のオブジェクトを整理してIDの若い順に寄せる / Move an object from index i1 to index i2 in the object list

引数
i1整理したい配列の始点
i2整理したい配列の終点
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void delete_object ( int  y,
int  x 
)

フロアにマスに落ちているオブジェクトを全て削除する / Deletes all objects at given location Delete a dungeon object

引数
y削除したフロアマスのY座標
x削除したフロアマスのX座標
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void delete_object_idx ( int  o_idx)

オブジェクトを削除する / Delete a dungeon object

引数
o_idx削除対象のオブジェクト構造体ポインタ
戻り値
なし

Handle "stacks" of objects correctly.

関数の呼び出しグラフ:

呼出しグラフ:

void disclose_grid ( int  y,
int  x 
)

マスに存在するトラップを秘匿する / Disclose an invisible trap

引数
y秘匿したいマスのY座標
x秘匿したいマスのX座標
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void display_essence ( void  )
static

所持しているエッセンス一覧を表示する

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void display_koff ( int  k_idx)

現在アクティブになっているウィンドウにオブジェクトの詳細を表示する / Hack – display an object kind in the current window

引数
k_idxベースアイテムの参照ID
戻り値
なし

Include list of usable spells for readible books

関数の呼び出しグラフ:

呼出しグラフ:

void distribute_charges ( object_type o_ptr,
object_type q_ptr,
int  amt 
)

魔法棒やロッドのスロット分割時に使用回数を分配する / Distribute charges of rods or wands.

引数
o_ptr分割元オブジェクトの構造体参照ポインタ source item
q_ptr分割先オブジェクトの構造体参照ポインタ target item, must be of the same type as o_ptr
amt分割したい回数量 number of items that are transfered
戻り値
なし

Hack – If rods or wands are dropped, the total maximum timeout or
charges need to be allocated between the two stacks. If all the items
are being dropped, it makes for a neater message to leave the original
stack's pval alone. -LM-

呼出しグラフ:

void do_cmd_kaji ( bool  only_browse)

鍛冶コマンドのメインルーチン

引数
only_browseTRUEならばエッセンス一覧の表示のみを行う
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void dragon_resist ( object_type o_ptr)
static

ドラゴン装備にランダムな耐性を与える

引数
o_ptr強化を与えたいオブジェクトの構造体参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void drain_essence ( void  )
static

エッセンスの抽出処理

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

s16b drop_near ( object_type j_ptr,
int  chance,
int  y,
int  x 
)

生成済のオブジェクトをフロアの所定の位置に落とす。 Let an object fall to the ground at or near a location.

引数
j_ptr落としたいオブジェクト構造体の参照ポインタ
chanceドロップの成功率(%)
y配置したいフロアのY座標
x配置したいフロアのX座標
戻り値
生成に成功したらTRUEを返す。

The initial location is assumed to be "in_bounds()".

This function takes a parameter "chance". This is the percentage
chance that the item will "disappear" instead of drop. If the object
has been thrown, then this is the chance of disappearance on contact.

Hack – this function uses "chance" to determine if it should produce
some form of "description" of the drop event (under the player).

We check several locations to see if we can find a location at which
the object can combine, stack, or be placed. Artifacts will try very
hard to be placed, including "teleporting" to a useful grid if needed.

関数の呼び出しグラフ:

呼出しグラフ:

static void erase_essence ( void  )
static

エッセンスを消去する

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void excise_object_idx ( int  o_idx)

床上、モンスター所持でスタックされたアイテムを削除しスタックを補完する / Excise a dungeon object from any stacks

引数
o_idx削除対象のオブジェクト構造体ポインタ
戻り値
なし

呼出しグラフ:

s32b flag_cost ( object_type o_ptr,
int  plusses 
)

オブジェクトのフラグ類から価格を算出する / Return the value of the flags the object has...

引数
o_ptrフラグ価格を確認したいオブジェクトの構造体参照ポインタ
plussesフラグに与える価格の基本重み
戻り値
オブジェクトのフラグ価格

関数の呼び出しグラフ:

呼出しグラフ:

void floor_item_charges ( int  item)

床上の魔道具の残り残量メッセージを表示する / Describe the charges on an item on the floor.

引数
itemメッセージの対象にしたいアイテム所持スロット
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void floor_item_describe ( int  item)

床上のアイテムの残り数メッセージを表示する / Describe the charges on an item on the floor.

引数
itemメッセージの対象にしたいアイテム所持スロット
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void floor_item_increase ( int  item,
int  num 
)

床上のアイテムの数を増やす / Increase the "number" of an item on the floor

引数
item増やしたいアイテムの所持スロット
num増やしたいアイテムの数
戻り値
なし

呼出しグラフ:

void floor_item_optimize ( int  item)

床上の数の無くなったアイテムスロットを消去する / Optimize an item on the floor (destroy "empty" items)

引数
item消去したいアイテムの所持スロット
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

s16b get_obj_num ( int  level)

オブジェクト生成テーブルからアイテムを取得する / Choose an object kind that seems "appropriate" to the given level

引数
level生成階
戻り値
選ばれたオブジェクトベースID

This function uses the "prob2" field of the "object allocation table",
and various local information, to calculate the "prob3" field of the
same table, which is then used to choose an "appropriate" object, in
a relatively efficient manner.

It is (slightly) more likely to acquire an object of the given level
than one of a lower level. This is done by choosing several objects
appropriate to the given level and keeping the "hardest" one.

Note that if no objects are "appropriate", then this function will
fail, and return zero, but this should almost never happen.

呼出しグラフ:

static errr get_obj_num_prep ( void  )
static

オブジェクト生成テーブルに生成制約を加える / Apply a "object restriction function" to the "object allocation table"

戻り値
常に0を返す。

生成の制約はグローバルのget_obj_num_hook関数ポインタで加える

呼出しグラフ:

static byte get_random_ego ( byte  slot,
bool  good 
)
static

アイテムのエゴをレア度の重みに合わせてランダムに選択する Choose random ego type

引数
slot取得したいエゴの装備部位
goodTRUEならば通常のエゴ、FALSEならば呪いのエゴが選択対象となる。
戻り値
選択されたエゴ情報のID、万一選択できなかった場合はmax_e_idxが返る。

呼出しグラフ:

void init_normal_traps ( void  )

タグに従って、基本トラップテーブルを初期化する / Initialize arrays for normal traps

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

s16b inven_carry ( object_type o_ptr)

オブジェクトをプレイヤーが拾って所持スロットに納めるメインルーチン / Add an item to the players inventory, and return the slot used.

引数
o_ptr拾うオブジェクトの構造体参照ポインタ
戻り値
収められた所持スロットのID、拾うことができなかった場合-1を返す。

If the new item can combine with an existing item in the inventory,
it will do so, using "object_similar()" and "object_absorb()", else,
the item will be placed into the "proper" location in the inventory.

This function can be used to "over-fill" the player's pack, but only
once, and such an action must trigger the "overflow" code immediately.
Note that when the pack is being "over-filled", the new item must be
placed into the "overflow" slot, and the "overflow" must take place
before the pack is reordered, but (optionally) after the pack is
combined. This may be tricky. See "dungeon.c" for info.

Note that this code must remove any location/stack information
from the object once it is placed into the inventory.

関数の呼び出しグラフ:

呼出しグラフ:

bool inven_carry_okay ( object_type o_ptr)

アイテムを拾う際にザックから溢れずに済むかを判定する / Check if we have space for an item in the pack without overflow

引数
o_ptr拾いたいオブジェクトの構造体参照ポインタ
戻り値
溢れずに済むならTRUEを返す

関数の呼び出しグラフ:

呼出しグラフ:

void inven_drop ( int  item,
int  amt 
)

所持スロットから床下にオブジェクトを落とすメインルーチン / Drop (some of) a non-cursed inventory/equipment item

引数
item所持テーブルのID
amt落としたい個数
戻り値
なし

The object will be dropped "near" the current location

関数の呼び出しグラフ:

呼出しグラフ:

void inven_item_charges ( int  item)

魔道具の使用回数の残量を示すメッセージを表示する / Describe the charges on an item in the inventory.

引数
item残量を表示したいプレイヤーのアイテム所持スロット
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void inven_item_describe ( int  item)

アイテムの残り所持数メッセージを表示する / Describe an item in the inventory.

引数
item残量を表示したいプレイヤーのアイテム所持スロット
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void inven_item_increase ( int  item,
int  num 
)

アイテムの残り所持数メッセージを表示する / Increase the "number" of an item in the inventory

引数
item所持数を増やしたいプレイヤーのアイテム所持スロット
num増やしたい量
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void inven_item_optimize ( int  item)

所持アイテムスロットから所持数のなくなったアイテムを消去する / Erase an inventory slot if it has no more items

引数
item消去したいプレイヤーのアイテム所持スロット
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

s16b inven_takeoff ( int  item,
int  amt 
)

装備スロットからオブジェクトを外すメインルーチン / Take off (some of) a non-cursed equipment item

引数
itemオブジェクトを外したい所持テーブルのID
amt外したい個数
戻り値
収められた所持スロットのID、拾うことができなかった場合-1を返す。

Note that only one item at a time can be wielded per slot.
Note that taking off an item when "full" may cause that item
to fall to the ground.
Return the inventory slot into which the item is placed.

関数の呼び出しグラフ:

呼出しグラフ:

static bool item_monster_okay ( int  r_idx)
static

モンスターが人形のベースにできるかを返す

引数
r_idxチェックしたいモンスター種族のID
戻り値
人形にできるならTRUEを返す

呼出しグラフ:

static bool item_tester_hook_melee_ammo ( object_type o_ptr)
static

エッセンスの付加可能な武器や矢弾かを返す

引数
o_ptrチェックしたいオブジェクトの構造体参照ポインタ
戻り値
エッセンスの付加可能な武器か矢弾ならばTRUEを返す。

呼出しグラフ:

static bool kind_is_good ( int  k_idx)
static

ベースアイテムが上質として扱われるかどうかを返す。 Hack – determine if a template is "good"

引数
k_idx判定したいベースアイテムのID
戻り値
ベースアイテムが上質ならばTRUEを返す。

呼出しグラフ:

s16b lookup_kind ( int  tval,
int  sval 
)

tvalとsvalに対応するベースアイテムのIDを返す。 Find the index of the object_kind with the given tval and sval

引数
tval検索したいベースアイテムのtval
sval検索したいベースアイテムのsval
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

s16b m_bonus ( int  max,
int  level 
)

上質以上のオブジェクトに与えるための各種ボーナスを正規乱数も加えて算出する。 Help determine an "enchantment bonus" for an object.

引数
maxボーナス値の限度
levelボーナス値に加味する基準生成階
戻り値
算出されたボーナス値

To avoid floating point but still provide a smooth distribution of bonuses,
we simply round the results of division in such a way as to "average" the
correct floating point value.

This function has been changed. It uses "randnor()" to choose values from
a normal distribution, whose mean moves from zero towards the max as the
level increases, and whose standard deviation is equal to 1/4 of the max,
and whose values are forced to lie between zero and the max, inclusive.

Since the "level" rarely passes 100 before Morgoth is dead, it is very
rare to get the "full" enchantment on an object, even a deep levels.

It is always possible (albeit unlikely) to get the "full" enchantment.

A sample distribution of values from "m_bonus(10, N)" is shown below:

N 0 1 2 3 4 5 6 7 8 9 10
— -— -— -— -— -— -— -— -— -— -— -—
0 66.37 13.01 9.73 5.47 2.89 1.31 0.72 0.26 0.12 0.09 0.03
8 46.85 24.66 12.13 8.13 4.20 2.30 1.05 0.36 0.19 0.08 0.05
16 30.12 27.62 18.52 10.52 6.34 3.52 1.95 0.90 0.31 0.15 0.05
24 22.44 15.62 30.14 12.92 8.55 5.30 2.39 1.63 0.62 0.28 0.11
32 16.23 11.43 23.01 22.31 11.19 7.18 4.46 2.13 1.20 0.45 0.41
40 10.76 8.91 12.80 29.51 16.00 9.69 5.90 3.43 1.47 0.88 0.65
48 7.28 6.81 10.51 18.27 27.57 11.76 7.85 4.99 2.80 1.22 0.94
56 4.41 4.73 8.52 11.96 24.94 19.78 11.06 7.18 3.68 1.96 1.78
64 2.81 3.07 5.65 9.17 13.01 31.57 13.70 9.30 6.04 3.04 2.64
72 1.87 1.99 3.68 7.15 10.56 20.24 25.78 12.17 7.52 4.42 4.62
80 1.02 1.23 2.78 4.75 8.37 12.04 27.61 18.07 10.28 6.52 7.33
88 0.70 0.57 1.56 3.12 6.34 10.06 15.76 30.46 12.58 8.47 10.38
96 0.27 0.60 1.25 2.28 4.30 7.60 10.77 22.52 22.51 11.37 16.53
104 0.22 0.42 0.77 1.36 2.62 5.33 8.93 13.05 29.54 15.23 22.53
112 0.15 0.20 0.56 0.87 2.00 3.83 6.86 10.06 17.89 27.31 30.27
120 0.03 0.11 0.31 0.46 1.31 2.48 4.60 7.78 11.67 25.53 45.72
128 0.02 0.01 0.13 0.33 0.83 1.41 3.24 6.17 9.57 14.22 64.07

関数の呼び出しグラフ:

呼出しグラフ:

static bool make_artifact ( object_type o_ptr)
static

非INSTA_ART型の固定アーティファクトの生成を確率に応じて試行する。 Mega-Hack – Attempt to create one of the "Special Objects"

引数
o_ptr生成に割り当てたいオブジェクトの構造体参照ポインタ
戻り値
生成に成功したらTRUEを返す。

Attempt to change an object into an artifact
This routine should only be called by "apply_magic()"
Note – see "make_artifact_special()" and "apply_magic()"

関数の呼び出しグラフ:

呼出しグラフ:

static bool make_artifact_special ( object_type o_ptr)
static

INSTA_ART型の固定アーティファクトの生成を確率に応じて試行する。 Mega-Hack – Attempt to create one of the "Special Objects".

引数
o_ptr生成に割り当てたいオブジェクトの構造体参照ポインタ
戻り値
生成に成功したらTRUEを返す。

We are only called from "make_object()", and we assume that
"apply_magic()" is called immediately after we return.

Note – see "make_artifact()" and "apply_magic()"

覚え書き
地上ではキャンセルする / No artifacts in the town
get_obj_num_hookによる指定がある場合は生成をキャンセルする / Themed object
全固定アーティファクト中からIDの若い順に生成対象とその確率を走査する / Check the artifact list (just the "specials")
アーティファクト名が空の不正なデータは除外する / Skip "empty" artifacts
既に生成回数がカウントされたアーティファクト、QUESTITEMと非INSTA_ARTは除外 / Cannot make an artifact twice
アーティファクト生成階が現在に対して足りない場合は高確率で1/(不足階層*2)を満たさないと生成リストに加えられない / XXX XXX Enforce minimum "depth" (loosely)
1/(レア度)の確率を満たさないと除外される / Artifact "rarity roll"
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.
前述の条件を満たしたら、後のIDのアーティファクトはチェックせずすぐ確定し生成処理に移す / Assign the template. Mega-Hack – mark the item as an artifact. Hack: Some artifacts get random extra powers. Success.
全INSTA_ART固定アーティファクトを試行しても決まらなかった場合 FALSEを返す / Failure

関数の呼び出しグラフ:

呼出しグラフ:

bool make_gold ( object_type j_ptr)

生成階に応じた財宝オブジェクトの生成を行う。 Make a treasure object

引数
j_ptr生成結果を収めたいオブジェクト構造体の参照ポインタ
戻り値
生成に成功したらTRUEを返す。

The location must be a legal, clean, floor grid.

関数の呼び出しグラフ:

呼出しグラフ:

bool make_object ( object_type j_ptr,
u32b  mode 
)

生成階に応じたベースアイテムの生成を行う。 Attempt to make an object (normal or good/great)

引数
j_ptr生成結果を収めたいオブジェクト構造体の参照ポインタ
modeオプションフラグ
戻り値
生成に成功したらTRUEを返す。

This routine plays nasty games to generate the "special artifacts".
This routine uses "object_level" for the "generation level".
We assume that the given object has been "wiped".

関数の呼び出しグラフ:

呼出しグラフ:

s16b o_pop ( void  )

グローバルオブジェクト配列から空きを取得する / Acquires and returns the index of a "free" object.

戻り値
開いているオブジェクト要素のID

This routine should almost never fail, but in case it does, we must be sure to handle "failure" of this routine.

関数の呼び出しグラフ:

呼出しグラフ:

void object_absorb ( object_type o_ptr,
object_type j_ptr 
)

両オブジェクトをスロットに重ね合わせる。 Allow one item to "absorb" another, assuming they are similar

引数
o_ptr重ね合わせ先のオブジェクトの構造体参照ポインタ
j_ptr重ね合わせ元のオブジェクトの構造体参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void object_aware ( object_type o_ptr)

オブジェクトを*鑑定*済にする / The player is now aware of the effects of the given object.

引数
o_ptr*鑑定*済にするオブジェクトの構造体参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void object_copy ( object_type o_ptr,
object_type j_ptr 
)

オブジェクトを複製する Wipe an object clean.

引数
o_ptr複製元のオブジェクトの構造体参照ポインタ
j_ptr複製先のオブジェクトの構造体参照ポインタ
戻り値
なし

呼出しグラフ:

void object_known ( object_type o_ptr)

オブジェクトを鑑定済にする / Known is true when the "attributes" of an object are "known".

引数
o_ptr鑑定済にするオブジェクトの構造体参照ポインタ
戻り値
なし These include tohit, todam, toac, cost, and pval (charges).

Note that "knowing" an object gives you everything that an "awareness"
gives you, and much more. In fact, the player is always "aware" of any
item of which he has full "knowledge".

But having full knowledge of, say, one "wand of wonder", does not, by
itself, give you knowledge, or even awareness, of other "wands of wonder".
It happens that most "identify" routines (including "buying from a shop")
will make the player "aware" of the object as well as fully "know" it.

This routine also removes any inscriptions generated by "feelings".

呼出しグラフ:

static void object_mention ( object_type o_ptr)
static

デバッグ時にアイテム生成情報をメッセージに出力する / Cheat – describe a created object for the user

引数
o_ptrデバッグ出力するオブジェクトの構造体参照ポインタ
戻り値
なし
覚え書き
アイテム名取得後アイテムの価値に応じたデバッグメッセージを出力する。 Get Describe and view, Artifact, Random Artifact, Ego-item, and Normal item.

関数の呼び出しグラフ:

呼出しグラフ:

void object_prep ( object_type o_ptr,
int  k_idx 
)

オブジェクト構造体にベースアイテムを作成する Prepare an object based on an object kind.

引数
o_ptr代入したいオブジェクトの構造体参照ポインタ
k_idx新たに作成したいベースアイテム情報のID
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

bool object_similar ( object_type o_ptr,
object_type j_ptr 
)

両オブジェクトをスロットに重ねることができるかどうかを返す。 Determine if an item can absorb a second item.

引数
o_ptr検証したいオブジェクトの構造体参照ポインタ1
j_ptr検証したいオブジェクトの構造体参照ポインタ2
戻り値
重ね合わせ可能ならばTRUEを返す。

関数の呼び出しグラフ:

呼出しグラフ:

int object_similar_part ( object_type o_ptr,
object_type j_ptr 
)

両オブジェクトをスロットに重ね合わせ可能な最大数を返す。 Determine if an item can partly absorb a second item.

Return maximum number of stack.

引数
o_ptr検証したいオブジェクトの構造体参照ポインタ1
j_ptr検証したいオブジェクトの構造体参照ポインタ2
戻り値
重ね合わせ可能なアイテム数

関数の呼び出しグラフ:

呼出しグラフ:

bool object_sort_comp ( object_type o_ptr,
s32b  o_value,
object_type j_ptr 
)

オブジェクトを定義された基準に従いソートするための関数 / Check if we have space for an item in the pack without overflow

引数
o_ptr比較対象オブジェクトの構造体参照ポインタ1
o_valueo_ptrのアイテム価値(手動であらかじめ代入する必要がある?)
j_ptr比較対象オブジェクトの構造体参照ポインタ2
戻り値
o_ptrの方が上位ならばTRUEを返す。

関数の呼び出しグラフ:

呼出しグラフ:

void object_tried ( object_type o_ptr)

オブジェクトを試行済にする / Something has been "sampled"

引数
o_ptr試行済にするオブジェクトの構造体参照ポインタ
戻り値
なし

呼出しグラフ:

s32b object_value ( object_type o_ptr)

オブジェクト価格算出のメインルーチン / Return the price of an item including plusses (and charges)

引数
o_ptr判明している現価格を確認したいオブジェクトの構造体参照ポインタ
戻り値
オブジェクトの判明している現価格

This function returns the "value" of the given item (qty one)

Never notice "unknown" bonuses or properties, including "curses",
since that would give the player information he did not have.

Note that discounted items stay discounted forever, even if
the discount is "forgotten" by the player via memory loss.

関数の呼び出しグラフ:

呼出しグラフ:

static s32b object_value_base ( object_type o_ptr)
static

未鑑定なベースアイテムの基本価格を返す / Return the "value" of an "unknown" item Make a guess at the value of non-aware items

引数
o_ptr未鑑定価格を確認したいオブジェクトの構造体参照ポインタ
戻り値
オブジェクトの未鑑定価格

呼出しグラフ:

s32b object_value_real ( object_type o_ptr)

オブジェクトの真の価格を算出する / Return the value of the flags the object has...

引数
o_ptr本価格を確認したいオブジェクトの構造体参照ポインタ
戻り値
オブジェクトの本価格

Return the "real" price of a "known" item, not including discounts

Wand and staffs get cost for each charge

Armor is worth an extra 100 gold per bonus point to armor class.

Weapons are worth an extra 100 gold per bonus point (AC,TH,TD).

Missiles are only worth 5 gold per bonus point, since they
usually appear in groups of 20, and we want the player to get
the same amount of cash for any "equivalent" item. Note that
missiles never have any of the "pval" flags, and in fact, they
only have a few of the available flags, primarily of the "slay"
and "brand" and "ignore" variety.

Armor with a negative armor bonus is worthless.
Weapons with negative hit+damage bonuses are worthless.

Every wearable item with a "pval" bonus is worth extra (see below).

関数の呼び出しグラフ:

呼出しグラフ:

void object_wipe ( object_type o_ptr)

オブジェクトを初期化する Wipe an object clean.

引数
o_ptr初期化したいオブジェクトの構造体参照ポインタ
戻り値
なし

呼出しグラフ:

void place_gold ( int  y,
int  x 
)

フロアの指定位置に生成階に応じた財宝オブジェクトの生成を行う。 Places a treasure (Gold or Gems) at given location

引数
y配置したいフロアのY座標
x配置したいフロアのX座標
戻り値
生成に成功したらTRUEを返す。

The location must be a legal, clean, floor grid.

関数の呼び出しグラフ:

呼出しグラフ:

void place_object ( int  y,
int  x,
u32b  mode 
)

フロアの指定位置に生成階に応じたベースアイテムの生成を行う。 Attempt to place an object (normal or good/great) at the given location.

引数
y配置したいフロアのY座標
x配置したいフロアのX座標
modeオプションフラグ
戻り値
生成に成功したらTRUEを返す。

This routine plays nasty games to generate the "special artifacts".
This routine uses "object_level" for the "generation level".
This routine requires a clean floor grid destination.

関数の呼び出しグラフ:

呼出しグラフ:

void place_trap ( int  y,
int  x 
)

マスをトラップを配置する / The location must be a legal, naked, floor grid.

引数
y配置したいマスのY座標
x配置したいマスのX座標
戻り値
Note that all traps start out as "invisible" and "untyped", and then
when they are "discovered" (by detecting them or setting them off),
the trap is "instantiated" as a visible, "typed", trap.

関数の呼び出しグラフ:

呼出しグラフ:

bool process_warning ( int  xx,
int  yy 
)

プレイヤーが特定地点へ移動した場合に警告を発する処理 / Examine the grid (xx,yy) and warn the player if there are any danger

引数
xx危険性を調査するマスのX座標
yy危険性を調査するマスのY座標
戻り値
警告を無視して進むことを選択するかか問題が無ければTRUE、警告に従ったならFALSEを返す。

関数の呼び出しグラフ:

呼出しグラフ:

void reduce_charges ( object_type o_ptr,
int  amt 
)

魔法棒やロッドの使用回数を減らす /

引数
o_ptrオブジェクトの構造体参照ポインタ source item
amt減らしたい回数量 number of items that are transfered
戻り値
なし

Hack – If rods or wand are destroyed, the total maximum timeout or
charges of the stack needs to be reduced, unless all the items are
being destroyed. -LM-

呼出しグラフ:

void reorder_pack ( void  )

プレイヤーの所持スロットに存在するオブジェクトを並び替える / Reorder items in the pack

戻り値
なし

Note special handling of the "overflow" slot

関数の呼び出しグラフ:

呼出しグラフ:

static void spell_damcalc ( monster_type m_ptr,
int  typ,
int  dam,
int *  max 
)
static

警告基準を定めるために魔法の効果属性に基づいて最大魔法ダメージを計算する / Calculate spell damages

引数
m_ptr魔法を行使するモンスターの構造体参照ポインタ
typ効果属性のID
dam基本ダメージ
max算出した最大ダメージを返すポインタ
戻り値
なし

呼出しグラフ:

void spell_damcalc_by_spellnum ( int  spell_num,
int  typ,
int  m_idx,
int *  max 
)

警告基準を定めるために魔法の効果属性に基づいて最大魔法ダメージを計算する。 / Calculate spell damages

引数
spell_numRF4ならRF4_SPELL_STARTのように32区切りのベースとなる数値
typ効果属性のID
m_idx魔法を行使するモンスターのID
max算出した最大ダメージを返すポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void torch_dice ( object_type o_ptr,
int *  dd,
int *  ds 
)

投擲時たいまつにダイスを与える。 Torches have special abilities when they are flaming.

引数
o_ptr投擲するオブジェクトの構造体参照ポインタ
dd特別なダイス数を返す参照ポインタ
ds特別なダイス面数を返す参照ポインタ
戻り値
なし

呼出しグラフ:

void torch_flags ( object_type o_ptr,
u32b flgs 
)

投擲時たいまつに投げやすい/焼棄/アンデッドスレイの特別効果を返す。 Torches have special abilities when they are flaming.

引数
o_ptr投擲するオブジェクトの構造体参照ポインタ
flgs特別に追加するフラグを返す参照ポインタ
戻り値
なし

呼出しグラフ:

void torch_lost_fuel ( object_type o_ptr)

投擲時命中したたいまつの寿命を縮める。 Torches have special abilities when they are flaming.

引数
o_ptr投擲するオブジェクトの構造体参照ポインタ
戻り値
なし

呼出しグラフ:

void wipe_o_list ( void  )

グローバルオブジェクト配列を初期化する / Delete all the items when player leaves the level

覚え書き
we do NOT visually reflect these (irrelevant) changes

Hack – we clear the "c_ptr->o_idx" field for every grid, and the "m_ptr->next_o_idx" field for every monster, since we know we are clearing every object. Technically, we only clear those fields for grids/monsters containing objects, and we clear it once for every such object.

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

変数

amuse_type amuse_info[]
初期値:
=
{
{ 0, 0, 0 }
}
#define SV_TSURIZAO
Definition: defines.h:2035
#define SV_ANY
Definition: defines.h:1940
#define TV_STATUE
Definition: defines.h:1880
#define TV_PARCHMENT
Definition: defines.h:1908
#define TV_SPIKE
Definition: defines.h:1877
#define TV_SCROLL
Definition: defines.h:1909
#define TV_POLEARM
Definition: defines.h:1890
#define AMS_PILE
Definition: object2.c:5496
#define SV_BROKEN_DAGGER
Definition: defines.h:2039
#define SV_SCROLL_AMUSEMENT
Definition: defines.h:2432
#define TV_JUNK
Definition: defines.h:1875
#define TV_BOTTLE
Definition: defines.h:1874
#define TV_FIGURINE
Definition: defines.h:1879
#define AMS_NO_UNIQUE
Definition: object2.c:5493
#define AMS_NOTHING
Definition: object2.c:5492
#define AMS_MULTIPLE
Definition: object2.c:5495
#define SV_BROKEN_SWORD
Definition: defines.h:2040
#define TV_SWORD
Definition: defines.h:1891
#define TV_CORPSE
Definition: defines.h:1881
#define TV_SKELETON
Definition: defines.h:1873
#define AMS_FIXED_ART
Definition: object2.c:5494
essence_type essence_info[]
static

エッセンス情報テーブル Smithing type data for Weapon smith

cptr essence_name[]

エッセンス名テーブル / Essense names for Weapon smith

s16b normal_traps[MAX_NORMAL_TRAPS]
static