It is currently 29 Oct 2025, 07:05
   
Text Size

Untap next turn detection

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Untap next turn detection

Postby 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.
Masher8
 
Posts: 18
Joined: 05 Feb 2011, 13:57
Has thanked: 0 time
Been thanked: 0 time

Re: Untap next turn detection

Postby 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).
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Untap next turn detection

Postby Masher8 » 13 Feb 2011, 15:27

Cool Sloth, thanks.
Masher8
 
Posts: 18
Joined: 05 Feb 2011, 13:57
Has thanked: 0 time
Been thanked: 0 time


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 8 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 8 users online :: 0 registered, 0 hidden and 8 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 8 guests

Login Form