It is currently 11 Sep 2025, 22:00
   
Text Size

Incorrect Scripts

Post MTG Forge Related Programming Questions Here

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

Re: Incorrect Scripts

Postby jeffwadsworth » 22 Feb 2012, 09:01

I should be able to fix it. 3am here. I will do it in the morning. Thanks.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Incorrect Scripts

Postby Sloth » 22 Feb 2012, 12:38

jeffwadsworth wrote:I should be able to fix it. 3am here. I will do it in the morning. Thanks.
Omen Machine works now, but i found a little inaccuracy in the script: the lands should be put onto the battlefield not played.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Incorrect Scripts

Postby jeffwadsworth » 22 Feb 2012, 13:54

Sloth wrote:
jeffwadsworth wrote:I should be able to fix it. 3am here. I will do it in the morning. Thanks.
Omen Machine works now, but i found a little inaccuracy in the script: the lands should be put onto the battlefield not played.
Ah. I saw the references to land in your AB Play and thought it "handled" the land differently. Is there any way to fix, or do we have another Vesuva situation?
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Incorrect Scripts

Postby slapshot5 » 22 Feb 2012, 13:58

Shouldn't be a Vesuva situation. Just a ChangeZone if it's a land and a Play if it's not. I think we can do that, but I'm not the script expert.
-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Incorrect Scripts

Postby jeffwadsworth » 22 Feb 2012, 20:36

Sloth wrote:Jeff, Omen Machine has to wait. The script is correct, but there is currently no way to force the player to cast a targeted spell (canceling is always enabled). Until this is fixed, i will remove Omen Machine.

EDIT: And Ib Halfheart, Goblin Tactician should not give the triggers to other goblins. The triggered ability is only on Ib.

EDIT2: Omen Machine works now.
I have old Ib Halfheart working now. I just need to test a few corner cases.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Incorrect Scripts

Postby jeffwadsworth » 23 Feb 2012, 13:29

Before anyone mentions it, I know that The Wretched doesn't work in its current form. The issue is that Defined$ doesn't recognize "isBlocking". That is a ValidCards$ thing. I will fix it soon.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Incorrect Scripts

Postby Sloth » 24 Feb 2012, 08:55

jeffwadsworth wrote:Before anyone mentions it, I know that The Wretched doesn't work in its current form. The issue is that Defined$ doesn't recognize "isBlocking". That is a ValidCards$ thing. I will fix it soon.
Your version of Gaze of the Gorgon does not destroy the opposing creature when the target regenerates.

Please also remember to fix Omen Machine.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Incorrect Scripts

Postby jeffwadsworth » 24 Feb 2012, 09:22

Sloth wrote:
jeffwadsworth wrote:Before anyone mentions it, I know that The Wretched doesn't work in its current form. The issue is that Defined$ doesn't recognize "isBlocking". That is a ValidCards$ thing. I will fix it soon.
Your version of Gaze of the Gorgon does not destroy the opposing creature when the target regenerates.

Please also remember to fix Omen Machine.
I will post a ruling on that count. Removed from combat is pretty drastic.

The Omen Machine will be fixed tomorrow. I thought it was fixed due to this line in AB Play.

            // lands will be played
            if (tgtCard.isLand()) {
                controller.playLand(tgtCard);
return;
}

That looks like the correct technique.

The rules I mentioned.

Up to date rules.
 
506.4. A permanent is removed from combat if it leaves the battlefield, if its controller changes, if it phases out, if an effect specifically removes it from combat, if it's a planeswalker that's being attacked and stops being a planeswalker, or if it's an attacking or blocking creature that regenerates (see rule 701.12) or stops being a creature. A creature that's removed from combat stops being an attacking, blocking, blocked, and/or unblocked creature. A planeswalker that's removed from combat stops being attacked.
 
From here:
 
http://wiki.mtgsalvation.com/article/Combat_phase

Both will be fixed tomorrow, etc.
 
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Incorrect Scripts

Postby Sloth » 24 Feb 2012, 10:04

jeffwadsworth wrote:The Omen Machine will be fixed tomorrow. I thought it was fixed due to this line in AB Play.

            // lands will be played
            if (tgtCard.isLand()) {
                controller.playLand(tgtCard);
return;
}

