Re: Spell Casting AI
The "mayusegems 1" at the top probably is 1 = true, 0 = false and since it's true he's checked for gem use for every spell at "boost xx scoreat x". I also think the scoreat 0 means he doesn't actually have any gems.
I still think we are seeing the easy part. How does it set the relative score for Ironskin at 1003, Quicken at 768, Flying Shards 7, and so on?
A different point is that this routine could probably be speeded up a lot by checking the favored spell first and stopping if it works (favored is +100000!) and setting mayusespells to 0 if the commander doesn't have any.
|