It is currently 14 May 2025, 09:02
   
Text Size

Getting card type in the getText() method?

Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins

Getting card type in the getText() method?

Postby LokiX » 02 Apr 2015, 04:09

I have implemented the Amplify keyword, however one minor detail is annoying me. I can't, for the life of me, figure out how to get the type(s) of the card in the getText method, is it possible to get it with just the Mode parameter?

As it is I have the text set up as follow:
Amplify3(As this enters the battlefield, put three +1/+1 counters on it for each card you reveal in your hand.)

When it should be something like this:
Amplify3(As this enters the battlefield, put three +1/+1 counters on it for each dragon card you reveal in your hand.)

If not, anybody has any insight as how I might be able to? Or should I go with something like:
Amplify3(As this enters the battlefield, put three +1/+1 counters on it for each card you reveal that shares a type with it in your hand.)
LokiX
 
Posts: 4
Joined: 03 Jun 2012, 22:17
Has thanked: 1 time
Been thanked: 0 time

Re: Getting card type in the getText() method?

Postby LevelX » 04 Apr 2015, 12:19

I made some changes to the Amplify effect.
Also I added a test for Amplify.

Check out the changes, if there any questions about feel free to ask.

And never use a static Filter and add during resolution predicates. [-X
The changes accumulate and are used for all games on the server using objects that use that static object.
I made this mistake also a longer time ago and had a hard time to find out the reason for strange behaviours that causes.
User avatar
LevelX
DEVELOPER
 
Posts: 1677
Joined: 08 Dec 2011, 15:08
Has thanked: 174 times
Been thanked: 374 times

Re: Getting card type in the getText() method?

Postby LokiX » 04 Apr 2015, 13:58

Yeah, I saw it and was wondering why you changed and now that you mentioned it makes a lot more sense, thanks.

Also thanks for the tests for the Amplify keyword, after lokking more closely at them I think I got a good grasp on how to write them and will write them more often to test changes like these.
LokiX
 
Posts: 4
Joined: 03 Jun 2012, 22:17
Has thanked: 1 time
Been thanked: 0 time


Return to Developers Talk

Who is online

Users browsing this forum: No registered users and 0 guests


Who is online

In total there are 0 users online :: 0 registered, 0 hidden and 0 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 0 guests

Login Form