Hengband
2.2.1
|
データ構造 | |
struct | owner_type |
struct | store_type |
マクロ定義 | |
#define | STORE_GENERAL 0 |
店舗の種類: 雑貨屋 [詳解] | |
#define | STORE_ARMOURY 1 |
店舗の種類: 防具屋 [詳解] | |
#define | STORE_WEAPON 2 |
店舗の種類: 武器屋 [詳解] | |
#define | STORE_TEMPLE 3 |
店舗の種類: 寺院 [詳解] | |
#define | STORE_ALCHEMIST 4 |
店舗の種類: 錬金術の店 [詳解] | |
#define | STORE_MAGIC 5 |
店舗の種類: 魔道具屋 [詳解] | |
#define | STORE_BLACK 6 |
店舗の種類: ブラック・マーケット [詳解] | |
#define | STORE_HOME 7 |
店舗の種類: 我が家 [詳解] | |
#define | STORE_BOOK 8 |
店舗の種類: 書店 [詳解] | |
#define | STORE_MUSEUM 9 |
店舗の種類: 博物館 [詳解] | |
#define | MAX_STORES 10 |
store.c用の店舗の種類最大数 / Total number of stores (see "store.c", etc) [詳解] | |
#define | MAX_OWNERS 32 |
各店舗毎の店主定義最大数 / Total number of owners per store (see "store.c", etc) [詳解] | |
#define | STORE_INVEN_MAX 24 /* Max number of discrete objs in inven */ |
#define | STORE_CHOICES 48 /* Number of items to choose stock from */ |
#define | STORE_OBJ_LEVEL 5 /* Magic Level for normal stores */ |
#define | STORE_TURNOVER 9 /* Normal shop turnover, per day */ |
#define | STORE_MIN_KEEP 6 /* Min slots to "always" keep full */ |
#define | STORE_MAX_KEEP 18 /* Max slots to "always" keep full */ |
#define | STORE_SHUFFLE 21 /* 1/Chance (per day) of an owner changing */ |
#define | STORE_TICKS 1000 /* Number of ticks between turnovers */ |
型定義 | |
typedef struct owner_type | owner_type |
typedef struct store_type | store_type |
関数 | |
bool | combine_and_reorder_home (int store_num) |
現在の町の指定された店舗のアイテムを整理する / Combine and reorder items in store. [詳解] | |
void | do_cmd_store (void) |
店舗処理全体のメインルーチン / Enter a store, and interact with it. [詳解] | |
void | store_shuffle (int which) |
現在の町の店主を交代させる / Shuffle one of the stores. [詳解] | |
void | store_maint (int town_num, int store_num) |
店の品揃えを変化させる / Maintain the p_ptr->inventory_list at the stores. [詳解] | |
void | store_init (int town_num, int store_num) |
店舗情報を初期化する / Initialize the stores [詳解] | |
void | move_to_black_market (object_type *o_ptr) |
アイテムを町のブラックマーケットに移動させる / [詳解] | |
変数 | |
const owner_type | owners [MAX_STORES][MAX_OWNERS] |
闘技場のモンスターID及び報酬アイテムテーブル / Store owners (exactly four "possible" owners per store, chosen randomly) [詳解] | |
byte | store_table [MAX_STORES][STORE_CHOICES][2] |
店舗で販売するオブジェクトを定義する / Hack – Objects sold in the stores – by tval/sval pair. [詳解] | |
#define MAX_OWNERS 32 |
各店舗毎の店主定義最大数 / Total number of owners per store (see "store.c", etc)
#define MAX_STORES 10 |
store.c用の店舗の種類最大数 / Total number of stores (see "store.c", etc)
#define STORE_ALCHEMIST 4 |
店舗の種類: 錬金術の店
#define STORE_ARMOURY 1 |
店舗の種類: 防具屋
#define STORE_BLACK 6 |
店舗の種類: ブラック・マーケット
#define STORE_BOOK 8 |
店舗の種類: 書店
#define STORE_CHOICES 48 /* Number of items to choose stock from */ |
#define STORE_GENERAL 0 |
店舗の種類: 雑貨屋
#define STORE_HOME 7 |
店舗の種類: 我が家
#define STORE_INVEN_MAX 24 /* Max number of discrete objs in inven */ |
#define STORE_MAGIC 5 |
店舗の種類: 魔道具屋
#define STORE_MAX_KEEP 18 /* Max slots to "always" keep full */ |
#define STORE_MIN_KEEP 6 /* Min slots to "always" keep full */ |
#define STORE_MUSEUM 9 |
店舗の種類: 博物館
#define STORE_OBJ_LEVEL 5 /* Magic Level for normal stores */ |
#define STORE_SHUFFLE 21 /* 1/Chance (per day) of an owner changing */ |
#define STORE_TEMPLE 3 |
店舗の種類: 寺院
#define STORE_TICKS 1000 /* Number of ticks between turnovers */ |
#define STORE_TURNOVER 9 /* Normal shop turnover, per day */ |
#define STORE_WEAPON 2 |
店舗の種類: 武器屋
typedef struct owner_type owner_type |
typedef struct store_type store_type |
bool combine_and_reorder_home | ( | int | store_num | ) |
現在の町の指定された店舗のアイテムを整理する / Combine and reorder items in store.
store_num | 店舗ID |
void do_cmd_store | ( | void | ) |
店舗処理全体のメインルーチン / Enter a store, and interact with it.
Note that we use the standard "request_command()" function to get a command, allowing us to use "command_arg" and all command macros and other nifty stuff, but we use the special "shopping" argument, to force certain commands to be converted into other commands, normally, we convert "p" (pray) and "m" (cast magic) into "g" (get), and "s" (search) into "d" (drop).
void move_to_black_market | ( | object_type * | o_ptr | ) |
アイテムを町のブラックマーケットに移動させる /
o_ptr | 移動させたいオブジェクトの構造体参照ポインタ |
void store_init | ( | int | town_num, |
int | store_num | ||
) |
店舗情報を初期化する / Initialize the stores
town_num | 町のID |
store_num | 店舗種類のID |
void store_maint | ( | int | town_num, |
int | store_num | ||
) |
店の品揃えを変化させる / Maintain the p_ptr->inventory_list at the stores.
town_num | 町のID |
store_num | 店舗種類のID |
void store_shuffle | ( | int | which | ) |
現在の町の店主を交代させる / Shuffle one of the stores.
which | 店舗種類のID |
const owner_type owners[MAX_STORES][MAX_OWNERS] |
闘技場のモンスターID及び報酬アイテムテーブル / Store owners (exactly four "possible" owners per store, chosen randomly)
{ name, purse, max greed, min greed, haggle_per, tolerance, race, unused }
Lifted extra shopkeepers from CthAngband (don't you just love open source development? ;-)). Since this gave less than 32 unique names for some shops, those have their first x names copied to reach 32.
For the weapon and armour shops, several owners have a limit of 5k.
I want to do 50k owners, but the purse is currently s16b. Perhaps we should just store 1/10th of the purse?
byte store_table[MAX_STORES][STORE_CHOICES][2] |
店舗で販売するオブジェクトを定義する / Hack – Objects sold in the stores – by tval/sval pair.