Commit 0b01ebfc authored by TanakaKotoha's avatar TanakaKotoha

cctv

parent 43ecbe48
......@@ -46,7 +46,7 @@ end
function c12029022.chcon1(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ((re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE)
or ((re:GetActiveType()==TYPE_SPELL or re:GetActiveType()==TYPE_TRAP) )) and Duel.IsExistingMatchingCard(c12029022.filter1,rp,0,LOCATION_ONFIELD,1,nil)
or (re:GetActiveType()==TYPE_SPELL or re:GetActiveType()==TYPE_TRAP)or re:GetHandler():IsOnField()) and Duel.IsExistingMatchingCard(c12029022.filter1,rp,0,LOCATION_ONFIELD,1,nil)
end
--
function c12029022.chop1(e,tp,eg,ep,ev,re,r,rp)
......@@ -57,7 +57,8 @@ end
--
function c12029022.repop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c12029022.filter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SendtoGrave(tc,REASON_RULE)
......@@ -95,24 +96,25 @@ end
--
function c12029022.repop3(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),tp,1,REASON_EFFECT)
Duel.Draw(rp,1,REASON_EFFECT)
Duel.ShuffleDeck(e:GetOwnerPlayer())
Duel.Draw(e:GetOwnerPlayer(),1,REASON_EFFECT)
end
--
function c12029022.spfilter(c,e,tp,lv)
return c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
--
function c12029022.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12029022.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c12029022.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c12029022.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12029022.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and Duel.IsExistingMatchingCard(c12029022.spfilter,tp,LOCATION_DECK,nil,e,tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tcl=Duel.SelectMatchingCard(tp,c12029022.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
tcl=tcl:GetFirst()
if tcl then
Duel.SpecialSummon(tcl,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
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