Commit 381aa799 authored by TanakaKotoha's avatar TanakaKotoha

fix k2

parent 3f3818aa
No preview for this file type
...@@ -22,7 +22,6 @@ function c33310159.initial_effect(c) ...@@ -22,7 +22,6 @@ function c33310159.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
c33310159[c]=e1 c33310159[c]=e1
end end
function c33310159.ltg(e,tp,eg,ep,ev,re,r,rp,chk) function c33310159.ltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,0x55b) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,0x55b) end
end end
...@@ -48,31 +47,27 @@ function c33310159.mfilter(c,e,tp,eg,ep,ev,re,r,rp) ...@@ -48,31 +47,27 @@ function c33310159.mfilter(c,e,tp,eg,ep,ev,re,r,rp)
if tg and not tg(e,tp,eg,ep,ev,re,r,rp,0,nil,c) then return false end if tg and not tg(e,tp,eg,ep,ev,re,r,rp,0,nil,c) then return false end
return true return true
end end
function c33310159.sffilter1(c)
return c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5
end
function c33310159.sffilter2(c)
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5
end
function c33310159.remfilter(c,tp) function c33310159.remfilter(c,tp)
return c:IsControler(1-tp) and (c:IsLocation(LOCATION_SZONE) or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) return c:IsControler(1-tp) and (c:IsLocation(LOCATION_SZONE) or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5))
end end
function c33310159.desfilter(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp)
end
function c33310159.sfilter(c) function c33310159.sfilter(c)
local tp=c:GetControler() local tp=c:GetControler()
local g=c:GetColumnGroup(1,1) local g=c:GetColumnGroup()
if g then if g:GetCount()>0 then
g=g:Filter(Card.IsControler,nil,tp) g:Remove(c33310159.remfilter,nil,tp)
if g then end
if c:IsLocation(LOCATION_MZONE) then if c:GetSequence()<5 then
g=g:Filter(c33310159.sffilter1,nil) local dg=Duel.GetMatchingGroup(c33310159.desfilter,tp,LOCATION_ONFIELD,0,nil,c:GetSequence(),tp)
elseif c:IsLocation(LOCATION_SZONE) then if c:IsLocation(LOCATION_MZONE) then
g=g:Filter(c33310159.sffilter2,nil) dg:Filter(Card.IsLocation,nil,LOCATION_MZONE)
end elseif c:IsLocation(LOCATION_SZONE) then
g:Merge(c:GetColumnGroup()) dg:Filter(Card.IsLocation,nil,LOCATION_SZONE)
if g then
g:Remove(c33310159.remfilter,nil,tp)
end
end end
g:Merge(dg)
end end
return g:GetCount()>0 return g:GetCount()>0
end end
...@@ -105,23 +100,21 @@ function c33310159.eftg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -105,23 +100,21 @@ function c33310159.eftg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectTarget(tp,c33310159.sfilter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,c33310159.sfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
e:SetCategory(CATEGORY_TOGRAVE) e:SetCategory(CATEGORY_TOGRAVE)
local gc=g:GetFirst() local gc=g:GetFirst()
local gtp=gc:GetControler() local gtp=gc:GetControler()
local gg=gc:GetColumnGroup(1,1) local g=gc:GetColumnGroup()
if gg then if g:GetCount()>0 then
gg=gg:Filter(Card.IsControler,nil,gtp) g:Remove(c33310159.remfilter,nil,gtp)
if gg then end
if gc:IsLocation(LOCATION_MZONE) then if gc:GetSequence()<5 then
gg=gg:Filter(c33310159.sffilter1,nil) local dg=Duel.GetMatchingGroup(c33310159.desfilter,gtp,LOCATION_ONFIELD,0,nil,gc:GetSequence(),gtp)
elseif c:IsLocation(LOCATION_SZONE) then if gc:IsLocation(LOCATION_MZONE) then
gg=gg:Filter(c33310159.sffilter2,nil) dg:Filter(Card.IsLocation,nil,LOCATION_MZONE)
end elseif gc:IsLocation(LOCATION_SZONE) then
gg:Merge(gc:GetColumnGroup()) dg:Filter(Card.IsLocation,nil,LOCATION_SZONE)
if gg then
gg:Remove(c33310159.remfilter,nil,gtp)
end
end end
g:Merge(dg)
end end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,gg,gg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
op=1 op=1
end end
e:SetLabel(op) e:SetLabel(op)
...@@ -138,21 +131,19 @@ function c33310159.efop(e,tp,eg,ep,ev,re,r,rp) ...@@ -138,21 +131,19 @@ function c33310159.efop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local ttp=tc:GetControler() local ttp=tc:GetControler()
local g=tc:GetColumnGroup(1,1) local g=tc:GetColumnGroup()
if g then if g:GetCount()>0 then
g=g:Filter(Card.IsControler,nil,ttp) g:Remove(c33310159.remfilter,nil,ttp)
if g then end
if tc:IsLocation(LOCATION_MZONE) then if tc:GetSequence()<5 then
g=g:Filter(c33310159.sffilter1,nil) local dg=Duel.GetMatchingGroup(c33310159.desfilter,ttp,LOCATION_ONFIELD,0,nil,tc:GetSequence(),ttp)
elseif tc:IsLocation(LOCATION_SZONE) then if tc:IsLocation(LOCATION_MZONE) then
g=g:Filter(c33310159.sffilter2,nil) dg:Filter(Card.IsLocation,nil,LOCATION_MZONE)
end elseif tc:IsLocation(LOCATION_SZONE) then
g:Merge(tc:GetColumnGroup()) dg:Filter(Card.IsLocation,nil,LOCATION_SZONE)
if g then end
g:Remove(c33310159.remfilter,nil,ttp) g:Merge(dg)
end end
end
end
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
......
...@@ -72,7 +72,7 @@ function c47530035.teop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +72,7 @@ function c47530035.teop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SendtoExtraP(c,tp,REASON_EFFECT) Duel.SendtoExtraP(c,tp,REASON_EFFECT)
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,false) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end end
end end
function c47530035.xyzcon(e,tp,eg,ep,ev,re,r,rp) function c47530035.xyzcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -39,18 +39,16 @@ function c47530042.spfilter(c,e,tp) ...@@ -39,18 +39,16 @@ function c47530042.spfilter(c,e,tp)
end end
function c47530042.rbtg(e,tp,eg,ep,ev,re,r,rp,chk) function c47530042.rbtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c47530042.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c47530042.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c47530042.lfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,1,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,1,1,0,0)
end end
function c47530042.rbop(e,tp,eg,ep,ev,re,r,rp) function c47530042.rbop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local zone=bit.band(tc:GetLinkedZone(tp),0x1f)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c47530042.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c47530042.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and zone~=0 then if tc then
Duel.Destroy(c,REASON_EFFECT) Duel.Destroy(c,REASON_EFFECT)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_XYZ_LEVEL) e1:SetCode(EFFECT_XYZ_LEVEL)
......
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