MantisBT - VCMI
View Issue Details
0002778VCMIOtherpublic2017-08-27 02:152017-08-29 07:02
normalminorhave not tried
0002778: INDEPENDENT_MIN and INDEPENDENT_MAX logics are a mess
Currently we allow mixing of INDEPENDENT_MIN, INDEPENDENT_MAX and other value types. The result is a mess (see BonusList::totalValue).
Should log error when encountering combination of different value types (maybe also change logic). Then add new value types LOWER_BOUND and UPPER_BOUND.
No tags attached.
Issue History
2017-08-27 02:15hkoehlerNew Issue
2017-08-29 06:40WarmongerNote Added: 0007242
2017-08-29 06:52hkoehlerNote Added: 0007243
2017-08-29 06:53hkoehlerNote Edited: 0007243bug_revision_view_page.php?bugnote_id=7243#r3389
2017-08-29 06:53hkoehlerNote Edited: 0007243bug_revision_view_page.php?bugnote_id=7243#r3390
2017-08-29 07:02hkoehlerNote Edited: 0007243bug_revision_view_page.php?bugnote_id=7243#r3391

2017-08-29 06:40   
But what you propose? LOWER_BOUND and UPPER_BOUND would be just renamed INDEPENDENT_MIn and INDEPENDENT_MAX.

Current formula takes all possibilities into consideration, as it's descibed on Wiki: [^]
2017-08-29 06:52   
(edited on: 2017-08-29 07:02)
The way the wiki describes it would be sensible, however:
* Currently INDEPENDENT_MIN is the maximum value taken and INDEPENDENT_MAX the minimum value, which is fairly confusing UNLESS you never mix them with other bonuses (as I was told is current practice). Here renaming would help stave off confusion (we might have to introduce a mapping to deal with usage in existing mods).
* The actual implementation does not follow the wiki. There's an assertion that INDEPENDENT_MIN < INDEPENDENT_MAX which should be the other way around (someone got confused already), and if no non-independent bonuses are present (i.e., the "normal" case) then it's different from having a non-independent bonus of 0.