local de=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON)
local rc=de:GetHandler()
cm[0][rc]=rc:GetFieldID()
return de:IsActiveType(TYPE_MONSTER) and ((rc:IsAbleToHand() and not rc:IsLocation(LOCATION_HAND)) or (rc:IsAbleToGrave() and not rc:IsLocation(LOCATION_GRAVE)))
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
ifchk==0thenreturntrueend
Duel.SetTargetCard(e:GetLabelObject())
if chk==0 then
local res=false
for rc,fid in pairs(cm[0]) do
if fid==rc:GetFieldID() then res=true end
end
return res
end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
localtc=Duel.GetFirstTarget()
iftc:IsRelateToEffect(e)then
local g=Group.CreateGroup()
for rc,fid in pairs(cm[0]) do
if fid==rc:GetFieldID() then g:AddCard(rc) end
end
local tc=SNNM.Select_1(g,tp,HINTMSG_OPERATECARD)
if tc then
local th=tc:IsAbleToHand() and not tc:IsLocation(LOCATION_HAND)
local tg=tc:IsAbleToGrave() and not tc:IsLocation(LOCATION_GRAVE)