Commit 33b24803 authored by TanakaKotoha's avatar TanakaKotoha

none

parent 0a601d7b
...@@ -119,31 +119,36 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -119,31 +119,36 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end end
function cm.filter1(tc,c) function cm.filter1(tc,c,e)
if not tc:IsFaceup() or not tc:IsCanBeSynchroMaterial() then return false end if not tc:IsFaceup() or not tc:IsCanBeSynchroMaterial() then return false end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL) e1:SetCode(EFFECT_SYNCHRO_MATERIAL)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
e:SetLabelObject(e1)
return true return true
end end
function cm.synfilter(c,mg) function cm.synfilter(c,mg)
return c:IsSynchroSummonable(nil,mg) return c:IsSynchroSummonable(nil,mg)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler()) local mg=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler(),e)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),mg) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),mg) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler()) local te=e:GetLabelObject()
te:Reset()
local mg=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler(),e)
local te=e:GetLabelObject()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,e:GetHandler(),mg) local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,e:GetHandler(),mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c,mg) Duel.SynchroSummon(tp,sg:GetFirst(),c,mg)
te:Reset()
end end
end end
function cm.cfilter(c) function cm.cfilter(c)
......
...@@ -46,11 +46,11 @@ function cm.setcost1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -46,11 +46,11 @@ function cm.setcost1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function cm.setfilter1(c,tp) function cm.setfilter1(c,tp)
return c:IsFaceup() and c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS return c:IsFaceup() and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS)
and Duel.IsExistingMatchingCard(cm.setfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode()) and Duel.IsExistingMatchingCard(cm.setfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end end
function cm.setfilter2(c,code) function cm.setfilter2(c,code)
return c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS and not c:IsCode(code) and c:IsSSetable() return c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and not c:IsCode(code) and c:IsSSetable()
end end
function cm.settg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.settg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and cm.setfilter1(chkc,tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and cm.setfilter1(chkc,tp) 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