Hengband  2.1.4
 全て データ構造 ファイル 関数 変数 型定義 マクロ定義 ページ
マクロ定義 | 関数 | 変数
store.c

店の処理 / Store commands [詳細]

#include "angband.h"
store.cのインクルード依存関係図

マクロ定義

#define MIN_STOCK   12
 
#define RUMOR_CHANCE   8
 
#define MAX_COMMENT_1   6
 
#define MAX_COMMENT_2A   2
 
#define MAX_COMMENT_2B   12
 
#define MAX_COMMENT_3A   2
 
#define MAX_COMMENT_3B   12
 
#define MAX_COMMENT_4A   4
 
#define MAX_COMMENT_4B   4
 
#define MAX_COMMENT_5   8
 
#define MAX_COMMENT_6   4
 
#define MAX_COMMENT_7A   4
 
#define MAX_COMMENT_7B   4
 
#define MAX_COMMENT_7C   4
 
#define MAX_COMMENT_7D   4
 

関数

static void say_comment_1 (void)
 取引成功時の店主のメッセージ処理 / Successful haggle. [詳細]
 
static void say_comment_2 (s32b value, int annoyed)
 プレイヤーがアイテムを買う時の価格代案メッセージ処理 / Continue haggling (player is buying) [詳細]
 
static void say_comment_3 (s32b value, int annoyed)
 プレイヤーがアイテムを売る時の価格代案メッセージ処理 / Continue haggling (player is selling) [詳細]
 
static void say_comment_4 (void)
 店主がプレイヤーを追い出す時のメッセージ処理 / Kick 'da bum out. [詳細]
 
static void say_comment_5 (void)
 店主がプレイヤーに取り合わない時のメッセージ処理 / You are insulting me [詳細]
 
static void say_comment_6 (void)
 店主がプレイヤーの提示を理解できなかった時のメッセージ処理 / That makes no sense. [詳細]
 
static void purchase_analyze (s32b price, s32b value, s32b guess)
 店主が交渉を終えた際の反応を返す処理 / Let a shop-keeper React to a purchase [詳細]
 
static s32b price_item (object_type *o_ptr, int greed, bool flip)
 店舗価格を決定する / Determine the price of an item (qty one) in a store. [詳細]
 
static void mass_produce (object_type *o_ptr)
 安価な消耗品の販売数を増やし、低確率で割引にする / Certain "cheap" objects should be created in "piles" [詳細]
 
static bool store_object_similar (object_type *o_ptr, object_type *j_ptr)
 店舗に並べた品を同一品であるかどうか判定する / Determine if a store item can "absorb" another item [詳細]
 
static void store_object_absorb (object_type *o_ptr, object_type *j_ptr)
 店舗に並べた品を重ね合わせできるかどうか判定する / Allow a store item to absorb another item [詳細]
 
static int store_check_num (object_type *o_ptr)
 店舗に品を置くスペースがあるかどうかの判定を返す / Check to see if the shop will be carrying too many objects -RAK- [詳細]
 
static bool is_blessed (object_type *o_ptr)
 オブジェクトが祝福されているかの判定を返す / [詳細]
 
static bool store_will_buy (object_type *o_ptr)
 オブジェクトが所定の店舗で引き取れるかどうかを返す / Determine if the current store will purchase the given item [詳細]
 
bool combine_and_reorder_home (int store_num)
 現在の町の指定された店舗のアイテムを整理する / Combine and reorder items in store. [詳細]
 
static int home_carry (object_type *o_ptr)
 我が家にオブジェクトを加える / Add the item "o_ptr" to the inventory of the "Home" [詳細]
 
static int store_carry (object_type *o_ptr)
 店舗にオブジェクトを加える / Add the item "o_ptr" to a real stores inventory. [詳細]
 
static void store_item_increase (int item, int num)
 店舗のオブジェクト数を増やす / Add the item "o_ptr" to a real stores inventory. [詳細]
 
static void store_item_optimize (int item)
 店舗のオブジェクト数を削除する / Remove a slot if it is empty [詳細]
 
static bool black_market_crap (object_type *o_ptr)
 ブラックマーケット用の無価値品の排除判定 / This function will keep 'crap' out of the black market. [詳細]
 
static void store_delete (void)
 店舗の品揃え変化のためにアイテムを削除する / Attempt to delete (some of) a random item from the store [詳細]
 
static void store_create (void)
 店舗の品揃え変化のためにアイテムを追加する / Creates a random item and gives it to a store [詳細]
 
