Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk



Question about "Choose Two Cards"
Moderator: CCGHQ Admins
Question about "Choose Two Cards"
by Xana » 16 Aug 2012, 14:31
Hey Again
Having just coded Agonizing Memories, i stumbled upon a question that somehow google couldn't help me with.
The card says to choose two cards from target players hand, what happens if that player only has one card in his hand, is he still a valid target and only one card is chosen automatically or is he no longer a legal target?
Well not so much a programming question, but still relevant as to how to code the card, my current implementation automatically selects the remaining card and puts it on top of the library when there is less than two cards in target players hand, but i'm not sure as to whether this is the correct behavior?
Having just coded Agonizing Memories, i stumbled upon a question that somehow google couldn't help me with.
The card says to choose two cards from target players hand, what happens if that player only has one card in his hand, is he still a valid target and only one card is chosen automatically or is he no longer a legal target?
Well not so much a programming question, but still relevant as to how to code the card, my current implementation automatically selects the remaining card and puts it on top of the library when there is less than two cards in target players hand, but i'm not sure as to whether this is the correct behavior?
Re: Question about "Choose Two Cards"
by thefiremind » 16 Aug 2012, 14:46
The spell targets the player and not the cards, so as long as the player can be targetted by the spell (i.e. the player doesn't have shroud/hexproof/protection from black), you can play Agonizing Memories even if the hand is empty or with just one card.
Hex, for example, can't be cast if there aren't enough creatures because it targets them.
Hex, for example, can't be cast if there aren't enough creatures because it targets them.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 16 guests