Commit f42f703e authored by Tachibana's avatar Tachibana

ybb

parent 30564719
......@@ -237,16 +237,18 @@ function cm.linkop(e,tp,eg,ep,ev,re,r,rp)
end
--Effect 3
function cm.togfilter(c,tp)
return Duel.IsExistingMatchingCard(cm.gyfilter,tp,0,LOCATION_ONFIELD,1,nil,c:GetColumnGroup(),tp)
local rg=c:GetColumnGroup()
rg:AddCard(c)
return rg:IsExists(cm.gyfilter,1,nil,tp)
end
function cm.gyfilter(c,g,tp)
return c:IsAbleToGrave() and g:IsContains(c) and c:IsControler(1-tp)
function cm.gyfilter(c,tp)
return c:IsAbleToGrave() and c:IsControler(tp)
end
function cm.togtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return cm.togfilter(chkc) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(cm.togfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) end
if chkc then return cm.togfilter(chkc,1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(cm.togfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,1-tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.togfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp)
Duel.SelectTarget(tp,cm.togfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,1-tp)
end
function cm.togop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment