Incorrect Scripts
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Incorrect Scripts
by 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
by Sloth » 22 Feb 2012, 12:38
Omen Machine works now, but i found a little inaccuracy in the script: the lands should be put onto the battlefield not played.jeffwadsworth wrote:I should be able to fix it. 3am here. I will do it in the morning. Thanks.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Incorrect Scripts
by jeffwadsworth » 22 Feb 2012, 13:54
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?Sloth wrote:Omen Machine works now, but i found a little inaccuracy in the script: the lands should be put onto the battlefield not played.jeffwadsworth wrote: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
by 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
- 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
by jeffwadsworth » 22 Feb 2012, 20:36
I have old Ib Halfheart working now. I just need to test a few corner cases.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.
- 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
by 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
by Sloth » 24 Feb 2012, 08:55
Your version of Gaze of the Gorgon does not destroy the opposing creature when the target regenerates.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.
Please also remember to fix Omen Machine.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Incorrect Scripts
by jeffwadsworth » 24 Feb 2012, 09:22
I will post a ruling on that count. Removed from combat is pretty drastic.Sloth wrote:Your version of Gaze of the Gorgon does not destroy the opposing creature when the target regenerates.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.
Please also remember to fix Omen Machine.
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
by Sloth » 24 Feb 2012, 10:04
Playing a land is a game term (and triggers stuff like Burgeoning), putting a land onto the battlefield is something different.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.
So AF Play handles playing lands, but in a different way than Omen Machine.
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).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.
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).
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Incorrect Scripts
by 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
by 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
by Sloth » 28 Feb 2012, 07:05
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?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.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Incorrect Scripts
by jeffwadsworth » 28 Feb 2012, 12:12
No. I did not realize that targeting checked that validity of the target after resolution.Sloth wrote: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?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.
- 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
by friarsol » 28 Feb 2012, 13:09
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"jeffwadsworth wrote:No. I did not realize that targeting checked that validity of the target after resolution.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Incorrect Scripts
by 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.
- 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.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Who is online
Users browsing this forum: No registered users and 21 guests