diff options
author | miramor <danlev@norwoodlight.com> | 2015-03-22 14:18:10 -0400 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-03-23 17:34:03 +0100 |
commit | 0a66e1537dc7bb5500d7bf2203144ea44b167f45 (patch) | |
tree | ce22466f84dfb580748c1c744ea3e0cf564a64ce /src/store.cc | |
parent | 7d5abc9c35e080555d1841234497ad1b06528f3a (diff) |
Add a no-selling birth option
Diffstat (limited to 'src/store.cc')
-rw-r--r-- | src/store.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/store.cc b/src/store.cc index 1a26f536..195598f1 100644 --- a/src/store.cc +++ b/src/store.cc @@ -297,6 +297,9 @@ static s32b price_item(object_type *o_ptr, int greed, bool_ flip) /* Mega-Hack -- Black market sucks */ if (st_info[st_ptr->st_idx].flags1 & SF1_ALL_ITEM) price = price / 2; + + /* No selling means you get no money */ + if (no_selling) price = 0; } /* Shop is selling */ @@ -310,14 +313,14 @@ static s32b price_item(object_type *o_ptr, int greed, bool_ flip) /* Mega-Hack -- Black market sucks */ if (st_info[st_ptr->st_idx].flags1 & SF1_ALL_ITEM) price = price * 2; + + /* Never give items away for free */ + if (price <= 0L) price = 1L; } /* Compute the final price (with rounding) */ price = (price * adjust + 50L) / 100L; - /* Note -- Never become "free" */ - if (price <= 0L) return (1L); - /* Return the price */ return (price); } |