MantisBT - VCMI
View Issue Details
0001266VCMIMechanics - Battlespublic2013-05-20 12:502018-03-27 08:01
Ivan 
hkoehler 
normalminoralways
closedfixed 
 
 
0001266: Battle-wide bonuses of upgrades do not stack with downgrades.
Check screenshot. My army consists from 4 stacks:
2 stacks of bone dragons
2 stacks of ghost dragons

H3 behaviour here is -1 morale no matter how many stacks hero army has (usually compensated by same alignment bonus).
This means that:
[FIXED] 1) No bonuses stacking from _same_ creatures (for some reason works correctly for Ghost D. but not for Bone D.)
2) Battle-wide bonuses of upgrades do not stack with downgrades. Same goes to Angel + Archangel and Devils + Archdevils bonuses.
No tags attached.
related to 0002841closed Ivan Spirit of oppression - incorrect work 
parent of 0002517closed hkoehler Bonuses: angels and archangels give separate +1 morale 
parent of 0002608closed AVS Double morale bonus from angels and archangels 
related to 0002919resolved hkoehler Army lose creature bonuses like Archangels morale +1 after stacks are joined 
png stackydragons.png (979,845) 2013-05-20 12:50
https://bugs.vcmi.eu/file_download.php?file_id=1264&type=bug
png
Issue History
2013-05-20 12:50IvanNew Issue
2013-05-20 12:50IvanFile Added: stackydragons.png
2013-05-20 13:03IvanDescription Updatedbug_revision_view_page.php?rev_id=2187#r2187
2013-05-20 17:44TowNote Added: 0003544
2013-05-25 11:02IvanNote Added: 0003554
2013-05-25 11:03IvanSummaryBonuses from different groups of same creatures stack => Battle-wide bonuses of upgrades do not stack with downgrades.
2013-05-25 11:03IvanDescription Updatedbug_revision_view_page.php?rev_id=2190#r2190
2016-09-25 19:37WarmongerRelationship addedparent of 0002517
2017-08-06 11:38AnubisNote Added: 0007216
2017-08-09 22:51AVSNote Added: 0007221
2017-08-09 23:06AVSRelationship addedparent of 0002608
2018-03-17 08:19hkoehlerRelationship addedrelated to 0002919
2018-03-17 08:19hkoehlerAssigned To => hkoehler
2018-03-17 08:19hkoehlerStatusnew => assigned
2018-03-19 12:37PovelitelNote Added: 0007523
2018-03-19 12:37PovelitelRelationship addedrelated to 0002841
2018-03-19 13:07AVSNote Added: 0007524
2018-03-27 08:01hkoehlerNote Added: 0007552
2018-03-27 08:01hkoehlerStatusassigned => closed
2018-03-27 08:01hkoehlerResolutionopen => fixed

Notes
(0003544)
Tow   
2013-05-20 17:44   
As for the Bone Dragon: isn't this yet another duplicated bonus? (both in ZCRTRAIT and in .JSON)

***

Tough one.
The -1 morale modifier nneds to be in a single bonus system node that is parent both to Bone Dragons and Ghost Dragons.

I'm not sure how this should be done. I think about some custom step in creature handler after loading creatures that goes over sets of creatures that are in upgrade/downgrade transitive relation and:
* checks if all creatures in the group share the same bonus(es). For efficiency this can be limited to bonuses with propagators / ONLY_ENEMY_ARMY range (that range should be propgator actually…)
* if they do, create a new bonus node, put shared bonuses in there. Attach all creatures to that node.

(Plus tweaking the ONLY_ENEMY_ARMY workaround but that won't be hard.)
(0003554)
Ivan   
2013-05-25 11:02   
Bone dragons should be OK now. Editing report a bit to match current situation.
(0007216)
Anubis   
2017-08-06 11:38   
Can I add some information about current behaviour?
Right now the bonuses from 2 different grades of units (Angels/Archangels, Devils/Archdevils, Bone/Ghost Dragons) do stack, so +2 to Morale (or -2 to Luck/Morale respectively) is applied. That's not correct.

However, this is different for Pegasi/Magi (neither bonuses/debuffs from 2 different grades nor different unit stacks work), so their interactions (spell cost decrease/increase) are correct.
(0007221)
AVS   
2017-08-09 22:51   
@Anubis, bonus calculation for Pegasi/Magi is hardcoded as special case (for other reason) that`s why they are not affected by this bug.
(0007523)
Povelitel   
2018-03-19 12:37   
I think 2841 also has a connection...
(0007524)
AVS   
2018-03-19 13:07   
2841 is completely different issue, BLOCK_MORALE bonus just block any moral calculation
(0007552)
hkoehler   
2018-03-27 08:01   
fixed with bonus stacking.