static bool noneedtobargain (s32b minprice)
 店舗の割引対象外にするかどうかを判定 / Eliminate need to bargain if player has haggled well in the past [詳細]
 
static void updatebargain (s32b price, s32b minprice, int num)
 店主の持つプレイヤーに対する売買の良し悪し経験を記憶する / Update the bargain info [詳細]
 
static void display_entry (int pos)
 店の商品リストを再表示する / Re-displays a single store entry [詳細]
 
static void display_inventory (void)
 店の商品リストを表示する / Displays a store's inventory -RAK- [詳細]
 
static void store_prt_gold (void)
 プレイヤーの所持金を表示する / Displays players gold -RAK- [詳細]
 
static void display_store (void)
 店舗情報全体を表示するメインルーチン / Displays store (after clearing screen) -RAK- [詳細]
 
static int get_stock (int *com_val, cptr pmt, int i, int j)
 店舗からアイテムを選択する / Get the ID of a store item and return its value -RAK- [詳細]
 
static int increase_insults (void)
 店主の不満度を増やし、プレイヤーを締め出す判定と処理を行う / Increase the insult counter and get angry if too many -RAK- [詳細]
 
static void decrease_insults (void)
 店主の不満度を減らす / Decrease insults -RAK- [詳細]
 
static int haggle_insults (void)
 店主の不満度が増えた場合のみのメッセージを表示する / Have insulted while haggling -RAK- [詳細]
 
static int get_haggle (cptr pmt, s32b *poffer, s32b price, int final)
 交渉価格を確認と認証の是非を行う / Get a haggle [詳細]
 
static bool receive_offer (cptr pmt, s32b *poffer, s32b last_offer, int factor, s32b price, int final)
 店主がプレイヤーからの交渉価格を判断する / Receive an offer (from the player) [詳細]
 
static bool purchase_haggle (object_type *o_ptr, s32b *price)
 プレイヤーが購入する時の値切り処理メインルーチン / Haggling routine -RAK- [詳細]
 
static bool sell_haggle (object_type *o_ptr, s32b *price)
 プレイヤーが売却する時の値切り処理メインルーチン / Haggling routine -RAK- [詳細]
 
static void store_purchase (void)
 店からの購入処理のメインルーチン / Buy an item from a store -RAK- [詳細]
 
static void store_sell (void)
 店からの売却処理のメインルーチン / Sell an item to the store (or home) [詳細]
 
static void store_examine (void)
 店のアイテムを調べるコマンドのメインルーチン / Examine an item in a store -JDL- [詳細]
 
static void museum_remove_object (void)
 博物館のアイテムを除去するコマンドのメインルーチン / Remove an item from museum (Originally from TOband) [詳細]
 
static void store_process_command (void)
 店舗処理コマンド選択のメインルーチン / Process a command in a 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 inventory at the stores. [詳細]
 
void store_init (int town_num, int store_num)
 店舗情報を初期化する / Initialize the stores [詳細]
 
void move_to_black_market (object_type *o_ptr)
 アイテムを町のブラックマーケットに移動させる / [詳細]
 

変数

static int cur_store_num = 0
 
static int store_top = 0
 
static int store_bottom = 0
 
static int xtra_stock = 0
 
static store_typest_ptr = NULL
 
static const owner_typeot_ptr = NULL
 
static s16b old_town_num = 0
 
static s16b inner_town_num = 0
 
static cptr comment_1 [MAX_COMMENT_1]
 
static cptr comment_2a [MAX_COMMENT_2A]
 
static cptr comment_2b [MAX_COMMENT_2B]
 
static cptr comment_3a [MAX_COMMENT_3A]
 
static cptr comment_3b [MAX_COMMENT_3B]
 
static cptr comment_4a [MAX_COMMENT_4A]
 
static cptr comment_4b [MAX_COMMENT_4B]
 
static cptr comment_5 [MAX_COMMENT_5]
 
static cptr comment_6 [MAX_COMMENT_6]
 
static cptr comment_7a [MAX_COMMENT_7A]
 
static cptr comment_7b [MAX_COMMENT_7B]
 
static cptr comment_7c [MAX_COMMENT_7C]
 
static cptr comment_7d [MAX_COMMENT_7D]
 
static int cur_store_feat
 
static byte rgold_adj [MAX_RACES][MAX_RACES]
 
static bool allow_inc = FALSE
 
static s32b last_inc = 0L
 
static bool leave_store = FALSE
 

説明

店の処理 / Store commands

