Hengband  2.1.4
マクロ定義 | 関数 | 変数
spells3.c ファイル

魔法効果の実装/ Spell code (part 3) [詳解]

#include "angband.h"
spells3.c の依存先関係図:

マクロ定義

#define MAX_TRIES   100
 テレポート先探索の試行数 / Maximum number of tries for teleporting [詳解]
 
#define HURT_CHANCE   16
 能力値現象の基本確率(1 / HURT_CHANCE) / 1/x chance of reducing stats (for elemental attacks) [詳解]
 
#define MAX_TELEPORT_DISTANCE   200
 テレポート最大距離 [詳解]
 
#define MANA_CONST   2400
 
#define MANA_DIV   4
 
#define DEC_MANA_DIV   3
 

関数

static bool cave_monster_teleportable_bold (int m_idx, int y, int x, u32b mode)
 指定されたマスがモンスターのテレポート可能先かどうかを判定する。 [詳解]
 
bool teleport_away (int m_idx, int dis, u32b mode)
 モンスターのテレポートアウェイ処理 / Teleport a monster, normally up to "dis" grids away. [詳解]
 
void teleport_monster_to (int m_idx, int ty, int tx, int power, u32b mode)
 モンスターを指定された座標付近にテレポートする / Teleport monster next to a grid near the given location [詳解]
 
bool cave_player_teleportable_bold (int y, int x, u32b mode)
 指定されたマスにプレイヤーがテレポート可能かどうかを判定する。 [詳解]
 
bool teleport_player_aux (int dis, u32b mode)
 プレイヤーのテレポート先選定と移動処理 / Teleport the player to a location up to "dis" grids away. [詳解]
 
void teleport_player (int dis, u32b mode)
 プレイヤーのテレポート処理メインルーチン [詳解]
 
void teleport_player_away (int m_idx, int dis)
 プレイヤーのテレポートアウェイ処理 / [詳解]
 
void teleport_player_to (int ny, int nx, u32b mode)
 プレイヤーを指定位置近辺にテレポートさせる Teleport player to a grid near the given location [詳解]
 
void teleport_away_followable (int m_idx)
 
void teleport_level (int m_idx)
 プレイヤー及びモンスターをレベルテレポートさせる / Teleport the player one level up or down (random when legal) [詳解]
 
int choose_dungeon (cptr note, int y, int x)
 これまでに入ったダンジョンの一覧を表示する [詳解]
 
bool recall_player (int turns)
 プレイヤーの帰還発動及び中止処理 / Recall the player to town or dungeon [詳解]
 
bool word_of_recall (void)
 帰還用メインルーチン [詳解]
 
bool reset_recall (void)
 フロア・リセット処理 [詳解]
 
bool apply_disenchant (int mode)
 プレイヤーの装備劣化処理 / Apply disenchantment to the player's stuff [詳解]
 
void mutate_player (void)
 プレイヤーの突然変異処理 [詳解]
 
void apply_nexus (monster_type *m_ptr)
 プレイヤーの因果混乱処理 / Apply Nexus [詳解]
 
void phlogiston (void)
 寿命つき光源の燃素追加処理 / Charge a lite (torch or latern) [詳解]
 
void brand_weapon (int brand_type)
 武器へのエゴ付加処理 / Brand the current weapon [詳解]
 
static bool vanish_dungeon (void)
 虚無招来によるフロア中の全壁除去処理 / Vanish all walls in this floor [詳解]
 
void call_the_ (void)
 虚無招来処理 / [詳解]
 
void fetch (int dir, int wgt, bool require_los)
 アイテム引き寄せ処理 / Fetch an item (teleport it right underneath the caster) [詳解]
 
void alter_reality (void)
 現実変容処理 [詳解]
 
bool warding_glyph (void)
 守りのルーン設置処理 / Leave a "glyph of warding" which prevents monster movement [詳解]
 
bool place_mirror (void)
 鏡設置処理 [詳解]
 
bool explosive_rune (void)
 爆発のルーン設置処理 / Leave an "explosive rune" which prevents monster movement [詳解]
 
void identify_pack (void)
 全所持アイテム鑑定処理 / Identify everything being carried. [詳解]
 
static int remove_curse_aux (int all)
 装備の解呪処理 / Removes curses from items in inventory [詳解]
 
bool remove_curse (void)
 装備の軽い呪い解呪処理 / Remove most curses [詳解]
 
bool remove_all_curse (void)
 装備の重い呪い解呪処理 / Remove all curses [詳解]
 
bool alchemy (void)
 アイテムの価値に応じた錬金術処理 / Turns an object into gold, gain some of its value in a shop [詳解]
 
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 (int num_hit, int num_dam, int num_ac)
 装備修正強化処理のメインルーチン / Enchant an item (in the inventory or on the floor) [詳解]
 
