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

モンスター情報の記述 / describe monsters (using monster memory) [詳解]

#include "angband.h"
#include "util.h"
#include "term.h"
#include "cmd-dump.h"
#include "bldg.h"
#include "cmd-pet.h"
#include "floor.h"
#include "objectkind-hook.h"
#include "player-personality.h"
#include "monster.h"
#include "monster-spell.h"
#include "monsterrace-hook.h"
#include "spells-summon.h"
#include "patron.h"
#include "quest.h"
#include "artifact.h"
#include "avatar.h"
#include "wild.h"
#include "spells.h"
#include "dungeon.h"
#include "world.h"
#include "melee.h"
#include "japanese.h"
#include "view-mainwindow.h"
#include "player-class.h"
#include "english.h"
monster1.c の依存先関係図:

マクロ定義

#define plural(c, s, p)   (((c) == 1) ? (s) : (p))
 英語の複数系記述用マクロ / Pluralizer. [詳解]
 

関数

static bool know_armour (MONRACE_IDX r_idx)
 モンスターのAC情報を得ることができるかを返す / Determine if the "armor" is known [詳解]
 
static bool know_damage (MONRACE_IDX r_idx, int i)
 モンスターの打撃威力を知ることができるかどうかを返す Determine if the "damage" of the given attack is known [詳解]
 
static void hooked_roff (concptr str)
 モンスターの思い出メッセージをあらかじめ指定された関数ポインタに基づき出力する [詳解]
 
void dice_to_string (int base_damage, int dice_num, int dice_side, int dice_mult, int dice_div, char *msg)
 ダイス目を文字列に変換する [詳解]
 
void set_damage (MONRACE_IDX r_idx, int SPELL_NUM, char *msg, char *tmp)
 文字列にモンスターの攻撃力を加える [詳解]
 
static void roff_aux (MONRACE_IDX r_idx, BIT_FLAGS mode)
 モンスターの思い出情報を表示する Hack – display monster information using "hooked_roff()" [詳解]
 
void roff_top (MONRACE_IDX r_idx)
 モンスター情報のヘッダを記述する Hack – Display the "name" and "attr/chars" of a monster race [詳解]
 
void screen_roff (MONRACE_IDX r_idx, BIT_FLAGS mode)
 モンスター情報の表示と共に画面を一時消去するサブルーチン / Hack – describe the given monster race at the top of the screen [詳解]
 
void display_roff (MONRACE_IDX r_idx)
 モンスター情報の現在のウィンドウに表示する / Hack – describe the given monster race in the current "term" window [詳解]
 
void output_monster_spoiler (MONRACE_IDX r_idx, void(*roff_func)(TERM_COLOR attr, concptr str))
 モンスター詳細情報を自動スポイラー向けに出力する / Hack – output description of the given monster race [詳解]
 
monsterrace_hook_type get_monster_hook (void)
 プレイヤーの現在の広域マップ座標から得た地勢を元にモンスターの生成条件関数を返す [詳解]
 
monsterrace_hook_type get_monster_hook2 (POSITION y, POSITION x)
 指定された広域マップ座標の地勢を元にモンスターの生成条件関数を返す [詳解]
 
void set_friendly (monster_type *m_ptr)
 モンスターを友好的にする [詳解]
 
void set_pet (monster_type *m_ptr)
 モンスターをペットにする [詳解]
 
void set_hostile (monster_type *m_ptr)
 モンスターを敵に回す Makes the monster hostile towards the player [詳解]
 
void anger_monster (monster_type *m_ptr)
 モンスターを怒らせる Anger the monster [詳解]
 
bool monster_can_cross_terrain (FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 mode)
 モンスターが地形を踏破できるかどうかを返す Check if monster can cross terrain [詳解]
 
bool monster_can_enter (POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode)
 指定された座標の地形をモンスターが踏破できるかどうかを返す Strictly check if monster can enter the grid [詳解]
 
static bool check_hostile_align (byte sub_align1, byte sub_align2)
 モンスターの属性の基づいた敵対関係の有無を返す(サブルーチン) Check if this monster has "hostile" alignment (aux) [詳解]
 
bool are_enemies (monster_type *m_ptr, monster_type *n_ptr)
 モンスターの属性の基づいた敵対関係の有無を返す Check if two monsters are enemies [詳解]
 
bool monster_has_hostile_align (monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr)
 モンスターがプレイヤーに対して敵意を抱くかどうかを返す Check if this monster race has "hostile" alignment [詳解]
 
