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

Angbandゲームエンジン / Angband game engine [詳解]

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

マクロ定義

#define TY_CURSE_CHANCE   200
 太古の怨念の1ターン毎の発動確率(1/n) [詳解]
 
#define CHAINSWORD_NOISE   100
 チェンソーの1ターン毎の発動確率(1/n) [詳解]
 
#define RATING_BOOST(delta)   (delta * delta + 50 * delta)
 ダンジョンの雰囲気を計算するための非線形基準値 / Dungeon rating is no longer linear [詳解]
 

関数

static byte value_check_aux1 (object_type *o_ptr)
 重度擬似鑑定の判断処理 / Return a "feeling" (or NULL) about an item. [詳解]
 
static byte value_check_aux2 (object_type *o_ptr)
 軽度擬似鑑定の判断処理 / Return a "feeling" (or NULL) about an item. [詳解]
 
static void sense_inventory_aux (int slot, bool heavy)
 擬似鑑定を実際に行い判定を反映する [詳解]
 
static void sense_inventory1 (void)
 1プレイヤーターン毎に武器、防具の擬似鑑定が行われるかを判定する。 [詳解]
 
static void sense_inventory2 (void)
 1プレイヤーターン毎に武器、防具以外の擬似鑑定が行われるかを判定する。 [詳解]
 
static void pattern_teleport (void)
 パターン終点到達時のテレポート処理を行う [詳解]
 
static void wreck_the_pattern (void)
 種族アンバライトが出血時パターンの上に乗った際のペナルティ処理 [詳解]
 
static bool pattern_effect (void)
 各種パターン地形上の特別な処理 / Returns TRUE if we are on the Pattern... [詳解]
 
static void regenhp (int percent)
 プレイヤーのHP自然回復処理 / Regenerate hit points -RAK- [詳解]
 
static void regenmana (int upkeep_factor, int regen_amount)
 プレイヤーのMP自然回復処理(regen_magic()のサブセット) / Regenerate mana points [詳解]
 
static void regenmagic (int regen_amount)
 プレイヤーのMP自然回復処理 / Regenerate magic regen_amount: PY_REGEN_NORMAL * 2 (if resting) * 2 (if having regenarate) [詳解]
 
static void regen_monsters (void)
 100ゲームターン毎のモンスターのHP自然回復処理 / Regenerate the monsters (once per 100 game turns) [詳解]
 
static void regen_captured_monsters (void)
 30ゲームターン毎のボール中モンスターのHP自然回復処理 / Regenerate the captured monsters (once per 30 game turns) [詳解]
 
static void notice_lite_change (object_type *o_ptr)
 寿命つき光源の警告メッセージ処理 [詳解]
 
void leave_quest_check (void)
 クエスト階層から離脱する際の処理 [詳解]
 
void leave_tower_check (void)
 「塔」クエストの各階層から離脱する際の処理 [詳解]
 
bool psychometry (void)
 超能力者のサイコメトリー処理/ Forcibly pseudo-identify an object in the inventory (or on the floor) [詳解]
 
static void recharged_notice (object_type *o_ptr)
 !!を刻んだ魔道具の時間経過による再充填を知らせる処理 / If player has inscribed the object with "!!", let him know when it's recharged. [詳解]
 
static void check_music (void)
 プレイヤーの歌に関する継続処理 [詳解]
 
static object_typechoose_cursed_obj_name (u32b flag)
 現在呪いを保持している装備品を一つランダムに探し出す / Choose one of items that have cursed flag [詳解]
 
static void process_world_aux_hp_and_sp (void)
 10ゲームターンが進行するごとにプレイヤーのHPとMPの増減処理を行う。 / Handle timed damage and regeneration every 10 game turns [詳解]
 
static void process_world_aux_timeout (void)
 10ゲームターンが進行するごとに魔法効果の残りターンを減らしていく処理 / Handle timeout every 10 game turns [詳解]
 
static void process_world_aux_light (void)
 10ゲームターンが進行する毎に光源の寿命を減らす処理 / Handle burning fuel every 10 game turns [詳解]
 
static void process_world_aux_mutation (void)
 10ゲームターンが進行するごとに突然変異の発動判定を行う処理 / Handle mutation effects once every 10 game turns [詳解]
 
