Hengband
2.2.1
|
町の施設処理 / Building commands [詳解]
#include "angband.h"
#include "util.h"
#include "term.h"
#include "core.h"
#include "cmd-dump.h"
#include "cmd-magiceat.h"
#include "floor.h"
#include "floor-events.h"
#include "floor-save.h"
#include "autopick.h"
#include "objectkind.h"
#include "object-boost.h"
#include "object-flavor.h"
#include "object-hook.h"
#include "monster.h"
#include "monsterrace-hook.h"
#include "melee.h"
#include "wild.h"
#include "world.h"
#include "sort.h"
#include "avatar.h"
#include "bldg.h"
#include "dungeon.h"
#include "mutation.h"
#include "quest.h"
#include "artifact.h"
#include "cmd-spell.h"
#include "rumor.h"
#include "spells.h"
#include "spells-object.h"
#include "spells-status.h"
#include "realm-hex.h"
#include "dungeon-file.h"
#include "files.h"
#include "player-status.h"
#include "player-effects.h"
#include "player-class.h"
#include "player-personality.h"
#include "player-inventory.h"
#include "scores.h"
#include "shoot.h"
#include "view-mainwindow.h"
#include "monsterrace.h"
マクロ定義 | |
#define | SUIT_OF(card) ((card) / 13) |
トランプカードのスートを返す [詳解] | |
#define | NUM_OF(card) ((card) % 13) |
トランプカードの番号を返す [詳解] | |
#define | IS_JOKER(card) ((card) == 52) |
トランプカードがジョーカーかどうかを返す [詳解] | |
#define | ODDS_5A 3000 |
ファイブエースの役倍率 [詳解] | |
#define | ODDS_5C 400 |
ファイブカードの役倍率 [詳解] | |
#define | ODDS_RF 200 |
ロイヤルストレートフラッシュの役倍率 [詳解] | |
#define | ODDS_SF 80 |
ストレートフラッシュの役倍率 [詳解] | |
#define | ODDS_4C 16 |
フォアカードの役倍率 [詳解] | |
#define | ODDS_FH 12 |
フルハウスの役倍率 [詳解] | |
#define | ODDS_FL 8 |
フラッシュの役倍率 [詳解] | |
#define | ODDS_ST 4 |
ストレートの役倍率 [詳解] | |
#define | ODDS_3C 1 |
スリーカードの役倍率 [詳解] | |
#define | ODDS_2P 1 |
ツーペアの役倍率 [詳解] | |
関数 | |
static bool | is_owner (building_type *bldg) |
施設毎に設定された種族、職業、魔法領域フラグがプレイヤーと一致するかを判定する。 [詳解] | |
static bool | is_member (building_type *bldg) |
施設毎に設定された種族、職業、魔法領域フラグがプレイヤーと一致するかを判定する。 (スペルマスターの特別判定つき) [詳解] | |
void | clear_bldg (int min_row, int max_row) |
コンソールに表示された施設に関する情報を消去する / Clear the building information [詳解] | |
static void | building_prt_gold (void) |
所持金を表示する。 [詳解] | |
static void | show_building (building_type *bldg) |
施設のサービス一覧を表示する / Display a building. [詳解] | |
static void | arena_comm (int cmd) |
闘技場に入るコマンドの処理 / arena commands [詳解] | |
static void | display_fruit (int row, int col, int fruit) |
カジノのスロットシンボルを表示する / display fruit for dice slots [詳解] | |
static void | reset_deck (int deck[]) |
ポーカーの山札を切る。 [詳解] | |
static bool | have_joker (void) |
ポーカープレイ中にジョーカーを持っているかの判定を返す。 [詳解] | |
static bool | find_card_num (int num) |
ポーカーの手札に該当の番号の札があるかを返す。 [詳解] | |
static bool | yaku_check_flush (void) |
ポーカーの手札がフラッシュ役を得ているかを帰す。 [詳解] | |
static int | yaku_check_straight (void) |
ポーカーの手札がストレートを含んだ高位の役を得ているかを帰す。 [詳解] | |
static int | yaku_check_pair (void) |
ポーカーのペア役の状態を返す。 [詳解] | |
static int | yaku_check (void) |
ポーカーの役をチェックし、その結果を画面に表示しつつ結果を返す。 [詳解] | |
static void | display_kaeruka (int hoge, int kaeruka[]) |
ポーカーの捨てる/残すインターフェイスの表示を更新する。 [詳解] | |
static void | display_cards (void) |
ポーカーの手札を表示する。 [詳解] | |
static int | do_poker (void) |
ポーカーの1プレイルーチン。 [詳解] | |
static bool | gamble_comm (int cmd) |
カジノ1プレイごとのメインルーチン / gamble_comm [詳解] | |
void | update_gambling_monsters (void) |
モンスター闘技場に参加するモンスターを更新する。 [詳解] | |
static bool | kakutoujou (void) |
モンスター闘技場のメインルーチン [詳解] | |
static void | today_target (void) |
本日の賞金首情報を表示する。 [詳解] | |
static void | tsuchinoko (void) |
ツチノコの賞金首情報を表示する。 [詳解] | |
static void | shoukinkubi (void) |
通常の賞金首情報を表示する。 [詳解] | |
static bool | kankin (void) |
賞金首の引き換え処理 / Get prize [詳解] | |
static bool | inn_comm (int cmd) |
宿屋の利用サブルーチン [詳解] | |
static void | get_questinfo (IDX questnum, bool do_init) |
クエスト情報を表示しつつ処理する。/ Display quest information [詳解] | |
static void | castle_quest (void) |
クエスト処理のメインルーチン / Request a quest from the Lord. [詳解] | |
static void | town_history (void) |
町に関するヘルプを表示する / Display town history [詳解] | |
static HIT_POINT | calc_slaydam (HIT_POINT dam, int mult, int div, bool force) |
攻撃時スレイによるダメージ期待値修正計算 / critical happens at i / 10000 [詳解] | |
static u32b | calc_expect_dice (u32b dam, int mult, int div, bool force, WEIGHT weight, int plus, s16b meichuu, bool dokubari, int vorpal_mult, int vorpal_div) |
攻撃時の期待値計算(スレイ→重量クリティカル→切れ味効果) [詳解] | |
static void | show_weapon_dmg (int r, int c, int mindice, int maxdice, int blows, int dam_bonus, concptr attr, byte color) |
武器の各条件毎のダメージ期待値を表示する。 [詳解] | |
static void | compare_weapon_aux (object_type *o_ptr, int col, int r) |
武器一つ毎のダメージ情報を表示する。 [詳解] | |
static void | list_weapon (object_type *o_ptr, TERM_LEN row, TERM_LEN col) |
武器匠における武器一つ毎の完全情報を表示する。 [詳解] | |
static PRICE | compare_weapons (PRICE bcost) |
武器匠鑑定1回分(オブジェクト2種)の処理。/ Compare weapons [詳解] | |
static bool | eval_ac (ARMOUR_CLASS iAC) |
ACから回避率、ダメージ減少率を計算し表示する。 / Evaluate AC [詳解] | |
static void | give_one_ability_of_object (object_type *to_ptr, object_type *from_ptr) |
修復材料のオブジェクトから修復対象に特性を移植する。 [詳解] | |
static PRICE | repair_broken_weapon_aux (PRICE bcost) |
アイテム修復処理のメインルーチン / Repair broken weapon [詳解] | |
static int | repair_broken_weapon (PRICE bcost) |
アイテム修復処理の過渡ルーチン / Repair broken weapon [詳解] | |
static bool | enchant_item (PRICE cost, HIT_PROB to_hit, HIT_POINT to_dam, ARMOUR_CLASS to_ac) |
アイテムの強化を行う。 / Enchant item [詳解] | |
static void | building_recharge (void) |
魔道具の使用回数を回復させる施設のメインルーチン / Recharge rods, wands and staves [詳解] | |
static void | building_recharge_all (void) |
魔道具の使用回数を回復させる施設の一括処理向けサブルーチン / Recharge rods, wands and staves [詳解] | |
static bool | research_mon (void) |
施設でモンスターの情報を知るメインルーチン / research_mon -KMW- [詳解] | |
static void | bldg_process_command (building_type *bldg, int i) |
施設の処理実行メインルーチン / Execute a building command [詳解] | |
void | do_cmd_bldg (void) |
施設入り口にプレイヤーが乗った際の処理 / Do building commands [詳解] | |
void | determine_today_mon (bool conv_old) |
今日の賞金首を確定する / Determine today's bounty monster [詳解] | |
void | determine_bounty_uniques (void) |
賞金首となるユニークを確定する / Determine bounty uniques [詳解] | |
変数 | |
building_type | building [MAX_BLDG] |
MONRACE_IDX | battle_mon [4] |
u32b | mon_odds [4] |
int | battle_odds |
PRICE | kakekin |
int | sel_monster |
bool | reinit_wilderness = FALSE |
MONSTER_IDX | today_mon |
const arena_type | arena_info [MAX_ARENA_MONS+2] |
闘技場のモンスターID及び報酬アイテムテーブル [詳解] | |
static int | cards [5] |
ポーカーの現在の手札ID [詳解] | |
struct { | |
OBJECT_TYPE_VALUE tval | |
ベースアイテムのメイン種別ID [詳解] | |
OBJECT_SUBTYPE_VALUE sval | |
ベースアイテムのサブ種別ID [詳解] | |
} | prize_list [MAX_KUBI] |
賞金首の報酬テーブル / List of prize object [詳解] | |
町の施設処理 / Building commands
#define IS_JOKER | ( | card | ) | ((card) == 52) |
トランプカードがジョーカーかどうかを返す
#define NUM_OF | ( | card | ) | ((card) % 13) |
トランプカードの番号を返す
#define ODDS_2P 1 |
ツーペアの役倍率
#define ODDS_3C 1 |
スリーカードの役倍率
#define ODDS_4C 16 |
フォアカードの役倍率
#define ODDS_5A 3000 |
ファイブエースの役倍率
#define ODDS_5C 400 |
ファイブカードの役倍率
#define ODDS_FH 12 |
フルハウスの役倍率
#define ODDS_FL 8 |
フラッシュの役倍率
#define ODDS_RF 200 |
ロイヤルストレートフラッシュの役倍率
#define ODDS_SF 80 |
ストレートフラッシュの役倍率
#define ODDS_ST 4 |
ストレートの役倍率
#define SUIT_OF | ( | card | ) | ((card) / 13) |
トランプカードのスートを返す
TODO: donataka! tsukutte!
9/13/2000 –Koka 9/15/2000 joker wo jissou. soreto, code wo sukosi kakikae. –Habu
|
static |
闘技場に入るコマンドの処理 / arena commands
cmd | 闘技場処理のID |
|
static |
施設の処理実行メインルーチン / Execute a building command
bldg | 施設構造体の参照ポインタ |
i | 実行したい施設のサービステーブルの添字 |
|
static |
所持金を表示する。
|
static |
魔道具の使用回数を回復させる施設のメインルーチン / Recharge rods, wands and staves
The player can select the number of charges to add
(up to a limit), and the recharge never fails.
The cost for rods depends on the level of the rod. The prices
for recharging wands and staves are dependent on the cost of
the base-item.
|
static |
魔道具の使用回数を回復させる施設の一括処理向けサブルーチン / Recharge rods, wands and staves
The player can select the number of charges to add
(up to a limit), and the recharge never fails.
The cost for rods depends on the level of the rod. The prices
for recharging wands and staves are dependent on the cost of
the base-item.
|
static |
攻撃時の期待値計算(スレイ→重量クリティカル→切れ味効果)
dam | 基本ダメージ |
mult | スレイ倍率(掛け算部分) |
div | スレイ倍率(割り算部分) |
force | 理力特別計算フラグ |
weight | 重量 |
plus | 武器ダメージ修正 |
meichuu | 命中値 |
dokubari | 毒針処理か否か |
vorpal_mult | 切れ味倍率(掛け算部分) |
vorpal_div | 切れ味倍率(割り算部分) |
攻撃時スレイによるダメージ期待値修正計算 / critical happens at i / 10000
dam | 基本ダメージ |
mult | スレイ倍率(掛け算部分) |
div | スレイ倍率(割り算部分) |
force | 理力特別計算フラグ |
|
static |
クエスト処理のメインルーチン / Request a quest from the Lord.
void clear_bldg | ( | int | min_row, |
int | max_row | ||
) |
コンソールに表示された施設に関する情報を消去する / Clear the building information
消去は行毎にヌル文字列で行われる。
min_row | 開始行番号 |
max_row | 末尾行番号 |
|
static |
武器一つ毎のダメージ情報を表示する。
o_ptr | オブジェクトの構造体の参照ポインタ。 |
col | 表示する行の上端 |
r | 表示する列の左端 |
Show the damage figures for the various monster types
Only accurate for the current weapon, because it includes
the current number of blows for the player.
武器匠鑑定1回分(オブジェクト2種)の処理。/ Compare weapons
Copies the weapons to compare into the weapon-slot and
compares the values for both weapons.
武器1つだけで比較をしないなら費用は半額になる。
bcost | 基本鑑定費用 |
void determine_bounty_uniques | ( | void | ) |
賞金首となるユニークを確定する / Determine bounty uniques
void determine_today_mon | ( | bool | conv_old | ) |
今日の賞金首を確定する / Determine today's bounty monster
|
static |
ポーカーの手札を表示する。
|
static |
カジノのスロットシンボルを表示する / display fruit for dice slots
row | シンボルを表示する行の上端 |
col | シンボルを表示する行の左端 |
fruit | 表示するシンボルID |
|
static |
ポーカーの捨てる/残すインターフェイスの表示を更新する。
hoge | カーソルの現在位置 |
kaeruka | カードの捨てる/残すフラグ配列 |
void do_cmd_bldg | ( | void | ) |
施設入り口にプレイヤーが乗った際の処理 / Do building commands
|
static |
ポーカーの1プレイルーチン。
|
static |
アイテムの強化を行う。 / Enchant item
cost | 1回毎の費用 |
to_hit | 命中をアップさせる量 |
to_dam | ダメージをアップさせる量 |
to_ac | ACをアップさせる量 |
|
static |
ACから回避率、ダメージ減少率を計算し表示する。 / Evaluate AC
Calculate and display the dodge-rate and the protection-rate based on AC
iAC | プレイヤーのAC。 |
|
static |
ポーカーの手札に該当の番号の札があるかを返す。
num | 探したいカードの番号。 |
|
static |
カジノ1プレイごとのメインルーチン / gamble_comm
cmd | プレイするゲームID |
クエスト情報を表示しつつ処理する。/ Display quest information
questnum | クエストのID |
do_init | クエストの開始処理(TRUE)、結果処理か(FALSE) |
|
static |
修復材料のオブジェクトから修復対象に特性を移植する。
to_ptr | 修復対象オブジェクトの構造体の参照ポインタ。 |
from_ptr | 修復材料オブジェクトの構造体の参照ポインタ。 |
|
static |
ポーカープレイ中にジョーカーを持っているかの判定を返す。
|
static |
宿屋の利用サブルーチン
inn commands
Note that resting for the night was a perfect way to avoid player
ghosts in the town if you could only make it to the inn in time (-:
Now that the ghosts are temporarily disabled in 2.8.X, this function
will not be that useful. I will keep it in the hopes the player
ghost code does become a reality again. Does help to avoid filthy urchins.
Resting at night is also a quick way to restock stores -KMW-
cmd | 宿屋の利用施設ID |
|
static |
施設毎に設定された種族、職業、魔法領域フラグがプレイヤーと一致するかを判定する。 (スペルマスターの特別判定つき)
各種ギルドや寺院など、特定の職業ならば優遇措置を得られる施設、 あるいは食堂など特定の種族では利用できない施設の判定処理を行う。
bldg | 施設構造体の参照ポインタ |
|
static |
施設毎に設定された種族、職業、魔法領域フラグがプレイヤーと一致するかを判定する。
各種ギルドや寺院など、特定の職業ならば優遇措置を得られる施設、 あるいは食堂など特定の種族では利用できない施設の判定処理を行う。
bldg | 施設構造体の参照ポインタ |
|
static |
モンスター闘技場のメインルーチン
|
static |
賞金首の引き換え処理 / Get prize
|
static |
武器匠における武器一つ毎の完全情報を表示する。
o_ptr | オブジェクトの構造体の参照ポインタ。 |
row | 表示する列の左端 |
col | 表示する行の上端 |
Displays all info about a weapon
Only accurate for the current weapon, because it includes various info about the player's +to_dam and number of blows.
|
static |
アイテム修復処理の過渡ルーチン / Repair broken weapon
bcost | 基本鑑定費用 |
アイテム修復処理のメインルーチン / Repair broken weapon
bcost | 基本修復費用 |
|
static |
施設でモンスターの情報を知るメインルーチン / research_mon -KMW-
|
static |
ポーカーの山札を切る。
deck | デッキの配列 |
|
static |
通常の賞金首情報を表示する。
|
static |
施設のサービス一覧を表示する / Display a building.
bldg | 施設構造体の参照ポインタ |
|
static |
武器の各条件毎のダメージ期待値を表示する。
r | 表示行 |
c | 表示列 |
mindice | ダイス部分最小値 |
maxdice | ダイス部分最大値 |
blows | 攻撃回数 |
dam_bonus | ダメージ修正値 |
attr | 条件内容 |
color | 条件内容の表示色 |
Display the damage figure of an object
(used by compare_weapon_aux)
Only accurate for the current weapon, because it includes
the current +dam of the player.
|
static |
本日の賞金首情報を表示する。
|
static |
町に関するヘルプを表示する / Display town history
|
static |
ツチノコの賞金首情報を表示する。
void update_gambling_monsters | ( | void | ) |
モンスター闘技場に参加するモンスターを更新する。
|
static |
ポーカーの役をチェックし、その結果を画面に表示しつつ結果を返す。
|
static |
ポーカーの手札がフラッシュ役を得ているかを帰す。
|
static |
ポーカーのペア役の状態を返す。
|
static |
ポーカーの手札がストレートを含んだ高位の役を得ているかを帰す。
const arena_type arena_info[MAX_ARENA_MONS+2] |
闘技場のモンスターID及び報酬アイテムテーブル
MONRACE_IDX battle_mon[4] |
int battle_odds |
building_type building[MAX_BLDG] |
|
static |
ポーカーの現在の手札ID
PRICE kakekin |
u32b mon_odds[4] |
struct { ... } prize_list[MAX_KUBI] |
賞金首の報酬テーブル / List of prize object
int sel_monster |
OBJECT_SUBTYPE_VALUE sval |
ベースアイテムのサブ種別ID
MONSTER_IDX today_mon |
OBJECT_TYPE_VALUE tval |
ベースアイテムのメイン種別ID