Hengband  2.2.1
データ構造 | マクロ定義 | 型定義 | 関数 | 変数
rooms-pitnest.c ファイル
#include "angband.h"
#include "util.h"
#include "grid.h"
#include "floor-generate.h"
#include "rooms.h"
#include "rooms-pitnest.h"
#include "monster.h"
#include "monsterrace-hook.h"
#include "sort.h"
#include "floor.h"
#include "feature.h"
#include "dungeon.h"
rooms-pitnest.c の依存先関係図:

データ構造

struct  vault_aux_type
 pit/nest型情報の構造体定義 [詳解]
 

マクロ定義

#define NUM_NEST_MON_TYPE   64
 nestの種別数 [詳解]
 
#define NEST_TYPE_CLONE   0
 nestのID定義 / Nest types code [詳解]
 
#define NEST_TYPE_JELLY   1
 
#define NEST_TYPE_SYMBOL_GOOD   2
 
#define NEST_TYPE_SYMBOL_EVIL   3
 
#define NEST_TYPE_MIMIC   4
 
#define NEST_TYPE_LOVECRAFTIAN   5
 
#define NEST_TYPE_KENNEL   6
 
#define NEST_TYPE_ANIMAL   7
 
#define NEST_TYPE_CHAPEL   8
 
#define NEST_TYPE_UNDEAD   9
 
#define PIT_TYPE_ORC   0
 pitのID定義 / Pit types code [詳解]
 
#define PIT_TYPE_TROLL   1
 
#define PIT_TYPE_GIANT   2
 
#define PIT_TYPE_LOVECRAFTIAN   3
 
#define PIT_TYPE_SYMBOL_GOOD   4
 
#define PIT_TYPE_SYMBOL_EVIL   5
 
#define PIT_TYPE_CHAPEL   6
 
#define PIT_TYPE_DRAGON   7
 
#define PIT_TYPE_DEMON   8
 
#define PIT_TYPE_DARK_ELF   9
 

型定義

typedef struct vault_aux_type vault_aux_type
 pit/nest型情報のtypedef [詳解]
 

関数

static int pick_vault_type (vault_aux_type *l_ptr, BIT_FLAGS16 allow_flag_mask)
 ダンジョン毎に指定されたピット配列を基準にランダムなpit/nestタイプを決める [詳解]
 
static concptr pit_subtype_string (int type, bool nest)
 デバッグ時に生成されたpit/nestの型を出力する処理 [詳解]
 
static bool ang_sort_comp_nest_mon_info (vptr u, vptr v, int a, int b)
 
static void ang_sort_swap_nest_mon_info (vptr u, vptr v, int a, int b)
 nestのモンスターリストをスワップするための関数 / Swap function for sorting nest monster information [詳解]
 
bool build_type5 (floor_type *floor_ptr)
 タイプ5の部屋…nestを生成する / Type 5 – Monster nests [詳解]
 
bool build_type6 (floor_type *floor_ptr)
 タイプ6の部屋…pitを生成する / Type 6 – Monster pits [詳解]
 
static bool vault_aux_trapped_pit (MONRACE_IDX r_idx)
 
bool build_type13 (floor_type *floor_ptr)
 タイプ13の部屋…トラップpitの生成 / Type 13 – Trapped monster pits [詳解]
 

変数

static vault_aux_type nest_types []
 nest情報テーブル [詳解]
 
static vault_aux_type pit_types []
 pit情報テーブル [詳解]
 

マクロ定義詳解

◆ NEST_TYPE_ANIMAL

#define NEST_TYPE_ANIMAL   7

◆ NEST_TYPE_CHAPEL

#define NEST_TYPE_CHAPEL   8

◆ NEST_TYPE_CLONE

#define NEST_TYPE_CLONE   0

nestのID定義 / Nest types code

◆ NEST_TYPE_JELLY

#define NEST_TYPE_JELLY   1

◆ NEST_TYPE_KENNEL

#define NEST_TYPE_KENNEL   6

◆ NEST_TYPE_LOVECRAFTIAN

#define NEST_TYPE_LOVECRAFTIAN   5

◆ NEST_TYPE_MIMIC

#define NEST_TYPE_MIMIC   4

◆ NEST_TYPE_SYMBOL_EVIL

#define NEST_TYPE_SYMBOL_EVIL   3

◆ NEST_TYPE_SYMBOL_GOOD

#define NEST_TYPE_SYMBOL_GOOD   2

◆ NEST_TYPE_UNDEAD

#define NEST_TYPE_UNDEAD   9

◆ NUM_NEST_MON_TYPE

#define NUM_NEST_MON_TYPE   64

nestの種別数

◆ PIT_TYPE_CHAPEL

#define PIT_TYPE_CHAPEL   6