static void process_world_aux_curse (void)
 10ゲームターンが進行するごとに装備効果の発動判定を行う処理 / Handle curse effects once every 10 game turns [詳解]
 
static void process_world_aux_recharge (void)
 10ゲームターンが進行するごとに魔道具の自然充填を行う処理 / Handle recharging objects once every 10 game turns [詳解]
 
static void process_world_aux_movement (void)
 10ゲームターンが進行するごとに帰還や現実変容などの残り時間カウントダウンと発動を処理する。 / Handle involuntary movement once every 10 game turns [詳解]
 
static int get_monster_crowd_number (int m_idx)
 指定したモンスターに隣接しているモンスターの数を返す。 / Count number of adjacent monsters [詳解]
 
static byte get_dungeon_feeling (void)
 ダンジョンの雰囲気を算出する。 / Examine all monsters and unidentified objects, and get the feeling of current dungeon floor [詳解]
 
static void update_dungeon_feeling (void)
 ダンジョンの雰囲気を更新し、変化があった場合メッセージを表示する / Update dungeon feeling, and announce it if changed [詳解]
 
static void process_world (void)
 10ゲームターンが進行する毎にゲーム世界全体の処理を行う。 / Handle certain things once every 10 game turns [詳解]
 
static bool enter_wizard_mode (void)
 ウィザードモードへの導入処理 / Verify use of "wizard" mode [詳解]
 
static bool enter_debug_mode (void)
 デバッグコマンドへの導入処理 / Verify use of "debug" commands [詳解]
 
void do_cmd_debug (void)
 デバッグコマンドを選択する処理のメインルーチン / Ask for and parse a "debug command" The "command_arg" may have been set. [詳解]
 
static void process_command (void)
 プレイヤーから受けた入力コマンドの分岐処理。 / Parse and execute the current command Give "Warning" on illegal commands. [詳解]
 
static bool monster_tsuri (int r_idx)
 モンスター種族が釣れる種族かどうかを判定する。 [詳解]
 
static void pack_overflow (void)
 アイテムの所持種類数が超えた場合にアイテムを床に落とす処理 / Hack – Pack Overflow [詳解]
 
static void process_upkeep_with_speed (void)
 プレイヤーの行動エネルギーが充填される(=プレイヤーのターンが回る)毎に行われる処理 / process the effects per 100 energy at player speed. [詳解]
 
static void process_player (void)
 プレイヤーの行動処理 / Process the player [詳解]
 
static void dungeon (bool load_game)
 現在プレイヤーがいるダンジョンの全体処理 / Interact with the current dungeon level. [詳解]
 
static void load_all_pref_files (void)
 全ユーザプロファイルをロードする / Load some "user pref files" [詳解]
 
void extract_option_vars (void)
 ビットセットからゲームオプションを展開する / Extract option variables from bit sets [詳解]
 
void determine_bounty_uniques (void)
 賞金首となるユニークを確定する / Determine bounty uniques [詳解]
 
void determine_today_mon (bool conv_old)
 今日の賞金首を確定する / Determine today's bounty monster [詳解]
 
void play_game (bool new_game)
 1ゲームプレイの主要ルーチン / Actually play a game [詳解]
 
s32b turn_real (s32b hoge)
 ゲームターンからの実時間換算を行うための補正をかける [詳解]
 
void prevent_turn_overflow (void)
 ターンのオーバーフローに対する対処 [詳解]
 

変数

static bool load = TRUE
 ロード処理中の分岐フラグ [詳解]
 
static int wild_regen = 20
 広域マップ移動時の自然回復処理カウンタ(広域マップ1マス毎に20回処理を基本とする) [詳解]
 

詳解

Angbandゲームエンジン / Angband game engine

日付
2013/12/31
著者
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.
2013 Deskull rearranged comment for Doxygen.

マクロ定義詳解

◆ CHAINSWORD_NOISE

#define CHAINSWORD_NOISE   100

チェンソーの1ターン毎の発動確率(1/n)

◆ RATING_BOOST

#define RATING_BOOST (   delta)    (delta * delta + 50 * delta)

ダンジョンの雰囲気を計算するための非線形基準値 / Dungeon rating is no longer linear

◆ TY_CURSE_CHANCE

