Pikemen and Halberdiers take no extra damage from Cavalry

I am doing some jsons and the first creature were pikeman. When Ivan remarked that there is no ability field for the creature it stuck me:

“Pikemen and Halberdiers take no extra damage from Cavalry and Champion’s jousting bonus”

In code I find no trace of this. Is it a bug?

There is CHARGE_IMMUNITY ability:


AT the end of CCreatureHandler::loadLegacyData() the ability is not there for pikemen and unicorns but green dragons for EG, have abilities already loaded… Is it added somewhere later?

Maybe it’s bug and VCMI creators forgot to add ability?

krs, loadLegacyData() loads data from h3 txt’s including some of abilities. Remaining part is loaded from VCMI json configs.

To get complete data you need to merge data from loadLegacy with one of vcmi config files. This is done inside mod handler and then passed to CCreatureHandler::load(). This is where you can get access to compete data including all abilities.