static bool item_tester_hook_nameless_weapon_armour (object_type *o_ptr)
 アイテムが並の価値のアイテムかどうか判定する / Check if an object is nameless weapon or armour [詳解]
 
bool artifact_scroll (void)
 アーティファクト生成の巻物処理 / [詳解]
 
bool identify_item (object_type *o_ptr)
 アイテム鑑定処理 / Identify an object [詳解]
 
static bool item_tester_hook_identify (object_type *o_ptr)
 アイテムが鑑定済みかを判定する / [詳解]
 
static bool item_tester_hook_identify_weapon_armour (object_type *o_ptr)
 アイテムが鑑定済みの武器防具かを判定する / [詳解]
 
bool ident_spell (bool only_equip)
 アイテム鑑定のメインルーチン処理 / Identify an object in the inventory (or on the floor) [詳解]
 
bool mundane_spell (bool only_equip)
 アイテム凡庸化のメインルーチン処理 / Identify an object in the inventory (or on the floor) [詳解]
 
static bool item_tester_hook_identify_fully (object_type *o_ptr)
 アイテムが*鑑定*済みかを判定する / [詳解]
 
static bool item_tester_hook_identify_fully_weapon_armour (object_type *o_ptr)
 アイテムが*鑑定*済みの武器防具かを判定する / [詳解]
 
bool identify_fully (bool only_equip)
 アイテム*鑑定*のメインルーチン処理 / Identify an object in the inventory (or on the floor) [詳解]
 
bool item_tester_hook_recharge (object_type *o_ptr)
 魔力充填が可能なアイテムかどうか判定する / Hook for "get_item()". [詳解]
 
bool recharge (int power)
 魔力充填処理 / Recharge a wand/staff/rod from the pack or on the floor. [詳解]
 
bool bless_weapon (void)
 武器の祝福処理 / Bless a weapon [詳解]
 
bool pulish_shield (void)
 盾磨き処理 / pulish shield [詳解]
 
bool potion_smash_effect (int who, int y, int x, int k_idx)
 薬の破損効果処理 / Potions "smash open" and cause an area effect when [詳解]
 
void display_spell_list (void)
 プレイヤーの全既知呪文を表示する / Hack – Display all known spells in a window return なし [詳解]
 
s16b experience_of_spell (int spell, int use_realm)
 呪文の経験値を返す / Returns experience of a spell [詳解]
 
int mod_need_mana (int need_mana, int spell, int realm)
 呪文の消費MPを返す / Modify mana consumption rate using spell exp and p_ptr->dec_mana [詳解]
 
int mod_spell_chance_1 (int chance)
 呪文の失敗率修正処理1(呪い、消費魔力減少、呪文簡易化) / Modify spell fail rate Using p_ptr->to_m_chance, p_ptr->dec_mana, p_ptr->easy_spell and p_ptr->heavy_spell [詳解]
 
int mod_spell_chance_2 (int chance)
 呪文の失敗率修正処理2(消費魔力減少、呪い、負値修正) / Modify spell fail rate Using p_ptr->to_m_chance, p_ptr->dec_mana, p_ptr->easy_spell and p_ptr->heavy_spell [詳解]
 
s16b spell_chance (int spell, int use_realm)
 呪文の失敗率計算メインルーチン / Returns spell chance of failure for spell -RAK- [詳解]
 
bool spell_okay (int spell, bool learned, bool study_pray, int use_realm)
 魔法が利用可能かどうかを返す / Determine if a spell is "okay" for the player to cast or study The spell must be legible, not forgotten, and also, to cast, it must be known, and to study, it must not be known. [詳解]
 
void print_spells (int target_spell, byte *spells, int num, int y, int x, int use_realm)
 呪文情報の表示処理 / Print a list of spells (for browsing or casting or viewing) [詳解]
 
bool hates_acid (object_type *o_ptr)
 アイテムが酸で破損するかどうかを判定する [詳解]
 
bool hates_elec (object_type *o_ptr)
 アイテムが電撃で破損するかどうかを判定する / Does a given object (usually) hate electricity? [詳解]
 
bool hates_fire (object_type *o_ptr)
 アイテムが火炎で破損するかどうかを判定する / Does a given object (usually) hate fire? [詳解]
 
bool hates_cold (object_type *o_ptr)
 アイテムが冷気で破損するかどうかを判定する / Does a given object (usually) hate cold? [詳解]
 
int set_acid_destroy (object_type *o_ptr)
 アイテムが酸で破損するかどうかを判定する(メインルーチン) / Melt something [詳解]
 
int set_elec_destroy (object_type *o_ptr)
 アイテムが電撃で破損するかどうかを判定する(メインルーチン) / Electrical damage [詳解]
 