日付
2014/02/02
作者
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.
2014 Deskull rearranged comment for Doxygen.

マクロ定義

#define MAX_COMMENT_1   6
#define MAX_COMMENT_2A   2
#define MAX_COMMENT_2B   12
#define MAX_COMMENT_3A   2
#define MAX_COMMENT_3B   12
#define MAX_COMMENT_4A   4
#define MAX_COMMENT_4B   4
#define MAX_COMMENT_5   8
#define MAX_COMMENT_6   4
#define MAX_COMMENT_7A   4
#define MAX_COMMENT_7B   4
#define MAX_COMMENT_7C   4
#define MAX_COMMENT_7D   4
#define MIN_STOCK   12
#define RUMOR_CHANCE   8

関数

static bool black_market_crap ( object_type o_ptr)
static

ブラックマーケット用の無価値品の排除判定 / This function will keep 'crap' out of the black market.

引数
o_ptr判定したいオブジェクトの構造体参照ポインタ
戻り値
ブラックマーケットにとって無価値な品ならばTRUEを返す
Crap is defined as any item that is "available" elsewhere
Based on a suggestion by "Lee Vogt" lvogt.nosp@m.@cig.nosp@m..mcel.nosp@m..mot.nosp@m..com

呼出しグラフ:

bool combine_and_reorder_home ( int  store_num)

現在の町の指定された店舗のアイテムを整理する / Combine and reorder items in store.

引数
store_num店舗ID
戻り値
実際に整理が行われたならばTRUEを返す。

関数の呼び出しグラフ:

呼出しグラフ:

static void decrease_insults ( void  )
static

店主の不満度を減らす / Decrease insults -RAK-

戻り値
プレイヤーを締め出す場合TRUEを返す

呼出しグラフ:

static void display_entry ( int  pos)
static

店の商品リストを再表示する / Re-displays a single store entry

引数
pos表示行
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void display_inventory ( void  )
static

店の商品リストを表示する / Displays a store's inventory -RAK-

戻り値
なし

All prices are listed as "per individual object". -BEN-

関数の呼び出しグラフ:

呼出しグラフ:

static void display_store ( void  )
static

店舗情報全体を表示するメインルーチン / Displays store (after clearing screen) -RAK-

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

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).
    

関数の呼び出しグラフ:

呼出しグラフ:

static int get_haggle ( cptr  pmt,
s32b poffer,
s32b  price,
int  final 
)
static

交渉価格を確認と認証の是非を行う / Get a haggle

引数
pmtメッセージ
poffer別途価格提示をした場合の値を返す参照ポインタ
price現在の交渉価格
final最終確定価格ならばTRUE
戻り値
プレイヤーを締め出す場合TRUEを返す

関数の呼び出しグラフ:

呼出しグラフ:

static int get_stock ( int *  com_val,
cptr  pmt,
int  i,
int  j 
)
static

店舗からアイテムを選択する / Get the ID of a store item and return its value -RAK-

引数
com_val選択IDを返す参照ポインタ
pmtメッセージキャプション
i選択範囲の最小値
j選択範囲の最大値
戻り値
実際に選択したらTRUE、キャンセルしたらFALSE

関数の呼び出しグラフ:

呼出しグラフ:

static int haggle_insults ( void  )
static

店主の不満度が増えた場合のみのメッセージを表示する / Have insulted while haggling -RAK-

戻り値
プレイヤーを締め出す場合TRUEを返す

関数の呼び出しグラフ:

呼出しグラフ:

static int home_carry ( object_type o_ptr)
static

我が家にオブジェクトを加える / Add the item "o_ptr" to the inventory of the "Home"

引数
o_ptr加えたいオブジェクトの構造体参照ポインタ
戻り値
収めた先のID
In all cases, return the slot (or -1) where the object was placed
Note that this is a hacked up version of "inven_carry()".
Also note that it may not correctly "adapt" to "knowledge" bacoming
known, the player may have to pick stuff up and drop it again.

関数の呼び出しグラフ:

呼出しグラフ:

static int increase_insults ( void  )
static

店主の不満度を増やし、プレイヤーを締め出す判定と処理を行う / Increase the insult counter and get angry if too many -RAK-

戻り値
プレイヤーを締め出す場合TRUEを返す

関数の呼び出しグラフ:

呼出しグラフ:

static bool is_blessed ( object_type o_ptr)
static

オブジェクトが祝福されているかの判定を返す /

引数
o_ptr判定したいオブジェクト構造体の参照ポインタ
戻り値
アイテムが祝福されたアイテムならばTRUEを返す

