Commit 7e979fc8 authored by VanillaSalt's avatar VanillaSalt

fix

parent 723fe978
......@@ -29,8 +29,7 @@ function c14920218.initial_effect(c)
c:RegisterEffect(e4)
end
function c14920218.pcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return tc and tc:IsSetCard(0x98)
end
function c14920218.pfilter(c)
......
......@@ -17,8 +17,7 @@ function c15146890.initial_effect(c)
c:RegisterEffect(e2)
end
function c15146890.condition(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return tc and tc:IsSetCard(0x98)
end
function c15146890.cfilter(c)
......
......@@ -44,8 +44,7 @@ function c17330916.initial_effect(c)
c:RegisterEffect(e5)
end
function c17330916.sccon(e)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or not tc:IsSetCard(0x9f)
end
function c17330916.reg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -57,8 +57,7 @@ function c17979378.atkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c17979378.sccon(e)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or not tc:IsSetCard(0xaf)
end
function c17979378.filter(c)
......
......@@ -25,23 +25,16 @@ function c18239909.initial_effect(c)
e2:SetOperation(c18239909.spop)
c:RegisterEffect(e2)
end
function c18239909.tgfilter(c)
if c:IsLocation(LOCATION_MZONE) then
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
else
return c:IsLocation(LOCATION_PZONE)
end
end
function c18239909.desfilter(c)
return c18239909.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function c18239909.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c18239909.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c18239909.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_PZONE) and c18239909.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c18239909.desfilter,tp,LOCATION_MZONE+LOCATION_PZONE,LOCATION_MZONE+LOCATION_PZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c18239909.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,c18239909.desfilter,tp,LOCATION_MZONE+LOCATION_PZONE,LOCATION_MZONE+LOCATION_PZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_ONFIELD)
end
......
......@@ -40,8 +40,7 @@ function c20281581.initial_effect(c)
c:RegisterEffect(e4)
end
function c20281581.descon(e)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc
end
function c20281581.rdcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -65,8 +65,7 @@ function c20409757.aclimit(e,re,tp)
return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c20409757.slcon(e)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or (not tc:IsSetCard(0x98) and not tc:IsSetCard(0x99))
end
function c20409757.filter(c,tp)
......
......@@ -32,7 +32,7 @@ function c22638495.initial_effect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_ONFIELD,0)
e4:SetTargetRange(LOCATION_MZONE+LOCATION_PZONE,0)
e4:SetTarget(c22638495.indtg)
e4:SetValue(1)
c:RegisterEffect(e4)
......@@ -40,7 +40,7 @@ function c22638495.initial_effect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_ONFIELD,0)
e5:SetTargetRange(LOCATION_MZONE+LOCATION_PZONE,0)
e5:SetTarget(c22638495.indtg)
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
......@@ -92,5 +92,5 @@ function c22638495.spop2(e,tp,eg,ep,ev,re,r,rp)
end
end
function c22638495.indtg(e,c)
return c:IsType(TYPE_PENDULUM) and c:IsLocation(LOCATION_MZONE+LOCATION_PZONE)
return c:IsType(TYPE_PENDULUM)
end
......@@ -13,27 +13,23 @@ function c24019092.initial_effect(c)
c:RegisterEffect(e2)
end
function c24019092.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
end
function c24019092.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c24019092.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c24019092.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c24019092.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end
local dg=Group.FromCards(c,pc)
local dg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if dg:GetCount()<2 then return end
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c24019092.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
......
......@@ -13,27 +13,23 @@ function c24131534.initial_effect(c)
c:RegisterEffect(e2)
end
function c24131534.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
end
function c24131534.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c24131534.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c24131534.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c24131534.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end
local dg=Group.FromCards(c,pc)
local dg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if dg:GetCount()<2 then return end
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c24131534.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
......
......@@ -32,8 +32,7 @@ function c36521459.initial_effect(c)
e9:SetType(EFFECT_TYPE_FIELD)
e9:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e9:SetRange(LOCATION_MZONE)
e9:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e9:SetTarget(c36521459.indes)
e9:SetTargetRange(LOCATION_FZONE,LOCATION_FZONE)
e9:SetValue(1)
c:RegisterEffect(e9)
--spson
......@@ -44,9 +43,6 @@ function c36521459.initial_effect(c)
ea:SetValue(aux.FALSE)
c:RegisterEffect(ea)
end
function c36521459.indes(e,c)
return c:IsFaceup() and c:GetSequence()==5
end
function c36521459.spfilter(c)
return c:IsCode(44508094) and c:IsAbleToRemoveAsCost()
end
......
......@@ -34,14 +34,13 @@ function c38737148.spcon(e,c)
and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,4,nil,ATTRIBUTE_LIGHT)
end
function c38737148.desfilter(c)
return c:GetSequence()==5
and Duel.IsExistingTarget(aux.TRUE,0,LOCATION_ONFIELD,LOCATION_ONFIELD,2,c)
return Duel.IsExistingTarget(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,2,c)
end
function c38737148.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c38737148.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c38737148.desfilter,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c38737148.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
local g1=Duel.SelectTarget(tp,c38737148.desfilter,tp,LOCATION_FZONE,LOCATION_FZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,g1:GetFirst())
g1:Merge(g2)
......
......@@ -44,14 +44,12 @@ function c45627618.pcfilter(c)
return c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c45627618.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence()
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c45627618.pcfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c45627618.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local seq=e:GetHandler():GetSequence()
if not Duel.CheckLocation(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1]) then return end
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c45627618.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -57,9 +57,7 @@ function c47349116.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc)
end
function c47349116.repfilter(c,tp)
local seq=c:GetSequence()
return c:IsFaceup() and c:IsControler(tp)
and c:IsLocation(LOCATION_MZONE+LOCATION_PZONE)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE+LOCATION_PZONE)
and c:IsType(TYPE_PENDULUM) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c47349116.tgfilter(c)
......
......@@ -13,27 +13,23 @@ function c50407691.initial_effect(c)
c:RegisterEffect(e2)
end
function c50407691.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
end
function c50407691.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c50407691.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c50407691.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c50407691.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end
local dg=Group.FromCards(c,pc)
local dg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if dg:GetCount()<2 then return end
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c50407691.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
......
......@@ -35,8 +35,7 @@ function c51391183.initial_effect(c)
end
function c51391183.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
if chk==0 then return tc and tc:IsSetCard(0x10ec) and tc:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tc)
end
......
......@@ -17,8 +17,7 @@ function c51531505.initial_effect(c)
c:RegisterEffect(e2)
end
function c51531505.condition(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return tc and tc:IsSetCard(0x98)
end
function c51531505.cfilter(c)
......
......@@ -15,9 +15,9 @@ function c53208660.initial_effect(c)
end
function c53208660.chainfilter(re,tp,cid)
local rc=re:GetHandler()
local loc,seq=Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
return not (re:IsActiveType(TYPE_SPELL) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)
and loc==LOCATION_SZONE and (seq==6 or seq==7) and rc:IsSetCard(0x98))
local loc=Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)
return not (re:GetActiveType()==TYPE_PENDULUM+TYPE_SPELL and not re:IsHasType(EFFECT_TYPE_ACTIVATE)
and loc==LOCATION_SZONE and rc:IsSetCard(0x98))
end
function c53208660.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(53208660,tp,ACTIVITY_CHAIN)==0
......
......@@ -36,10 +36,10 @@ function c53724621.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function c53724621.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and c53724621.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_PZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c53724621.filter,tp,LOCATION_PZONE,0,1,1,nil)
Duel.SelectTarget(tp,nil,tp,LOCATION_PZONE,0,1,1,nil)
end
function c53724621.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -67,8 +67,7 @@ function c5399521.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c5399521.slcon(e)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or not tc:IsSetCard(0x1066)
end
function c5399521.spcon(e,c)
......
......@@ -22,8 +22,7 @@ function c56675280.initial_effect(c)
c:RegisterEffect(e2)
end
function c56675280.sccon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return tc and (tc:IsSetCard(0x98) or tc:IsSetCard(0x99) or tc:IsSetCard(0x9f)) and not tc:IsCode(56675280)
end
function c56675280.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -30,13 +30,12 @@ function c59762399.initial_effect(c)
end
function c59762399.spcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
local seq=e:GetHandler():GetSequence()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil and Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil and tc
end
function c59762399.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local seq=c:GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,c):GetFirst()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
......@@ -44,8 +43,7 @@ end
function c59762399.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local seq=c:GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,c):GetFirst()
if tc and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -21,13 +21,13 @@ function c60398723.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c60398723.rfilter(c)
return c:GetSequence()==5 and c:IsAbleToHand()
return c:IsAbleToHand()
end
function c60398723.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
local rg=Duel.GetMatchingGroup(c60398723.rfilter,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
local rg=Duel.GetMatchingGroup(c60398723.rfilter,tp,LOCATION_FZONE,LOCATION_FZONE,nil)
if rg:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(60398723,0)) then
Duel.BreakEffect()
Duel.SendtoHand(rg,nil,REASON_EFFECT)
......
......@@ -12,8 +12,7 @@ function c60434189.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetTarget(c60434189.indtg)
e1:SetTargetRange(LOCATION_PZONE,LOCATION_PZONE)
e1:SetValue(c60434189.indval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
......@@ -25,14 +24,11 @@ function c60434189.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c60434189.indtg(e,c)
return c:GetSequence()>5
end
function c60434189.indval(e,re,tp)
return tp~=e:GetHandlerPlayer()
end
function c60434189.indfilter(c)
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()>5
return c:IsLocation(LOCATION_PZONE)
end
function c60434189.discon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
......
......@@ -13,27 +13,23 @@ function c61639289.initial_effect(c)
c:RegisterEffect(e2)
end
function c61639289.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
end
function c61639289.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c61639289.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c61639289.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c61639289.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end
local dg=Group.FromCards(c,pc)
local dg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if dg:GetCount()<2 then return end
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c61639289.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
......
......@@ -13,27 +13,23 @@ function c67273917.initial_effect(c)
c:RegisterEffect(e2)
end
function c67273917.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
end
function c67273917.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c67273917.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c67273917.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c67273917.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end
local dg=Group.FromCards(c,pc)
local dg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if dg:GetCount()<2 then return end
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c67273917.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
......
......@@ -18,8 +18,8 @@ function c69512157.initial_effect(c)
c:RegisterEffect(e3)
end
function c69512157.disop(e,tp,eg,ep,ev,re,r,rp)
local p,loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
if re:IsActiveType(TYPE_SPELL) and p~=tp and loc==LOCATION_SZONE and (seq==6 or seq==7) then
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
if re:GetActiveType()==TYPE_PENDULUM+TYPE_SPELL and p~=tp and loc==LOCATION_SZONE then
Duel.NegateEffect(ev)
end
end
......@@ -12,9 +12,10 @@ function c72648810.initial_effect(c)
c:RegisterEffect(e1)
end
function c72648810.condition(e,tp,eg,ep,ev,re,r,rp)
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
return rp~=tp and re:IsActiveType(TYPE_PENDULUM) and (re:IsActiveType(TYPE_MONSTER)
or (loc==LOCATION_SZONE and (seq==6 or seq==7) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)))
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
local atype=re:GetActiveType()
return rp~=tp and (bit.band(atype,TYPE_PENDULUM+TYPE_MONSTER)==TYPE_PENDULUM+TYPE_MONSTER
or (atype==TYPE_PENDULUM+TYPE_SPELL and loc==LOCATION_SZONE and not re:IsHasType(EFFECT_TYPE_ACTIVATE)))
and Duel.IsChainNegatable(ev)
end
function c72648810.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -23,8 +23,7 @@ function c72714461.initial_effect(c)
c:RegisterEffect(e3)
end
function c72714461.pencon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local sc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local sc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return sc and (sc:IsSetCard(0x98) or sc:IsSetCard(0x9f))
end
function c72714461.penfilter(c)
......
......@@ -25,8 +25,7 @@ function c73130445.initial_effect(c)
c:RegisterEffect(e3)
end
function c73130445.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and tc and tc:IsSetCard(0x9f) and not tc:IsCode(73130445) and e:GetHandler():IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
......
......@@ -45,10 +45,10 @@ function c73468603.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
end
function c73468603.cfilter(c)
return c:GetSequence()==5 and c:IsFacedown() and c:GetFlagEffect(73468603)~=0
return c:IsFacedown() and c:GetFlagEffect(73468603)~=0
end
function c73468603.con(e)
return Duel.IsExistingMatchingCard(c73468603.cfilter,e:GetHandlerPlayer(),LOCATION_SZONE,LOCATION_SZONE,1,nil)
return Duel.IsExistingMatchingCard(c73468603.cfilter,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function c73468603.actlimit(e,re,tp)
return re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():GetFlagEffect(73468603)==0
......
......@@ -61,8 +61,7 @@ function c81571633.atkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c81571633.sccon(e)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or not tc:IsSetCard(0xaf)
end
function c81571633.filter(c,e,tp)
......
......@@ -63,14 +63,12 @@ function c86238081.pcfilter(c)
return c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c86238081.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence()
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c86238081.pcfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c86238081.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local seq=e:GetHandler():GetSequence()
if not Duel.CheckLocation(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1]) then return end
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c86238081.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -77,7 +77,6 @@ function c88412339.splimit(e,c)
return not c:IsSetCard(0x10ec)
end
function c88412339.aclimit(e,re,tp)
local c=re:GetHandler()
return c:IsCode(88412339) and re:GetActivateLocation()==LOCATION_SZONE
and (c:GetSequence()==6 or c:GetSequence()==7)
local rc=re:GetHandler()
return rc:IsCode(88412339) and re:GetActiveType()==TYPE_PENDULUM+TYPE_SPELL
end
......@@ -45,8 +45,7 @@ function c88935103.initial_effect(c)
c:RegisterEffect(e6)
end
function c88935103.descon(e)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or not tc:IsSetCard(0x98)
end
function c88935103.synlimit(e,c)
......
......@@ -30,8 +30,7 @@ function c91420254.initial_effect(c)
c:RegisterEffect(e4)
end
function c91420254.sccon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return tc and tc:IsSetCard(0xb3)
end
function c91420254.scop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -27,15 +27,13 @@ function c92746535.initial_effect(c)
c:RegisterEffect(e5)
end
function c92746535.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
return Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
end
function c92746535.thfilter(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function c92746535.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence()
local sc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local sc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
if chk==0 then return Duel.IsExistingMatchingCard(c92746535.thfilter,tp,LOCATION_DECK,0,1,nil,sc:GetOriginalCode()) end
Duel.SetTargetCard(sc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sc,1,0,0)
......
......@@ -27,8 +27,7 @@ function c93149655.initial_effect(c)
c:RegisterEffect(e2)
end
function c93149655.atkcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
if not tc or not tc:IsSetCard(0x99) then return end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
......
......@@ -13,27 +13,23 @@ function c93662626.initial_effect(c)
c:RegisterEffect(e2)
end
function c93662626.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
end
function c93662626.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c93662626.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c93662626.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c93662626.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end
local dg=Group.FromCards(c,pc)
local dg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if dg:GetCount()<2 then return end
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c93662626.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
......
......@@ -57,8 +57,7 @@ function c94415058.aclimit(e,re,tp)
return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c94415058.sccon(e)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or (not tc:IsSetCard(0x98) and not tc:IsSetCard(0x99))
end
function c94415058.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -54,8 +54,7 @@ function c96227613.ndcon(e)
return Duel.IsExistingMatchingCard(c96227613.ndcfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function c96227613.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsCode(22211622)
end
function c96227613.thfilter(c)
......@@ -63,18 +62,15 @@ function c96227613.thfilter(c)
end
function c96227613.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c96227613.thfilter,tp,LOCATION_DECK,0,1,nil) end
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
local g=Group.FromCards(c,pc)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c96227613.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end
local g=Group.FromCards(c,pc)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if g:GetCount()<2 then return end
if Duel.Destroy(g,REASON_EFFECT)==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c96227613.thfilter,tp,LOCATION_DECK,0,1,1,nil)
......
......@@ -13,27 +13,23 @@ function c96802306.initial_effect(c)
c:RegisterEffect(e2)
end
function c96802306.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
end
function c96802306.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c96802306.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c96802306.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c96802306.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end
local dg=Group.FromCards(c,pc)
local dg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if dg:GetCount()<2 then return end
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c96802306.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
......
......@@ -13,27 +13,23 @@ function c97024987.initial_effect(c)
c:RegisterEffect(e2)
end
function c97024987.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
end
function c97024987.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c97024987.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c97024987.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c97024987.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end
local dg=Group.FromCards(c,pc)
local dg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if dg:GetCount()<2 then return end
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c97024987.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,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