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

雑多なその他の処理2 / effects of various "objects" [詳解]

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

マクロ定義

#define REWARD_CHANCE   10
 
#define Go_no_JuuJou   5*5*5*5*5*5*5*5*5*5
 

関数

void check_experience (void)
 プレイヤーの経験値について整合性のためのチェックと調整を行う / Advance experience levels and print experience [詳解]
 
static int get_coin_type (int r_idx)
 モンスターを倒した際の財宝svalを返す [詳解]
 
static bool kind_is_cloak (int k_idx)
 オブジェクトがクロークかどうかを判定する / Hack – determine if a template is Cloak [詳解]
 
static bool kind_is_polearm (int k_idx)
 オブジェクトが竿状武器かどうかを判定する / Hack – determine if a template is Polearm [詳解]
 
static bool kind_is_sword (int k_idx)
 オブジェクトが剣かどうかを判定する / Hack – determine if a template is Sword [詳解]
 
static bool kind_is_book (int k_idx)
 オブジェクトが魔法書かどうかを判定する / Hack – determine if a template is Book [詳解]
 
static bool kind_is_good_book (int k_idx)
 オブジェクトがベースアイテム時点でGOODかどうかを判定する / Hack – determine if a template is Good book [詳解]
 
static bool kind_is_armor (int k_idx)
 オブジェクトが鎧かどうかを判定する / Hack – determine if a template is Armor [詳解]
 
static bool kind_is_hafted (int k_idx)
 オブジェクトが打撃武器かどうかを判定する / Hack – determine if a template is hafted weapon [詳解]
 
void complete_quest (int quest_num)
 クエストを達成状態にする / [詳解]
 
static int count_all_hostile_monsters (void)
 現在フロアに残っている敵モンスターの数を返す / [詳解]
 
void check_quest_completion (monster_type *m_ptr)
 特定の敵を倒した際にクエスト達成処理 / Check for "Quest" completion when a quest monster is killed or charmed. [詳解]
 
void check_find_art_quest_completion (object_type *o_ptr)
 特定のアーティファクトを入手した際のクエスト達成処理 / Check for "Quest" completion when a quest monster is killed or charmed. [詳解]
 
cptr extract_note_dies (monster_race *r_ptr)
 モンスターを撃破した際の述語メッセージを返す / Return monster death string [詳解]
 
void monster_death (int m_idx, bool drop_item)
 モンスターが死亡した時の処理 / Handle the "death" of a monster. [詳解]
 
int mon_damage_mod (monster_type *m_ptr, int dam, bool is_psy_spear)
 モンスターに与えたダメージの修正処理 / Modify the physical damage done to the monster. [詳解]
 
static void get_exp_from_mon (int dam, monster_type *m_ptr)
 モンスターに与えたダメージを元に経験値を加算する / Calculate experience point to be get [詳解]
 
bool mon_take_hit (int m_idx, int dam, bool *fear, cptr note)
 モンスターのHPをダメージに応じて減算する / Decreases monsters hit points, handling monster death. [詳解]
 
void get_screen_size (int *wid_p, int *hgt_p)
 現在のコンソール表示の縦横を返す。 / Get term size and calculate screen size [詳解]
 
void panel_bounds_center (void)
 コンソール上におけるマップ表示の左上位置を返す / Calculates current boundaries Called below and from "do_cmd_locate()". [詳解]
 
void resize_map (void)
 コンソールのリサイズに合わせてマップを再描画する / Map resizing whenever the main term changes size [詳解]
 
void redraw_window (void)
 コンソールを再描画する / Redraw a term when it is resized [詳解]
 
bool change_panel (int dy, int dx)
 フォーカスを当てるべきマップ描画の基準座標を指定する(サブルーチン) [詳解]
 
bool change_panel_xy (int y, int x)
 フォーカスを当てるべきマップ描画の基準座標を指定する [詳解]
 
void verify_panel (void)
 マップ描画のフォーカスを当てるべき座標を更新する [詳解]
 