◆ PIT_TYPE_DARK_ELF

#define PIT_TYPE_DARK_ELF   9

◆ PIT_TYPE_DEMON

#define PIT_TYPE_DEMON   8

◆ PIT_TYPE_DRAGON

#define PIT_TYPE_DRAGON   7

◆ PIT_TYPE_GIANT

#define PIT_TYPE_GIANT   2

◆ PIT_TYPE_LOVECRAFTIAN

#define PIT_TYPE_LOVECRAFTIAN   3

◆ PIT_TYPE_ORC

#define PIT_TYPE_ORC   0

pitのID定義 / Pit types code

◆ PIT_TYPE_SYMBOL_EVIL

#define PIT_TYPE_SYMBOL_EVIL   5

◆ PIT_TYPE_SYMBOL_GOOD

#define PIT_TYPE_SYMBOL_GOOD   4

◆ PIT_TYPE_TROLL

#define PIT_TYPE_TROLL   1

型定義詳解

◆ vault_aux_type

pit/nest型情報のtypedef

関数詳解

◆ ang_sort_comp_nest_mon_info()

static bool ang_sort_comp_nest_mon_info ( vptr  u,
vptr  v,
int  a,
int  b 
)
static
被呼び出し関係図:

◆ ang_sort_swap_nest_mon_info()

static void ang_sort_swap_nest_mon_info ( vptr  u,
vptr  v,
int  a,
int  b 
)
static

nestのモンスターリストをスワップするための関数 / Swap function for sorting nest monster information

引数
uスワップ処理対象配列ポインタ
v未使用
aスワップ対象参照ID1
bスワップ対象参照ID2 TODO: to sort.c
被呼び出し関係図:

◆ build_type13()

bool build_type13 ( floor_type floor_ptr)

タイプ13の部屋…トラップpitの生成 / Type 13 – Trapped monster pits

戻り値
なし

A trapped monster pit is a "big" room with a straight corridor in
which wall opening traps are placed, and with two "inner" rooms
containing a "collection" of monsters of a given type organized in
the room.

The trapped monster pit appears as shown below, where the actual
monsters in each location depend on the type of the pit

XXXXXXXXXXXXXXXXXXXXXXXXX
X X
XXXXXXXXXXXXXXXXXXXXXXX X
XXXXX001123454321100XXX X
XXX0012234567654322100X X
XXXXXXXXXXXXXXXXXXXXXXX X
X ^ X
X XXXXXXXXXXXXXXXXXXXXXXX
X X0012234567654322100XXX
X XXX001123454321100XXXXX
X XXXXXXXXXXXXXXXXXXXXXXX
X X
XXXXXXXXXXXXXXXXXXXXXXXXX

Note that the monsters in the pit are now chosen by using "get_mon_num()"
to request 16 "appropriate" monsters, sorting them by level, and using
the "even" entries in this sorted list for the contents of the pit.

Hack – all of the "dragons" in a "dragon" pit must be the same "color",
which is handled by requiring a specific "breath" attack for all of the
dragons. This may include "multi-hued" breath. Note that "wyrms" may
be present in many of the dragon pits, if they have the proper breath.

Note the use of the "get_mon_num_prep()" function, and the special
"get_mon_num_hook()" restriction function, to prepare the "monster\n allocation table" in such a way as to optimize the selection of
"appropriate" non-unique monsters for the pit.

Note that the "get_mon_num()" function may (rarely) fail, in which case
the pit will be empty.

Note that "monster pits" will never contain "unique" monsters.

呼び出し関係図:

◆ build_type5()

bool build_type5 ( floor_type floor_ptr)

タイプ5の部屋…nestを生成する / Type 5 – Monster nests

戻り値
なし

A monster nest is a "big" room, with an "inner" room, containing
a "collection" of monsters of a given type strewn about the room.

The monsters are chosen from a set of 64 randomly selected monster
races, to allow the nest creation to fail instead of having "holes".

Note the use of the "get_mon_num_prep()" function, and the special
"get_mon_num_hook()" restriction function, to prepare the "monster\n allocation table" in such a way as to optimize the selection of
"appropriate" non-unique monsters for the nest.

Note that the "get_mon_num()" function may (rarely) fail, in which
case the nest will be empty.

Note that "monster nests" will never contain "unique" monsters.

呼び出し関係図:

◆ build_type6()

bool build_type6 ( floor_type floor_ptr)

タイプ6の部屋…pitを生成する / Type 6 – Monster pits

戻り値
なし

A monster pit is a "big" room, with an "inner" room, containing
a "collection" of monsters of a given type organized in the room.

The inside room in a monster pit appears as shown below, where the
actual monsters in each location depend on the type of the pit

