Commit b1251a4b authored by TanakaKotoha's avatar TanakaKotoha

cctv

parent 5bcc4b9d
......@@ -31,10 +31,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetOperation(cm.activate)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,0,0,0)
else
......@@ -44,7 +41,9 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not tc:IsHasEffect(EFFECT_NECRO_VALLEY)
......@@ -58,7 +57,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
--e2
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0xa82) end
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0xa12) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0xa82)
Duel.Release(g,REASON_COST)
end
......
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