関数の呼び出しグラフ:

呼出しグラフ:

static void mass_produce ( object_type o_ptr)
static

安価な消耗品の販売数を増やし、低確率で割引にする / Certain "cheap" objects should be created in "piles"

引数
o_ptr店舗に並べるオブジェクト構造体の参照ポインタ
戻り値
なし
Some objects can be sold at a "discount" (in small piles)

関数の呼び出しグラフ:

呼出しグラフ:

void move_to_black_market ( object_type o_ptr)

アイテムを町のブラックマーケットに移動させる /

引数
o_ptr移動させたいオブジェクトの構造体参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

static void museum_remove_object ( void  )
static

博物館のアイテムを除去するコマンドのメインルーチン / Remove an item from museum (Originally from TOband)

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool noneedtobargain ( s32b  minprice)
static

店舗の割引対象外にするかどうかを判定 / Eliminate need to bargain if player has haggled well in the past

引数
minpriceアイテムの最低販売価格
戻り値
割引を禁止するならTRUEを返す。

呼出しグラフ:

static s32b price_item ( object_type o_ptr,
int  greed,
bool  flip 
)
static

店舗価格を決定する / Determine the price of an item (qty one) in a store.

引数
o_ptr店舗に並べるオブジェクト構造体の参照ポインタ
greed店主の強欲度
flipTRUEならば店主にとっての買取価格、FALSEなら売出価格を計算
戻り値
なし
This function takes into account the player's charisma, and the
shop-keepers friendliness, and the shop-keeper's base greed, but
never lets a shop-keeper lose money in a transaction.
The "greed" value should exceed 100 when the player is "buying" the
item, and should be less than 100 when the player is "selling" it.
Hack – the black market always charges twice as much as it should.
Charisma adjustment runs from 80 to 130
Racial adjustment runs from 95 to 130
Since greed/charisma/racial adjustments are centered at 100, we need
to adjust (by 200) to extract a usable multiplier.  Note that the
"greed" value is always something (?).

関数の呼び出しグラフ:

呼出しグラフ:

static void purchase_analyze ( s32b  price,
s32b  value,
s32b  guess 
)
static

店主が交渉を終えた際の反応を返す処理 / Let a shop-keeper React to a purchase

引数
priceアイテムの取引額
valueアイテムの実際価値
guess店主が当初予想していた価値
戻り値
なし

We paid "price", it was worth "value", and we thought it was worth "guess"

関数の呼び出しグラフ:

呼出しグラフ:

static bool purchase_haggle ( object_type o_ptr,
s32b price 
)
static

プレイヤーが購入する時の値切り処理メインルーチン / Haggling routine -RAK-

引数
o_ptrオブジェクトの構造体参照ポインタ
price最終価格を返す参照ポインタ
戻り値
プレイヤーの価格に対して店主が不服ならばTRUEを返す / Return TRUE if purchase is NOT successful

関数の呼び出しグラフ:

呼出しグラフ:

static bool receive_offer ( cptr  pmt,
s32b poffer,
s32b  last_offer,
int  factor,
s32b  price,
int  final 
)
static

店主がプレイヤーからの交渉価格を判断する / Receive an offer (from the player)

引数
pmtメッセージ
poffer店主からの交渉価格を返す参照ポインタ
last_offer現在の交渉価格
factor店主の価格基準倍率
priceアイテムの実価値
final最終価格確定ならばTRUE
戻り値
プレイヤーの価格に対して不服ならばTRUEを返す / Return TRUE if offer is NOT okay

関数の呼び出しグラフ:

呼出しグラフ:

static void say_comment_1 ( void  )
static

取引成功時の店主のメッセージ処理 / Successful haggle.

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void say_comment_2 ( s32b  value,
int  annoyed 
)
static

プレイヤーがアイテムを買う時の価格代案メッセージ処理 / Continue haggling (player is buying)

引数
value店主の提示価格
annoyed店主のいらつき度
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void say_comment_3 ( s32b  value,
int  annoyed 
)
static

プレイヤーがアイテムを売る時の価格代案メッセージ処理 / Continue haggling (player is selling)

引数
value店主の提示価格
annoyed店主のいらつき度
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void say_comment_4 ( void  )
static

店主がプレイヤーを追い出す時のメッセージ処理 / Kick 'da bum out.

                -RAK-
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void say_comment_5 ( void  )
static

店主がプレイヤーに取り合わない時のメッセージ処理 / You are insulting me

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void say_comment_6 ( void  )
static

