Commit 5282b32d authored by mercury233's avatar mercury233

fix

parent d47fb2fa
......@@ -27,31 +27,23 @@ end
function c101106001.linkedfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_LINK)
end
function c101106001.spcon(e,c)
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
function c101106001.checkzone(tp)
local zone=0
local tc=g:GetFirst()
while tc do
local g=Duel.GetMatchingGroup(c101106001.linkedfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
zone=bit.bor(zone,tc:GetLinkedZone(tp))
tc=g:GetNext()
end
zone=bit.band(zone,0x1f)
return zone and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return bit.band(zone,0x1f)
end
function c101106001.spval(e,c)
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c101106001.linkedfilter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()<=0 then return end
local zone=0
local tc=g:GetFirst()
while tc do
zone=bit.bor(zone,tc:GetLinkedZone(tp))
tc=g:GetNext()
end
zone=bit.band(zone,0x1f)
function c101106001.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=c101106001.checkzone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101106001.spval(e,c)
local tp=c:GetControler()
local zone=c101106001.checkzone(tp)
return 0,zone
end
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)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
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)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
......@@ -59,7 +59,7 @@ function c101106030.indtg(e,c)
return c:IsFacedown()
end
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)
end
function c101106030.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -30,7 +30,7 @@ end
function c101106065.target(e,tp,eg,ep,ev,re,r,rp,chk)
local check=Duel.IsExistingMatchingCard(c101106065.cfilter,tp,LOCATION_MZONE,0,1,nil)
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_DAMAGE,nil,0,tp,1000)
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