Campaign support in VCMI

If this will not force all heroes to have this “cant use spells”. than why not?
It will help to make pure barbarians for mods also.

I through it out.

I think there is no reason for new fields.
I propose to extend usage of “affinity”.
Let it accept several meanings like “might”, “magic”, “neutral” (50%/50%), “onlyMight”, “onlyMagic”.

I think we can have a dev build for our testers right now. It would be great if someone could test campaigns and check if every scenario can be played and what things are handled differently. Perhaps one tester could test all RoE campaigns and someone else SoD campaigns and check if everything works as expected.

For smaller campaign bugs like Yog handling we can have a single mantis ticket. I would like to do a few minor things for campaigns in the next days and then we can provide a additional dev build, no problem for me.

I’d rather wait for a one-two days more till I’ll commit my changeset. Will try to do this tomorrow (or should I say “today” already?) - just want to test it myself first a bit more.

Right now I’m pretty much finished converting current win/loss system to new one based on logical expressions. This also means that it will be better to recheck all win/loss conditions from H3 just in case I broke something.

Now to campaigns:
All I done so far is set of internal changes. To implement special victory conditions for campaigns I still need:

  • Some way to override part of map loading (or to just overwrite loaded H3M data)
  • Computer-readable victory conditions using format from wiki (right now - only on my page, probably should be copied to map format). Writing them may take some time.

Notes on AI:
AI “understands” my changes but some bits are still missing:

  • some victory conditions are still not handled like “improve town”.
  • AI will focus on 1st goal that it will find. So in case of “find artifact or defeat enemies” he always focuses on “find artifact” part.
    I’m leaving both of these to Warmonger. I largely rewrote Win::whatToDoToAchieve() and marked all places that need changes.