Fixing the clones
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
42 posts
• Page 1 of 3 • 1, 2, 3
Fixing the clones
by ArsenalNut » 27 May 2012, 05:27
I started working on a new Clone AF that will allow the "clone" cards to be scripted with static ETB triggers. I thought this was going to be fairly quick to implement but it looks like its not. I have the clone drawback ability working but in testing I found a problem. In order to get the ETB to work more than once for cases like cloning an Undying creature or the clone get flickered, I need to move the SVars into the CardCharacteristics otherwise the SVars get overwritten in the initial cloning and the second ETB throws an exception. I have implemented the change in such a way that it didn't change the Card Class API for accessing SVars. I know this is going to affect the DFC and flip cards especially the werewolves that use the same SVar for both transform triggers. Also, the image download code will be affected. I'll need to figure what other areas of the code are affected. I want to make sure I don't break anything.
Mostly I am posting this to let the other developers know what I am planning and that's it going to take me some time to do it right. I am going to start a new branch so I can commit incremental changes without breaking the Trunk.
Mostly I am posting this to let the other developers know what I am planning and that's it going to take me some time to do it right. I am going to start a new branch so I can commit incremental changes without breaking the Trunk.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Fixing the clones
by Max mtg » 28 May 2012, 12:45
I have attempted to fix clones some time ago.
The correct cloning cannot be achieved by placing an ETB trigger on the cloner card (unless you supress its broadcasting to listeners?). This is because ETB should trigger only once - for the card being copied by clone, or for the clone permanent itself if its controller choses not to copy anything.
The idea of warpring SVars into CardCharacteristis is sane. If there remain variables associated with the whole card (not its single side or face) - and they do remain: rarity, sets, pictures - then use a different keyword to define them in cardname.txt.
The correct cloning cannot be achieved by placing an ETB trigger on the cloner card (unless you supress its broadcasting to listeners?). This is because ETB should trigger only once - for the card being copied by clone, or for the clone permanent itself if its controller choses not to copy anything.
The idea of warpring SVars into CardCharacteristis is sane. If there remain variables associated with the whole card (not its single side or face) - and they do remain: rarity, sets, pictures - then use a different keyword to define them in cardname.txt.
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: Fixing the clones
by Sloth » 29 May 2012, 18:59
I hope your plans are compatible with Hellfishs Ability branch. Sounds like both mess with SVars a lot.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Fixing the clones
by Hellfish » 29 May 2012, 19:32
Sloth: That should be fine, since it's all relayed through the Card, right?
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
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
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Fixing the clones
by ArsenalNut » 29 May 2012, 19:42
It should be transparent. The SVar setters/getters in the Card class will have the same interface but they retrieve/set the SVars stored in the CardCharacteristics just like the setters/getters for the other properties stored in CardCharacteristics.Hellfish wrote:Sloth: That should be fine, since it's all relayed through the Card, right?
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Fixing the clones
by ArsenalNut » 29 May 2012, 19:51
What is suppose to happen when a flip/dfc/facedown card is pumped or animated then transforms? For example say I cast a Dwarven Blastminer face down. The next turn I cast Commando Raid on the face down creature and then pay the morph cost to turn it face up. Does the Dwarven Blastminer still have the combat damage trigger given by Commando Raid?
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Fixing the clones
by friarsol » 29 May 2012, 20:09
The card is still the same entity, just a different "base" if you Giant Growth a Morph creature it's 5/5, and then morph it up, it's X+3/X+3. So yes, your unmorphed Blastminer still retains this ability.ArsenalNut wrote:What is suppose to happen when a flip/dfc/facedown card is pumped or animated then transforms? For example say I cast a Dwarven Blastminer face down. The next turn I cast Commando Raid on the face down creature and then pay the morph cost to turn it face up. Does the Dwarven Blastminer still have the combat damage trigger given by Commando Raid?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Fixing the clones
by ArsenalNut » 29 May 2012, 22:07
That's what I thought, thanks for the confirmation. I tested the above scenario using the Trunk version of Forge and Dwarven Blastminer loses the combat damage trigger if it is turned face up after Commando Raid is cast on it but does not lose the +3/+3 from Giant Growth. I'll get this fixed in my branch.friarsol wrote:The card is still the same entity, just a different "base" if you Giant Growth a Morph creature it's 5/5, and then morph it up, it's X+3/X+3. So yes, your unmorphed Blastminer still retains this ability.ArsenalNut wrote:What is suppose to happen when a flip/dfc/facedown card is pumped or animated then transforms? For example say I cast a Dwarven Blastminer face down. The next turn I cast Commando Raid on the face down creature and then pay the morph cost to turn it face up. Does the Dwarven Blastminer still have the combat damage trigger given by Commando Raid?
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Fixing the clones
by ArsenalNut » 14 Jun 2012, 04:33
I got some free time from work and made some progress with the clone fix. While testing I ran into a rules situation that I need clarification. I cast Evil Twin to copy a creature on the battlefield. Then I cast Clone to copy the Evil Twin version of the creature. Does the Clone get Evil Twin's destroy ability?
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Fixing the clones
by friarsol » 14 Jun 2012, 12:14
Yep, http://forums.mtgsalvation.com/showthread.php?t=373059ArsenalNut wrote:I got some free time from work and made some progress with the clone fix. While testing I ran into a rules situation that I need clarification. I cast Evil Twin to copy a creature on the battlefield. Then I cast Clone to copy the Evil Twin version of the creature. Does the Clone get Evil Twin's destroy ability?
Back in the day we used this trick to turn a Clone into a Vesuvan Doppleganger permanently.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Fixing the clones
by ArsenalNut » 01 Jul 2012, 15:36
I've made some good progress on the Clone AF. I have converted all the existing clones except Body Double to scripts. I was reading the ruling for Dimir Doppelganger and saw this
This ruling means that the Clone AF should clear the Remember (and Imprint) lists for the card that is becoming the copy, right?A permanent's ability that refers to cards the creature exiled (such as Sisters of Stone Death's third ability) only affects cards exiled by other abilities intrinsic to that permanent (such as Sisters of Stone Death's second ability). Suppose that (a) Dimir Doppelganger copies Arc-Slogger, (b) its "deal 2 damage" ability is activated, and then (c) it copies Sisters of Stone Death. Creatures exiled by Arc-Slogger's ability can't be returned with Sisters of Stone Death's ability.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Fixing the clones
by friarsol » 01 Jul 2012, 17:35
I'm reading that similarly. It may not be correct in all circumstances but it will be most of the time. The main part is that certain cards have "linked abilities" (like the Karn Planeswalker) and if somehow Karn exiles things in a different way, those don't return when you restart the game, only the ones that he originally had.ArsenalNut wrote:This ruling means that the Clone AF should clear the Remember (and Imprint) lists for the card that is becoming the copy, right?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Fixing the clones
by ArsenalNut » 01 Jul 2012, 18:09
I am testing Cemetery Puca and another copying rule question came up. If the a Clone of some creature dies and I use Cemetery Puca triggered ability, what does Cemetery Puca become? Right now, the Cemetery Puca becomes the original card, i.e. a Clone, but I think it's suppose to become whatever the Clone was copying.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Fixing the clones
by jeffwadsworth » 01 Jul 2012, 19:34
http://forums.mtgsalvation.com/showthread.php?t=171808ArsenalNut wrote:I am testing Cemetery Puca and another copying rule question came up. If the a Clone of some creature dies and I use Cemetery Puca triggered ability, what does Cemetery Puca become? Right now, the Cemetery Puca becomes the original card, i.e. a Clone, but I think it's suppose to become whatever the Clone was copying.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Fixing the clones
by ArsenalNut » 01 Jul 2012, 19:49
Thanks, I had found this thread earlier but it didn't quite give me the definitive answer I was looking for. That thread is specifically dealing with whether or not a clone persists when its copying something with persist. It does not directly address what the triggered ability of Cemetery Puca copies when a clone of some creature dies. I think it implies that the triggered ability should be using the LKI of the clone which would be the copied creature. This means I need to fix what Forge currently does but I was looking a definitive answer before I went down that path.jeffwadsworth wrote:http://forums.mtgsalvation.com/showthread.php?t=171808ArsenalNut wrote:I am testing Cemetery Puca and another copying rule question came up. If the a Clone of some creature dies and I use Cemetery Puca triggered ability, what does Cemetery Puca become? Right now, the Cemetery Puca becomes the original card, i.e. a Clone, but I think it's suppose to become whatever the Clone was copying.
The Copying rules are giving me a headache

So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
42 posts
• Page 1 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 27 guests