Commit e8efb21f authored by sidschingis's avatar sidschingis Committed by VanillaSalt

fix

fixed not being able to chain the effect when XYZ summoned with Star
Drawing or HC Extra Sword
parent 81bc1172
...@@ -28,9 +28,13 @@ function c46772449.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,9 +28,13 @@ function c46772449.condition(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c46772449.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c46772449.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end local c=e:GetHandler()
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and
local e1=Effect.CreateEffect(e:GetHandler()) c:GetFlagEffect(46772449)==0
end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
c:RegisterFlagEffect(46772449,RESET_CHAIN,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -40,12 +44,12 @@ function c46772449.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,12 +44,12 @@ function c46772449.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c46772449.target(e,tp,eg,ep,ev,re,r,rp,chk) function c46772449.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) if chk==0 then return
and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c46772449.operation(e,tp,eg,ep,ev,re,r,rp) function c46772449.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
\ No newline at end of file
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