cptr look_mon_desc (monster_type *m_ptr, u32b mode)
 
void ang_sort_aux (vptr u, vptr v, int p, int q)
 
void ang_sort (vptr u, vptr v, int n)
 
bool target_able (int m_idx)
 
bool target_okay (void)
 
static bool ang_sort_comp_distance (vptr u, vptr v, int a, int b)
 
static bool ang_sort_comp_importance (vptr u, vptr v, int a, int b)
 
static void ang_sort_swap_distance (vptr u, vptr v, int a, int b)
 
static s16b target_pick (int y1, int x1, int dy, int dx)
 
static bool target_set_accept (int y, int x)
 
static void target_set_prepare (int mode)
 
void target_set_prepare_look ()
 
static void evaluate_monster_exp (char *buf, monster_type *m_ptr)
 
static int target_set_aux (int y, int x, int mode, cptr info)
 
bool target_set (int mode)
 
bool get_aim_dir (int *dp)
 
bool get_rep_dir (int *dp, bool under)
 
bool get_rep_dir2 (int *dp)
 
void gain_level_reward (int chosen_reward)
 
static bool tgt_pt_accept (int y, int x)
 
static void tgt_pt_prepare (void)
 
bool tgt_pt (int *x_ptr, int *y_ptr)
 
bool get_hack_dir (int *dp)
 
s16b gain_energy (void)
 
s16b bow_energy (int sval)
 
int bow_tmul (int sval)
 
cptr your_alignment (void)
 
int weapon_exp_level (int weapon_exp)
 
int riding_exp_level (int riding_exp)
 
int spell_exp_level (int spell_exp)
 
int rumor_num (char *zz, int max_idx)
 
cptr rumor_bind_name (char *base, cptr fullname)
 
void display_rumor (bool ex)
 

変数

bool show_gold_on_floor = FALSE
 

詳解

雑多なその他の処理2 / effects of various "objects"

日付
2014/02/06
著者
Copyright (c) 1989 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.
2014 Deskull rearranged comment for Doxygen.

マクロ定義詳解

◆ Go_no_JuuJou

#define Go_no_JuuJou   5*5*5*5*5*5*5*5*5*5

◆ REWARD_CHANCE

#define REWARD_CHANCE   10

関数詳解

◆ ang_sort()

void ang_sort ( vptr  u,
vptr  v,
int  n 
)
呼び出し関係図:

◆ ang_sort_aux()

void ang_sort_aux ( vptr  u,
vptr  v,
int  p,
int  q 
)

◆ ang_sort_comp_distance()

static bool ang_sort_comp_distance ( vptr  u,
vptr  v,
int  a,
int  b 
)
static
被呼び出し関係図:

◆ ang_sort_comp_importance()

static bool ang_sort_comp_importance ( vptr  u,
vptr  v,
int  a,
int  b 
)
static
呼び出し関係図:
被呼び出し関係図:

◆ ang_sort_swap_distance()

static void ang_sort_swap_distance ( vptr  u,
vptr  v,
int  a,
int  b 
)
static
被呼び出し関係図:

◆ bow_energy()

s16b bow_energy ( int  sval)

◆ bow_tmul()

int bow_tmul ( int  sval)

◆ change_panel()

bool change_panel ( int  dy,
int  dx 
)

フォーカスを当てるべきマップ描画の基準座標を指定する(サブルーチン)

引数
dy変更先のフロアY座標
dx変更先のフロアX座標 Handle a request to change the current panel Return TRUE if the panel was changed. Also used in do_cmd_locate
戻り値
実際に再描画が必要だった場合TRUEを返す
呼び出し関係図:

◆ change_panel_xy()

bool change_panel_xy ( int  y,
int  x 
)

フォーカスを当てるべきマップ描画の基準座標を指定する

引数
y変更先のフロアY座標
x変更先のフロアX座標

Handle a request to change the current panel Return TRUE if the panel was changed. Also used in do_cmd_locate

戻り値
実際に再描画が必要だった場合TRUEを返す
呼び出し関係図:
被呼び出し関係図:

