fix #H4072 - alchemy bugs

The 3.6.0 feature of dipping only a subset when attempting to dip a large
stack of potions into another potion (other than water) was calculating
the size of the subset poorly.  Dipping 9 non-magic potions would always
dip the whole stack, but attempting to dip 10 would split the stack and
dip 2..9, so manually splitting off 9 in advance let the player always
get maximum yield.  This anomaly didn't extend to dipping magic potions,
where dipping 2 always dipped "all" 2 and attempting to dip 3..N dipped
2..min(N,9) regardless of N.  Also, the decision about whether what you
were dipping was magic was based on the potion being dipped even though
most alchemy formulas yield the same outcome when dipping magic potion
into non-magic or vice versa.

Change the splitting calculation to yield 3..min(N,8) for magic and 7..N
for non-magic, with no extra threshold that can produce anomalies in the
result.  Also, the determination of magic vs non-magic is based on the
outcome rather than either of the inputs--unless the outcome is random,
in which case it will be treated as magic if either of the input potions
is magic.
This commit is contained in:
PatR
2015-12-20 17:17:48 -08:00
parent 40ad82ed77
commit b66b5ee6c3
2 changed files with 25 additions and 16 deletions

View File

@@ -48,6 +48,8 @@ sceptre of might database entry word change
avoid "spellbook of novel" on discoveries list after object ID of novel
add novel to discoveries list after reading one
putting gold into hero-owned container on shop floor gave free credit
stack splitting for dipping large quantities of potions was done poorly
dipping fruit juice into enlightenment gave different result than the inverse
Platform- and/or Interface-Specific Fixes