Commit daf1f661 authored by VanillaSalt's avatar VanillaSalt

fix

parent b62b35f8
......@@ -23,13 +23,31 @@ end
function c23296404.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc8) and c:IsDestructable()
end
function c23296404.desfilter2(c,e)
return c23296404.desfilter(c) and c:IsCanBeEffectTarget(e)
end
function c23296404.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c23296404.desfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c23296404.desfilter,tp,LOCATION_ONFIELD,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c23296404.desfilter,tp,LOCATION_ONFIELD,0,3,3,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
if chk==0 then return ct<=3 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c23296404.desfilter,tp,LOCATION_ONFIELD,0,3,nil)
and (ct<=0 or Duel.IsExistingTarget(c23296404.desfilter,tp,LOCATION_MZONE,0,ct,nil)) end
local g=nil
if ct>0 then
local tg=Duel.GetMatchingGroup(c23296404.desfilter2,tp,0,LOCATION_ONFIELD,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=tg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE)
if ct<3 then
tg:Sub(g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=tg:Select(tp,3-ct,3-ct,nil)
g:Merge(g2)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=Duel.SelectTarget(tp,c23296404.desfilter,tp,LOCATION_ONFIELD,0,3,3,nil)
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -56,13 +74,9 @@ function c23296404.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c23296404.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
local g=Duel.GetMatchingGroup(c23296404.tdfilter,tp,0,LOCATION_ONFIELD,nil)
if tc:IsLocation(LOCATION_HAND+LOCATION_EXTRA) and g:GetCount()>0 then
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=g:Select(tp,1,1,nil)
Duel.SendtoDeck(rg,nil,1,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,c23296404.tdfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
end
end
......@@ -26,18 +26,20 @@ function c24019092.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c24019092.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-e:GetHandler():GetSequence())
if chk==0 then return e:GetHandler():IsDestructable() and pc:IsDestructable()
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return c:IsDestructable() and pc:IsDestructable()
and Duel.IsExistingMatchingCard(c24019092.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(e:GetHandler(),pc)
local g=Group.FromCards(c,pc)
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)
if not e:GetHandler():IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-e:GetHandler():GetSequence())
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if not pc then return end
local dg=Group.FromCards(e:GetHandler(),pc)
local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24019092.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
......
......@@ -26,19 +26,21 @@ function c24131534.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c24131534.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-e:GetHandler():GetSequence())
if chk==0 then return e:GetHandler():IsDestructable() and pc:IsDestructable()
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return c:IsDestructable() and pc:IsDestructable()
and Duel.IsExistingMatchingCard(c24131534.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(e:GetHandler(),pc)
local g=Group.FromCards(c,pc)
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)
if not e:GetHandler():IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-e:GetHandler():GetSequence())
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if not pc then return end
local dg=Group.FromCards(e:GetHandler(),pc)
if Duel.Destroy(dg,REASON_COST)~=2 then return end
local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24131534.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -13,7 +13,7 @@ function c39357122.initial_effect(c)
c:RegisterEffect(e1)
end
function c39357122.filter(c,atk)
return c:IsFaceup() and c:IsDestructable() and c:IsDefenceBelow(atk)
return c:IsFaceup() and c:IsDefenceBelow(atk) and c:IsDestructable()
end
function c39357122.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local atk=e:GetHandler():GetAttack()
......@@ -22,7 +22,9 @@ function c39357122.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c39357122.desop(e,tp,eg,ep,ev,re,r,rp)
local atk=e:GetHandler():GetAttack()
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local atk=c:GetAttack()
local g=Duel.GetMatchingGroup(c39357122.filter,tp,0,LOCATION_MZONE,nil,atk)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -26,19 +26,21 @@ function c50407691.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c50407691.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-e:GetHandler():GetSequence())
if chk==0 then return e:GetHandler():IsDestructable() and pc:IsDestructable()
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return c:IsDestructable() and pc:IsDestructable()
and Duel.IsExistingMatchingCard(c50407691.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(e:GetHandler(),pc)
local g=Group.FromCards(c,pc)
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)
if not e:GetHandler():IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-e:GetHandler():GetSequence())
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if not pc then return end
local dg=Group.FromCards(e:GetHandler(),pc)
if Duel.Destroy(dg,REASON_COST)~=2 then return end
local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50407691.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -27,18 +27,19 @@ function c58446973.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and c:IsRelateToEffect(e) and c:IsFaceup() then
local code=tc:GetCode()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(tc:GetCode())
e2:SetValue(code)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
c:CopyEffect(tc:GetCode(),RESET_EVENT+0x1fe0000,1)
c:CopyEffect(code,RESET_EVENT+0x1fe0000,1)
end
end
......@@ -23,13 +23,31 @@ end
function c59785059.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc8) and c:IsDestructable()
end
function c59785059.desfilter2(c,e)
return c59785059.desfilter(c) and c:IsCanBeEffectTarget(e)
end
function c59785059.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c59785059.desfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c59785059.desfilter,tp,LOCATION_ONFIELD,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c59785059.desfilter,tp,LOCATION_ONFIELD,0,3,3,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
if chk==0 then return ct<=3 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c59785059.desfilter,tp,LOCATION_ONFIELD,0,3,nil)
and (ct<=0 or Duel.IsExistingTarget(c59785059.desfilter,tp,LOCATION_MZONE,0,ct,nil)) end
local g=nil
if ct>0 then
local tg=Duel.GetMatchingGroup(c59785059.desfilter2,tp,0,LOCATION_ONFIELD,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=tg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE)
if ct<3 then
tg:Sub(g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=tg:Select(tp,3-ct,3-ct,nil)
g:Merge(g2)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=Duel.SelectTarget(tp,c59785059.desfilter,tp,LOCATION_ONFIELD,0,3,3,nil)
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -53,13 +71,9 @@ function c59785059.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c59785059.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil)
if tc:IsLocation(LOCATION_HAND+LOCATION_EXTRA) and g:GetCount()>0 then
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=g:Select(tp,1,1,nil)
Duel.SendtoDeck(rg,nil,1,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
end
end
......@@ -26,19 +26,21 @@ function c61639289.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c61639289.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-e:GetHandler():GetSequence())
if chk==0 then return e:GetHandler():IsDestructable() and pc:IsDestructable()
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return c:IsDestructable() and pc:IsDestructable()
and Duel.IsExistingMatchingCard(c61639289.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(e:GetHandler(),pc)
local g=Group.FromCards(c,pc)
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)
if not e:GetHandler():IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-e:GetHandler():GetSequence())
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if not pc then return end
local dg=Group.FromCards(e:GetHandler(),pc)
if Duel.Destroy(dg,REASON_COST)~=2 then return end
local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c61639289.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -48,7 +48,7 @@ function c66574418.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c66574418.tdfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToHand()
and Duel.IsExistingTarget(c66574418.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINT_MESSAGE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c66574418.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
......
......@@ -23,20 +23,19 @@ function c66752837.tricon(e,c)
return c:IsRace(RACE_DRAGON)
end
function c66752837.cfilter(c)
return c:GetPreviousRaceOnField()==RACE_DRAGON and c:IsPreviousPosition(POS_FACEUP)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsCode(66752837)
end
function c66752837.cfilter2(c)
return c66752837.cfilter(c) and c:IsType(TYPE_NORMAL)
return c:IsRace(RACE_DRAGON) and c:GetPreviousRaceOnField()==RACE_DRAGON
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsCode(66752837)
end
function c66752837.spcon(e,tp,eg,ep,ev,re,r,rp)
if eg:IsContains(e:GetHandler()) then return false end
if eg:IsExists(c66752837.cfilter2,1,nil) then
local g=eg:Filter(c66752837.cfilter,nil)
if g:GetCount()==0 then return false end
e:SetLabel(0)
if g:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
e:SetLabel(1)
return true
else
return eg:IsExists(c66752837.cfilter,1,nil)
end
return true
end
function c66752837.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -47,10 +46,12 @@ function c66752837.thfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c66752837.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c66752837.thfilter,tp,LOCATION_GRAVE,0,nil)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and e:GetLabel()==1
and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(66752837,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
......@@ -34,7 +34,7 @@ function c85967160.adop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
......
......@@ -41,7 +41,8 @@ end
function c92746535.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence()
local sc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq)
if chk==0 then return Duel.IsExistingMatchingCard(c92746535.thfilter,tp,LOCATION_DECK,0,1,nil,sc:GetOriginalCode()) end
if chk==0 then return sc:IsDestructable()
and Duel.IsExistingMatchingCard(c92746535.thfilter,tp,LOCATION_DECK,0,1,nil,sc:GetOriginalCode()) end
Duel.SetTargetCard(sc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
......@@ -26,19 +26,21 @@ function c96802306.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c96802306.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-e:GetHandler():GetSequence())
if chk==0 then return e:GetHandler():IsDestructable() and pc:IsDestructable()
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return c:IsDestructable() and pc:IsDestructable()
and Duel.IsExistingMatchingCard(c96802306.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(e:GetHandler(),pc)
local g=Group.FromCards(c,pc)
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)
if not e:GetHandler():IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-e:GetHandler():GetSequence())
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if not pc then return end
local dg=Group.FromCards(e:GetHandler(),pc)
if Duel.Destroy(dg,REASON_COST)~=2 then return end
local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c96802306.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -26,19 +26,21 @@ function c97024987.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c97024987.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-e:GetHandler():GetSequence())
if chk==0 then return e:GetHandler():IsDestructable() and pc:IsDestructable()
local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if chk==0 then return c:IsDestructable() and pc:IsDestructable()
and Duel.IsExistingMatchingCard(c97024987.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(e:GetHandler(),pc)
local g=Group.FromCards(c,pc)
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)
if not e:GetHandler():IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-e:GetHandler():GetSequence())
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence())
if not pc then return end
local dg=Group.FromCards(e:GetHandler(),pc)
if Duel.Destroy(dg,REASON_COST)~=2 then return end
local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c97024987.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
......
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