◆ check_experience()

void check_experience ( void  )

プレイヤーの経験値について整合性のためのチェックと調整を行う / Advance experience levels and print experience

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

◆ check_find_art_quest_completion()

void check_find_art_quest_completion ( object_type o_ptr)

特定のアーティファクトを入手した際のクエスト達成処理 / Check for "Quest" completion when a quest monster is killed or charmed.

引数
o_ptr入手したオブジェクトの構造体参照ポインタ
戻り値
なし
呼び出し関係図:

◆ check_quest_completion()

void check_quest_completion ( monster_type m_ptr)

特定の敵を倒した際にクエスト達成処理 / Check for "Quest" completion when a quest monster is killed or charmed.

引数
m_ptr撃破したモンスターの構造体参照ポインタ
戻り値
なし
呼び出し関係図:

◆ complete_quest()

void complete_quest ( int  quest_num)

クエストを達成状態にする /

引数
quest_num達成状態にしたいクエストのID
戻り値
なし
呼び出し関係図:

◆ count_all_hostile_monsters()

static int count_all_hostile_monsters ( void  )
static

現在フロアに残っている敵モンスターの数を返す /

戻り値
現在の敵モンスターの数
被呼び出し関係図:

◆ display_rumor()

void display_rumor ( bool  ex)
呼び出し関係図:

◆ evaluate_monster_exp()

static void evaluate_monster_exp ( char *  buf,
monster_type m_ptr 
)
static
呼び出し関係図:
被呼び出し関係図:

◆ extract_note_dies()

cptr extract_note_dies ( monster_race r_ptr)

モンスターを撃破した際の述語メッセージを返す / Return monster death string

引数
r_ptr撃破されたモンスターの種族情報を持つ構造体の参照ポインタ
戻り値
撃破されたモンスターの述語
呼び出し関係図:

◆ gain_energy()

s16b gain_energy ( void  )

◆ gain_level_reward()

void gain_level_reward ( int  chosen_reward)
呼び出し関係図:

◆ get_aim_dir()

bool get_aim_dir ( int *  dp)
呼び出し関係図:

◆ get_coin_type()

static int get_coin_type ( int  r_idx)
static

モンスターを倒した際の財宝svalを返す

引数
r_idx倒したモンスターの種族ID
戻り値
財宝のsval

Hack – Return the "automatic coin type" of a monster race Used to allocate proper treasure when "Creeping coins" die XXX XXX XXX Note the use of actual "monster names"

被呼び出し関係図:

◆ get_exp_from_mon()

static void get_exp_from_mon ( int  dam,
monster_type m_ptr 
)
static

モンスターに与えたダメージを元に経験値を加算する / Calculate experience point to be get

引数
dam与えたダメージ量
m_ptrダメージを与えたモンスターの構造体参照ポインタ
戻り値
なし
Even the 64 bit operation is not big enough to avoid overflaw
unless we carefully choose orders of multiplication and division.
Get the coefficient first, and multiply (potentially huge) base
experience point of a monster later.
呼び出し関係図:
被呼び出し関係図:

◆ get_hack_dir()

bool get_hack_dir ( int *  dp)
呼び出し関係図:

◆ get_rep_dir()

bool get_rep_dir ( int *  dp,
bool  under 
)
呼び出し関係図:

◆ get_rep_dir2()

bool get_rep_dir2 ( int *  dp)
呼び出し関係図:

◆ get_screen_size()

void get_screen_size ( int *  wid_p,
int *  hgt_p 
)

現在のコンソール表示の縦横を返す。 / Get term size and calculate screen size

引数
wid_pコンソールの表示幅文字数を返す
hgt_pコンソールの表示行数を返す
戻り値
なし
呼び出し関係図:

◆ kind_is_armor()

static bool kind_is_armor ( int  k_idx)
static

オブジェクトが鎧かどうかを判定する / Hack – determine if a template is Armor

