(October 11th, 2022, 00:17)hackflow Wrote: I am having several bugs with Mystic Surge:
A. (The most grief here) If a unit becomes undead it stays undead after battle. Many hammerhands and one hero I basically lost to this.
B. Sometimes the spell gives adamant weapons to a unit, the stay after battle.
C. If a caster hero becomes undead his spell book gets many death spells.
All of these are intended effects. It's a risky spell with all of these as possible consequences. You can mod the spell and remove the permanent effects if you prefer, it has a separate script file.
Quote:Another bug: Aether Flux does not affect costs of spells for heroes in battle.
Cost modifiers only apply to wizards. Units always cast every spell at the default costs.
Quote:So, the game gets stuck when running this code in AICustomWizard.CAS. What it tries to do is raise the number of wizards permitted on Myrror regardless of what score modifiers are picked. Can someone figure out if there is a problem with this code, or if it's due to a bug?
The problem is not in the script.
This is how the system works :
1. Start loop for each wizard
2. Generate random wizard
3. Run script for that wizard
4. If reroll is set, go to 2
5. If this wasn't the last wizard, increase the counter and go to 2.
6. Check for Myrran requirements. If not met, go to 1 (start over from wizard 1)
There is currently no way to override "6" from the script that runs at "3". If you force the myrran wizard count to be "wrong" it'll result in an endless loop.
For this to be possible, the "MinimalMyrranWizards" and "MaximalMyrranWizards" functions in step 6 needs to be converted into a script, or a new output variable needs to be added that forces skipping step 6.