Commit 704d3eec authored by nanahira's avatar nanahira Committed by VanillaSalt

update Dante, Pilgrim of the Burning Abyss (#869)

updated the fusion proc of Pilgrim of the Burning Abyss in mr4
parent 63a9606e
...@@ -84,41 +84,36 @@ end ...@@ -84,41 +84,36 @@ end
function c18386170.ffilter(c,fc) function c18386170.ffilter(c,fc)
return c:IsFusionSetCard(0xb1) and not c:IsHasEffect(6205579) and c:IsCanBeFusionMaterial(fc) return c:IsFusionSetCard(0xb1) and not c:IsHasEffect(6205579) and c:IsCanBeFusionMaterial(fc)
end end
function c18386170.fselect(c,mg,sg,tp,fc)
if sg:IsExists(Card.IsCode,1,nil,c:GetCode()) then return false end
sg:AddCard(c)
local res=false
if sg:GetCount()==3 then
res=Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0
else
res=mg:IsExists(c18386170.fselect,1,sg,mg,sg,tp,fc)
end
sg:RemoveCard(c)
return res
end
function c18386170.fscon(e,g,gc,chkf) function c18386170.fscon(e,g,gc,chkf)
if g==nil then return true end if g==nil then return true end
local mg=g:Filter(c18386170.ffilter,nil,e:GetHandler()) local c=e:GetHandler()
if gc then local tp=c:GetControler()
mg:AddCard(gc) local mg=g:Filter(c18386170.ffilter,nil,c)
return c18386170.ffilter(gc,e:GetHandler()) and mg:GetClassCount(Card.GetCode)>=3 local sg=Group.CreateGroup()
end if gc then return c18386170.ffilter(gc,c) and c18386170.fselect(gc,mg,sg,tp,fc) end
local fs=false return mg:IsExists(c18386170.fselect,1,sg,mg,sg,tp,c)
if mg:IsExists(aux.FConditionCheckF,1,nil,chkf) then fs=true end
return mg:GetClassCount(Card.GetCode)>=3 and (fs or chkf==PLAYER_NONE)
end end
function c18386170.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf) function c18386170.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local sg=eg:Filter(c18386170.ffilter,gc,e:GetHandler()) local c=e:GetHandler()
if gc then local mg=eg:Filter(c18386170.ffilter,nil,c)
sg:Remove(Card.IsCode,nil,gc:GetCode()) local sg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) if gc then sg:AddCard(gc) end
local g1=sg:Select(tp,1,1,nil) repeat
sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g2=sg:Select(tp,1,1,nil) local g=mg:FilterSelect(tp,c18386170.fselect,1,1,sg,mg,sg,tp,c)
g1:Merge(g2) sg:Merge(g)
Duel.SetFusionMaterial(g1) until sg:GetCount()==3
return Duel.SetFusionMaterial(sg)
end
local g1=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
if chkf~=PLAYER_NONE then g1=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf)
else g1=sg:Select(tp,1,1,nil) end
sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g2=sg:Select(tp,1,1,nil)
sg:Remove(Card.IsCode,nil,g2:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g3=sg:Select(tp,1,1,nil)
g1:Merge(g2)
g1:Merge(g3)
Duel.SetFusionMaterial(g1)
end 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