Hengband
2.2.1
|
モンスター情報の記述 / 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"
マクロ定義 | |
#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)
#define plural | ( | c, | |
s, | |||
p | |||
) | (((c) == 1) ? (s) : (p)) |
英語の複数系記述用マクロ / Pluralizer.
Args(count, singular, plural)
void anger_monster | ( | monster_type * | m_ptr | ) |
モンスターを怒らせる Anger the monster
m_ptr | モンスター情報構造体の参照ポインタ |
bool are_enemies | ( | monster_type * | m_ptr, |
monster_type * | n_ptr | ||
) |
モンスターの属性の基づいた敵対関係の有無を返す Check if two monsters are enemies
m_ptr | モンスター1の構造体参照ポインタ |
n_ptr | モンスター2の構造体参照ポインタ |
モンスターの属性の基づいた敵対関係の有無を返す(サブルーチン) Check if this monster has "hostile" alignment (aux)
sub_align1 | モンスター1のサブフラグ |
sub_align2 | モンスター2のサブフラグ |
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 | 文字列を格納するポインタ |
void display_roff | ( | MONRACE_IDX | r_idx | ) |
モンスター情報の現在のウィンドウに表示する / Hack – describe the given monster race in the current "term" window
r_idx | モンスターの種族ID |
concptr extract_note_dies | ( | MONRACE_IDX | r_idx | ) |
モンスターを撃破した際の述語メッセージを返す / Return monster death string
r_ptr | 撃破されたモンスターの種族情報を持つ構造体の参照ポインタ |
|
static |
モンスターを倒した際の財宝svalを返す
r_idx | 倒したモンスターの種族ID |
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"
monsterrace_hook_type get_monster_hook | ( | void | ) |
プレイヤーの現在の広域マップ座標から得た地勢を元にモンスターの生成条件関数を返す
monsterrace_hook_type get_monster_hook2 | ( | POSITION | y, |
POSITION | x | ||
) |
指定された広域マップ座標の地勢を元にモンスターの生成条件関数を返す
|
static |
モンスターの思い出メッセージをあらかじめ指定された関数ポインタに基づき出力する
str | 出力文字列 |
|
static |
モンスターのAC情報を得ることができるかを返す / Determine if the "armor" is known
r_idx | モンスターの種族ID |
The higher the level, the fewer kills needed.
|
static |
モンスターの打撃威力を知ることができるかどうかを返す Determine if the "damage" of the given attack is known
r_idx | モンスターの種族ID |
i | 確認したい攻撃手番 |
the higher the level of the monster, the fewer the attacks you need, the more damage an attack does, the more attacks you need
concptr look_mon_desc | ( | monster_type * | m_ptr, |
BIT_FLAGS | mode | ||
) |
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 | オプション |
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 | オプション |
void monster_death | ( | MONSTER_IDX | m_idx, |
bool | drop_item | ||
) |
モンスターが死亡した時の処理 / Handle the "death" of a monster.
m_idx | 死亡したモンスターのID |
drop_item | TRUEならばモンスターのドロップ処理を行う |
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.
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 | モンスター種族情報の構造体参照ポインタ |
If user is player, m_ptr == NULL.
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 | 出力処理を行う関数ポインタ |
|
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.
void roff_top | ( | MONRACE_IDX | r_idx | ) |
モンスター情報のヘッダを記述する Hack – Display the "name" and "attr/chars" of a monster race
r_idx | モンスターの種族ID |
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 | 表示オプション |
void set_damage | ( | MONRACE_IDX | r_idx, |
int | SPELL_NUM, | ||
char * | msg, | ||
char * | tmp | ||
) |
文字列にモンスターの攻撃力を加える
r_idx | モンスターの種族ID |
SPELL_NUM | 呪文番号 |
msg | 表示する文字列 |
tmp | 返すメッセージを格納する配列 |
void set_friendly | ( | monster_type * | m_ptr | ) |
モンスターを友好的にする
m_ptr | モンスター情報構造体の参照ポインタ |
void set_hostile | ( | monster_type * | m_ptr | ) |
モンスターを敵に回す Makes the monster hostile towards the player
m_ptr | モンスター情報構造体の参照ポインタ |
void set_pet | ( | monster_type * | m_ptr | ) |
モンスターをペットにする
m_ptr | モンスター情報構造体の参照ポインタ |
void(* hook_c_roff) (TERM_COLOR attr, concptr str) = c_roff |
|
static |
|
static |