Page 1 of 1

Question about mana abilities with cost

PostPosted: 15 Sep 2014, 03:50
by excessum
I noticed that ComputerUtilMana.getAIPlayableMana() explicitly excludes abilities that have a mana cost. With the latest revision, the AI appears to be capable of automatically computing and using some of these abilities so is this restriction still necessary?

Working examples:
Forest;Unknown Shores -> cast Soldier of the Pantheon
Mystic Gate;Island -> cast Azorius Charm
Mystic Gate;Island;Plains -> cast Azorius Charm (ignores Mystic Gate since it is a two colour source and is ranked last)

Buggy:
Mystic Gate;Island -> cast Frostburn Weird (correctly taps for UU but still requests the user to select U from mana pool)

By adding checks for the net mana generated, getAvailableMana() should be able to rank them appropriately so that simple filters like Unknown Shores are ranked behind fixers like Azorius Signet.

Re: Question about mana abilities with cost

PostPosted: 16 Sep 2014, 12:40
by Sloth
excessum wrote:I noticed that ComputerUtilMana.getAIPlayableMana() explicitly excludes abilities that have a mana cost. With the latest revision, the AI appears to be capable of automatically computing and using some of these abilities so is this restriction still necessary?
The AI always tried to cast spells without being able to pay the mana in the past, but we can test whether it works now.

Re: Question about mana abilities with cost

PostPosted: 17 Sep 2014, 12:53
by excessum
Sloth wrote:The AI always tried to cast spells without being able to pay the mana in the past, but we can test whether it works now.
I think this can be safely ignored at this point. The auto payment only works in the cases where the ability payment can be made at that specific point within the "while (!cost.isPaid())" loop. Trying to make canPayManaCost() aware of abilities used in such payments only led to problems with "undo" returning too little/much mana and/or failing to untap lands properly.