Just some things I spotted, not sure if any of them are causing problems or not...
In CvUnit.cpp, around line 609...
Code:
// ELM / Warhammer Mod / 12th August 2006
// Animosity
CyUnit* pyUnit = new CyUnit(this);
CyArgsList pyArgs;
pyArgs.add(gDLL->getPythonIFace()->makePythonObject(pyUnit));
gDLL->getEventReporterIFace()->genericEvent("endUnitTurn", pyArgs.makeFunctionArgs());
//ELM End
Don't forget to:
afterwords! Otherwise, the pointer variable is deleted when it goes out of scope and the memory is leaked. You might want to check any other events you've created, just in case.
---
I am getting a ton of Assertion failures over anyplace where there's a check for UNITAI types. This is probably from Spellbook and Wizard being added to the list of UNITAI types in CvEnums. Anywhere where there's:
Code:
switch (AI_getUnitAIType())
and no mention of the new types it hits it's default case and throws an assert, which although shouldn't do anything bad it annoys me since it pops up the assertion 20-some times every turn, and I'm not one to ignore assertions
---
When checking for promotions ( the Animosity.py, around line 175) there are a few getInfoTypeForString messages that are sometimes having an empty string passed in, throwing an assert. Perhaps you can make sure that the strings returned from getProtagonist1, 2, & 3 are not empty before calling getInfoTypeForString? Otherwise, that function is being called many times without it needing to be (and each time throwing an assertion... I stopped counting after 200

)
---
The assertion error is being thrown on CvUnit.cpp 9959 (CvUnit::animosityAttack).
Code:
FAssert(canMoveInto(pPlot, true, false, true));
The reason the unit couldn't move into the plot is because the pCurrPlot and pPlot were the same plot. When you check for if the plot's valid in python, are you checking to make sure that the plots aren't the same?