Hengband  2.2.1
関数 | 変数
monster-status.c ファイル
#include "angband.h"
#include "core.h"
#include "util.h"
#include "creature.h"
#include "cmd-dump.h"
#include "dungeon.h"
#include "floor.h"
#include "grid.h"
#include "monster.h"
#include "monster-status.h"
#include "monster-spell.h"
#include "monster-process.h"
#include "spells.h"
#include "spells-summon.h"
#include "monsterrace-hook.h"
#include "object-curse.h"
#include "artifact.h"
#include "avatar.h"
#include "files.h"
#include "player-effects.h"
#include "player-personality.h"
#include "view-mainwindow.h"
#include "world.h"
#include "report.h"
#include "melee.h"
monster-status.c の依存先関係図:

関数

bool monster_is_powerful (MONSTER_IDX m_idx)
 モンスターIDからPOWERFULフラグの有無を取得する / [詳解]
 
DEPTH monster_level_idx (MONSTER_IDX m_idx)
 モンスターIDからモンスターのレベルを取得する(ただし最低1を保証する) / [詳解]
 
HIT_POINT mon_damage_mod (monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear)
 モンスターに与えたダメージの修正処理 / Modify the physical damage done to the monster. [詳解]
 
static void get_exp_from_mon (HIT_POINT dam, monster_type *m_ptr)
 モンスターに与えたダメージを元に経験値を加算する / Calculate experience point to be get [詳解]
 
int get_mproc_idx (MONSTER_IDX m_idx, int mproc_type)
 モンスターの時限ステータスを取得する [詳解]
 
static void mproc_add (MONSTER_IDX m_idx, int mproc_type)
 モンスターの時限ステータスリストを追加する [詳解]
 
static void mproc_remove (MONSTER_IDX m_idx, int mproc_type)
 モンスターの時限ステータスリストを削除 [詳解]
 
void mproc_init (void)
 モンスターの時限ステータスリストを初期化する / Initialize monster process [詳解]
 
bool set_monster_csleep (MONSTER_IDX m_idx, int v)
 モンスターの睡眠状態値をセットする。0で起きる。 / Set "m_ptr->mtimed[MTIMED_CSLEEP]", notice observable changes [詳解]
 
bool set_monster_fast (MONSTER_IDX m_idx, int v)
 モンスターの加速状態値をセット / Set "m_ptr->mtimed[MTIMED_FAST]", notice observable changes [詳解]
 
bool set_monster_slow (MONSTER_IDX m_idx, int v)
 
bool set_monster_stunned (MONSTER_IDX m_idx, int v)
 モンスターの朦朧状態値をセット / Set "m_ptr->mtimed[MTIMED_STUNNED]", notice observable changes [詳解]
 
bool set_monster_confused (MONSTER_IDX m_idx, int v)
 モンスターの混乱状態値をセット / Set "m_ptr->mtimed[MTIMED_CONFUSED]", notice observable changes [詳解]
 
bool set_monster_monfear (MONSTER_IDX m_idx, int v)
 モンスターの恐慌状態値をセット / Set "m_ptr->mtimed[MTIMED_MONFEAR]", notice observable changes [詳解]
 
bool set_monster_invulner (MONSTER_IDX m_idx, int v, bool energy_need)
 モンスターの無敵状態値をセット / Set "m_ptr->mtimed[MTIMED_INVULNER]", notice observable changes [詳解]
 
static void process_monsters_mtimed_aux (MONSTER_IDX m_idx, int mtimed_idx)
 モンスターの各種状態値を時間経過により更新するサブルーチン [詳解]
 
void process_monsters_mtimed (int mtimed_idx)
 全モンスターの各種状態値を時間経過により更新するメインルーチン [詳解]
 
void dispel_monster_status (MONSTER_IDX m_idx)
 モンスターへの魔力消去処理 [詳解]
 
bool set_monster_timewalk (int num, MONSTER_IDX who, bool vs_player)
 モンスターの時間停止処理 [詳解]
 
void monster_gain_exp (MONSTER_IDX m_idx, MONRACE_IDX s_idx)
 モンスターの経験値取得処理 [詳解]
 
bool mon_take_hit (MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, concptr note)
 モンスターのHPをダメージに応じて減算する / Decreases monsters hit points, handling monster death. [詳解]
 
bool monster_is_valid (monster_type *m_ptr)
 

変数

static u32b csleep_noise
 

関数詳解

◆ dispel_monster_status()

void dispel_monster_status ( MONSTER_IDX  m_idx)

モンスターへの魔力消去処理

引数
m_idx魔力消去を受けるモンスターの参照ID
戻り値
なし
呼び出し関係図:

◆ get_exp_from_mon()

static void get_exp_from_mon ( HIT_POINT  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_mproc_idx()

int get_mproc_idx ( MONSTER_IDX  m_idx,
int  mproc_type 
)

モンスターの時限ステータスを取得する

戻り値
m_idx モンスターの参照ID
mproc_type モンスターの時限ステータスID
残りターン値

◆ mon_damage_mod()

HIT_POINT mon_damage_mod ( monster_type m_ptr,
HIT_POINT  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 ( MONSTER_IDX  m_idx,
HIT_POINT  dam,
bool fear,
concptr  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.
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_gain_exp()

void monster_gain_exp ( MONSTER_IDX  m_idx,
MONRACE_IDX  s_idx 
)

モンスターの経験値取得処理

引数
m_idx経験値を得るモンスターの参照ID
s_idx撃破されたモンスター種族の参照ID
戻り値
なし
呼び出し関係図:

◆ monster_is_powerful()

bool monster_is_powerful ( MONSTER_IDX  m_idx)

モンスターIDからPOWERFULフラグの有無を取得する /

引数
m_idxモンスターID
戻り値
POWERFULフラグがあればTRUE、なければFALSEを返す。

◆ monster_is_valid()

bool monster_is_valid ( monster_type m_ptr)

◆ monster_level_idx()

DEPTH monster_level_idx ( MONSTER_IDX  m_idx)

モンスターIDからモンスターのレベルを取得する(ただし最低1を保証する) /

引数
m_idxモンスターID
戻り値
モンスターのレベル

◆ mproc_add()

static void mproc_add ( MONSTER_IDX  m_idx,
int  mproc_type 
)
static

モンスターの時限ステータスリストを追加する

戻り値
m_idx モンスターの参照ID
mproc_type 追加したいモンスターの時限ステータスID
なし
被呼び出し関係図:

◆ mproc_init()

void mproc_init ( void  )

モンスターの時限ステータスリストを初期化する / Initialize monster process

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

◆ mproc_remove()

static void mproc_remove ( MONSTER_IDX  m_idx,
int  mproc_type 
)
static

モンスターの時限ステータスリストを削除

戻り値
m_idx モンスターの参照ID
mproc_type 削除したいモンスターの時限ステータスID
なし
呼び出し関係図:
被呼び出し関係図:

◆ process_monsters_mtimed()

void process_monsters_mtimed ( int  mtimed_idx)

全モンスターの各種状態値を時間経過により更新するメインルーチン

引数
mtimed_idx更新するモンスターの時限ステータスID
戻り値
なし

Process the counters of monsters (once per 10 game turns)
These functions are to process monsters' counters same as player's.

呼び出し関係図:

◆ process_monsters_mtimed_aux()

static void process_monsters_mtimed_aux ( MONSTER_IDX  m_idx,
int  mtimed_idx 
)
static

モンスターの各種状態値を時間経過により更新するサブルーチン

引数
m_idxモンスター参照ID
mtimed_idx更新するモンスターの時限ステータスID
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ set_monster_confused()

bool set_monster_confused ( MONSTER_IDX  m_idx,
int  v 
)

モンスターの混乱状態値をセット / Set "m_ptr->mtimed[MTIMED_CONFUSED]", notice observable changes

引数
m_idxモンスター参照ID
vセットする値
戻り値
別途更新処理が必要な場合TRUEを返す
呼び出し関係図:

◆ set_monster_csleep()

bool set_monster_csleep ( MONSTER_IDX  m_idx,
int  v 
)

モンスターの睡眠状態値をセットする。0で起きる。 / Set "m_ptr->mtimed[MTIMED_CSLEEP]", notice observable changes

引数
m_idxモンスター参照ID
vセットする値
戻り値
別途更新処理が必要な場合TRUEを返す
呼び出し関係図:

◆ set_monster_fast()

bool set_monster_fast ( MONSTER_IDX  m_idx,
int  v 
)

モンスターの加速状態値をセット / Set "m_ptr->mtimed[MTIMED_FAST]", notice observable changes

引数
m_idxモンスター参照ID
vセットする値
戻り値
別途更新処理が必要な場合TRUEを返す
呼び出し関係図:

◆ set_monster_invulner()

bool set_monster_invulner ( MONSTER_IDX  m_idx,
int  v,
bool  energy_need 
)

モンスターの無敵状態値をセット / Set "m_ptr->mtimed[MTIMED_INVULNER]", notice observable changes

引数
m_idxモンスター参照ID
vセットする値
energy_needTRUEならば無敵解除時に行動ターン消費を行う
戻り値
別途更新処理が必要な場合TRUEを返す
呼び出し関係図:

◆ set_monster_monfear()

bool set_monster_monfear ( MONSTER_IDX  m_idx,
int  v 
)

モンスターの恐慌状態値をセット / Set "m_ptr->mtimed[MTIMED_MONFEAR]", notice observable changes

引数
m_idxモンスター参照ID
vセットする値
戻り値
別途更新処理が必要な場合TRUEを返す
呼び出し関係図:

◆ set_monster_slow()

bool set_monster_slow ( MONSTER_IDX  m_idx,
int  v 
)
呼び出し関係図:

◆ set_monster_stunned()

bool set_monster_stunned ( MONSTER_IDX  m_idx,
int  v 
)

モンスターの朦朧状態値をセット / Set "m_ptr->mtimed[MTIMED_STUNNED]", notice observable changes

引数
m_idxモンスター参照ID
vセットする値
戻り値
別途更新処理が必要な場合TRUEを返す
呼び出し関係図:

◆ set_monster_timewalk()

bool set_monster_timewalk ( int  num,
MONSTER_IDX  who,
bool  vs_player 
)

モンスターの時間停止処理

引数
num時間停止を行った敵が行動できる回数
who時間停止処理の主体ID
vs_playerTRUEならば時間停止開始処理を行う
戻り値
時間停止が行われている状態ならばTRUEを返す
呼び出し関係図:

変数詳解

◆ csleep_noise

u32b csleep_noise
static