Hengband
2.2.1
|
#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"
関数 | |
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 |
void dispel_monster_status | ( | MONSTER_IDX | m_idx | ) |
モンスターへの魔力消去処理
m_idx | 魔力消去を受けるモンスターの参照ID |
|
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.
int get_mproc_idx | ( | MONSTER_IDX | m_idx, |
int | mproc_type | ||
) |
モンスターの時限ステータスを取得する
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.
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.
void monster_gain_exp | ( | MONSTER_IDX | m_idx, |
MONRACE_IDX | s_idx | ||
) |
モンスターの経験値取得処理
m_idx | 経験値を得るモンスターの参照ID |
s_idx | 撃破されたモンスター種族の参照ID |
bool monster_is_powerful | ( | MONSTER_IDX | m_idx | ) |
モンスターIDからPOWERFULフラグの有無を取得する /
m_idx | モンスターID |
bool monster_is_valid | ( | monster_type * | m_ptr | ) |
DEPTH monster_level_idx | ( | MONSTER_IDX | m_idx | ) |
モンスターIDからモンスターのレベルを取得する(ただし最低1を保証する) /
m_idx | モンスターID |
|
static |
モンスターの時限ステータスリストを追加する
void mproc_init | ( | void | ) |
モンスターの時限ステータスリストを初期化する / Initialize monster process
|
static |
モンスターの時限ステータスリストを削除
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.
|
static |
モンスターの各種状態値を時間経過により更新するサブルーチン
m_idx | モンスター参照ID |
mtimed_idx | 更新するモンスターの時限ステータスID |
bool set_monster_confused | ( | MONSTER_IDX | m_idx, |
int | v | ||
) |
モンスターの混乱状態値をセット / Set "m_ptr->mtimed[MTIMED_CONFUSED]", notice observable changes
m_idx | モンスター参照ID |
v | セットする値 |
bool set_monster_csleep | ( | MONSTER_IDX | m_idx, |
int | v | ||
) |
モンスターの睡眠状態値をセットする。0で起きる。 / Set "m_ptr->mtimed[MTIMED_CSLEEP]", notice observable changes
m_idx | モンスター参照ID |
v | セットする値 |
bool set_monster_fast | ( | MONSTER_IDX | m_idx, |
int | v | ||
) |
モンスターの加速状態値をセット / Set "m_ptr->mtimed[MTIMED_FAST]", notice observable changes
m_idx | モンスター参照ID |
v | セットする値 |
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_need | TRUEならば無敵解除時に行動ターン消費を行う |
bool set_monster_monfear | ( | MONSTER_IDX | m_idx, |
int | v | ||
) |
モンスターの恐慌状態値をセット / Set "m_ptr->mtimed[MTIMED_MONFEAR]", notice observable changes
m_idx | モンスター参照ID |
v | セットする値 |
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
m_idx | モンスター参照ID |
v | セットする値 |
bool set_monster_timewalk | ( | int | num, |
MONSTER_IDX | who, | ||
bool | vs_player | ||
) |
モンスターの時間停止処理
num | 時間停止を行った敵が行動できる回数 |
who | 時間停止処理の主体ID |
vs_player | TRUEならば時間停止開始処理を行う |
|
static |