店主がプレイヤーの提示を理解できなかった時のメッセージ処理 / That makes no sense.

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool sell_haggle ( object_type o_ptr,
s32b price 
)
static

プレイヤーが売却する時の値切り処理メインルーチン / Haggling routine -RAK-

引数
o_ptrオブジェクトの構造体参照ポインタ
price最終価格を返す参照ポインタ
戻り値
プレイヤーの価格に対して店主が不服ならばTRUEを返す / Return TRUE if purchase is NOT successful

関数の呼び出しグラフ:

呼出しグラフ:

static int store_carry ( object_type o_ptr)
static

店舗にオブジェクトを加える / Add the item "o_ptr" to a real stores inventory.

引数
o_ptr加えたいオブジェクトの構造体参照ポインタ
戻り値
収めた先のID
In all cases, return the slot (or -1) where the object was placed
Note that this is a hacked up version of "inven_carry()".
Also note that it may not correctly "adapt" to "knowledge" bacoming
known, the player may have to pick stuff up and drop it again.

関数の呼び出しグラフ:

呼出しグラフ:

static int store_check_num ( object_type o_ptr)
static

店舗に品を置くスペースがあるかどうかの判定を返す / Check to see if the shop will be carrying too many objects -RAK-

引数
o_ptr店舗に置きたいオブジェクト構造体の参照ポインタ
戻り値
置き場がないなら0、重ね合わせできるアイテムがあるなら-1、スペースがあるなら1を返す。
Note that the shop, just like a player, will not accept things
it cannot hold. Before, one could "nuke" potions this way.
Return value is now int:
 0 : No space
-1 : Can be combined to existing slot.
 1 : Cannot be combined but there are empty spaces.

関数の呼び出しグラフ:

呼出しグラフ:

static void store_create ( void  )
static

店舗の品揃え変化のためにアイテムを追加する / Creates a random item and gives it to a store

戻り値
なし
This algorithm needs to be rethought.  A lot.
Currently, "normal" stores use a pre-built array.
Note – the "level" given to "obj_get_num()" is a "favored"
level, that is, there is a much higher chance of getting
items with a level approaching that of the given level...
Should we check for "permission" to have the given item?

関数の呼び出しグラフ:

呼出しグラフ:

static void store_delete ( void  )
static

店舗の品揃え変化のためにアイテムを削除する / Attempt to delete (some of) a random item from the store

戻り値
なし
Hack – we attempt to "maintain" piles of items when possible.

関数の呼び出しグラフ:

呼出しグラフ:

static void store_examine ( void  )
static

店のアイテムを調べるコマンドのメインルーチン / Examine an item in a store -JDL-

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void store_init ( int  town_num,
int  store_num 
)

店舗情報を初期化する / Initialize the stores

引数
town_num町のID
store_num店舗種類のID
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void store_item_increase ( int  item,
int  num 
)
static

店舗のオブジェクト数を増やす / Add the item "o_ptr" to a real stores inventory.

引数
item増やしたいアイテムのID
num増やしたい数
戻り値
なし
Increase, by a given amount, the number of a certain item
in a certain store. This can result in zero items.

呼出しグラフ:

static void store_item_optimize ( int  item)
static

店舗のオブジェクト数を削除する / Remove a slot if it is empty

引数
item削除したいアイテムのID
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void store_maint ( int  town_num,
int  store_num 
)

店の品揃えを変化させる / Maintain the inventory at the stores.

引数
town_num町のID
store_num店舗種類のID
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void store_object_absorb ( object_type o_ptr,
object_type j_ptr 
)
static

店舗に並べた品を重ね合わせできるかどうか判定する / Allow a store item to absorb another item

引数
o_ptr判定するオブジェクト構造体の参照ポインタ1
j_ptr判定するオブジェクト構造体の参照ポインタ2
戻り値
重ね合わせできるならTRUEを返す
See "object_similar()" for the same function for the "player"

呼出しグラフ:

static bool store_object_similar ( object_type o_ptr,
object_type j_ptr 
)
static

店舗に並べた品を同一品であるかどうか判定する / Determine if a store item can "absorb" another item

引数
o_ptr判定するオブジェクト構造体の参照ポインタ1
j_ptr判定するオブジェクト構造体の参照ポインタ2
戻り値
同一扱いできるならTRUEを返す
See "object_similar()" for the same function for the "player"

関数の呼び出しグラフ:

呼出しグラフ:

static void store_process_command ( void  )
static

店舗処理コマンド選択のメインルーチン / Process a command in a store

