Page 1 of 1

Implementation of the Tradewind Rider card

PostPosted: 11 Aug 2010, 23:50
by mullery
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

Re: Implementation of the Tradewind Rider card

PostPosted: 12 Aug 2010, 00:10
by DennisBergkamp
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) :

Code: Select all
if (CardFactoryUtil.canTarget(card, getTargetCard())) {
                       PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, getTargetCard().getOwner());
                       AllZone.GameAction.moveTo(hand, getTargetCard());
                    }
There's still a problem though with this card, the creatures that are being tapped are actually a part of the cost of the ability. Currently when using Mother of Runes to give protection from blue, the ability will not resolve but also the cost of tapping creatures (incorrectly) does not occur. This is trickier to fix though.

Re: Implementation of the Tradewind Rider card

PostPosted: 17 Aug 2010, 23:37
by mullery
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

Re: Implementation of the Tradewind Rider card

PostPosted: 18 Aug 2010, 14:09
by Chris H.
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. :D