Commit 722d2794 authored by TanakaKotoha's avatar TanakaKotoha

Merge branch 'master' into 2020.9.6

parents 53c7cc2a e024d0d1
Pipeline #685 passed with stage
in 9 minutes and 6 seconds
......@@ -33,7 +33,7 @@ function c11200207.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11200207.descfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
function c11200207.descfilter(c)
return c:IsFaceup() and c:CheckSetCard("SCP") and (not c:CheckSetCard("SCP_J")) and not c:IsCode(11200207)
return c:IsFaceup() and c:CheckSetCard("SCP") and (not c:CheckSetCard("SCP_J"))
end
function cm.fusf(c)
return c:IsReleasable() and c:IsType(TYPE_MONSTER) and c:CheckSetCard("SCP")
......@@ -48,15 +48,12 @@ end
function c11200207.filter0(c)
return c:IsFaceup() and c:IsCanBeFusionMaterial()
end
function c11200207.filter1_1(c)
return c:IsCanBeFusionMaterial()
end
function c11200207.filter1(c,e)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c11200207.filter2(c,e,tp,m,f,chkf,cc)
function c11200207.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,cc,chkf)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c11200207.filter3(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e)
......@@ -64,11 +61,9 @@ end
function c11200207.copytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c11200207.filter0,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg2)
local mg1_1=Duel.GetMatchingGroup(c11200207.filter1_1,tp,LOCATION_HAND,0,nil)
mg1=mg1:Merge(mg1_1)
local res=Duel.IsExistingMatchingCard(c11200207.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
......@@ -84,14 +79,12 @@ function c11200207.copytg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c11200207.copyop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local c=e:GetHandler()
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local mg2=Duel.GetMatchingGroup(c11200207.filter0,tp,0,LOCATION_MZONE,nil)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c11200207.filter1,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
local mg1_1=Duel.GetMatchingGroup(c11200207.filter1_1,tp,LOCATION_HAND,0,nil)
mg1=mg1:Merge(mg1_1)
local sg1=Duel.GetMatchingGroup(c11200207.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf,eg:Filter(Card.IsCode,nil,16102002):GetFirst())
local sg1=Duel.GetMatchingGroup(c11200207.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
......@@ -108,13 +101,13 @@ function c11200207.copyop(e,tp,eg,ep,ev,re,r,rp)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,eg:Filter(Card.IsCode,nil,16102002):GetFirst(),chkf)
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,eg:Filter(Card.IsCode,nil,16102002):GetFirst(),chkf)
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
......
......@@ -47,18 +47,14 @@ end
function c12003000.filter(c)
return c:IsRace(RACE_SEASERPENT) and c:IsAbleToHand()
end
function c12003000.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_DECK) and c12003000.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12003000.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c12003000.filter,tp,LOCATION_DECK,0,1,1,nil)
function c12003000.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12003000.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c12003000.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c12003000.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
......@@ -93,7 +93,7 @@ function c12063003.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local g=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc1:IsRelateToEffect(e) then
if g:IsRelateToEffect(e) then
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Draw(p,d,REASON_EFFECT)
......
......@@ -2,8 +2,8 @@
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16102002,"SCP_J")
function cm.initial_effect(c)
local e1=rsef.I(c,{m,0},{1,m},"dr,th",nil,LOCATION_MZONE,nil,rscost.cost(Card.IsReleasable,"res",LOCATION_ONFIELD),rsop.target(nil,"dr",1),cm.drop)
local e2=rsef.I(c,{m,1},nil,"sp",nil,LOCATION_HAND,cm.spcon,nil,rsop.target(rscf.spfilter2(),"sp"),cm.spop)
local e1=rsef.I(c,{m,0},{1,m},"dr,th",nil,LOCATION_MZONE,nil,rscost.cost(Card.IsReleasable,"res",LOCATION_ONFIELD),rsop.target(1,"dr"),cm.drop)
local e2=rsef.I(c,{m,1},nil,"sp",nil,LOCATION_HAND,cm.spcon,nil,rsop.target(rscf.spfilter2,"sp"),cm.spop)
end
function cm.drop(e,tp)
if Duel.Draw(tp,1,REASON_EFFECT)<=0 then return end
......
......@@ -71,12 +71,12 @@ function c33310009.rpop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
local op=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
op=Duel.SelectOption(tp,aux.Stringid(33310009,1),aux.Stringid(33310009,2))
op=Duel.SelectOption(tp,aux.Stringid(33310009,0),aux.Stringid(33310009,1))
else
op=Duel.SelectOption(tp,aux.Stringid(33310009,1))
end
if op==0 then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
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