戻り値
なし
覚え書き
Note that we must allow the use of a few "special" commands
in the stores which are not allowed in the dungeon, and we
must disable some commands which are allowed in the dungeon
but not in the stores, to prevent chaos.

関数の呼び出しグラフ:

呼出しグラフ:

static void store_prt_gold ( void  )
static

プレイヤーの所持金を表示する / Displays players gold -RAK-

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void store_purchase ( void  )
static

店からの購入処理のメインルーチン / Buy an item from a store -RAK-

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void store_sell ( void  )
static

店からの売却処理のメインルーチン / Sell an item to the store (or home)

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void store_shuffle ( int  which)

現在の町の店主を交代させる / Shuffle one of the stores.

引数
which店舗種類のID
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool store_will_buy ( object_type o_ptr)
static

オブジェクトが所定の店舗で引き取れるかどうかを返す / Determine if the current store will purchase the given item

引数
o_ptr判定したいオブジェクト構造体の参照ポインタ
戻り値
アイテムが買い取れるならばTRUEを返す
覚え書き
Note that a shop-keeper must refuse to buy "worthless" items

関数の呼び出しグラフ:

呼出しグラフ:

static void updatebargain ( s32b  price,
s32b  minprice,
int  num 
)
static

店主の持つプレイヤーに対する売買の良し悪し経験を記憶する / Update the bargain info

引数
price実際の取引価格
minprice店主の提示した価格
num売買数
戻り値
なし

呼出しグラフ:

変数

bool allow_inc = FALSE
static
cptr comment_1[MAX_COMMENT_1]
static
初期値:
=
{
"Okay.",
"Fine.",
"Accepted!",
"Agreed!",
"Done!",
"Taken!"
}
cptr comment_2a[MAX_COMMENT_2A]
static
初期値:
=
{
"You try my patience. %s is final.",
"My patience grows thin. %s is final."
}
cptr comment_2b[MAX_COMMENT_2B]
static
cptr comment_3a[MAX_COMMENT_3A]
static
初期値:
=
{
"You try my patience. %s is final.",
"My patience grows thin. %s is final."
}
cptr comment_3b[MAX_COMMENT_3B]
static
cptr comment_4a[MAX_COMMENT_4A]
static
初期値:
=
{
"Enough! You have abused me once too often!",
"Arghhh! I have had enough abuse for one day!",
"That does it! You shall waste my time no more!",
"This is getting nowhere! I'm going to Londis!"
}
cptr comment_4b[MAX_COMMENT_4B]
static
初期値:
=
{
"Leave my store!",
"Get out of my sight!",
"Begone, you scoundrel!",
"Out, out, out!"
}
cptr comment_5[MAX_COMMENT_5]
static
初期値:
=
{
"Try again.",
"Ridiculous!",
"You will have to do better than that!",
"Do you wish to do business or not?",
"You've got to be kidding!",
"You'd better be kidding!",
"You try my patience.",
"Hmmm, nice weather we're having."
}
cptr comment_6[MAX_COMMENT_6]
static
初期値:
=
{
"I must have heard you wrong.",
"I'm sorry, I missed that.",
"I'm sorry, what was that?",
"Sorry, what was that again?"
}
cptr comment_7a[MAX_COMMENT_7A]
static
初期値:
=
{
"Arrgghh!",
"You bastard!",
"You hear someone sobbing...",
"The shopkeeper howls in agony!"
}
cptr comment_7b[MAX_COMMENT_7B]
static
初期値:
=
{
"Damn!",
"You fiend!",
"The shopkeeper curses at you.",
"The shopkeeper glares at you."
}
cptr comment_7c[MAX_COMMENT_7C]
static
初期値:
=
{
"Cool!",
"You've made my day!",
"The shopkeeper giggles.",
"The shopkeeper laughs loudly."
}
cptr comment_7d[MAX_COMMENT_7D]
static
初期値:
=
{
"Yipee!",
"I think I'll retire!",
"The shopkeeper jumps for joy.",
"The shopkeeper smiles gleefully."
}
int cur_store_feat
static
int cur_store_num = 0
static
s16b inner_town_num = 0
static
s32b last_inc = 0L
static
bool leave_store = FALSE
static
s16b old_town_num = 0
static
const owner_type* ot_ptr = NULL
static
byte rgold_adj[MAX_RACES][MAX_RACES]
static
store_type* st_ptr = NULL
static
int store_bottom = 0
static
int store_top = 0
static
int xtra_stock = 0
static