Commit 6a3da989 authored by Amiya's avatar Amiya

Merge branch 'master' of git.moenext.com:mycard/pre-release-database-cdb

parents c108637f 9558f600
Pipeline #40547 passed with stages
in 1 minute and 35 seconds
...@@ -45,30 +45,30 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,30 +45,30 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
function s.setfilter(c,tp) function s.setfilter(c,tp)
return c:IsSetCard(0xef) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.gcheck(sg,tp)
return sg:IsExists(s.setfilter1,1,nil,tp) and sg:IsExists(s.setfilter2,1,nil,tp)
end
function s.setfilter1(c,tp)
return c:IsSetCard(0xef) and c:IsType(TYPE_SPELL) and c:IsSSetable() return c:IsSetCard(0xef) and c:IsType(TYPE_SPELL) and c:IsSSetable()
and (Duel.GetLocationCount(tp,LOCATION_SZONE)>1 or c:IsType(TYPE_FIELD)) and (Duel.GetLocationCount(tp,LOCATION_SZONE)>1
and Duel.IsExistingMatchingCard(s.setfilter2,tp,LOCATION_DECK,0,1,nil,tp,c) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsType(TYPE_FIELD))
end end
function s.setfilter2(c,tp,tc) function s.setfilter2(c)
return c:IsSetCard(0xef) and c:IsType(TYPE_TRAP) and c:IsSSetable() return c:IsSetCard(0xef) and c:IsType(TYPE_TRAP) and c:IsSSetable()
and (Duel.GetLocationCount(tp,LOCATION_SZONE)>1 or tc:IsType(TYPE_FIELD))
end end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 local sg=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil,tp)
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil,tp) if chk==0 then return sg:CheckSubGroup(s.gcheck,2,2,tp) end
and Duel.IsExistingMatchingCard(s.setfilter2,tp,LOCATION_DECK,0,1,nil) end
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end local sg=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) if not sg:CheckSubGroup(s.gcheck,2,2,tp) then return end
local g1=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if not g1 or g1:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g2=Duel.SelectMatchingCard(tp,s.setfilter2,tp,LOCATION_DECK,0,1,1,nil,tp,g1:GetFirst()) local g=sg:SelectSubGroup(tp,s.gcheck,false,2,2,tp)
if not g2 or g2:GetCount()==0 then return end if g:GetCount()==2 then
g1:Merge(g2) Duel.SSet(tp,g)
if g1:GetCount()>0 then
Duel.SSet(tp,g1)
end end
end end
function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
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