Commit 5282b32d authored by mercury233's avatar mercury233

fix

parent d47fb2fa
...@@ -27,31 +27,23 @@ end ...@@ -27,31 +27,23 @@ end
function c101106001.linkedfilter(c) function c101106001.linkedfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_LINK) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_LINK)
end end
function c101106001.spcon(e,c) function c101106001.checkzone(tp)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c101106001.linkedfilter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()<=0 then return false end
local zone=0 local zone=0
local tc=g:GetFirst() local g=Duel.GetMatchingGroup(c101106001.linkedfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
while tc do for tc in aux.Next(g) do
zone=bit.bor(zone,tc:GetLinkedZone(tp)) zone=bit.bor(zone,tc:GetLinkedZone(tp))
tc=g:GetNext()
end end
zone=bit.band(zone,0x1f) return bit.band(zone,0x1f)
return zone and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
function c101106001.spval(e,c) function c101106001.spcon(e,c)
local tp=c:GetControler() if c==nil then return true end
local g=Duel.GetMatchingGroup(c101106001.linkedfilter,tp,LOCATION_MZONE,0,nil) local tp=c:GetControler()
if g:GetCount()<=0 then return end local zone=c101106001.checkzone(tp)
local zone=0 return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
local tc=g:GetFirst() end
while tc do function c101106001.spval(e,c)
zone=bit.bor(zone,tc:GetLinkedZone(tp)) local tp=c:GetControler()
tc=g:GetNext() local zone=c101106001.checkzone(tp)
end
zone=bit.band(zone,0x1f)
return 0,zone return 0,zone
end end
function c101106001.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) function c101106001.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -32,7 +32,7 @@ function c101106030.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,7 @@ function c101106030.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local fid=c:GetFieldID() local fid=c:GetFieldID()
c:RegisterFlagEffect(101106030,RESET_EVENT+RESETS_STANDARD,0,1,fid) c:RegisterFlagEffect(101106030,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,EFFECT_FLAG_CLIENT_HINT,1,fid,66)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC) e1:SetCode(EFFECT_PUBLIC)
...@@ -59,7 +59,7 @@ function c101106030.indtg(e,c) ...@@ -59,7 +59,7 @@ function c101106030.indtg(e,c)
return c:IsFacedown() return c:IsFacedown()
end end
function c101106030.spcon(e,tp,eg,ep,ev,re,r,rp) function c101106030.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
and not re:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) and not re:GetHandler():IsStatus(STATUS_ACT_FROM_HAND)
end end
function c101106030.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101106030.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -30,7 +30,7 @@ end ...@@ -30,7 +30,7 @@ end
function c101106065.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101106065.target(e,tp,eg,ep,ev,re,r,rp,chk)
local check=Duel.IsExistingMatchingCard(c101106065.cfilter,tp,LOCATION_MZONE,0,1,nil) local check=Duel.IsExistingMatchingCard(c101106065.cfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101106065.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,check) end and Duel.IsExistingMatchingCard(c101106065.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,check) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000)
end end
......
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