Commit 20863752 authored by VanillaSalt's avatar VanillaSalt

Merge pull request #1435 from nekrozar/patch-3

fix Artifacts Unleashed, Number F0: Utopic Future
parents eff85782 d494b2de
...@@ -34,6 +34,9 @@ end ...@@ -34,6 +34,9 @@ end
function c56611470.mfilter2(c,mc) function c56611470.mfilter2(c,mc)
return c.xyz_filter(mc) return c.xyz_filter(mc)
end end
function c56611470.mfilter3(c,mc,exg)
return exg:IsExists(Card.IsXyzSummonable,1,nil,Group.FromCards(c,mc))
end
function c56611470.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c56611470.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local mg=Duel.GetMatchingGroup(c56611470.filter,tp,LOCATION_MZONE,0,nil,e) local mg=Duel.GetMatchingGroup(c56611470.filter,tp,LOCATION_MZONE,0,nil,e)
...@@ -43,9 +46,8 @@ function c56611470.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -43,9 +46,8 @@ function c56611470.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local sg1=mg:FilterSelect(tp,c56611470.mfilter1,1,1,nil,exg) local sg1=mg:FilterSelect(tp,c56611470.mfilter1,1,1,nil,exg)
local tc1=sg1:GetFirst() local tc1=sg1:GetFirst()
local exg2=exg:Filter(c56611470.mfilter2,nil,tc1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local sg2=mg:FilterSelect(tp,c56611470.mfilter1,1,1,tc1,exg2) local sg2=mg:FilterSelect(tp,c56611470.mfilter3,1,1,tc1,tc1,exg)
sg1:Merge(sg2) sg1:Merge(sg2)
Duel.SetTargetCard(sg1) Duel.SetTargetCard(sg1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......
...@@ -44,8 +44,12 @@ function c65305468.initial_effect(c) ...@@ -44,8 +44,12 @@ function c65305468.initial_effect(c)
e7:SetRange(LOCATION_MZONE) e7:SetRange(LOCATION_MZONE)
e7:SetTarget(c65305468.reptg) e7:SetTarget(c65305468.reptg)
c:RegisterEffect(e7) c:RegisterEffect(e7)
if not c65305468.xyz_filter then
c65305468.xyz_filter=function(mc) return mc:IsType(TYPE_XYZ) and not mc:IsSetCard(0x48) and mc:IsCanBeXyzMaterial(c) end
end
end end
c65305468.xyz_number=0 c65305468.xyz_number=0
c65305468.xyz_count=2
function c65305468.mfilter(c) function c65305468.mfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and not c:IsSetCard(0x48) return c:IsFaceup() and c:IsType(TYPE_XYZ) and not c:IsSetCard(0x48)
end end
...@@ -59,24 +63,36 @@ function c65305468.xyzcon(e,c,og) ...@@ -59,24 +63,36 @@ function c65305468.xyzcon(e,c,og)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c65305468.mfilter,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(c65305468.mfilter,tp,LOCATION_MZONE,0,nil)
if og then mg=og end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and mg:IsExists(c65305468.xyzfilter1,1,nil,mg) and mg:IsExists(c65305468.xyzfilter1,1,nil,mg)
end end
function c65305468.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og) function c65305468.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og)
local mg=Duel.GetMatchingGroup(c65305468.mfilter,tp,LOCATION_MZONE,0,nil) local g=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) local sg=Group.CreateGroup()
local g1=mg:FilterSelect(tp,c65305468.xyzfilter1,1,1,nil,mg) if og then
local tc1=g1:GetFirst() local tc=og:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) while tc do
local g2=mg:FilterSelect(tp,c65305468.xyzfilter2,1,1,tc1,tc1:GetRank()) g:AddCard(tc)
local tc2=g2:GetFirst() sg:Merge(tc:GetOverlayGroup())
g1:Merge(g2) tc=og:GetNext()
local sg1=tc1:GetOverlayGroup() end
local sg2=tc2:GetOverlayGroup() else
sg1:Merge(sg2) local mg=Duel.GetMatchingGroup(c65305468.mfilter,tp,LOCATION_MZONE,0,nil)
Duel.SendtoGrave(sg1,REASON_RULE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
c:SetMaterial(g1) local g1=mg:FilterSelect(tp,c65305468.xyzfilter1,1,1,nil,mg)
Duel.Overlay(c,g1) local tc1=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g2=mg:FilterSelect(tp,c65305468.xyzfilter2,1,1,tc1,tc1:GetRank())
local tc2=g2:GetFirst()
g:AddCard(tc1)
g:AddCard(tc2)
sg:Merge(tc1:GetOverlayGroup())
sg:Merge(tc2:GetOverlayGroup())
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(g)
Duel.Overlay(c,g)
end end
function c65305468.cttg(e,tp,eg,ep,ev,re,r,rp,chk) function c65305468.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget() local tc=e:GetHandler():GetBattleTarget()
......
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