XXXXXXXXXXXXXXXXXXXXX
X0000000000000000000X
X0112233455543322110X
X0112233467643322110X
X0112233455543322110X
X0000000000000000000X
XXXXXXXXXXXXXXXXXXXXX

Note that the monsters in the pit are now chosen by using "get_mon_num()"
to request 16 "appropriate" monsters, sorting them by level, and using
the "even" entries in this sorted list for the contents of the pit.

Hack – all of the "dragons" in a "dragon" pit must be the same "color",
which is handled by requiring a specific "breath" attack for all of the
dragons. This may include "multi-hued" breath. Note that "wyrms" may
be present in many of the dragon pits, if they have the proper breath.

Note the use of the "get_mon_num_prep()" function, and the special
"get_mon_num_hook()" restriction function, to prepare the "monster\n allocation table" in such a way as to optimize the selection of
"appropriate" non-unique monsters for the pit.

Note that the "get_mon_num()" function may (rarely) fail, in which case
the pit will be empty.

Note that "monster pits" will never contain "unique" monsters.

呼び出し関係図:

◆ pick_vault_type()

static int pick_vault_type ( vault_aux_type l_ptr,
BIT_FLAGS16  allow_flag_mask 
)
static

ダンジョン毎に指定されたピット配列を基準にランダムなpit/nestタイプを決める

引数
l_ptr選択されたpit/nest情報を返す参照ポインタ
allow_flag_mask生成が許されるpit/nestのビット配列
戻り値
選択されたpit/nestのID、選択失敗した場合-1を返す。
被呼び出し関係図:

◆ pit_subtype_string()

static concptr pit_subtype_string ( int  type,
bool  nest 
)
static

デバッグ時に生成されたpit/nestの型を出力する処理

引数
typepit/nestの型ID
nestTRUEならばnest、FALSEならばpit
戻り値
デバッグ表示文字列の参照ポインタ

Hack – Get the string describing subtype of pit/nest Determined in prepare function (some pit/nest only)

被呼び出し関係図:

◆ vault_aux_trapped_pit()

static bool vault_aux_trapped_pit ( MONRACE_IDX  r_idx)
static
被呼び出し関係図:

変数詳解

◆ nest_types

vault_aux_type nest_types[]
static
初期値:
=
{
{ _("クローン", "clone"), vault_aux_clone, vault_prep_clone, 5, 3 },
{ _("ゼリー", "jelly"), vault_aux_jelly, NULL, 5, 6 },
{ _("シンボル(善)", "symbol good"), vault_aux_symbol_g, vault_prep_symbol, 25, 2 },
{ _("シンボル(悪)", "symbol evil"), vault_aux_symbol_e, vault_prep_symbol, 25, 2 },
{ _("ミミック", "mimic"), vault_aux_mimic, NULL, 30, 4 },
{ _("狂気", "lovecraftian"), vault_aux_cthulhu, NULL, 70, 2 },
{ _("犬小屋", "kennel"), vault_aux_kennel, NULL, 45, 4 },
{ _("動物園", "animal"), vault_aux_animal, NULL, 35, 5 },
{ _("教会", "chapel"), vault_aux_chapel_g, NULL, 75, 4 },
{ _("アンデッド", "undead"), vault_aux_undead, NULL, 75, 5 },
{ NULL, NULL, NULL, 0, 0 },
}
bool vault_aux_mimic(MONRACE_IDX r_idx)
モンスターがミミックnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (mimic)"
Definition: monsterrace-hook.c:458
bool vault_aux_symbol_g(MONRACE_IDX r_idx)
モンスターが善良属性シンボルクローンnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (symbol clone)"
Definition: monsterrace-hook.c:502
bool vault_aux_undead(MONRACE_IDX r_idx)
モンスターがアンデッドnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (undead)"
Definition: monsterrace-hook.c:405
bool vault_aux_jelly(MONRACE_IDX r_idx)
モンスターがゼリーnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (jelly)"
Definition: monsterrace-hook.c:374
bool vault_aux_kennel(MONRACE_IDX r_idx)
モンスターが犬小屋nestの生成必要条件を満たしているかを返す / Helper function for "monster nest (kennel)"
Definition: monsterrace-hook.c:444
void vault_prep_symbol(void)
pit/nestの基準となるモンスターシンボルを決める /
Definition: monsterrace-hook.c:43
bool vault_aux_clone(MONRACE_IDX r_idx)
モンスターが単一クローンnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (clone)"
Definition: monsterrace-hook.c:472
bool vault_aux_cthulhu(MONRACE_IDX r_idx)
モンスターが狂気pitの生成必要条件を満たしているかを返す / Helper function for "monster pit (lovecraftian)"
Definition: monsterrace-hook.c:601
bool vault_aux_animal(MONRACE_IDX r_idx)
モンスターが動物nestの生成必要条件を満たしているかを返す / Helper function for "monster nest (animal)"
Definition: monsterrace-hook.c:390
#define NULL
コンパイル環境に定義がない場合のNULL定義
Definition: h-basic.h:42
bool vault_aux_chapel_g(MONRACE_IDX r_idx)
モンスターが聖堂nestの生成必要条件を満たしているかを返す / Helper function for "monster nest (chapel)"
Definition: monsterrace-hook.c:419
void vault_prep_clone(void)
pit/nestの基準となる単種モンスターを決める /
Definition: monsterrace-hook.c:26
bool vault_aux_symbol_e(MONRACE_IDX r_idx)
モンスターが邪悪属性シンボルクローンnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (symbol clone)"
Definition: monsterrace-hook.c:485
#define _(JAPANESE, ENGLISH)
Definition: util.h:85

