diff options
author | B. Watson <yalhcru@gmail.com> | 2021-03-27 10:17:25 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2021-03-27 10:17:25 -0400 |
commit | 7c439dc0c032792749beefe5590632cab8377c43 (patch) | |
tree | e54fb4ff7a7748c3c822c33a02cc93bb4cec7905 | |
parent | 3d61fe0383c6d35f774b18913f8a1e6c01f1d121 (diff) | |
download | taipan-7c439dc0c032792749beefe5590632cab8377c43.tar.gz |
Make set_prices() more like Apple version
-rw-r--r-- | taipan.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -401,10 +401,13 @@ unsigned long cash = 0, unsigned long price[4]; -const int base_price[4][8] = { {1000, 11, 16, 15, 14, 12, 10, 13}, - {100, 11, 14, 15, 16, 10, 13, 12}, - {10, 12, 16, 10, 11, 13, 14, 15}, - {1, 10, 11, 12, 13, 14, 15, 16} }; +const int base_price[4][8] = { + /* each row: first number is base price, the rest are + multiplier at each port (1-7) */ + {1000, 11, 16, 15, 14, 12, 10, 13}, /* opium */ + {100, 11, 14, 15, 16, 10, 13, 12}, /* silk */ + {10, 12, 16, 10, 11, 13, 14, 15}, /* arms */ + {1, 10, 11, 12, 13, 14, 15, 16} }; /* general */ /* hkw_ is the warehouse, hold_ is how much of each item is in your hold. both need to be unsigned (makes no sense to @@ -1637,7 +1640,7 @@ void cash_or_guns(void) { void set_prices(void) { char i; for(i = 0; i < 4; ++i) - price[i] = base_price[i][port] / 2 * rand1to3() * base_price[i][0]; + price[i] = (base_price[i][port] * rand1to3() * base_price[i][0]) / 2; } unsigned int warehouse_in_use() { |