Page 1 of 1

Last known information

PostPosted: 31 Aug 2011, 07:49
by Sloth
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 :shock: .

I know this has been a problem for a long time now, but has anyone a good solution for this?

Re: Last known information

PostPosted: 31 Aug 2011, 10:59
by Hellfish
Doi...
I see the problem, it's not a terribly hard fix. I'm on it right after work!

EDIT:Done. Check out r10115!

Re: Last known information

PostPosted: 31 Aug 2011, 18:57
by Sloth
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!
This looks like the right way to implement it. All my testing turned out positive. Good work Hellfish! =D>

Should we copy some more variables over to the LastKnownInfo?

I can imagine these:
1. counters, (EDIT: there already)
2. extrinsicKeyword
3. cardColor, changedCardTypes, newPT (can all be changed by AF Animate or static effects)

Re: Last known information

PostPosted: 31 Aug 2011, 20:24
by friarsol
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.

Re: Last known information

PostPosted: 01 Sep 2011, 05:13
by Hellfish
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.

Re: Last known information

PostPosted: 02 Sep 2011, 08:49
by Sloth
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:
Code: Select all
        for (Trigger trigger : c.getTriggers())
            trigger.setHostCard(lastKnownInfo);
If I replace "lastKnownInfo" with "copied" the EtB triggers work again. Would this break your lkI fix?

EDIT: I've just tested Proper Burial with Giant Growth and it still works. I will submit it.

Re: Last known information

PostPosted: 02 Sep 2011, 13:06
by Hellfish
That *may* break the Anodet Lurker-case that was on the issue tracker.
I'll have a go tonight.

EDIT:Well, test cases seem fine. I'm cautiously optimistic :D

Re: Last known information

PostPosted: 05 Sep 2011, 05:38
by slapshot5
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

Re: Last known information

PostPosted: 05 Sep 2011, 06:02
by Hellfish
Sure thing, I was going to anyway before I saw you were assigned to the issue ;)

Re: Last known information

PostPosted: 05 Sep 2011, 16:41
by slapshot5
Hellfish wrote:Sure thing, I was going to anyway before I saw you were assigned to the issue ;)
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.

-slapshot5