AbilityFactory and X cost spells

Sol suggested a couple of weeks ago that we start a topic devoted to how we should handle AbilityFactory and X cost spells.
At one point, Dennis cobbled together a few X-cost spells like Hurricane, etc. I used his code as a template and added a few more. I seem to remember that there was a method that we could call which would return how much un-tapped mana the AI had available.
We would subtract the non-X portion of the cost from this and that would give us a maximum value for the X portion. We could use this in determining if we should return a true or a false for canPlayAI(). Under most circumstances we probably do not want the computer to cast a Braingeyser that draws zero or one card.
I have not had a chance yet to think about how we would add this to AbilityFactory. It might make sense for the AFs to have at least a minimum X portion and some AFs might also want to have a max value.
I will get off of the soap box at this time and give others a chance to offer their own thoughts on how to handle X cost spells.
At one point, Dennis cobbled together a few X-cost spells like Hurricane, etc. I used his code as a template and added a few more. I seem to remember that there was a method that we could call which would return how much un-tapped mana the AI had available.
We would subtract the non-X portion of the cost from this and that would give us a maximum value for the X portion. We could use this in determining if we should return a true or a false for canPlayAI(). Under most circumstances we probably do not want the computer to cast a Braingeyser that draws zero or one card.
I have not had a chance yet to think about how we would add this to AbilityFactory. It might make sense for the AFs to have at least a minimum X portion and some AFs might also want to have a max value.
I will get off of the soap box at this time and give others a chance to offer their own thoughts on how to handle X cost spells.