nethack.rankin
c98133ac80
calculating shop price adjustments (trunk only)
...
Fix the second of a couple of minor things I noticed when viewing
that guy's ttyrec about a hidden inventory item which turned out to be
scrolls of scare monster on the used-up items section of his shop bill.
He had a lot of scroll prices which started as $X00 and were changed
to $Y99 due to integer division roundoff when being hit with a 1/3 price
increase for unID'd items followed by 1/2 price increase for low charisma:
100 -> 133 -> 199
200 -> 266 -> 399
Forcing things to round up instead of truncate would help in some cases
but yield $Z01 in others. Rather than doing that, this accumulates the
adjustment factors and then uses them to make one calculation which gives
a better result:
100 -> 200
200 -> 400
Other values and/or other adjustments might not work out so well, but I
don't think they'll ever become prices which look worse than before.
For a single increase of 1/3, 100 still yields 133 but 200 now gives 267
(so ends up differing from the combined price for two 100->133 items).
2011-07-23 03:57:09 +00:00
..
2002-01-18 02:50:06 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2011-05-10 02:32:37 +00:00
2011-04-08 02:20:56 +00:00
2011-02-17 03:51:04 +00:00
2009-05-06 10:45:32 +00:00
2011-04-24 02:53:52 +00:00
2009-05-06 10:50:32 +00:00
2011-04-29 02:06:11 +00:00
2009-05-06 10:50:32 +00:00
2011-01-16 01:29:18 +00:00
2009-05-06 10:50:32 +00:00
2009-08-22 00:02:09 +00:00
2010-01-10 02:18:28 +00:00
2009-05-06 10:50:32 +00:00
2011-01-25 13:30:23 +00:00
2011-03-05 10:09:48 +00:00
2011-07-16 03:41:46 +00:00
2011-04-15 01:55:42 +00:00
2009-05-06 10:50:32 +00:00
2011-01-16 01:29:18 +00:00
2011-02-09 01:05:29 +00:00
2009-05-06 10:50:32 +00:00
2010-04-29 19:19:32 +00:00
2010-07-02 01:49:51 +00:00
2011-04-25 03:29:49 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2009-05-28 14:09:30 +00:00
2010-01-10 02:35:19 +00:00
2011-04-23 01:37:30 +00:00
2009-05-06 10:50:32 +00:00
2010-12-30 21:47:06 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2011-02-03 21:49:36 +00:00
2009-05-06 10:50:32 +00:00
2011-04-21 00:29:26 +00:00
2009-05-06 10:50:32 +00:00
2011-03-15 02:25:28 +00:00
2011-04-07 20:59:40 +00:00
2011-07-17 09:19:17 +00:00
2009-05-06 10:50:32 +00:00
2010-08-17 14:11:39 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2011-04-09 00:30:59 +00:00
2009-05-06 10:50:32 +00:00
2011-01-16 01:29:18 +00:00
2011-04-07 18:10:47 +00:00
2009-06-30 02:45:46 +00:00
2010-05-13 00:54:13 +00:00
2009-05-06 10:50:32 +00:00
2011-02-17 03:51:04 +00:00
2009-05-06 10:50:32 +00:00
2009-12-17 02:51:03 +00:00
2009-05-06 10:50:32 +00:00
2011-04-07 20:59:40 +00:00
2010-03-01 03:27:33 +00:00
2011-04-25 03:29:49 +00:00
2010-01-15 19:54:37 +00:00
2011-04-09 00:30:59 +00:00
2009-05-06 10:50:32 +00:00
2011-03-01 13:39:59 +00:00
2011-03-03 10:23:47 +00:00
2011-03-05 10:09:48 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2011-03-01 12:15:51 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2009-10-21 03:16:02 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2009-10-21 03:16:02 +00:00
2011-07-23 03:57:09 +00:00
2011-04-15 01:55:42 +00:00
2010-01-07 17:51:35 +00:00
2010-12-14 01:14:37 +00:00
2011-01-05 01:28:36 +00:00
2011-03-05 20:32:37 +00:00
2011-07-09 02:56:38 +00:00
2011-07-16 03:41:46 +00:00
2010-05-13 00:54:13 +00:00
2011-04-20 23:46:33 +00:00
2009-05-06 10:50:32 +00:00
2010-12-28 19:43:01 +00:00
2009-05-06 10:50:32 +00:00
2011-04-21 23:45:02 +00:00
2009-05-06 10:50:32 +00:00
2011-04-07 20:59:40 +00:00
2010-02-06 01:58:33 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2011-02-11 02:25:59 +00:00
2011-02-28 11:29:27 +00:00
2009-05-06 10:50:32 +00:00
2011-04-19 02:02:11 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2009-05-06 10:50:32 +00:00
2010-12-28 19:54:41 +00:00
2011-03-15 14:11:55 +00:00