int set_fire_destroy (object_type *o_ptr)
 アイテムが火炎で破損するかどうかを判定する(メインルーチン) / Burn something [詳解]
 
int set_cold_destroy (object_type *o_ptr)
 アイテムが冷気で破損するかどうかを判定する(メインルーチン) / Freeze things [詳解]
 
int inven_damage (inven_func typ, int perc)
 アイテムが指定確率で破損するかどうかを判定する / Destroys a type of item on a given percent chance [詳解]
 
static int minus_ac (void)
 酸攻撃による装備のAC劣化処理 / Acid has hit the player, attempt to affect some armor. [詳解]
 
int acid_dam (int dam, cptr kb_str, int monspell, bool aura)
 酸属性によるプレイヤー損害処理 / Hurt the player with Acid [詳解]
 
int elec_dam (int dam, cptr kb_str, int monspell, bool aura)
 電撃属性によるプレイヤー損害処理 / Hurt the player with electricity [詳解]
 
int fire_dam (int dam, cptr kb_str, int monspell, bool aura)
 火炎属性によるプレイヤー損害処理 / Hurt the player with Fire [詳解]
 
int cold_dam (int dam, cptr kb_str, int monspell, bool aura)
 冷気属性によるプレイヤー損害処理 / Hurt the player with Cold [詳解]
 
bool rustproof (void)
 防具の錆止め防止処理 [詳解]
 
bool curse_armor (void)
 防具呪縛処理 / Curse the players armor [詳解]
 
bool curse_weapon_object (bool force, object_type *o_ptr)
 武器呪縛処理 / Curse the players weapon [詳解]
 
bool curse_weapon (bool force, int slot)
 武器呪縛処理のメインルーチン / Curse the players weapon [詳解]
 
bool brand_bolts (void)
 ボルトのエゴ化処理(火炎エゴのみ) / Enchant some bolts [詳解]
 
static s16b poly_r_idx (int r_idx)
 変身処理向けにモンスターの近隣レベル帯モンスターを返す / Helper function – return a "nearby" race for polymorphing [詳解]
 
bool polymorph_monster (int y, int x)
 指定座標にいるモンスターを変身させる / Helper function – return a "nearby" race for polymorphing [詳解]
 
static bool dimension_door_aux (int x, int y)
 次元の扉処理 / Dimension Door [詳解]
 
bool dimension_door (void)
 次元の扉処理のメインルーチン / Dimension Door [詳解]
 
bool mirror_tunnel (void)
 鏡抜け処理のメインルーチン / Mirror Master's Dimension Door [詳解]
 
bool eat_magic (int power)
 魔力食い処理 [詳解]
 
bool summon_kin_player (int level, int y, int x, u32b mode)
 同族召喚(援軍)処理 [詳解]
 
void massacre (void)
 皆殺し(全方向攻撃)処理 [詳解]
 

変数

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

詳解

魔法効果の実装/ Spell code (part 3)

日付
2014/07/26
著者
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.

マクロ定義詳解

◆ DEC_MANA_DIV

#define DEC_MANA_DIV   3

◆ HURT_CHANCE

#define HURT_CHANCE   16

能力値現象の基本確率(1 / HURT_CHANCE) / 1/x chance of reducing stats (for elemental attacks)

◆ MANA_CONST

#define MANA_CONST   2400

◆ MANA_DIV

#define MANA_DIV   4

◆ MAX_TELEPORT_DISTANCE

#define MAX_TELEPORT_DISTANCE   200

テレポート最大距離

◆ MAX_TRIES

#define MAX_TRIES   100

テレポート先探索の試行数 / Maximum number of tries for teleporting

関数詳解

◆ acid_dam()

int acid_dam ( int  dam,
cptr  kb_str,
int  monspell,
bool  aura 
)

酸属性によるプレイヤー損害処理 / Hurt the player with Acid

引数
dam基本ダメージ量
kb_strダメージ原因記述
monspell原因となったモンスター特殊攻撃ID
auraオーラよるダメージが原因ならばTRUE
戻り値
修正HPダメージ量
呼び出し関係図:

◆ alchemy()

bool alchemy ( void  )

アイテムの価値に応じた錬金術処理 / Turns an object into gold, gain some of its value in a shop

戻り値
処理が実際に行われたらTRUEを返す
呼び出し関係図:

◆ alter_reality()

void alter_reality ( void  )

現実変容処理

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

◆ apply_disenchant()

bool apply_disenchant ( int  mode)

プレイヤーの装備劣化処理 / Apply disenchantment to the player's stuff

引数
mode最下位ビットが1ならば劣化処理が若干低減される
戻り値
劣化処理に関するメッセージが発せられた場合はTRUEを返す / Return "TRUE" if the player notices anything
呼び出し関係図:

◆ apply_nexus()

void apply_nexus ( monster_type m_ptr)