That looks like the correct technique.
Playing a land is a game term (and triggers stuff like Burgeoning), putting a land onto the battlefield is something different.
So AF Play handles playing lands, but in a different way than Omen Machine.

jeffwadsworth wrote:The rules I mentioned.

Up to date rules.
 
506.4. A permanent is removed from combat if it leaves the battlefield, if its controller changes, if it phases out, if an effect specifically removes it from combat, if it's a planeswalker that's being attacked and stops being a planeswalker, or if it's an attacking or blocking creature that regenerates (see rule 701.12) or stops being a creature. A creature that's removed from combat stops being an attacking, blocking, blocked, and/or unblocked creature. A planeswalker that's removed from combat stops being attacked.
Yes, but that has nothing to do with Gaze of the Gorgon. When its trigger triggers (at end of combat) it looks back in time what the targeted creature (which may not be on the battlefield anymore) has blocked or was blocked by this turn (which may include multiple combat phases).

The only way to get this card right is to add a blocked map and a blockedby map to each creature (similar to receivedDamageFromThisTurn and dealtDamageToThisTurn).
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Incorrect Scripts

Postby jeffwadsworth » 24 Feb 2012, 14:37

It isn't worth arguing over. I will just delete it. *washes hands*
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Incorrect Scripts

Postby jeffwadsworth » 28 Feb 2012, 05:34

.Beguiler of Wills needs a Conditional.

| Open
1/22/2011 In order to activate the ability, you must be able to target a creature with power less than or equal to the number of creatures you control. The comparison is made again when the ability resolves. If the power is greater than the number of creatures you control at that time, the target is illegal and the ability is countered.
1/22/2011 The control-changing effect lasts indefinitely, even if the power of the creature becomes greater than the number of creatures you control after the ability resolves.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Incorrect Scripts

Postby Sloth » 28 Feb 2012, 07:05

jeffwadsworth wrote:.Beguiler of Wills needs a Conditional.

| Open
1/22/2011 In order to activate the ability, you must be able to target a creature with power less than or equal to the number of creatures you control. The comparison is made again when the ability resolves. If the power is greater than the number of creatures you control at that time, the target is illegal and the ability is countered.
1/22/2011 The control-changing effect lasts indefinitely, even if the power of the creature becomes greater than the number of creatures you control after the ability resolves.
A Conditional should not be needed. The normal targeting rules should be able to handle that. Did you test this scenario with Beguiler of Wills?
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Incorrect Scripts

Postby jeffwadsworth » 28 Feb 2012, 12:12

Sloth wrote:
jeffwadsworth wrote:.Beguiler of Wills needs a Conditional.

| Open
1/22/2011 In order to activate the ability, you must be able to target a creature with power less than or equal to the number of creatures you control. The comparison is made again when the ability resolves. If the power is greater than the number of creatures you control at that time, the target is illegal and the ability is countered.
1/22/2011 The control-changing effect lasts indefinitely, even if the power of the creature becomes greater than the number of creatures you control after the ability resolves.
A Conditional should not be needed. The normal targeting rules should be able to handle that. Did you test this scenario with Beguiler of Wills?
No. I did not realize that targeting checked that validity of the target after resolution.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Incorrect Scripts

Postby friarsol » 28 Feb 2012, 13:09

jeffwadsworth wrote:No. I did not realize that targeting checked that validity of the target after resolution.
It's not exactly after resolution. It targets to begin with, then as the resolve starts, it checks to see if the target is still valid. If it fails for any reason (no longer the right type, no longer in the zone, etc) it "fizzles"
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Incorrect Scripts

Postby Sloth » 28 Feb 2012, 15:01

Two incorrect scripts:

- Gather Specimens needs a proper replacement effect. The current script does not work correctly with other replacement effects (like Voice of All and Sage of Fables). Check the rules baggage here: http://magiccards.info/ala/en/45.html

- The script of Blood Feud does not work with creatures with Wither or Infect. Since Fight will be an evergreen keyword, it's worth to write AF Fight sooner or later.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 34 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 34 users online :: 0 registered, 0 hidden and 34 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 34 guests

Login Form