version 1.55 | | version 1.56 |
---|
| | |
/* | | /* |
* static char *rcsid_shop_c = | | * static char *rcsid_shop_c = |
* "$Id: shop.c,v 1.55 2006/07/25 19:14:24 tchize Exp $"; | | * "$Id: shop.c,v 1.56 2006/08/07 07:22:19 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
static double shop_specialisation_ratio(const object *item, const mapstruct *map); | | static double shop_specialisation_ratio(const object *item, const mapstruct *map); |
static double shop_greed(const mapstruct *map); | | static double shop_greed(const mapstruct *map); |
| | |
#define NUM_COINS 3 /* number of coin types */ | | #define NUM_COINS 5 /* number of coin types */ |
static const char* const coins[] = {"platinacoin", "goldcoin", "silvercoin", NULL}; | | #define LARGEST_COIN_GIVEN 2 /* never give amber or jade, but accept them */ |
| | static const char* const coins[] = {"ambercoin", "jadecoin","platinacoin", "goldcoin", "silvercoin", NULL}; |
| | |
/* Added F_TRUE flag to define.h to mean that the price should not | | /* Added F_TRUE flag to define.h to mean that the price should not |
* be adjusted by players charisma. With F_TRUE, it returns the amount | | * be adjusted by players charisma. With F_TRUE, it returns the amount |
| | |
static char buf[MAX_BUF]; | | static char buf[MAX_BUF]; |
archetype *coin, *next_coin; | | archetype *coin, *next_coin; |
char *endbuf; | | char *endbuf; |
int num, cointype = 0; | | int num; |
| | int cointype = LARGEST_COIN_GIVEN; |
| | |
coin = find_next_coin(cost, &cointype); | | coin = find_next_coin(cost, &cointype); |
if (coin == NULL) | | if (coin == NULL) |
| | |
if (!idskill2 || !find_skill_by_number(who, idskill2)) { | | if (!idskill2 || !find_skill_by_number(who, idskill2)) { |
if (!find_skill_by_number(who,SK_BARGAINING)) { | | if (!find_skill_by_number(who,SK_BARGAINING)) { |
static char buf[MAX_BUF]; | | static char buf[MAX_BUF]; |
int num, cointype = 0; | | int num; |
| | int cointype = LARGEST_COIN_GIVEN; |
archetype *coin = find_next_coin(real_value, &cointype); | | archetype *coin = find_next_coin(real_value, &cointype); |
| | |
if (coin == NULL) return "nothing"; | | if (coin == NULL) return "nothing"; |