#define TY_CURSE_CHANCE   200

太古の怨念の1ターン毎の発動確率(1/n)

関数詳解

◆ check_music()

static void check_music ( void  )
static

プレイヤーの歌に関する継続処理

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

◆ choose_cursed_obj_name()

static object_type* choose_cursed_obj_name ( u32b  flag)
static

現在呪いを保持している装備品を一つランダムに探し出す / Choose one of items that have cursed flag

引数
flag探し出したい呪いフラグ配列
戻り値
該当の呪いが一つでもあった場合にランダムに選ばれた装備品のオブジェクト構造体参照ポインタを返す。
呪いがない場合NULLを返す。
呼び出し関係図:
被呼び出し関係図:

◆ determine_bounty_uniques()

void determine_bounty_uniques ( void  )

賞金首となるユニークを確定する / Determine bounty uniques

戻り値
なし

◆ determine_today_mon()

void determine_today_mon ( bool  conv_old)

今日の賞金首を確定する / Determine today's bounty monster

戻り値
なし
覚え書き
conv_old is used if loaded 0.0.3 or older save file

◆ do_cmd_debug()

void do_cmd_debug ( void  )

デバッグコマンドを選択する処理のメインルーチン / Ask for and parse a "debug command" The "command_arg" may have been set.

戻り値
なし

◆ dungeon()

static void dungeon ( bool  load_game)
static

現在プレイヤーがいるダンジョンの全体処理 / Interact with the current dungeon level.

戻り値
なし
覚え書き
This function will not exit until the level is completed,
the user dies, or the game is terminated.
呼び出し関係図:
被呼び出し関係図:

◆ enter_debug_mode()

static bool enter_debug_mode ( void  )
static

デバッグコマンドへの導入処理 / Verify use of "debug" commands

戻り値
実際にデバッグコマンドへ移行したらTRUEを返す。
呼び出し関係図:
被呼び出し関係図:

◆ enter_wizard_mode()

static bool enter_wizard_mode ( void  )
static

ウィザードモードへの導入処理 / Verify use of "wizard" mode

戻り値
実際にウィザードモードへ移行したらTRUEを返す。
呼び出し関係図:
被呼び出し関係図:

◆ extract_option_vars()

void extract_option_vars ( void  )

ビットセットからゲームオプションを展開する / Extract option variables from bit sets

戻り値
なし

◆ get_dungeon_feeling()

static byte get_dungeon_feeling ( void  )
static

ダンジョンの雰囲気を算出する。 / Examine all monsters and unidentified objects, and get the feeling of current dungeon floor

戻り値
算出されたダンジョンの雰囲気ランク
呼び出し関係図:
被呼び出し関係図:

◆ get_monster_crowd_number()

static int get_monster_crowd_number ( int  m_idx)
static

指定したモンスターに隣接しているモンスターの数を返す。 / Count number of adjacent monsters

引数
m_idx隣接数を調べたいモンスターのID
戻り値
隣接しているモンスターの数
被呼び出し関係図:

◆ leave_quest_check()

void leave_quest_check ( void  )

クエスト階層から離脱する際の処理

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

◆ leave_tower_check()

void leave_tower_check ( void  )

「塔」クエストの各階層から離脱する際の処理

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

◆ load_all_pref_files()

static void load_all_pref_files ( void  )
static

全ユーザプロファイルをロードする / Load some "user pref files"

戻り値
なし
覚え書き
Modified by Arcum Dagsson to support separate macro files for different realms.
呼び出し関係図:
被呼び出し関係図:

◆ monster_tsuri()

static bool monster_tsuri ( int  r_idx)
static

モンスター種族が釣れる種族かどうかを判定する。

引数
r_idx判定したいモンスター種族のID
戻り値
釣れる対象ならばTRUEを返す
呼び出し関係図:
被呼び出し関係図:

◆ notice_lite_change()

static void notice_lite_change ( object_type o_ptr)
static

寿命つき光源の警告メッセージ処理

引数
o_ptr現在光源として使っているオブジェクトの構造体参照ポインタ
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ pack_overflow()

static void pack_overflow ( void  )
static

アイテムの所持種類数が超えた場合にアイテムを床に落とす処理 / Hack – Pack Overflow

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

