Commit aa095402 authored by DailyShana's avatar DailyShana

fix

parent 19704819
...@@ -13,8 +13,9 @@ function c33256280.initial_effect(c) ...@@ -13,8 +13,9 @@ function c33256280.initial_effect(c)
e1:SetOperation(c33256280.operation) e1:SetOperation(c33256280.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c33256280.desfilter(c,tp,ft) function c33256280.desfilter(c,tp)
if c:IsFacedown() or not c:IsDestructable() then return false end if c:IsFacedown() or not c:IsDestructable() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c33256280.filter,tp,LOCATION_DECK,0,1,nil,true) return Duel.IsExistingMatchingCard(c33256280.filter,tp,LOCATION_DECK,0,1,nil,true)
else else
...@@ -25,11 +26,10 @@ function c33256280.filter(c,ignore) ...@@ -25,11 +26,10 @@ function c33256280.filter(c,ignore)
return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore) return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
end end
function c33256280.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33256280.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c33256280.desfilter(chkc,tp) and chkc~=e:GetHandler() end
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c33256280.desfilter(chkc,ft) and chkc~=e:GetHandler() end if chk==0 then return Duel.IsExistingTarget(c33256280.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
if chk==0 then return Duel.IsExistingTarget(c33256280.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c33256280.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),ft) local g=Duel.SelectTarget(tp,c33256280.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c33256280.operation(e,tp,eg,ep,ev,re,r,rp) function c33256280.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -13,8 +13,9 @@ function c60473572.initial_effect(c) ...@@ -13,8 +13,9 @@ function c60473572.initial_effect(c)
e1:SetOperation(c60473572.operation) e1:SetOperation(c60473572.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c60473572.desfilter(c,tp,ft) function c60473572.desfilter(c,tp)
if c:IsFacedown() or not c:IsDestructable() then return false end if c:IsFacedown() or not c:IsDestructable() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c60473572.filter,tp,LOCATION_DECK,0,1,nil,true) return Duel.IsExistingMatchingCard(c60473572.filter,tp,LOCATION_DECK,0,1,nil,true)
else else
...@@ -25,11 +26,10 @@ function c60473572.filter(c,ignore) ...@@ -25,11 +26,10 @@ function c60473572.filter(c,ignore)
return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore) return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
end end
function c60473572.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60473572.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c60473572.desfilter(chkc,tp) and chkc~=e:GetHandler() end
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c60473572.desfilter(chkc,ft) and chkc~=e:GetHandler() end if chk==0 then return Duel.IsExistingTarget(c60473572.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
if chk==0 then return Duel.IsExistingTarget(c60473572.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c60473572.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),ft) local g=Duel.SelectTarget(tp,c60473572.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c60473572.operation(e,tp,eg,ep,ev,re,r,rp) function c60473572.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -13,8 +13,9 @@ function c69351984.initial_effect(c) ...@@ -13,8 +13,9 @@ function c69351984.initial_effect(c)
e1:SetOperation(c69351984.operation) e1:SetOperation(c69351984.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c69351984.desfilter(c,tp,ft) function c69351984.desfilter(c,tp)
if c:IsFacedown() or not c:IsDestructable() then return false end if c:IsFacedown() or not c:IsDestructable() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c69351984.filter,tp,LOCATION_DECK,0,1,nil,true) return Duel.IsExistingMatchingCard(c69351984.filter,tp,LOCATION_DECK,0,1,nil,true)
else else
...@@ -25,11 +26,10 @@ function c69351984.filter(c,ignore) ...@@ -25,11 +26,10 @@ function c69351984.filter(c,ignore)
return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore) return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
end end
function c69351984.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c69351984.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c69351984.desfilter(chkc,tp) and chkc~=e:GetHandler() end
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c69351984.desfilter(chkc,ft) and chkc~=e:GetHandler() end if chk==0 then return Duel.IsExistingTarget(c69351984.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
if chk==0 then return Duel.IsExistingTarget(c69351984.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c69351984.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),ft) local g=Duel.SelectTarget(tp,c69351984.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c69351984.operation(e,tp,eg,ep,ev,re,r,rp) function c69351984.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -13,8 +13,9 @@ function c7868571.initial_effect(c) ...@@ -13,8 +13,9 @@ function c7868571.initial_effect(c)
e1:SetOperation(c7868571.operation) e1:SetOperation(c7868571.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c7868571.desfilter(c,tp,ft) function c7868571.desfilter(c,tp)
if c:IsFacedown() or not c:IsDestructable() then return false end if c:IsFacedown() or not c:IsDestructable() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c7868571.filter,tp,LOCATION_DECK,0,1,nil,true) return Duel.IsExistingMatchingCard(c7868571.filter,tp,LOCATION_DECK,0,1,nil,true)
else else
...@@ -25,11 +26,10 @@ function c7868571.filter(c,ignore) ...@@ -25,11 +26,10 @@ function c7868571.filter(c,ignore)
return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore) return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
end end
function c7868571.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c7868571.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c7868571.desfilter(chkc,tp) and chkc~=e:GetHandler() end
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c7868571.desfilter(chkc,ft) and chkc~=e:GetHandler() end if chk==0 then return Duel.IsExistingTarget(c7868571.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
if chk==0 then return Duel.IsExistingTarget(c7868571.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c7868571.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),ft) local g=Duel.SelectTarget(tp,c7868571.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c7868571.operation(e,tp,eg,ep,ev,re,r,rp) function c7868571.operation(e,tp,eg,ep,ev,re,r,rp)
......
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