Commit bdadb0a8 authored by TanakaKotoha's avatar TanakaKotoha

iidx gooooooooooooooooooold

parent c192c4f2
...@@ -29,8 +29,8 @@ function c60150621.initial_effect(c) ...@@ -29,8 +29,8 @@ function c60150621.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetCondition(c60150621.condition)
e4:SetCost(c60150621.cost) e4:SetCost(c60150621.cost)
e4:SetTarget(c60150621.target)
e4:SetOperation(c60150621.activate) e4:SetOperation(c60150621.activate)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
...@@ -64,9 +64,14 @@ function c60150621.seqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,9 +64,14 @@ function c60150621.seqop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterEffect(e5) e:GetHandler():RegisterEffect(e5)
end end
end end
function c60150621.condition(e,tp,eg,ep,ev,re,r,rp) function c60150621.thfilter(c,g)
local seq=e:GetHandler():GetSequence() return g:IsContains(c)
return Duel.GetFieldCard(1-tp,LOCATION_MZONE,4-seq) or Duel.GetFieldCard(1-tp,LOCATION_SZONE,4-seq) end
function c60150621.target(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=e:GetHandler():GetColumnGroup()
if chk==0 then return Duel.IsExistingMatchingCard(c60150621.thfilter,tp,0,LOCATION_ONFIELD,1,nil,cg) end
local g=Duel.GetMatchingGroup(c60150621.thfilter,tp,0,LOCATION_ONFIELD,nil,cg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c60150621.cfilter(c) function c60150621.cfilter(c)
return c:IsSetCard(0x3b21) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost() return c:IsSetCard(0x3b21) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
...@@ -107,24 +112,18 @@ function c60150621.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -107,24 +112,18 @@ function c60150621.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1,true) e:GetHandler():RegisterEffect(e1,true)
end end
function c60150621.desfilter2(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp)
end
function c60150621.activate(e,tp,eg,ep,ev,re,r,rp) function c60150621.activate(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local c=e:GetHandler()
local g=Group.CreateGroup() local cg=c:GetColumnGroup()
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,4-seq) local seq=c:GetSequence()
if tc then g:AddCard(tc) end local g=Duel.GetMatchingGroup(c60150621.thfilter,tp,0,LOCATION_ONFIELD,nil,cg)
tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,4-seq) local dg=Group.CreateGroup()
if tc then g:AddCard(tc) end if seq<5 then dg=Duel.GetMatchingGroup(c60150621.desfilter2,tp,0,LOCATION_ONFIELD,nil,seq,c) end
if Duel.Destroy(g,REASON_EFFECT)~=0 then if Duel.Destroy(g,REASON_EFFECT)~=0 and dg:GetCount()>0 then
local seq=e:GetHandler():GetSequence() Duel.SendtoHand(dg,nil,REASON_EFFECT)
local g=Group.CreateGroup()
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,3-seq)
if tc then g:AddCard(tc) end
tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,3-seq)
if tc then g:AddCard(tc) end
tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,5-seq)
if tc then g:AddCard(tc) end
tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5-seq)
if tc then g:AddCard(tc) end
Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
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