引数
k_idx判定したいオブジェクトのベースアイテムID
戻り値
オブジェクトが鎧ならばTRUEを返す
被呼び出し関係図:

◆ kind_is_book()

static bool kind_is_book ( int  k_idx)
static

オブジェクトが魔法書かどうかを判定する / Hack – determine if a template is Book

引数
k_idx判定したいオブジェクトのベースアイテムID
戻り値
オブジェクトが魔法書ならばTRUEを返す
被呼び出し関係図:

◆ kind_is_cloak()

static bool kind_is_cloak ( int  k_idx)
static

オブジェクトがクロークかどうかを判定する / Hack – determine if a template is Cloak

引数
k_idx判定したいオブジェクトのベースアイテムID
戻り値
オブジェクトがクロークならばTRUEを返す
被呼び出し関係図:

◆ kind_is_good_book()

static bool kind_is_good_book ( int  k_idx)
static

オブジェクトがベースアイテム時点でGOODかどうかを判定する / Hack – determine if a template is Good book

引数
k_idx判定したいオブジェクトのベースアイテムID
戻り値
オブジェクトがベースアイテム時点でGOODなアイテムならばTRUEを返す
被呼び出し関係図:

◆ kind_is_hafted()

static bool kind_is_hafted ( int  k_idx)
static

オブジェクトが打撃武器かどうかを判定する / Hack – determine if a template is hafted weapon

引数
k_idx判定したいオブジェクトのベースアイテムID
戻り値
オブジェクトが打撃武器ならばTRUEを返す
被呼び出し関係図:

◆ kind_is_polearm()

static bool kind_is_polearm ( int  k_idx)
static

オブジェクトが竿状武器かどうかを判定する / Hack – determine if a template is Polearm

引数
k_idx判定したいオブジェクトのベースアイテムID
戻り値
オブジェクトが竿状武器ならばTRUEを返す
被呼び出し関係図:

◆ kind_is_sword()

static bool kind_is_sword ( int  k_idx)
static

オブジェクトが剣かどうかを判定する / Hack – determine if a template is Sword

引数
k_idx判定したいオブジェクトのベースアイテムID
戻り値
オブジェクトが剣ならばTRUEを返す
被呼び出し関係図:

◆ look_mon_desc()

cptr look_mon_desc ( monster_type m_ptr,
u32b  mode 
)
呼び出し関係図:

◆ mon_damage_mod()

int mon_damage_mod ( monster_type m_ptr,
int  dam,
bool  is_psy_spear 
)

モンスターに与えたダメージの修正処理 / Modify the physical damage done to the monster.