static OBJECT_SUBTYPE_VALUE get_coin_type (MONRACE_IDX r_idx)
 モンスターを倒した際の財宝svalを返す [詳解]
 
void monster_death (MONSTER_IDX m_idx, bool drop_item)
 モンスターが死亡した時の処理 / Handle the "death" of a monster. [詳解]
 
concptr extract_note_dies (MONRACE_IDX r_idx)
 モンスターを撃破した際の述語メッセージを返す / Return monster death string [詳解]
 
concptr look_mon_desc (monster_type *m_ptr, BIT_FLAGS mode)
 

変数

static concptr wd_he [3]
 
static concptr wd_his [3]
 
void(* hook_c_roff )(TERM_COLOR attr, concptr str) = c_roff
 

詳解

モンスター情報の記述 / describe monsters (using monster memory)

日付
2013/12/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.

マクロ定義詳解

◆ plural

#define plural (   c,
  s,
 
)    (((c) == 1) ? (s) : (p))

英語の複数系記述用マクロ / Pluralizer.

Args(count, singular, plural)

関数詳解

◆ anger_monster()

void anger_monster ( monster_type m_ptr)

モンスターを怒らせる Anger the monster

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

◆ are_enemies()

bool are_enemies ( monster_type m_ptr,
monster_type n_ptr 
)

モンスターの属性の基づいた敵対関係の有無を返す Check if two monsters are enemies

引数
m_ptrモンスター1の構造体参照ポインタ
n_ptrモンスター2の構造体参照ポインタ
戻り値
敵対関係にあるならばTRUEを返す
呼び出し関係図:

◆ check_hostile_align()

static bool check_hostile_align ( byte  sub_align1,
byte  sub_align2 
)
static

モンスターの属性の基づいた敵対関係の有無を返す(サブルーチン) Check if this monster has "hostile" alignment (aux)

引数
sub_align1モンスター1のサブフラグ
sub_align2モンスター2のサブフラグ
戻り値
敵対関係にあるならばTRUEを返す
被呼び出し関係図:

◆ dice_to_string()

void dice_to_string ( int  base_damage,
int  dice_num,
int  dice_side,
int  dice_mult,
int  dice_div,
char *  msg 
)

ダイス目を文字列に変換する

引数
base_damage固定値
dice_numダイス数
dice_sideダイス面
dice_multダイス倍率
dice_divダイス除数
msg文字列を格納するポインタ
戻り値
なし

◆ display_roff()

void display_roff ( MONRACE_IDX  r_idx)

モンスター情報の現在のウィンドウに表示する / Hack – describe the given monster race in the current "term" window

引数
r_idxモンスターの種族ID
戻り値
なし
呼び出し関係図:

◆ extract_note_dies()

concptr extract_note_dies ( MONRACE_IDX  r_idx)

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

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

◆ get_coin_type()

