Commit 7154552c authored by DailyShana's avatar DailyShana

Merge pull request #311 from nekrozar/patch-1

fix Artifacts Unleashed
parents 5f2b27ef 84dc6f4b
...@@ -13,7 +13,7 @@ function c56611470.initial_effect(c) ...@@ -13,7 +13,7 @@ function c56611470.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(56611470,0)) e2:SetDescription(aux.Stringid(56611470,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(c56611470.drcon) e2:SetCondition(c56611470.drcon)
e2:SetCost(c56611470.drcost) e2:SetCost(c56611470.drcost)
...@@ -48,9 +48,19 @@ function c56611470.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -48,9 +48,19 @@ function c56611470.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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)
end end
function c56611470.tfilter(c,e)
return c:IsRelateToEffect(e) and c:IsFaceup()
end
function c56611470.activate(e,tp,eg,ep,ev,re,r,rp) function c56611470.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c56611470.attg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<-1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<-1 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c56611470.tfilter,nil,e)
if g:GetCount()<2 then return end if g:GetCount()<2 then return end
local xyzg=Duel.GetMatchingGroup(c56611470.xyzfilter,tp,LOCATION_EXTRA,0,nil,g) local xyzg=Duel.GetMatchingGroup(c56611470.xyzfilter,tp,LOCATION_EXTRA,0,nil,g)
if xyzg:GetCount()>0 then if xyzg:GetCount()>0 then
...@@ -58,13 +68,6 @@ function c56611470.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,13 +68,6 @@ function c56611470.activate(e,tp,eg,ep,ev,re,r,rp)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst() local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,g) Duel.XyzSummon(tp,xyz,g)
end end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c56611470.attg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end end
function c56611470.attg(e,c) function c56611470.attg(e,c)
return not c:IsSetCard(0x97) return not c:IsSetCard(0x97)
......
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