◆ pattern_effect()

static bool pattern_effect ( void  )
static

各種パターン地形上の特別な処理 / Returns TRUE if we are on the Pattern...

戻り値
実際にパターン地形上にプレイヤーが居た場合はTRUEを返す。
呼び出し関係図:
被呼び出し関係図:

◆ pattern_teleport()

static void pattern_teleport ( void  )
static

パターン終点到達時のテレポート処理を行う

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

◆ play_game()

void play_game ( bool  new_game)

1ゲームプレイの主要ルーチン / Actually play a game

戻り値
なし
覚え書き
If the "new_game" parameter is true, then, after loading the savefile, we will commit suicide, if necessary, to allow the player to start a new game.

◆ prevent_turn_overflow()

void prevent_turn_overflow ( void  )

ターンのオーバーフローに対する対処

ターン及びターンを記録する変数をターンの限界の1日前まで巻き戻す.

戻り値
修正をかけた後のゲームターン

◆ process_command()

static void process_command ( void  )
static

プレイヤーから受けた入力コマンドの分岐処理。 / Parse and execute the current command Give "Warning" on illegal commands.

todo:
XXX XXX XXX Make some "blocks"
戻り値
なし
被呼び出し関係図:

◆ process_player()

static void process_player ( void  )
static

プレイヤーの行動処理 / Process the player

戻り値
なし
覚え書き
Notice the annoying code to handle "pack overflow", which
must come first just in case somebody manages to corrupt
the savefiles by clever use of menu commands or something.
呼び出し関係図:
被呼び出し関係図:

◆ process_upkeep_with_speed()

static void process_upkeep_with_speed ( void  )
static

プレイヤーの行動エネルギーが充填される(=プレイヤーのターンが回る)毎に行われる処理 / process the effects per 100 energy at player speed.

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

◆ process_world()

static void process_world ( void  )
static

10ゲームターンが進行する毎にゲーム世界全体の処理を行う。 / Handle certain things once every 10 game turns

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

◆ process_world_aux_curse()

static void process_world_aux_curse ( void  )
static

10ゲームターンが進行するごとに装備効果の発動判定を行う処理 / Handle curse effects once every 10 game turns

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

◆ process_world_aux_hp_and_sp()

static void process_world_aux_hp_and_sp ( void  )
static

10ゲームターンが進行するごとにプレイヤーのHPとMPの増減処理を行う。 / Handle timed damage and regeneration every 10 game turns

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

◆ process_world_aux_light()

static void process_world_aux_light ( void  )
static

10ゲームターンが進行する毎に光源の寿命を減らす処理 / Handle burning fuel every 10 game turns

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

◆ process_world_aux_movement()

static void process_world_aux_movement ( void  )
static

10ゲームターンが進行するごとに帰還や現実変容などの残り時間カウントダウンと発動を処理する。 / Handle involuntary movement once every 10 game turns

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

◆ process_world_aux_mutation()

static void process_world_aux_mutation ( void  )
static

10ゲームターンが進行するごとに突然変異の発動判定を行う処理 / Handle mutation effects once every 10 game turns

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

◆ process_world_aux_recharge()

static void process_world_aux_recharge ( void  )
static

10ゲームターンが進行するごとに魔道具の自然充填を行う処理 / Handle recharging objects once every 10 game turns

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

◆ process_world_aux_timeout()

static void process_world_aux_timeout ( void  )
static

10ゲームターンが進行するごとに魔法効果の残りターンを減らしていく処理 / Handle timeout every 10 game turns

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

◆ psychometry()

bool psychometry ( void  )

超能力者のサイコメトリー処理/ Forcibly pseudo-identify an object in the inventory (or on the floor)

戻り値
なし
todo:
mind.cにこの関数を移動させるべき。
覚え書き
currently this function allows pseudo-id of any object, including silly ones like potions & scrolls, which always get '{average}'. This should be changed, either to stop such items from being pseudo-id'd, or to allow psychometry to detect whether the unidentified potion/scroll/etc is good (Cure Light Wounds, Restore Strength, etc) or bad (Poison, Weakness etc) or 'useless' (Slime Mold Juice, etc).
呼び出し関係図:

◆ recharged_notice()

static void recharged_notice ( object_type o_ptr)
static

