Implementation of the Tradewind Rider card
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
4 posts
• Page 1 of 1
Implementation of the Tradewind Rider card
by mullery » 11 Aug 2010, 23:50
Hello,
I think something is wrong with the card Tradewind Rider.
I've played a game against the IA and it used the abilitie of this card to return one of my creature to my hand. When it activated the ability, I've used Mother of Runes to give to my creature protection from blue but my creature just went to my hand anyway.
It seems this kind of problem happens a lot with many different kind of cards.
I'm not already enough confident with the source code to find the issue.
Anyone have an idea ?
Best Regards,
Mikael
I think something is wrong with the card Tradewind Rider.
I've played a game against the IA and it used the abilitie of this card to return one of my creature to my hand. When it activated the ability, I've used Mother of Runes to give to my creature protection from blue but my creature just went to my hand anyway.
It seems this kind of problem happens a lot with many different kind of cards.
I'm not already enough confident with the source code to find the issue.
Anyone have an idea ?
Best Regards,
Mikael
- mullery
- Posts: 8
- Joined: 05 Aug 2010, 20:13
- Has thanked: 0 time
- Been thanked: 0 time
Re: Implementation of the Tradewind Rider card
by DennisBergkamp » 12 Aug 2010, 00:10
What happens is that there's no check being made on resolution of the ability whether the creature can be targeted:
There's a humanResolve and a computerResolve in this case, basically by adding this check to right before where the bounce actually happens (in both places) :
There's a humanResolve and a computerResolve in this case, basically by adding this check to right before where the bounce actually happens (in both places) :
- Code: Select all
if (CardFactoryUtil.canTarget(card, getTargetCard())) {
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, getTargetCard().getOwner());
AllZone.GameAction.moveTo(hand, getTargetCard());
}
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Implementation of the Tradewind Rider card
by mullery » 17 Aug 2010, 23:37
Hello,
I've added the test you suggested and it works well. Even if the activation cost is not take into account as you explained it's far better than before.
How can we activate this feature in the svn repository ?
Regards,
Mikael
I've added the test you suggested and it works well. Even if the activation cost is not take into account as you explained it's far better than before.
How can we activate this feature in the svn repository ?
Regards,
Mikael
- mullery
- Posts: 8
- Joined: 05 Aug 2010, 20:13
- Has thanked: 0 time
- Been thanked: 0 time
Re: Implementation of the Tradewind Rider card
by Chris H. » 18 Aug 2010, 14:09
`mullery wrote:I've added the test you suggested and it works well. Even if the activation cost is not take into account as you explained it's far better than before.
How can we activate this feature in the svn repository ?
PM Dennis your google email address and he will give you commit status.

-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 46 guests