プレイヤーの因果混乱処理 / Apply Nexus

引数
m_ptr因果混乱をプレイヤーに与えたモンスターの情報参照ポインタ
戻り値
なし
呼び出し関係図:

◆ artifact_scroll()

bool artifact_scroll ( void  )

アーティファクト生成の巻物処理 /

戻り値
生成が実際に試みられたらTRUEを返す
呼び出し関係図:

◆ 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 ( 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呪い装備情報の参照ポインタ
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ call_the_()

void call_the_ ( void  )

虚無招来処理 /

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

◆ cave_monster_teleportable_bold()

static bool cave_monster_teleportable_bold ( int  m_idx,
int  y,
int  x,
u32b  mode 
)
static

指定されたマスがモンスターのテレポート可能先かどうかを判定する。

引数
m_idxモンスターID
y移動先Y座標
x移動先X座標
modeオプション
戻り値
テレポート先として妥当ならばtrue
呼び出し関係図:
被呼び出し関係図:

◆ cave_player_teleportable_bold()

bool cave_player_teleportable_bold ( int  y,
int  x,
u32b  mode 
)

指定されたマスにプレイヤーがテレポート可能かどうかを判定する。

引数
y移動先Y座標
x移動先X座標
modeオプション
戻り値
テレポート先として妥当ならばtrue
呼び出し関係図:

◆ choose_dungeon()

int choose_dungeon ( cptr  note,
int  y,
int  x 
)

これまでに入ったダンジョンの一覧を表示する

引数
noteダンジョンに施す処理記述
yコンソールY座標
xコンソールX座標
戻り値
なし
呼び出し関係図:

◆ cold_dam()

int cold_dam ( int  dam,
cptr  kb_str,
int  monspell,
bool  aura 
)

冷気属性によるプレイヤー損害処理 / Hurt the player with Cold

引数
dam基本ダメージ量
kb_strダメージ原因記述
monspell原因となったモンスター特殊攻撃ID
auraオーラよるダメージが原因ならばTRUE
戻り値
修正HPダメージ量
呼び出し関係図:

◆ curse_armor()

bool curse_armor ( void  )

防具呪縛処理 / 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 ( bool  force,
object_type o_ptr 
)

武器呪縛処理 / Curse the players weapon

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

◆ dimension_door()

bool dimension_door ( void  )

次元の扉処理のメインルーチン / Dimension Door

戻り値
ターンを消費した場合TRUEを返す
呼び出し関係図:

◆ dimension_door_aux()

static bool dimension_door_aux ( int  x,
int  y 
)
static

次元の扉処理 / Dimension Door

引数
xテレポート先のX座標
yテレポート先のY座標
戻り値
目標に指定通りテレポートできたならばTRUEを返す
呼び出し関係図:
被呼び出し関係図:

◆ display_spell_list()

void display_spell_list ( void  )

プレイヤーの全既知呪文を表示する / Hack – Display all known spells in a window return なし

XXX XXX XXX Need to analyze size of the window. XXX XXX XXX Need more color coding.

呼び出し関係図:

◆ eat_magic()

bool eat_magic ( int  power)

魔力食い処理

引数
power基本効力
戻り値
ターンを消費した場合TRUEを返す
呼び出し関係図:

◆ elec_dam()

int elec_dam ( int  dam,
cptr  kb_str,
int  monspell,
bool  aura 
)

電撃属性によるプレイヤー損害処理 / Hurt the player with electricity

引数
dam基本ダメージ量
kb_strダメージ原因記述
monspell原因となったモンスター特殊攻撃ID
auraオーラよるダメージが原因ならばTRUE
戻り値
修正HPダメージ量
呼び出し関係図:

◆ 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 ( int  num_hit,
int  num_dam,
int  num_ac 
)

装備修正強化処理のメインルーチン / Enchant an item (in the inventory 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

呼び出し関係図:

◆ experience_of_spell()

s16b experience_of_spell ( int  spell,
int  use_realm 
)

呪文の経験値を返す / Returns experience of a spell

引数
spell呪文ID
use_realm魔法領域
戻り値
経験値

◆ explosive_rune()

bool explosive_rune ( void  )

爆発のルーン設置処理 / Leave an "explosive rune" which prevents monster movement

戻り値
実際に設置が行われた場合TRUEを返す
呼び出し関係図:

◆ fetch()

void fetch ( int  dir,
int  wgt,
bool  require_los 
)

アイテム引き寄せ処理 / Fetch an item (teleport it right underneath the caster)

引数
dir魔法の発動方向
wgt許容重量
require_los射線の通りを要求するならばTRUE
戻り値
なし
呼び出し関係図:

◆ fire_dam()

int fire_dam ( int  dam,
cptr  kb_str,
int  monspell,
bool  aura 
)

火炎属性によるプレイヤー損害処理 / Hurt the player with Fire

引数
dam基本ダメージ量
kb_strダメージ原因記述
monspell原因となったモンスター特殊攻撃ID
auraオーラよるダメージが原因ならばTRUE
戻り値
修正HPダメージ量
呼び出し関係図:

◆ hates_acid()

bool hates_acid ( object_type o_ptr)

アイテムが酸で破損するかどうかを判定する

引数
o_ptrアイテムの情報参照ポインタ
戻り値
破損するならばTRUEを返す Note that amulets, rods, and high-level spell books are immune to "inventory damage" of any kind. Also sling ammo and shovels. Does a given class of objects (usually) hate acid? Note that acid can either melt or corrode something.

◆ hates_cold()

bool hates_cold ( object_type o_ptr)

アイテムが冷気で破損するかどうかを判定する / Does a given object (usually) hate cold?

引数
o_ptrアイテムの情報参照ポインタ
戻り値
破損するならばTRUEを返す

◆ hates_elec()

bool hates_elec ( object_type o_ptr)

アイテムが電撃で破損するかどうかを判定する / Does a given object (usually) hate electricity?

引数
o_ptrアイテムの情報参照ポインタ
戻り値
破損するならばTRUEを返す

◆ hates_fire()

bool hates_fire ( object_type o_ptr)

アイテムが火炎で破損するかどうかを判定する / Does a given object (usually) hate fire?

引数
o_ptrアイテムの情報参照ポインタ
戻り値
破損するならばTRUEを返す

Hafted/Polearm weapons have wooden shafts. Arrows/Bows are mostly wooden.

◆ ident_spell()

bool ident_spell ( bool  only_equip)

アイテム鑑定のメインルーチン処理 / Identify an object in the inventory (or on the floor)

引数
only_equip装備品のみを対象とするならばTRUEを返す
戻り値
実際に鑑定を行ったならばTRUEを返す

This routine does not automatically combine objects. Returns TRUE if something was identified, else FALSE.

呼び出し関係図:

◆ identify_fully()

bool identify_fully ( bool  only_equip)

アイテム*鑑定*のメインルーチン処理 / Identify an object in the inventory (or on the floor)

引数
only_equip装備品のみを対象とするならばTRUEを返す
戻り値
実際に鑑定を行ったならばTRUEを返す

Fully "identify" an object in the inventory -BEN- This routine returns TRUE if an item was identified.

呼び出し関係図:

◆ identify_item()

bool identify_item ( object_type o_ptr)

アイテム鑑定処理 / Identify an object

引数
o_ptr鑑定されるアイテムの情報参照ポインタ
戻り値
実際に鑑定できたらTRUEを返す
呼び出し関係図:

◆ identify_pack()

void identify_pack ( void  )

全所持アイテム鑑定処理 / Identify everything being carried.

Done by a potion of "self knowledge".

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

◆ inven_damage()

int inven_damage ( inven_func  typ,
int  perc 
)

アイテムが指定確率で破損するかどうかを判定する / Destroys a type of item on a given percent chance

引数
typ破損判定関数ポインタ
perc基本確率
戻り値
破損したアイテムの数

Note that missiles are no longer necessarily all destroyed Destruction taken from "melee.c" code for "stealing". New-style wands and rods handled correctly. -LM- Returns number of items destroyed.

呼び出し関係図:

◆ item_tester_hook_identify()

static bool item_tester_hook_identify ( object_type o_ptr)
static

アイテムが鑑定済みかを判定する /

引数
o_ptr判定するアイテムの情報参照ポインタ
戻り値
実際に鑑定済みならばTRUEを返す
被呼び出し関係図:

◆ item_tester_hook_identify_fully()

static bool item_tester_hook_identify_fully ( object_type o_ptr)
static

アイテムが*鑑定*済みかを判定する /

引数
o_ptr判定するアイテムの情報参照ポインタ
戻り値
実際に鑑定済みならばTRUEを返す
被呼び出し関係図:

◆ item_tester_hook_identify_fully_weapon_armour()

static bool item_tester_hook_identify_fully_weapon_armour ( object_type o_ptr)
static

アイテムが*鑑定*済みの武器防具かを判定する /

引数
o_ptr判定するアイテムの情報参照ポインタ
戻り値
実際に鑑定済みならばTRUEを返す
呼び出し関係図:
被呼び出し関係図:

◆ item_tester_hook_identify_weapon_armour()

static bool item_tester_hook_identify_weapon_armour ( object_type o_ptr)
static

アイテムが鑑定済みの武器防具かを判定する /

引数
o_ptr判定するアイテムの情報参照ポインタ
戻り値
実際に鑑定済みならばTRUEを返す
呼び出し関係図:
被呼び出し関係図:

◆ item_tester_hook_nameless_weapon_armour()

static bool item_tester_hook_nameless_weapon_armour ( object_type o_ptr)
static

アイテムが並の価値のアイテムかどうか判定する / Check if an object is nameless weapon or armour

引数
o_ptr判定するアイテムの情報参照ポインタ
戻り値
並ならばTRUEを返す
呼び出し関係図:
被呼び出し関係図:

◆ item_tester_hook_recharge()

bool item_tester_hook_recharge ( object_type o_ptr)

魔力充填が可能なアイテムかどうか判定する / Hook for "get_item()".

Determine if something is rechargable.

引数
o_ptr判定するアイテムの情報参照ポインタ
戻り値
魔力充填が可能ならばTRUEを返す

◆ massacre()

void massacre ( void  )

皆殺し(全方向攻撃)処理

引数
pyプレイヤーY座標
pxプレイヤーX座標
戻り値
なし
呼び出し関係図:

◆ minus_ac()

static int minus_ac ( void  )
static

酸攻撃による装備のAC劣化処理 / Acid has hit the player, attempt to affect some armor.

戻り値
ACが実際に劣化したらTRUEを返す

Note that the "base armor" of an object never changes. If any armor is damaged (or resists), the player takes less damage.

呼び出し関係図:
被呼び出し関係図:

◆ mirror_tunnel()

bool mirror_tunnel ( void  )

鏡抜け処理のメインルーチン / Mirror Master's Dimension Door

戻り値
ターンを消費した場合TRUEを返す
呼び出し関係図:

◆ mod_need_mana()

int mod_need_mana ( int  need_mana,
int  spell,
int  realm 
)

呪文の消費MPを返す / Modify mana consumption rate using spell exp and p_ptr->dec_mana

引数
need_mana基本消費MP
spell呪文ID
realm魔法領域
戻り値
消費MP
呼び出し関係図:

◆ mod_spell_chance_1()

int mod_spell_chance_1 ( int  chance)

呪文の失敗率修正処理1(呪い、消費魔力減少、呪文簡易化) / Modify spell fail rate Using p_ptr->to_m_chance, p_ptr->dec_mana, p_ptr->easy_spell and p_ptr->heavy_spell

引数
chance修正前失敗率
戻り値
失敗率(%)
todo:
統合を検討

◆ mod_spell_chance_2()

int mod_spell_chance_2 ( int  chance)

呪文の失敗率修正処理2(消費魔力減少、呪い、負値修正) / Modify spell fail rate Using p_ptr->to_m_chance, p_ptr->dec_mana, p_ptr->easy_spell and p_ptr->heavy_spell

引数
chance修正前失敗率
戻り値
失敗率(%) Modify spell fail rate (as "suffix" process) Using p_ptr->dec_mana, p_ptr->easy_spell and p_ptr->heavy_spell Note: variable "chance" cannot be negative.
todo:
統合を検討

◆ mundane_spell()

bool mundane_spell ( bool  only_equip)

アイテム凡庸化のメインルーチン処理 / Identify an object in the inventory (or on the floor)

引数
only_equip装備品のみを対象とするならばTRUEを返す
戻り値
実際に凡庸化をを行ったならばTRUEを返す
Mundanify an object in the inventory (or on the floor)
This routine does *not* automatically combine objects.
Returns TRUE if something was mundanified, else FALSE.
呼び出し関係図:

◆ mutate_player()

void mutate_player ( void  )

プレイヤーの突然変異処理

戻り値
なし

◆ phlogiston()

void phlogiston ( void  )

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

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

◆ place_mirror()

bool place_mirror ( void  )

鏡設置処理

戻り値
実際に設置が行われた場合TRUEを返す
呼び出し関係図:

◆ poly_r_idx()

static s16b poly_r_idx ( int  r_idx)
static

変身処理向けにモンスターの近隣レベル帯モンスターを返す / Helper function – return a "nearby" race for polymorphing

引数
r_idx基準となるモンスター種族ID
戻り値
変更先のモンスター種族ID

Note that this function is one of the more "dangerous" ones...

呼び出し関係図:
被呼び出し関係図:

◆ polymorph_monster()

bool polymorph_monster ( int  y,
int  x 
)

指定座標にいるモンスターを変身させる / Helper function – return a "nearby" race for polymorphing

引数
y指定のY座標
x指定のX座標
戻り値
実際に変身したらTRUEを返す
呼び出し関係図:

◆ potion_smash_effect()

bool potion_smash_effect ( int  who,
int  y,
int  x,
int  k_idx 
)

薬の破損効果処理 / Potions "smash open" and cause an area effect when

引数
who薬破損の主体ID(プレイヤー所持アイテムが壊れた場合0、床上のアイテムの場合モンスターID)
y破壊時のY座標
x破壊時のX座標
k_idx破損した薬のアイテムID
戻り値
薬を浴びたモンスターが起こるならばTRUEを返す
(1) they are shattered while in the player's inventory,
due to cold (etc) attacks;
(2) they are thrown at a monster, or obstacle;
(3) they are shattered by a "cold ball" or other such spell
while lying on the floor.
Arguments:
   who   ---  who caused the potion to shatter (0=player)
         potions that smash on the floor are assumed to
         be caused by no-one (who = 1), as are those that
         shatter inside the player inventory.
         (Not anymore -- I changed this; TY)
   y, x  --- coordinates of the potion (or player if
         the potion was in her inventory);
   o_ptr --- pointer to the potion object.
呼び出し関係図:

◆ print_spells()

void print_spells ( int  target_spell,
byte spells,
int  num,
int  y,
int  x,
int  use_realm 
)

呪文情報の表示処理 / Print a list of spells (for browsing or casting or viewing)

引数
target_spell呪文ID
spellsアクセス開始するスペルの参照ポイント
num表示する
y表示メッセージ左上Y座標
x表示メッセージ左上X座標
use_realm魔法領域ID
戻り値
なし
呼び出し関係図:

◆ pulish_shield()

bool pulish_shield ( void  )

盾磨き処理 / pulish shield

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

◆ recall_player()

bool recall_player ( int  turns)

プレイヤーの帰還発動及び中止処理 / Recall the player to town or dungeon

引数
turns発動までのターン数
戻り値
常にTRUEを返す
呼び出し関係図:

◆ recharge()

bool recharge ( int  power)

魔力充填処理 / Recharge a wand/staff/rod from the pack or on the floor.

This function has been rewritten in Oangband and ZAngband.

引数
power充填パワー
戻り値
ターン消費を要する処理まで進んだらTRUEを返す

Sorcery/Arcane – Recharge --> recharge(plev * 4) Chaos – Arcane Binding --> recharge(90)

Scroll of recharging --> recharge(130) Artifact activation/Thingol --> recharge(130)

It is harder to recharge high level, and highly charged wands, staffs, and rods. The more wands in a stack, the more easily and strongly they recharge. Staffs, however, each get fewer charges if stacked.

XXX XXX XXX Beware of "sliding index errors".

呼び出し関係図:

◆ remove_all_curse()

bool remove_all_curse ( void  )

装備の重い呪い解呪処理 / Remove all curses

戻り値
解呪に成功した装備数
呼び出し関係図:

◆ remove_curse()

bool remove_curse ( void  )

装備の軽い呪い解呪処理 / Remove most curses

戻り値
解呪に成功した装備数
呼び出し関係図:

◆ remove_curse_aux()

static int remove_curse_aux ( int  all)
static

装備の解呪処理 / Removes curses from items in inventory

引数
all軽い呪いまでの解除ならば0
戻り値
解呪されたアイテムの数
Note that Items which are "Perma-Cursed" (The One Ring,
The Crown of Morgoth) can NEVER be uncursed.
Note that if "all" is FALSE, then Items which are
"Heavy-Cursed" (Mormegil, Calris, and Weapons of Morgul)
will not be uncursed.
被呼び出し関係図:

◆ reset_recall()

bool reset_recall ( void  )

フロア・リセット処理

戻り値
リセット処理が実際に行われたらTRUEを返す
呼び出し関係図:

◆ rustproof()

bool rustproof ( void  )

防具の錆止め防止処理

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

◆ set_acid_destroy()

int set_acid_destroy ( object_type o_ptr)

アイテムが酸で破損するかどうかを判定する(メインルーチン) / Melt something

引数
o_ptrアイテムの情報参照ポインタ
戻り値
破損するならばTRUEを返す
todo:
統合を検討
呼び出し関係図:

◆ set_cold_destroy()

int set_cold_destroy ( object_type o_ptr)

アイテムが冷気で破損するかどうかを判定する(メインルーチン) / Freeze things

引数
o_ptrアイテムの情報参照ポインタ
戻り値
破損するならばTRUEを返す
todo:
統合を検討
呼び出し関係図:

◆ set_elec_destroy()

int set_elec_destroy ( object_type o_ptr)

アイテムが電撃で破損するかどうかを判定する(メインルーチン) / Electrical damage

引数
o_ptrアイテムの情報参照ポインタ
戻り値
破損するならばTRUEを返す
todo:
統合を検討
呼び出し関係図:

◆ set_fire_destroy()

int set_fire_destroy ( object_type o_ptr)

アイテムが火炎で破損するかどうかを判定する(メインルーチン) / Burn something

引数
o_ptrアイテムの情報参照ポインタ
戻り値
破損するならばTRUEを返す
todo:
統合を検討
呼び出し関係図:

◆ spell_chance()

s16b spell_chance ( int  spell,
int  use_realm 
)

呪文の失敗率計算メインルーチン / Returns spell chance of failure for spell -RAK-

引数
spell呪文ID
use_realm魔法領域ID
戻り値
失敗率(%)
呼び出し関係図:

◆ spell_okay()

bool spell_okay ( int  spell,
bool  learned,
bool  study_pray,
int  use_realm 
)

魔法が利用可能かどうかを返す / Determine if a spell is "okay" for the player to cast or study The spell must be legible, not forgotten, and also, to cast, it must be known, and to study, it must not be known.

引数
spell呪文ID
learned使用可能な判定ならばTRUE、学習可能かどうかの判定ならばFALSE
study_pray祈りの学習判定目的ならばTRUE
use_realm魔法領域ID
戻り値
失敗率(%)

◆ summon_kin_player()

bool summon_kin_player ( int  level,
int  y,
int  x,
u32b  mode 
)

同族召喚(援軍)処理

引数
level召喚基準レベル
y召喚先Y座標
x召喚先X座標
mode召喚オプション
戻り値
ターンを消費した場合TRUEを返す
呼び出し関係図:

◆ teleport_away()

bool teleport_away ( int  m_idx,
int  dis,
u32b  mode 
)

モンスターのテレポートアウェイ処理 / Teleport a monster, normally up to "dis" grids away.

引数
m_idxモンスターID
disテレポート距離
modeオプション
戻り値
テレポートが実際に行われたらtrue

Attempt to move the monster at least "dis/2" grids away. But allow variation to prevent infinite loops.

呼び出し関係図:

◆ teleport_away_followable()

void teleport_away_followable ( int  m_idx)
呼び出し関係図:

◆ teleport_level()

void teleport_level ( int  m_idx)

プレイヤー及びモンスターをレベルテレポートさせる / Teleport the player one level up or down (random when legal)

引数
m_idxテレポートの対象となるモンスターID(0ならばプレイヤー) / If m_idx <= 0, target is player.
戻り値
なし
呼び出し関係図:

◆ teleport_monster_to()

void teleport_monster_to ( int  m_idx,
int  ty,
int  tx,
int  power,
u32b  mode 
)

モンスターを指定された座標付近にテレポートする / Teleport monster next to a grid near the given location

引数
m_idxモンスターID
ty目安Y座標
tx目安X座標
powerテレポート成功確率
modeオプション
戻り値
なし
呼び出し関係図:

◆ teleport_player()

void teleport_player ( int  dis,
u32b  mode 
)

プレイヤーのテレポート処理メインルーチン

引数
dis基本移動距離
modeオプション
戻り値
なし
呼び出し関係図:

◆ teleport_player_aux()

bool teleport_player_aux ( int  dis,
u32b  mode 
)

プレイヤーのテレポート先選定と移動処理 / Teleport the player to a location up to "dis" grids away.

引数
dis基本移動距離
modeオプション
戻り値
実際にテレポート処理が行われたらtrue
If no such spaces are readily available, the distance may increase.
Try very hard to move the player at least a quarter that distance.
There was a nasty tendency for a long time; which was causing the
player to "bounce" between two or three different spots because
these are the only spots that are "far enough" way to satisfy the
algorithm.
But this tendency is now removed; in the new algorithm, a list of
candidates is selected first, which includes at least 50% of all
floor grids within the distance, and any single grid in this list
of candidates has equal possibility to be choosen as a destination.
呼び出し関係図:

◆ teleport_player_away()

void teleport_player_away ( int  m_idx,
int  dis 
)

プレイヤーのテレポートアウェイ処理 /

引数
m_idxアウェイを試みたプレイヤーID
disテレポート距離
戻り値
なし
呼び出し関係図:

◆ teleport_player_to()

void teleport_player_to ( int  ny,
int  nx,
u32b  mode 
)

プレイヤーを指定位置近辺にテレポートさせる Teleport player to a grid near the given location

引数
ny目標Y座標
nx目標X座標
modeオプションフラグ
戻り値
なし
This function is slightly obsessive about correctness.
This function allows teleporting into vaults (!)
呼び出し関係図:

◆ vanish_dungeon()

static bool vanish_dungeon ( void  )
static

虚無招来によるフロア中の全壁除去処理 / Vanish all walls in this floor

戻り値
実際に処理が反映された場合TRUE
呼び出し関係図:
被呼び出し関係図:

◆ warding_glyph()

bool warding_glyph ( void  )

守りのルーン設置処理 / Leave a "glyph of warding" which prevents monster movement

戻り値
実際に設置が行われた場合TRUEを返す
呼び出し関係図:

◆ word_of_recall()

bool word_of_recall ( void  )

帰還用メインルーチン

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

変数詳解

◆ 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

戻り値
なし