引数
m_ptrダメージを受けるモンスターの構造体参照ポインタ
damダメージ基本値
is_psy_spear攻撃手段が光の剣ならばTRUE
戻り値
修正を行った結果のダメージ量
(for example when it's invulnerable or shielded)
ToDo: Accept a damage-type to calculate the modified damage from
things like fire, frost, lightning, poison, ... attacks.
"type" is not yet used and should be 0.
呼び出し関係図:

◆ mon_take_hit()

bool mon_take_hit ( int  m_idx,
int  dam,
bool fear,
cptr  note 
)

モンスターのHPをダメージに応じて減算する / Decreases monsters hit points, handling monster death.

引数
dam与えたダメージ量
m_idxダメージを与えたモンスターのID
fearダメージによってモンスターが恐慌状態に陥ったならばTRUEを返す
noteモンスターが倒された際の特別なメッセージ述語
戻り値
なし
We return TRUE if the monster has been killed (and deleted).
We announce monster death (using an optional "death message"
if given, and a otherwise a generic killed/destroyed message).
Only "physical attacks" can induce the "You have slain" message.
Missile and Spell attacks will induce the "dies" message, or
various "specialized" messages.  Note that "You have destroyed"
and "is destroyed" are synonyms for "You have slain" and "dies".
Hack -- unseen monsters yield "You have killed it." message.
Added fear (DGK) and check whether to print fear messages -CWS
Made name, sex, and capitalization generic -BEN-
As always, the "ghost" processing is a total hack.
Hack -- we "delay" fear messages by passing around a "fear" flag.
XXX XXX XXX Consider decreasing monster experience over time, say,
by using "(m_exp * m_lev * (m_lev)) / (p_lev * (m_lev + n_killed))"
instead of simply "(m_exp * m_lev) / (p_lev)", to make the first
monster worth more than subsequent monsters.  This would also need
to induce changes in the monster recall code.
呼び出し関係図:

◆ monster_death()

void monster_death ( int  m_idx,
bool  drop_item 
)

モンスターが死亡した時の処理 / Handle the "death" of a monster.

引数
m_idx死亡したモンスターのID
drop_itemTRUEならばモンスターのドロップ処理を行う
戻り値
撃破されたモンスターの述語
Disperse treasures centered at the monster location based on the
various flags contained in the monster flags fields.
Check for "Quest" completion when a quest monster is killed.
Note that only the player can induce "monster_death()" on Uniques.
Thus (for now) all Quest monsters should be Uniques.
Note that monsters can now carry objects, and when a monster dies,
it drops all of its objects, which may disappear in crowded rooms.
呼び出し関係図:

◆ panel_bounds_center()

void panel_bounds_center ( void  )

コンソール上におけるマップ表示の左上位置を返す / Calculates current boundaries Called below and from "do_cmd_locate()".

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

◆ redraw_window()

void redraw_window ( void  )

コンソールを再描画する / Redraw a term when it is resized

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

◆ resize_map()

void resize_map ( void  )

コンソールのリサイズに合わせてマップを再描画する / Map resizing whenever the main term changes size

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

◆ riding_exp_level()

int riding_exp_level ( int  riding_exp)

◆ rumor_bind_name()

cptr rumor_bind_name ( char *  base,
cptr  fullname 
)
呼び出し関係図:
被呼び出し関係図:

◆ rumor_num()

int rumor_num ( char *  zz,
int  max_idx 
)
被呼び出し関係図:

◆ spell_exp_level()

int spell_exp_level ( int  spell_exp)

◆ target_able()

bool target_able ( int  m_idx)
呼び出し関係図:

◆ target_okay()

bool target_okay ( void  )
呼び出し関係図:

◆ target_pick()

static s16b target_pick ( int  y1,
int  x1,
int  dy,
int  dx 
)
static
被呼び出し関係図:

◆ target_set()

bool target_set ( int  mode)
呼び出し関係図:

◆ target_set_accept()

static bool target_set_accept ( int  y,
int  x 
)
static
被呼び出し関係図:

◆ target_set_aux()

static int target_set_aux ( int  y,
int  x,
int  mode,
cptr  info 
)
static

Display list of items

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

◆ target_set_prepare()

static void target_set_prepare ( int  mode)
static
呼び出し関係図:
被呼び出し関係図:

◆ target_set_prepare_look()

void target_set_prepare_look ( void  )
呼び出し関係図:

◆ tgt_pt()

bool tgt_pt ( int *  x_ptr,
int *  y_ptr 
)
呼び出し関係図:

◆ tgt_pt_accept()

static bool tgt_pt_accept ( int  y,
int  x 
)
static
被呼び出し関係図:

◆ tgt_pt_prepare()

static void tgt_pt_prepare ( void  )
static
呼び出し関係図:
被呼び出し関係図:

◆ verify_panel()

void verify_panel ( void  )

マップ描画のフォーカスを当てるべき座標を更新する

Given an row (y) and col (x), this routine detects when a move off the screen has occurred and figures new borders. -RAK- "Update" forces a "full update" to take place. The map is reprinted if necessary, and "TRUE" is returned.

戻り値
実際に再描画が必要だった場合TRUEを返す
呼び出し関係図:

◆ weapon_exp_level()

int weapon_exp_level ( int  weapon_exp)

◆ your_alignment()

cptr your_alignment ( void  )

変数詳解

◆ show_gold_on_floor

bool show_gold_on_floor = FALSE