Last known information
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
10 posts
• Page 1 of 1
Last known information
by Sloth » 31 Aug 2011, 07:49
The last try to fix triggers using last known information by Hellfish has some side-effects:
When I use Giant Growth on a creature and then Unsummon it, it will retain it's bonus in my hand
.
I know this has been a problem for a long time now, but has anyone a good solution for this?
When I use Giant Growth on a creature and then Unsummon it, it will retain it's bonus in my hand

I know this has been a problem for a long time now, but has anyone a good solution for this?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Last known information
by Hellfish » 31 Aug 2011, 10:59
Doi...
I see the problem, it's not a terribly hard fix. I'm on it right after work!
EDIT:Done. Check out r10115!
I see the problem, it's not a terribly hard fix. I'm on it right after work!
EDIT:Done. Check out r10115!
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: Last known information
by Sloth » 31 Aug 2011, 18:57
This looks like the right way to implement it. All my testing turned out positive. Good work Hellfish!Hellfish wrote:Doi...
I see the problem, it's not a terribly hard fix. I'm on it right after work!
EDIT:Done. Check out r10115!

Should we copy some more variables over to the LastKnownInfo?
I can imagine these:
2. extrinsicKeyword
3. cardColor, changedCardTypes, newPT (can all be changed by AF Animate or static effects)
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Last known information
by friarsol » 31 Aug 2011, 20:24
I had something similar to this in place at one point and ran into a problem where a card still appeared to be Enchanted by an Aura after this copying. Does this also fix cards like Carapace? I remember trying some code awfully similar to this, but ran into problems with Aura still granting powers to cards while no longer in play.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Last known information
by Hellfish » 01 Sep 2011, 05:13
I don't think that this helps Carapace, it was mainly to help triggers do their thing to the right thing, if you know what I mean.
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: Last known information
by Sloth » 02 Sep 2011, 08:49
I did some research about the error 0000219 you reported in the issue tracker Hellfish.
It's this part in the changeZone function that causes it:
EDIT: I've just tested Proper Burial with Giant Growth and it still works. I will submit it.
It's this part in the changeZone function that causes it:
- Code: Select all
for (Trigger trigger : c.getTriggers())
trigger.setHostCard(lastKnownInfo);
EDIT: I've just tested Proper Burial with Giant Growth and it still works. I will submit it.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Last known information
by Hellfish » 02 Sep 2011, 13:06
That *may* break the Anodet Lurker-case that was on the issue tracker.
EDIT:Well, test cases seem fine. I'm cautiously optimistic
I'll have a go tonight.Have AI cast Anodet Lurker
Cast Slave of Bolas on Anodet Lurker
Lightning Bolt/Sac/Whatever the Anodet Lurker
EDIT:Well, test cases seem fine. I'm cautiously optimistic

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: Last known information
by slapshot5 » 05 Sep 2011, 05:38
Hey Hellfish,
A commit related to this: r10115 has some other side-effects. This broke the graft keyword, and I fear some other things with defined in AFs.
See bug 231 for the problem. It works in r10114, but is broken in r10115.
I was testing with Aquastrand Spider. Basically, the Card object I get from AllZoneUtil.getCardsInPlay("Aquastrand Spider").get(0) returns a different Card object than AbilityFactory.getDefinedCards(...) using "Self".
Can you take a look?
Thanks,
slapshot5
A commit related to this: r10115 has some other side-effects. This broke the graft keyword, and I fear some other things with defined in AFs.
See bug 231 for the problem. It works in r10114, but is broken in r10115.
I was testing with Aquastrand Spider. Basically, the Card object I get from AllZoneUtil.getCardsInPlay("Aquastrand Spider").get(0) returns a different Card object than AbilityFactory.getDefinedCards(...) using "Self".
Can you take a look?
Thanks,
slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Last known information
by Hellfish » 05 Sep 2011, 06:02
Sure thing, I was going to anyway before I saw you were assigned to the issue 

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: Last known information
by slapshot5 » 05 Sep 2011, 16:41
I made the Graft keyword, so I took the issue. Investigation just led me to this. Feel free to take over the issue if you wish.Hellfish wrote:Sure thing, I was going to anyway before I saw you were assigned to the issue
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 34 guests