Untap next turn detection
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
3 posts
• Page 1 of 1
Untap next turn detection
by Masher8 » 12 Feb 2011, 20:00
I've been having a look at the source with a view to improving the combat AI (particularly the attacking). I've made some progress and have got a few changes I like the look of but the computer really needs to be able to look ahead and see if the player's creatures are going to be able to untap next turn (otherwise it behaves idiotically conservatively if they can't) and I can't find where it would do this in the code.
Is there any function to check for this already in the code base?
Evidently this isn't the most common occurrence but it would be nice to have it covered.
Is there any function to check for this already in the code base?
Evidently this isn't the most common occurrence but it would be nice to have it covered.
- Masher8
- Posts: 18
- Joined: 05 Feb 2011, 13:57
- Has thanked: 0 time
- Been thanked: 0 time
Re: Untap next turn detection
by Sloth » 13 Feb 2011, 11:16
I will write you such a function Masher. Look here for updates.
EDIT: You can now check if a creature will untap by using PhaseUtil.canUntap(card).
EDIT: You can now check if a creature will untap by using PhaseUtil.canUntap(card).
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 8 guests