Commit d529305e authored by fallenstardust's avatar fallenstardust

fix LEDE-JP008\018 Scripts

fix QCDB-JP001 script
parent 49e81bca
...@@ -41,14 +41,16 @@ end ...@@ -41,14 +41,16 @@ end
function c100212001.FShaddollFilter(c) function c100212001.FShaddollFilter(c)
return c:IsFusionSetCard(0xdd) or c:IsFusionSetCard(0xcf) and c:IsFusionType(TYPE_RITUAL) or c:IsFusionCode(23995346) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) return c:IsFusionSetCard(0xdd) or c:IsFusionSetCard(0xcf) and c:IsFusionType(TYPE_RITUAL) or c:IsFusionCode(23995346) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)
end end
function c100212001.Chaos_FShaddollFilter(c,mg,code) function c100212001.Chaos_FShaddollFilter(c,mg,fe)
return c:IsFusionSetCard(0xcf) and c:IsFusionType(TYPE_RITUAL) and mg:CheckSubGroup(c100212001.FShaddollSpgcheck,1,3,c,code) return c:IsFusionSetCard(0xcf) and c:IsFusionType(TYPE_RITUAL) and mg:CheckSubGroup(c100212001.FShaddollSpgcheck,1,3,c,fe)
end end
function c100212001.Blue_Eyes_Ultimate_Dragon(c,g,code) function c100212001.Blue_Eyes_Ultimate_Dragon(c,g,fe)
return (c:IsFusionCode(23995346) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) and not code==71143015) and g:FilterCount(Card.IsFusionSetCard,c,0xdd)==0 return (c:IsFusionCode(23995346)
or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) and not fe:GetHandler():IsCode(71143015))
and g:FilterCount(Card.IsFusionSetCard,c,0xdd)==0
end end
function c100212001.FShaddollSpgcheck(g,c,code) function c100212001.FShaddollSpgcheck(g,c,fe)
return (g:FilterCount(c100212001.Blue_Eyes_Ultimate_Dragon,c,g,code)==1 return (g:FilterCount(c100212001.Blue_Eyes_Ultimate_Dragon,c,g,fe)==1
or g:FilterCount(Card.IsFusionSetCard,c,0xdd)==3) or g:FilterCount(Card.IsFusionSetCard,c,0xdd)==3)
end end
function c100212001.FShaddollCondition() function c100212001.FShaddollCondition()
...@@ -56,7 +58,7 @@ function c100212001.FShaddollCondition() ...@@ -56,7 +58,7 @@ function c100212001.FShaddollCondition()
if g==nil then return aux.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end if g==nil then return aux.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end
local c=e:GetHandler() local c=e:GetHandler()
local mg=g:Filter(c100212001.FShaddollFilter,nil) local mg=g:Filter(c100212001.FShaddollFilter,nil)
return mg:IsExists(c100212001.Chaos_FShaddollFilter,1,nil,mg,e:GetHandler():GetCode()) return mg:IsExists(c100212001.Chaos_FShaddollFilter,1,nil,mg,e)
end end
end end
function c100212001.FShaddollOperation() function c100212001.FShaddollOperation()
...@@ -69,19 +71,19 @@ function c100212001.FShaddollOperation() ...@@ -69,19 +71,19 @@ function c100212001.FShaddollOperation()
mg:RemoveCard(gc) mg:RemoveCard(gc)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=mg:FilterSelect(tp,c100212001.Chaos_FShaddollFilter,1,1,nil,mg,e:GetHandler():GetCode()) g=mg:FilterSelect(tp,c100212001.Chaos_FShaddollFilter,1,1,nil,mg,e)
mg:Sub(g) mg:Sub(g)
end end
local sg=nil local sg=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=mg:SelectSubGroup(tp,c100212001.FShaddollSpgcheck,true,1,3,g) sg=mg:SelectSubGroup(tp,c100212001.FShaddollSpgcheck,true,1,3,g,e)
while not sg do while not sg do
mg:AddCard(g:GetFirst()) mg:AddCard(g:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=mg:FilterSelect(tp,c100212001.Chaos_FShaddollFilter,1,1,nil,mg,e:GetHandler():GetCode()) 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) sg=mg:SelectSubGroup(tp,c100212001.FShaddollSpgcheck,true,1,3,g,e)
end end
g:Merge(sg) g:Merge(sg)
Duel.SetFusionMaterial(g) Duel.SetFusionMaterial(g)
......
...@@ -37,7 +37,7 @@ function c101204008.initial_effect(c) ...@@ -37,7 +37,7 @@ function c101204008.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c101204008.costfilter(c,tp) function c101204008.costfilter(c,tp)
return c:IsCode(83104731) and not c:IsCode(36521307) and c:IsAbleToGraveAsCost() return c:IsCode(83104731) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c101204008.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c) and Duel.IsExistingMatchingCard(c101204008.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c)
end end
function c101204008.scost(e,tp,eg,ep,ev,re,r,rp,chk) function c101204008.scost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -47,7 +47,7 @@ function c101204018.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,7 +47,7 @@ function c101204018.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101204018.spop(e,tp,eg,ep,ev,re,r,rp) function c101204018.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c101204018.filter(c,e,tp) function c101204018.filter(c,e,tp)
......
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