Page 1 of 1

How to target cards in the exile zone?

PostPosted: 04 Aug 2013, 09:57
by thefiremind
I was attempting to code Jhoira's Timebug (yes, suspend might come back in my mod, if I solve this issue...) and I stumbled upon a major problem. Leaving aside the choice about which zone I want to target, I tried to ignore the possibility to target permanents and I made a target definition like this:
Code: Select all
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:SetZone(ZONE_EXILE)
    filter:Add( FE_OWNER, OP_IS, EffectController() )
    -- plus a characteristic that I gave to suspended cards, it's not important here
    </TARGET_DEFINITION>
When I tested it, I realized that the game can't handle targets in exile: the exile zone browser doesn't pop up, I can't pop it up by myself with the mouse, and the permanents are all greyed out because I'm not supposed to choose a card on the battlefield.
In previous DotP games this problem was easily ignored by making players choose their target from a chest... but in DotP2014 we have the TARGET block which, as far as I know, doesn't allow to choose the target from a chest. So, does anybody have an idea about how to target cards in the exile zone?

Re: How to target cards in the exile zone?

PostPosted: 09 Aug 2013, 09:12
by gorem2k
the best I could do is by not "Targeting"

Code: Select all
    <RESOLUTION_TIME_ACTION>
    EffectController():MoveLocalZone( ZONE_EXILE, ZONE_STACK )
    local filter = ClearFilter()
    local effectController = EffectController()
    filter:SetZone( ZONE_STACK, effectController )
    effectController:SetItemCount( 1 )
    for i = 0, (1-1) do
       effectController:SetItemPrompt(i, "CARD_QUERY_CHOOSE_CARD" )
    end
    effectController:ChooseItems( EffectDC():Make_Targets(0) )
    </RESOLUTION_TIME_ACTION>
by moving local zone to stack I was able to choose an exiled card, but after that, every cards from exile resolves.. should be a way to make them go back to exile. I've also tried playing with ZONE_NOWHERE_YET, thought about moving ZONE_GRAVEYARD to nowhere, ZONE_EXILE to ZONE_GRAVEYARD, then put them back, but that made the engine crash :lol:

Re: How to target cards in the exile zone?

PostPosted: 09 Aug 2013, 09:16
by thefiremind
This could make unwanted triggers trigger, and what if there are some cards already on the stack at the time the ability resolves? You would be able to choose them as well.

Re: How to target cards in the exile zone?

PostPosted: 09 Aug 2013, 09:24
by gorem2k
I don't know.

Seems that the exile zone can't be targeted, like you said. At least I'm trying :D

Re: How to target cards in the exile zone?

PostPosted: 09 Aug 2013, 11:50
by thefiremind
And I appreciate that, but what I was hoping to see here is someone who accidentally found a way to let the TARGET block select the target from a chest, or to target without using a TARGET block, maybe with some filter option I overlooked.
If I don't need to target, there's no reason to move the cards anywhere, I can use a ChooseItemFromDC. :wink:

Re: How to target cards in the exile zone?

PostPosted: 09 Aug 2013, 13:10
by gorem2k
Any idea what LoadTargetDefinitionFromDC actually do? I can't find any example.

At least, I've learned from this problem. I made a card that can return an exiled card to hand using ChooseItemFromDC.

Sorry I can't help you as much as you can help me. But I might stumble on a solution. who knows

Re: How to target cards in the exile zone?

PostPosted: 09 Aug 2013, 14:06
by thefiremind
gorem2k wrote:Any idea what LoadTargetDefinitionFromDC actually do? I can't find any example.
Did you read this? If not, do it now, it will be easier for me to explain.
After you "extracted" a data chest from a spell with GetDataChest, you could extract a specified target chest with the Get_NthTargets function, then LoadTargetDefinitionFromDC should allow you to set the filter as it was set in the definition for that spell's target chest. I don't know if DotP2014 still supports Get_NthTargets and LoadTargetDefinitionFromDC (yes they are into the executable but do they still work?), and even if it does, I can't think of a good use of them that doesn't include the TestFilter function, which was returning true if a card could have been targeted by another one through a specific filter and is missing in DotP2014.