static OBJECT_SUBTYPE_VALUE get_coin_type ( MONRACE_IDX  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 Note the use of actual "monster names"

被呼び出し関係図:

◆ get_monster_hook()

monsterrace_hook_type get_monster_hook ( void  )

プレイヤーの現在の広域マップ座標から得た地勢を元にモンスターの生成条件関数を返す

戻り値
地勢にあったモンスターの生成条件関数
呼び出し関係図:

◆ get_monster_hook2()

monsterrace_hook_type get_monster_hook2 ( POSITION  y,
POSITION  x 
)

指定された広域マップ座標の地勢を元にモンスターの生成条件関数を返す

戻り値
地勢にあったモンスターの生成条件関数
呼び出し関係図:

◆ hooked_roff()

static void hooked_roff ( concptr  str)
static

モンスターの思い出メッセージをあらかじめ指定された関数ポインタに基づき出力する

引数
str出力文字列
戻り値
なし
被呼び出し関係図:

◆ know_armour()

static bool know_armour ( MONRACE_IDX  r_idx)
static

モンスターのAC情報を得ることができるかを返す / Determine if the "armor" is known

引数
r_idxモンスターの種族ID
戻り値
敵のACを知る条件が満たされているならTRUEを返す

The higher the level, the fewer kills needed.

被呼び出し関係図:

◆ know_damage()

static bool know_damage ( MONRACE_IDX  r_idx,
int  i 
)
static

モンスターの打撃威力を知ることができるかどうかを返す Determine if the "damage" of the given attack is known

引数
r_idxモンスターの種族ID
i確認したい攻撃手番
戻り値
敵のダメージダイスを知る条件が満たされているならTRUEを返す
the higher the level of the monster, the fewer the attacks you need,
the more damage an attack does, the more attacks you need
被呼び出し関係図:

◆ look_mon_desc()

concptr look_mon_desc ( monster_type m_ptr,
BIT_FLAGS  mode 
)
呼び出し関係図:

◆ monster_can_cross_terrain()

bool monster_can_cross_terrain ( FEAT_IDX  feat,
monster_race r_ptr,
BIT_FLAGS16  mode 
)

モンスターが地形を踏破できるかどうかを返す Check if monster can cross terrain

引数
feat地形ID
r_ptrモンスター種族構造体の参照ポインタ
modeオプション
戻り値
踏破可能ならばTRUEを返す

◆ monster_can_enter()

bool monster_can_enter ( POSITION  y,
POSITION  x,
monster_race r_ptr,
BIT_FLAGS16  mode 
)

指定された座標の地形をモンスターが踏破できるかどうかを返す Strictly check if monster can enter the grid

引数
y地形のY座標
x地形のX座標
r_ptrモンスター種族構造体の参照ポインタ
modeオプション
戻り値
踏破可能ならばTRUEを返す
呼び出し関係図:

◆ monster_death()

void monster_death ( MONSTER_IDX  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.
呼び出し関係図:

◆ monster_has_hostile_align()

bool monster_has_hostile_align ( monster_type m_ptr,
int  pa_good,
int  pa_evil,
monster_race r_ptr 
)

モンスターがプレイヤーに対して敵意を抱くかどうかを返す Check if this monster race has "hostile" alignment

引数
m_ptrモンスター情報構造体の参照ポインタ
pa_goodプレイヤーの善傾向値
pa_evilプレイヤーの悪傾向値
r_ptrモンスター種族情報の構造体参照ポインタ
戻り値
プレイヤーに敵意を持つならばTRUEを返す

If user is player, m_ptr == NULL.

呼び出し関係図:

◆ output_monster_spoiler()

void output_monster_spoiler ( MONRACE_IDX  r_idx,
void(*)(TERM_COLOR attr, concptr str)  roff_func 
)

モンスター詳細情報を自動スポイラー向けに出力する / Hack – output description of the given monster race

引数
r_idxモンスターの種族ID
roff_func出力処理を行う関数ポインタ
戻り値
なし
呼び出し関係図:

◆ roff_aux()

static void roff_aux ( MONRACE_IDX  r_idx,
BIT_FLAGS  mode 
)
static

モンスターの思い出情報を表示する Hack – display monster information using "hooked_roff()"

引数
r_idxモンスターの種族ID
mode表示オプション
戻り値
なし

This function should only be called with the cursor placed at the left edge of the screen, on a cleared line, in which the recall is to take place. One extra blank line is left after the recall.

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

◆ roff_top()

void roff_top ( MONRACE_IDX  r_idx)

モンスター情報のヘッダを記述する Hack – Display the "name" and "attr/chars" of a monster race

引数
r_idxモンスターの種族ID
戻り値
なし
呼び出し関係図:

◆ screen_roff()

void screen_roff ( MONRACE_IDX  r_idx,
BIT_FLAGS  mode 
)

モンスター情報の表示と共に画面を一時消去するサブルーチン / Hack – describe the given monster race at the top of the screen

引数
r_idxモンスターの種族ID
mode表示オプション
戻り値
なし
呼び出し関係図:

◆ set_damage()

void set_damage ( MONRACE_IDX  r_idx,
int  SPELL_NUM,
char *  msg,
char *  tmp 
)

文字列にモンスターの攻撃力を加える

引数
r_idxモンスターの種族ID
SPELL_NUM呪文番号
msg表示する文字列
tmp返すメッセージを格納する配列
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ set_friendly()

void set_friendly ( monster_type m_ptr)

モンスターを友好的にする

引数
m_ptrモンスター情報構造体の参照ポインタ
戻り値
なし

◆ set_hostile()

void set_hostile ( monster_type m_ptr)

モンスターを敵に回す Makes the monster hostile towards the player

引数
m_ptrモンスター情報構造体の参照ポインタ
戻り値
なし

◆ set_pet()

void set_pet ( monster_type m_ptr)

モンスターをペットにする

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

変数詳解

◆ hook_c_roff

void(* hook_c_roff) (TERM_COLOR attr, concptr str) = c_roff

◆ wd_he

concptr wd_he[3]
static
初期値:
=
{ "it", "he", "she" }

◆ wd_his

concptr wd_his[3]
static
初期値:
=
{ "its", "his", "her" }