Question about mana abilities with cost
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Question about mana abilities with cost
by excessum » 15 Sep 2014, 03:50
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.
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
by Sloth » 16 Sep 2014, 12:40
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.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?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Question about mana abilities with cost
by excessum » 17 Sep 2014, 12:53
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.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.
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 22 guests