It is currently 08 Sep 2025, 17:01
   
Text Size

Implementation of the Tradewind Rider card

Post MTG Forge Related Programming Questions Here

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

Implementation of the Tradewind Rider card

Postby 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
mullery
 
Posts: 8
Joined: 05 Aug 2010, 20:13
Has thanked: 0 time
Been thanked: 0 time

Re: Implementation of the Tradewind Rider card

Postby 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) :

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.
User avatar
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

Postby 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
mullery
 
Posts: 8
Joined: 05 Aug 2010, 20:13
Has thanked: 0 time
Been thanked: 0 time

Re: Implementation of the Tradewind Rider card

Postby 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. :D
User avatar
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


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 46 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 46 users online :: 0 registered, 0 hidden and 46 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 46 guests

Login Form