It is currently 11 Sep 2025, 18:53
   
Text Size

Heads up, scripters! Counters-property changed.

Post MTG Forge Related Programming Questions Here

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

Heads up, scripters! Counters-property changed.

Postby Hellfish » 19 Sep 2011, 10:47

The validcard-property "counters" had some niggling little annoyances that were fixed in r10546 (namely being unable to compare against svars other than "X" or "Y" and needing a workaround in order to compare with integers > 9). Unfortunately the solution required a syntax change. A simple one, yes, but it'd definitely be annoying if you didn't know about it.
The property name ("counters"), the comparator ("LT/LE/EQ/NE/GE/GT#") and counter type are now separated by underscore.

This has been a public service announcement.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Heads up, scripters! Counters-property changed.

Postby friarsol » 19 Sep 2011, 11:59

Hellfish, want to give an example or two?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Heads up, scripters! Counters-property changed.

Postby Hellfish » 19 Sep 2011, 12:03

Well, I guess I was a bit unclear, but the change is quite simple really:
Before:
Code: Select all
countersGE1P1P1
After:
Code: Select all
counters_GE1_P1P1
It removes the necessity for things like
Code: Select all
...countersGEXLEVEL...
SVar:X:Number$12
EDIT: Also, as stated above, you can use arbitrary svar names rather than juts X & Y.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Heads up, scripters! Counters-property changed.

Postby Max mtg » 19 Sep 2011, 15:05

I've noted that Arcbound Worker does not enter the battlefield correctly - it just dies (when there are no permanents that would increase toughness of all your creatures). There must be some State Based Effects Check while counters are not put yet.

Is that related to counters mechanics or my changes to PlayerZones location?
I've attached a deck for your convinience.
Attachments
Affinity Blue Hard.dck.txt
(523 Bytes) Downloaded 175 times
Last edited by Max mtg on 19 Sep 2011, 15:06, edited 1 time in total.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Heads up, scripters! Counters-property changed.

Postby friarsol » 19 Sep 2011, 15:05

Hellfish wrote:Well, I guess I was a bit unclear, but the change is quite simple really:
I probably could have figured it out, but I had just woken up and didn't feel like it. Easier if there is a concrete example along with the post, so I don't have to try to find a card that does it.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Heads up, scripters! Counters-property changed.

Postby Sloth » 19 Sep 2011, 15:40

Max mtg wrote:I've noted that Arcbound Worker does not enter the battlefield correctly - it just dies (when there are no permanents that would increase toughness of all your creatures). There must be some State Based Effects Check while counters are not put yet.

Is that related to counters mechanics or my changes to PlayerZones location?
I've attached a deck for your convinience.
I haven't checked what's causing this, but it must have been a very recent change. I've used Chaotic Goo this weekend (saturday?) and it worked - today it does not.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Heads up, scripters! Counters-property changed.

Postby Max mtg » 20 Sep 2011, 00:27

Sloth wrote:I haven't checked what's causing this, but it must have been a very recent change. I've used Chaotic Goo this weekend (saturday?) and it worked - today it does not.
That was my fault, sorry.

Well, at least I'm learning Forge's internals (not only pretty quest and deck management)
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 36 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 36 users online :: 0 registered, 0 hidden and 36 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 36 guests

Login Form