Commit 25afa7e7 authored by fallenstardust's avatar fallenstardust

fix QCDB-JP001 script

parent 50141bab
Pipeline #24484 passed with stages
in 54 seconds
...@@ -68,6 +68,9 @@ end ...@@ -68,6 +68,9 @@ end
function c100212001.Chaos_FShaddollFilter(c,mg,fc,chkf) function c100212001.Chaos_FShaddollFilter(c,mg,fc,chkf)
return c:IsFusionSetCard(0xcf) and c:IsFusionType(TYPE_RITUAL) and mg:CheckSubGroup(c100212001.FShaddollSpgcheck,1,3,fc,c,chkf) return c:IsFusionSetCard(0xcf) and c:IsFusionType(TYPE_RITUAL) and mg:CheckSubGroup(c100212001.FShaddollSpgcheck,1,3,fc,c,chkf)
end end
function c100212001.Unnecessary_Chaos_FShaddollFilter(c)
return c:IsFusionSetCard(0xcf) and c:IsFusionType(TYPE_RITUAL) and not (c:IsFusionSetCard(0xdd) or c:IsFusionCode(23995346) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE))
end
function c100212001.Blue_Eyes_Ultimate_Dragon(c) function c100212001.Blue_Eyes_Ultimate_Dragon(c)
return c:IsFusionCode(23995346) and not c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) return c:IsFusionCode(23995346) and not c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)
or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)
...@@ -78,10 +81,11 @@ function c100212001.FShaddollSpgcheck(g,fc,ec,chkf) ...@@ -78,10 +81,11 @@ function c100212001.FShaddollSpgcheck(g,fc,ec,chkf)
local c=g:Filter(c100212001.Blue_Eyes_Ultimate_Dragon,nil):GetFirst() local c=g:Filter(c100212001.Blue_Eyes_Ultimate_Dragon,nil):GetFirst()
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc) if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc)
or aux.FGoalCheckAdditional and not aux.FGoalCheckAdditional(tp,sg,fc) then return false end or aux.FGoalCheckAdditional and not aux.FGoalCheckAdditional(tp,sg,fc) then return false end
return (g:FilterCount(c100212001.Blue_Eyes_Ultimate_Dragon,nil)==1 return ((g:FilterCount(c100212001.Blue_Eyes_Ultimate_Dragon,nil)==1
and g:FilterCount(Card.IsFusionSetCard,c,0xdd)==0 and g:FilterCount(Card.IsFusionSetCard,c,0xdd)==0
or g:FilterCount(Card.IsFusionSetCard,nil,0xdd)==3) or g:FilterCount(Card.IsFusionSetCard,nil,0xdd)==3)
and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0) and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0))
and g:FilterCount(c100212001.Unnecessary_Chaos_FShaddollFilter,nil)==0
end end
function c100212001.Necessarily_FShaddollFilter(c,gc) function c100212001.Necessarily_FShaddollFilter(c,gc)
return c:IsCode(gc:GetCode()) return c:IsCode(gc:GetCode())
...@@ -92,10 +96,11 @@ function c100212001.Necessarily_FShaddollSpgcheck(g,gc,fc,ec,chkf) ...@@ -92,10 +96,11 @@ function c100212001.Necessarily_FShaddollSpgcheck(g,gc,fc,ec,chkf)
sg:AddCard(ec) sg:AddCard(ec)
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc) if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc)
or aux.FGoalCheckAdditional and not aux.FGoalCheckAdditional(tp,sg,fc) then return false end or aux.FGoalCheckAdditional and not aux.FGoalCheckAdditional(tp,sg,fc) then return false end
return ((g:FilterCount(c100212001.Blue_Eyes_Ultimate_Dragon,nil)==1 return (((g:FilterCount(c100212001.Blue_Eyes_Ultimate_Dragon,nil)==1
and g:FilterCount(Card.IsFusionSetCard,c,0xdd)==0 and g:FilterCount(Card.IsFusionSetCard,c,0xdd)==0
or g:FilterCount(Card.IsFusionSetCard,nil,0xdd)==3) and g:FilterCount(c100212001.Necessarily_FShaddollFilter,nil,gc)==1) or g:FilterCount(Card.IsFusionSetCard,nil,0xdd)==3) and g:FilterCount(c100212001.Necessarily_FShaddollFilter,nil,gc)==1)
and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0) and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0))
and g:FilterCount(c100212001.Unnecessary_Chaos_FShaddollFilter,nil)==0
end end
function c100212001.FShaddollCondition() function c100212001.FShaddollCondition()
return function(e,g,gc,chkf) return function(e,g,gc,chkf)
...@@ -120,9 +125,6 @@ function c100212001.FShaddollOperation() ...@@ -120,9 +125,6 @@ function c100212001.FShaddollOperation()
mg=eg:Filter(c100212001.FShaddollFilter,nil) mg=eg:Filter(c100212001.FShaddollFilter,nil)
end end
local g=nil local g=nil
if gc then
if not mg:IsContains(gc) then return false end
end
if gc then if gc then
if c100212001.Chaos_FShaddollFilter(gc,mg,fc,chkf) then if c100212001.Chaos_FShaddollFilter(gc,mg,fc,chkf) then
g=Group.FromCards(gc) g=Group.FromCards(gc)
...@@ -136,14 +138,14 @@ function c100212001.FShaddollOperation() ...@@ -136,14 +138,14 @@ function c100212001.FShaddollOperation()
local sg=nil local sg=nil
if gc and g:FilterCount(c100212001.Necessarily_FShaddollFilter,nil,gc)==1 then if gc and g:FilterCount(c100212001.Necessarily_FShaddollFilter,nil,gc)==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=mg:SelectSubGroup(tp,c100212001.FShaddollSpgcheck,false,1,3,gc,g:GetFirst(),fc,chkf) sg=mg:SelectSubGroup(tp,c100212001.FShaddollSpgcheck,false,1,3,fc,g:GetFirst(),chkf)
else else
if gc then if gc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=mg:SelectSubGroup(tp,c100212001.Necessarily_FShaddollSpgcheck,false,1,3,gc,g:GetFirst(),fc,chkf) sg=mg:SelectSubGroup(tp,c100212001.Necessarily_FShaddollSpgcheck,false,1,3,gc,fc,g:GetFirst(),chkf)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=mg:SelectSubGroup(tp,c100212001.FShaddollSpgcheck,true,1,3,g:GetFirst(),fc,chkf) sg=mg:SelectSubGroup(tp,c100212001.FShaddollSpgcheck,true,1,3,fc,g:GetFirst(),chkf)
end end
end end
while not sg do while not sg do
...@@ -152,7 +154,7 @@ function c100212001.FShaddollOperation() ...@@ -152,7 +154,7 @@ function c100212001.FShaddollOperation()
g=mg:FilterSelect(tp,c100212001.Chaos_FShaddollFilter,1,1,nil,mg,e) g=mg:FilterSelect(tp,c100212001.Chaos_FShaddollFilter,1,1,nil,mg,e)
mg:Sub(g) mg:Sub(g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=mg:SelectSubGroup(tp,c100212001.FShaddollSpgcheck,true,1,3,g:GetFirst(),fc,chkf) sg=mg:SelectSubGroup(tp,c100212001.FShaddollSpgcheck,true,1,3,fc,g:GetFirst(),chkf)
end end
g:Merge(sg) g:Merge(sg)
Duel.SetFusionMaterial(g) Duel.SetFusionMaterial(g)
......
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