!!を刻んだ魔道具の時間経過による再充填を知らせる処理 / If player has inscribed the object with "!!", let him know when it's recharged.

-LM-

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

◆ regen_captured_monsters()

static void regen_captured_monsters ( void  )
static

30ゲームターン毎のボール中モンスターのHP自然回復処理 / Regenerate the captured monsters (once per 30 game turns)

戻り値
なし
覚え書き
XXX XXX XXX Should probably be done during monster turns.
被呼び出し関係図:

◆ regen_monsters()

static void regen_monsters ( void  )
static

100ゲームターン毎のモンスターのHP自然回復処理 / Regenerate the monsters (once per 100 game turns)

戻り値
なし
覚え書き
XXX XXX XXX Should probably be done during monster turns.
被呼び出し関係図:

◆ regenhp()

static void regenhp ( int  percent)
static

プレイヤーのHP自然回復処理 / Regenerate hit points -RAK-

引数
percent回復比率
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ regenmagic()

static void regenmagic ( int  regen_amount)
static

プレイヤーのMP自然回復処理 / Regenerate magic regen_amount: PY_REGEN_NORMAL * 2 (if resting) * 2 (if having regenarate)

引数
regen_amount回復量
戻り値
なし
被呼び出し関係図:

◆ regenmana()

static void regenmana ( int  upkeep_factor,
int  regen_amount 
)
static

プレイヤーのMP自然回復処理(regen_magic()のサブセット) / Regenerate mana points

引数
upkeep_factorペット維持によるMPコスト量
regen_amount回復量
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ sense_inventory1()

static void sense_inventory1 ( void  )
static

1プレイヤーターン毎に武器、防具の擬似鑑定が行われるかを判定する。

戻り値
なし

Sense the inventory

Class 0 = Warrior --> fast and heavy
Class 1 = Mage --> slow and light
Class 2 = Priest --> fast but light
Class 3 = Rogue --> okay and heavy
Class 4 = Ranger --> slow but heavy (changed!)
Class 5 = Paladin --> slow but heavy

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

◆ sense_inventory2()

static void sense_inventory2 ( void  )
static

1プレイヤーターン毎に武器、防具以外の擬似鑑定が行われるかを判定する。

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

◆ sense_inventory_aux()

static void sense_inventory_aux ( int  slot,
bool  heavy 
)
static

擬似鑑定を実際に行い判定を反映する

引数
slot擬似鑑定を行うプレイヤーの所持リストID
heavy重度の擬似鑑定を行うならばTRUE
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ turn_real()

s32b turn_real ( s32b  hoge)

ゲームターンからの実時間換算を行うための補正をかける

引数
hogeゲームターン

アンデッド種族は18:00からゲームを開始するので、この修正を予め行う。

戻り値
修正をかけた後のゲームターン

◆ update_dungeon_feeling()

static void update_dungeon_feeling ( void  )
static

ダンジョンの雰囲気を更新し、変化があった場合メッセージを表示する / Update dungeon feeling, and announce it if changed

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

◆ value_check_aux1()

static byte value_check_aux1 ( object_type o_ptr)
static

重度擬似鑑定の判断処理 / Return a "feeling" (or NULL) about an item.

Method 1 (Heavy).

引数
o_ptr擬似鑑定を行うオブジェクトの参照ポインタ。
戻り値
擬似鑑定結果のIDを返す。
呼び出し関係図:
被呼び出し関係図:

◆ value_check_aux2()

static byte value_check_aux2 ( object_type o_ptr)
static

軽度擬似鑑定の判断処理 / Return a "feeling" (or NULL) about an item.

Method 2 (Light).

引数
o_ptr擬似鑑定を行うオブジェクトの参照ポインタ。
戻り値
擬似鑑定結果のIDを返す。
呼び出し関係図:
被呼び出し関係図:

◆ wreck_the_pattern()

static void wreck_the_pattern ( void  )
static

種族アンバライトが出血時パターンの上に乗った際のペナルティ処理

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

変数詳解

◆ load

bool load = TRUE
static

ロード処理中の分岐フラグ

◆ wild_regen

int wild_regen = 20
static

広域マップ移動時の自然回復処理カウンタ(広域マップ1マス毎に20回処理を基本とする)