Commit 28319025 authored by Huangnan's avatar Huangnan

fix

parent 5e86d0f7
Pipeline #40362 failed with stages
in 4 minutes and 6 seconds
......@@ -65,7 +65,7 @@ function s.filter(c)
return not c:IsSetCard(0x5a5) and c:IsFaceup() and c:IsType(TYPE_MONSTER+TYPE_SPELL)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
and (re:IsHasCategory(CATEGORY_DRAW) or re:IsHasCategory(CATEGORY_SEARCH))
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -70,7 +70,7 @@ function s.filter(c)
return not c:IsSetCard(0x5a5) and c:IsFaceup() and c:IsType(TYPE_MONSTER+TYPE_SPELL)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -63,7 +63,7 @@ function s.filter(c)
return not c:IsSetCard(0x5a5) and c:IsFaceup() and c:IsType(TYPE_MONSTER+TYPE_SPELL)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
......
......@@ -63,7 +63,7 @@ function s.filter(c)
return not c:IsSetCard(0x5a5) and c:IsFaceup() and c:IsType(TYPE_MONSTER+TYPE_SPELL)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) then return false end
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) then return false end
if Duel.GetCurrentChain()<2 then return false end
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
......
......@@ -64,7 +64,7 @@ function s.filter(c)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and loc&LOCATION_ONFIELD~=0
end
......
......@@ -64,7 +64,7 @@ function s.filter(c)
return not c:IsSetCard(0x5a5) and c:IsFaceup() and c:IsType(TYPE_MONSTER+TYPE_SPELL)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
and eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_EXTRA)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -65,7 +65,7 @@ function s.filter(c)
return not c:IsSetCard(0x5a5) and c:IsFaceup() and c:IsType(TYPE_MONSTER+TYPE_SPELL)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -129,9 +129,6 @@ end
function s.exmzfilter(c,seq)
return c:GetSequence()==seq
end
function s.desfilter(c)
return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5
end
function s.seqfilter(c,seq,tp)
local cseq=c:GetSequence()
local cloc=c:GetLocation()
......@@ -155,7 +152,13 @@ function s.seqfilter(c,seq,tp)
end
function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,1,nil) end
local flag=false
for i=0,6 do
if Duel.IsExistingMatchingCard(s.seqfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,1,nil,i,tp) then
flag = true
end
end
if chk==0 then return flag end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function s.seqop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -41,7 +41,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PUBLIC)
e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
e1:SetTargetRange(0,LOCATION_HAND)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
......
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