Yeah, I thought about the auto-delete of SpecialUnit_Spell after I posted that. The function responsible will be deleted for next patch, there is no point in it since SpecialUnit already prevents any enhanced duration.
Good. Can you tell me where it is so that I can go and delete it myself for my tests?
Why did you invent a new unitcombat? Seems a wasted move, unless you are also creating special promotions for them, or some anti-unitcombat capabilities on other promotions/units to counter them. And I am not sure what the point of assigning it 0 fire damage is, that won't do anything at all.
The promotion has Autoaquire. So, I have to specify a unitcombat to autoaquire it, right? If I leave it blank, then all default unitcombats will be able to get it(?). This is what I thought.
The Fire damage 0 was just left there when doing some tests with Fire Damage 1, then put it to 0 again...
Not sure why the promotion isn't removing itself, you have the MustMaintain listed, so that should set everything up automatically.
As for Change/Alter Duration working wierd, those ones are a bit strange if you apply them before the spell applies the duration to the unit (ie - have them as a starting promotion for the unit, or have them AutoAcquire with prereqs which are met instantly upon creation). The spell forces a specific duration on the unit, so any altering of their duration done before that will work in reverse (you'll lose the bonus duration when the promotion is removed from the unit without having gained upon application)
ie - Apply AlterDuration -5 to a unit immediately upon summoning, then it is set to a duration of 2 (instantly clicked down by 1). Now you remove the AlterDuration promotion from the unit and the duration bumps up to 6.
The default duration for summons appears to be 1. When used iDurationAlter 1, did not show any change on the unit's duration in game. I hadn't removed or changed anything else at that time, because I was trying to figure out how to make it work, first...
Also, MustMaintain won't remove a promotion which is listed as a free promotion in UnitInfos. Did you maybe have it set that way when you tested things?
I had it at first, removed it later. The unitinfo that I posted here is the one I test with.
The promotion giving 100% defensive strike chance, I guess it means 100% of the already existing. So, if that is 5% it goes to 10%, if it is 0% it stays 0%...Is this correct?
In the meantime, I have also tried to solve the mana bonus issue. It was a tough nut to crack, but I finally did it. Unfortunatelly, I had to add a
Code:
ReportEventToPython(pUpgraded,"UnitUpgradedEvent");
to the Upgrade method of the unit.
There is a report there, but it is only called when unit statistics are enabled.
In order to make it randomly apply the bonuses, I had to pick the unit after it was upgraded. The OnUnitCreated event is called before the old unit copies its promotions to the new one, so it was impossible to correctly upgrade the correct line.
When I set up the OnUnitUpgradedEvent and hooked there the bonus promotions, all went well. Still, the OnUnitCreate event checks the adepts for bonuses, but everything else is covered on the onUnitUpgradedEvent.
Perhaps such an event can be included in the next patch, because it is
very useful for modding things that must happen on upgrades.
Hopefully, when you tell me what to delete to have the SPECIALUNIT_SPELL work correctly, I might be able to implement the FireWall as I want it to be(almost. The ideal situation would be to do fire damage to the attacking units, without depriving the archers from the chance to do defensive strikes, but I do not think this is currently doable).