Commit 8a5f3ef9 authored by VanillaSalt's avatar VanillaSalt

Merge pull request #713 from salix5/patch

fix
parents 3b16a5a7 e7664346
......@@ -18,7 +18,7 @@ function c17494901.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c17494901.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c17494901.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
......
......@@ -15,7 +15,7 @@ function c29071332.initial_effect(c)
c:RegisterEffect(e1)
end
function c29071332.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():GetFlagEffect(29071332)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
......
......@@ -30,7 +30,7 @@ function c29223325.desfilter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() and c:GetSequence()~=5
end
function c29223325.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c29223325.desfilter(chkc) end
if chkc then return chkc:IsOnField() and c29223325.desfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then
if not Duel.IsExistingMatchingCard(c29223325.filter,tp,LOCATION_DECK,0,1,nil) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
......@@ -39,7 +39,7 @@ function c29223325.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
elseif ft>0 then
return Duel.IsExistingTarget(c29223325.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
else
return Duel.IsExistingTarget(c29223325.desfilter2,tp,LOCATION_SZONE,0,1,e:GetHandler())
return Duel.IsExistingTarget(c29223325.desfilter2,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
......@@ -48,7 +48,7 @@ function c29223325.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if ft>0 then
g=Duel.SelectTarget(tp,c29223325.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
else
g=Duel.SelectTarget(tp,c29223325.desfilter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
g=Duel.SelectTarget(tp,c29223325.desfilter2,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
......
......@@ -18,7 +18,7 @@ function c32180819.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c32180819.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c32180819.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
......
......@@ -17,7 +17,7 @@ function c4178474.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c4178474.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
......
......@@ -59,9 +59,8 @@ end
function c61318483.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local at=Duel.GetAttacker()
if at:IsRelateToBattle() and at:IsFaceup() then
Duel.ChangePosition(at,POS_FACEDOWN_DEFENCE)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) then
if at:IsControler(1-tp) and at:IsFaceup() and Duel.ChangePosition(at,POS_FACEDOWN_DEFENCE)>0 then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)>0 then
Duel.ConfirmCards(1-tp,c)
end
end
......
......@@ -19,7 +19,7 @@ function c63516460.filter(c)
return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c63516460.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c63516460.filter(chkc) end
if chkc then return chkc:IsOnField() and c63516460.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c63516460.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c63516460.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
......
......@@ -21,7 +21,7 @@ function c81385346.filter2(c)
return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c81385346.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c81385346.filter2(chkc) end
if chkc then return chkc:IsOnField() and c81385346.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c81385346.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c81385346.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
......
......@@ -84,7 +84,7 @@ function c83438826.desop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+0x1fe0000)
eq:RegisterEffect(e1)
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsFacedown() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
......
......@@ -37,7 +37,7 @@ function c93108839.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c93108839.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c93108839.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c93108839.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():GetFlagEffect(93108839)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c93108839.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
......
......@@ -20,7 +20,7 @@ function c96471335.initial_effect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CHAIN_UNIQUE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c96471335.rmcon)
e2:SetCost(c96471335.rmcost)
......
......@@ -36,7 +36,7 @@ end
function c97268402.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() and tc:IsControler(1-tp)then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
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