Renamed :Are you looking for a Godsend? Suggested by gorem2k

I need help to resolve this issue :
I am tryng to exile a card from a chest after blockers are declared and before the damage is assigned.
The problem encountered is that the game doesn't let me select the card, i can see the available choices but i can select them, the selection has a may condition so i still can quit the selection without any card, if I do the game go forward normally.
**************************************************************************
Updated final solution :
Here you can find my last one i have tested and it seems to works fine!
I am tryng to exile a card from a chest after blockers are declared and before the damage is assigned.
The problem encountered is that the game doesn't let me select the card, i can see the available choices but i can select them, the selection has a may condition so i still can quit the selection without any card, if I do the game go forward normally.
- Code: Select all
<TRIGGERED_ABILITY replacement_query="1" linked_ability_group ="1">
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" pre_trigger="1">
local chest = LinkedDC():Get_Chest(1)
if chest ~= nil and MTG():GetStep() == STEP_COMBAT_DAMAGE then
return true
end
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local chest = LinkedDC():Get_Chest(1)
EffectController():SetItemCount(1)
for i = 0, (1 - 1) do
EffectController():SetItemPrompt(i, "CARD_QUERY_CHOOSE_CARD_TO_EXILE" )
end
EffectController():ChooseItemsFromDC( chest, EffectDC():Make_Targets(0), QUERY_FLAG_MAY )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
EffectDC():Get_Targets(0):Protect_CardPtr(0)
target:Exile()
local chest = LinkedDC():Get_Chest(1)
chest:Clear()
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
local source = EffectSource()
if target ~= nil and source ~= nil then
local chest = LinkedDC():Get_Chest(100)
if chest == nil then
chest = LinkedDC():Make_Chest(100)
end
local index = 1
while chest:Get_CardPtr(index) ~= nil do
index = index + 1
end
chest:Set_CardPtr(index, target)
chest:Protect_CardPtr(index)
chest:Set_Int(0, index)
target:NailOnto(source)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
**************************************************************************
Updated final solution :
Here you can find my last one i have tested and it seems to works fine!
- GodSend Neo Rev 1.1 | Open