nest情報テーブル

◆ pit_types

vault_aux_type pit_types[]
static
初期値:
=
{
{ _("オーク", "orc"), vault_aux_orc, NULL, 5, 6 },
{ _("トロル", "troll"), vault_aux_troll, NULL, 20, 6 },
{ _("巨人", "giant"), vault_aux_giant, NULL, 50, 6 },
{ _("狂気", "lovecraftian"), vault_aux_cthulhu, NULL, 80, 2 },
{ _("シンボル(善)", "symbol good"), vault_aux_symbol_g, vault_prep_symbol, 70, 1 },
{ _("シンボル(悪)", "symbol evil"), vault_aux_symbol_e, vault_prep_symbol, 70, 1 },
{ _("教会", "chapel"), vault_aux_chapel_g, NULL, 65, 2 },
{ _("ドラゴン", "dragon"), vault_aux_dragon, vault_prep_dragon, 70, 6 },
{ _("デーモン", "demon"), vault_aux_demon, NULL, 80, 6 },
{ _("ダークエルフ", "dark elf"), vault_aux_dark_elf, NULL, 45, 4 },
{ NULL, NULL, NULL, 0, 0 },
}
bool vault_aux_demon(MONRACE_IDX r_idx)
モンスターが悪魔pitの生成必要条件を満たしているかを返す / Helper function for "monster pit (demon)"
Definition: monsterrace-hook.c:585
bool vault_aux_symbol_g(MONRACE_IDX r_idx)
モンスターが善良属性シンボルクローンnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (symbol clone)"
Definition: monsterrace-hook.c:502
bool vault_aux_troll(MONRACE_IDX r_idx)
モンスターがトロルpitの生成必要条件を満たしているかを返す / Helper function for "monster pit (troll)"
Definition: monsterrace-hook.c:535
bool vault_aux_dragon(MONRACE_IDX r_idx)
モンスターがドラゴンpitの生成必要条件を満たしているかを返す / Helper function for "monster pit (dragon)"
Definition: monsterrace-hook.c:568
bool vault_aux_giant(MONRACE_IDX r_idx)
モンスターが巨人pitの生成必要条件を満たしているかを返す / Helper function for "monster pit (giant)"
Definition: monsterrace-hook.c:551
void vault_prep_symbol(void)
pit/nestの基準となるモンスターシンボルを決める /
Definition: monsterrace-hook.c:43
bool vault_aux_cthulhu(MONRACE_IDX r_idx)
モンスターが狂気pitの生成必要条件を満たしているかを返す / Helper function for "monster pit (lovecraftian)"
Definition: monsterrace-hook.c:601
#define NULL
コンパイル環境に定義がない場合のNULL定義
Definition: h-basic.h:42
bool vault_aux_chapel_g(MONRACE_IDX r_idx)
モンスターが聖堂nestの生成必要条件を満たしているかを返す / Helper function for "monster nest (chapel)"
Definition: monsterrace-hook.c:419
bool vault_aux_orc(MONRACE_IDX r_idx)
モンスターがオークpitの生成必要条件を満たしているかを返す / Helper function for "monster pit (orc)"
Definition: monsterrace-hook.c:519
bool vault_aux_symbol_e(MONRACE_IDX r_idx)
モンスターが邪悪属性シンボルクローンnestの生成必要条件を満たしているかを返す / Helper function for "monster nest (symbol clone)"
Definition: monsterrace-hook.c:485
#define _(JAPANESE, ENGLISH)
Definition: util.h:85
bool vault_aux_dark_elf(MONRACE_IDX r_idx)
モンスターがダークエルフpitの生成必要条件を満たしているかを返す / Helper function for "monster pit (dark elf)"
Definition: monsterrace-hook.c:616
void vault_prep_dragon(void)
pit/nestの基準となるドラゴンの種類を決める /
Definition: monsterrace-hook.c:65

pit情報テーブル