Commit 9e3bb213 authored by wind2009's avatar wind2009

sync エルシャドール・メシャフレール

parent 9950fde9
......@@ -102,7 +102,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.FShaddollFilter(c,fc)
return (c:IsFusionSetCard(0x9d) or c:IsFusionAttribute(ATTRIBUTE_DARK+ATTRIBUTE_EARTH) or c:IsHasEffect(4904633))
and c:IsCanBeFusionMaterial(fc) and not c:IsHasEffect(6205579)
......@@ -120,22 +119,14 @@ end
function s.FShaddollFilter3(c)
return c:IsFusionAttribute(ATTRIBUTE_EARTH) or c:IsHasEffect(4904633)
end
function s.FShaddollSpFilter1(c,fc,tp,mg,exg,chkf)
local emg=mg:Clone()
if exg then
emg:Merge(exg)
end
return mg:CheckSubGroup(s.FShaddollgcheck,3,3,c,fc,tp,c,chkf,exg)
or (exg and emg:CheckSubGroup(s.FShaddollgcheck,3,3,c,fc,tp,c,chkf,exg))
end
function s.FShaddollgcheck(g,gc,fc,tp,c,chkf,exg)
if gc and g:IsContains(gc) then return false end
function s.FShaddollCheck(g,gc,fc,tp,c,chkf,exg)
if gc and not g:IsContains(gc) then return false end
if exg and g:FilterCount(aux.IsInGroup,nil,exg)>1 then return false end
if g:IsExists(aux.TuneMagicianCheckX,1,nil,g,EFFECT_TUNE_MAGICIAN_F) then return false end
if not aux.MustMaterialCheck(g,tp,EFFECT_MUST_BE_FMATERIAL) then return false end
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,g,fc)
or aux.FGoalCheckAdditional and not aux.FGoalCheckAdditional(tp,g,fc) then return false end
return g:IsExists(s.FShaddollFilter1,1,nil,g)
and (not exg or not g:IsExists(s.exfilter,2,nil,exg))
and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,g,fc)>0)
end
function s.FShaddollCondition(e,g,gc,chkf)
......@@ -149,14 +140,9 @@ function s.FShaddollCondition(e,g,gc,chkf)
local fe=fc:IsHasEffect(81788994)
exg=Duel.GetMatchingGroup(s.FShaddollExFilter,tp,0,LOCATION_MZONE,mg,c,fe)
end
if gc then
if not mg:IsContains(gc) then return false end
return s.FShaddollSpFilter1(gc,c,tp,mg,exg,chkf)
end
return mg:IsExists(s.FShaddollSpFilter1,1,nil,c,tp,mg,exg,chkf)
end
function s.exfilter(c,g)
return g:IsContains(c)
if exg then mg:Merge(exg) end
if gc and not mg:IsContains(gc) then return false end
return mg:CheckSubGroup(s.FShaddollCheck,3,3,gc,fc,tp,c,chkf,exg)
end
function s.FShaddollOperation(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler()
......@@ -168,10 +154,9 @@ function s.FShaddollOperation(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
exg=Duel.GetMatchingGroup(s.FShaddollExFilter,tp,0,LOCATION_MZONE,mg,c,fe)
end
if exg then mg:Merge(exg) end
if gc and not s.FShaddollSpFilter1(gc,c,tp,mg,exg,chkf) then return false end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=mg:SelectSubGroup(tp,s.FShaddollgcheck,false,3,3,c,tp,c,chkf,exg)
if exg and g:IsExists(s.exfilter,1,nil,exg) then
local g=mg:SelectSubGroup(tp,s.FShaddollCheck,false,3,3,gc,c,tp,c,chkf,exg)
if exg and g:IsExists(aux.IsInGroup,1,nil,exg) then
fc:RemoveCounter(tp,0x16,3,REASON_EFFECT)
end
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