Hengband  2.2.1
データ構造 | マクロ定義 | 関数 | 変数
spells-object.c ファイル
#include "angband.h"
#include "util.h"
#include "cmd-basic.h"
#include "artifact.h"
#include "floor.h"
#include "grid.h"
#include "spells.h"
#include "spells-object.h"
#include "object-boost.h"
#include "object-hook.h"
#include "object-flavor.h"
#include "object-ego.h"
#include "player-damage.h"
#include "player-status.h"
#include "avatar.h"
#include "player-effects.h"
#include "player-class.h"
#include "player-inventory.h"
#include "objectkind.h"
#include "autopick.h"
#include "targeting.h"
#include "view-mainwindow.h"
spells-object.c の依存先関係図:

データ構造

struct  amuse_type
 

マクロ定義

#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 */
 

関数

bool create_ammo (player_type *creature_ptr)
 「弾/矢の製造」処理 / do_cmd_cast calls this function if the player's class is 'archer'. [詳解]
 
bool import_magic_device (player_type *user_ptr)
 魔道具術師の魔力取り込み処理 [詳解]
 
void amusement (POSITION y1, POSITION x1, int num, bool known)
 誰得ドロップを行う。 [詳解]
 
void acquirement (POSITION y1, POSITION x1, int num, bool great, bool special, bool known)
 獲得ドロップを行う。 Scatter some "great" objects near the player [詳解]
 
void acquire_chaos_weapon (player_type *creature_ptr)
 
bool curse_armor (player_type *owner_ptr)
 防具呪縛処理 / Curse the players armor [詳解]
 
bool curse_weapon_object (player_type *owner_ptr, bool force, object_type *o_ptr)
 武器呪縛処理 / Curse the players weapon [詳解]
 
bool curse_weapon (bool force, int slot)
 武器呪縛処理のメインルーチン / Curse the players weapon [詳解]
 
bool rustproof (void)
 防具の錆止め防止処理 [詳解]
 
bool brand_bolts (void)
 ボルトのエゴ化処理(火炎エゴのみ) / Enchant some bolts [詳解]
 
bool perilous_secrets (player_type *user_ptr)
 
void get_bloody_moon_flags (object_type *o_ptr)
 固定アーティファクト『ブラッディムーン』の特性を変更する。 [詳解]
 
void phlogiston (player_type *caster_ptr)
 寿命つき光源の燃素追加処理 / Charge a lite (torch or latern) [詳解]
 
bool bless_weapon (void)
 武器の祝福処理 / Bless a weapon [詳解]
 
bool pulish_shield (void)
 盾磨き処理 / pulish shield [詳解]
 
static void break_curse (object_type *o_ptr)
 呪いの打ち破り処理 / Break the curse of an item [詳解]
 
bool enchant (object_type *o_ptr, int n, int eflag)
 装備修正強化処理 / Enchants a plus onto an item. [詳解]
 
bool enchant_spell (HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac)
 装備修正強化処理のメインルーチン / Enchant an item (in the p_ptr->inventory_list or on the floor) [詳解]
 
void brand_weapon (player_type *caster_ptr, int brand_type)
 武器へのエゴ付加処理 / Brand the current weapon [詳解]
 

変数

static int enchant_table [16]
 装備強化処理の失敗率定数(千分率) / Used by the "enchant" function (chance of failure) (modified for Zangband, we need better stuff there...) – TY [詳解]
 
static amuse_type amuse_info []
 

マクロ定義詳解

◆ AMS_FIXED_ART

#define AMS_FIXED_ART   0x02 /* Make a fixed artifact based on the amusing object */

◆ AMS_MULTIPLE

#define AMS_MULTIPLE   0x04 /* Drop 1-3 objects for one type */

◆ AMS_NO_UNIQUE

#define AMS_NO_UNIQUE   0x01 /* Don't make the amusing object of uniques */

◆ AMS_NOTHING

#define AMS_NOTHING   0x00 /* No restriction */

◆ AMS_PILE

#define AMS_PILE   0x08 /* Drop 1-99 pile objects for one type */

関数詳解

◆ acquire_chaos_weapon()

void acquire_chaos_weapon ( player_type creature_ptr)
呼び出し関係図:

◆ acquirement()

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

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

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

◆ amusement()

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

誰得ドロップを行う。

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

◆ bless_weapon()

bool bless_weapon ( void  )

武器の祝福処理 / Bless a weapon

戻り値
ターン消費を要する処理を行ったならばTRUEを返す
呼び出し関係図:

◆ brand_bolts()

bool brand_bolts ( void  )

ボルトのエゴ化処理(火炎エゴのみ) / Enchant some bolts

戻り値
常にTRUEを返す
呼び出し関係図:

◆ brand_weapon()

void brand_weapon ( player_type caster_ptr,
int  brand_type 
)

武器へのエゴ付加処理 / Brand the current weapon

引数
brand_typeエゴ化ID(e_info.txtとは連動していない)
戻り値
なし
呼び出し関係図:

◆ break_curse()

static void break_curse ( object_type o_ptr)
static

呪いの打ち破り処理 / Break the curse of an item

引数
o_ptr呪い装備情報の参照ポインタ
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ create_ammo()

bool create_ammo ( player_type creature_ptr)

「弾/矢の製造」処理 / do_cmd_cast calls this function if the player's class is 'archer'.

Hook to determine if an object is contertible in an arrow/bolt

戻り値
製造を実際に行ったらTRUE、キャンセルしたらFALSEを返す
呼び出し関係図:

◆ curse_armor()

bool curse_armor ( player_type owner_ptr)

防具呪縛処理 / Curse the players armor

戻り値
実際に呪縛されたらTRUEを返す
呼び出し関係図:

◆ curse_weapon()

bool curse_weapon ( bool  force,
int  slot 
)

武器呪縛処理のメインルーチン / Curse the players weapon

引数
force無条件に呪縛を行うならばTRUE
slot呪縛する武器の装備スロット
戻り値
実際に呪縛されたらTRUEを返す
呼び出し関係図:

◆ curse_weapon_object()

bool curse_weapon_object ( player_type owner_ptr,
bool  force,
object_type o_ptr 
)

武器呪縛処理 / Curse the players weapon

引数
owner_ptr所持者の参照ポインタ
force無条件に呪縛を行うならばTRUE
o_ptr呪縛する武器のアイテム情報参照ポインタ
戻り値
実際に呪縛されたらTRUEを返す
呼び出し関係図:

◆ enchant()

bool enchant ( object_type o_ptr,
int  n,
int  eflag 
)

装備修正強化処理 / Enchants a plus onto an item.

-RAK-

引数
o_ptr強化するアイテムの参照ポインタ
n強化基本量
eflag強化オプション(命中/ダメージ/AC)
戻り値
強化に成功した場合TRUEを返す
Revamped!  Now takes item pointer, number of times to try enchanting,
and a flag of what to try enchanting.  Artifacts resist enchantment
some of the time, and successful enchantment to at least +0 might
break a curse on the item. -CFT-
Note that an item can technically be enchanted all the way to +15 if
you wait a very, very, long time.  Going from +9 to +10 only works
about 5% of the time, and from +10 to +11 only about 1% of the time.
Note that this function can now be used on "piles" of items, and
the larger the pile, the lower the chance of success.
呼び出し関係図:

◆ enchant_spell()

bool enchant_spell ( HIT_PROB  num_hit,
HIT_POINT  num_dam,
ARMOUR_CLASS  num_ac 
)

装備修正強化処理のメインルーチン / Enchant an item (in the p_ptr->inventory_list or on the floor)

引数
num_hit命中修正量
num_damダメージ修正量
num_acAC修正量
戻り値
強化に成功した場合TRUEを返す

Note that "num_ac" requires armour, else weapon Returns TRUE if attempted, FALSE if cancelled

呼び出し関係図:

◆ get_bloody_moon_flags()

void get_bloody_moon_flags ( object_type o_ptr)

固定アーティファクト『ブラッディムーン』の特性を変更する。

スレイ2d2種、及びone_resistance()による耐性1d2種、pval2種を得る。

引数
o_ptr対象のオブジェクト構造体(ブラッディムーン)のポインタ
戻り値
なし
呼び出し関係図:

◆ import_magic_device()

bool import_magic_device ( player_type user_ptr)

魔道具術師の魔力取り込み処理

引数
user_ptrアイテムを取り込むクリーチャー
戻り値
取り込みを実行したらTRUE、キャンセルしたらFALSEを返す
呼び出し関係図:

◆ perilous_secrets()

bool perilous_secrets ( player_type user_ptr)
呼び出し関係図:

◆ phlogiston()

void phlogiston ( player_type caster_ptr)

寿命つき光源の燃素追加処理 / Charge a lite (torch or latern)

戻り値
なし
呼び出し関係図:

◆ pulish_shield()

bool pulish_shield ( void  )

盾磨き処理 / pulish shield

戻り値
ターン消費を要する処理を行ったならばTRUEを返す
呼び出し関係図:

◆ rustproof()

bool rustproof ( void  )

防具の錆止め防止処理

戻り値
ターン消費を要する処理を行ったならばTRUEを返す
呼び出し関係図:

変数詳解

◆ amuse_info

amuse_type amuse_info[]
static
初期値:
=
{
{ 0, 0, 0 }
}
#define TV_PARCHMENT
Definition: object.h:245
#define AMS_MULTIPLE
Definition: spells-object.c:58
#define AMS_NO_UNIQUE
Definition: spells-object.c:56
#define SV_SCROLL_AMUSEMENT
Definition: object.h:1026
#define TV_SKELETON
Definition: object.h:210
#define TV_SCROLL
Definition: object.h:246
#define AMS_FIXED_ART
Definition: spells-object.c:57
#define SV_BROKEN_SWORD
Definition: object.h:634
#define TV_POLEARM
Definition: object.h:227
#define SV_ANY
Definition: object.h:534
#define TV_SPIKE
Definition: object.h:214
#define TV_FIGURINE
Definition: object.h:216
#define TV_JUNK
Definition: object.h:212
#define TV_SWORD
Definition: object.h:228
#define AMS_PILE
Definition: spells-object.c:59
#define SV_TSURIZAO
Definition: object.h:629
#define TV_BOTTLE
Definition: object.h:211
#define SV_BROKEN_DAGGER
Definition: object.h:633
#define TV_STATUE
Definition: object.h:217
#define TV_CORPSE
Definition: object.h:218
#define AMS_NOTHING
Definition: spells-object.c:55

◆ enchant_table

int enchant_table[16]
static
初期値:
=
{
0, 10, 50, 100, 200,
300, 400, 500, 650, 800,
950, 987, 993, 995, 998,
1000
}

装備強化処理の失敗率定数(千分率) / Used by the "enchant" function (chance of failure) (modified for Zangband, we need better stuff there...) – TY

戻り値
なし