Commit 8c975d67 authored by mercury233's avatar mercury233

fix

parent d3be0180
...@@ -30,7 +30,7 @@ function c100311002.cfilter(c) ...@@ -30,7 +30,7 @@ function c100311002.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x29) return c:IsFaceup() and c:IsSetCard(0x29)
end end
function c100311002.spcon(e,tp,eg,ep,ev,re,r,rp) function c100311002.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(62265044) or Duel.IsExistingMatchingCard(c100311002.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsEnvironment(62265044,tp) or Duel.IsExistingMatchingCard(c100311002.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c100311002.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c100311002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -18,7 +18,7 @@ function c101102006.initial_effect(c) ...@@ -18,7 +18,7 @@ function c101102006.initial_effect(c)
e2:SetDescription(aux.Stringid(101102006,1)) e2:SetDescription(aux.Stringid(101102006,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101102006+100) e2:SetCountLimit(1,101102006+100)
e2:SetTarget(c101102006.thtg) e2:SetTarget(c101102006.thtg)
...@@ -68,7 +68,6 @@ function c101102006.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,6 @@ function c101102006.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c101102006.sumlimit) e1:SetValue(c101102006.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local lk=e:GetLabel() local lk=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101102006.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk) local g=Duel.SelectMatchingCard(tp,c101102006.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk)
......
...@@ -86,7 +86,6 @@ function c101102007.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,7 +86,6 @@ function c101102007.spop1(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c101102007.sumlimit) e1:SetValue(c101102007.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local lk=e:GetLabel() local lk=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101102007.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk) local g=Duel.SelectMatchingCard(tp,c101102007.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk)
......
...@@ -5,7 +5,7 @@ function c101102008.initial_effect(c) ...@@ -5,7 +5,7 @@ function c101102008.initial_effect(c)
--to gy --to gy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102008,0)) e1:SetDescription(aux.Stringid(101102008,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE) e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,101102008) e1:SetCountLimit(1,101102008)
...@@ -87,7 +87,6 @@ function c101102008.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,7 +87,6 @@ function c101102008.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c101102008.sumlimit) e1:SetValue(c101102008.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local lk=e:GetLabel() local lk=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101102008.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk) local g=Duel.SelectMatchingCard(tp,c101102008.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk)
......
...@@ -5,7 +5,7 @@ function c101102010.initial_effect(c) ...@@ -5,7 +5,7 @@ function c101102010.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102010,0)) e1:SetDescription(aux.Stringid(101102010,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
...@@ -32,7 +32,7 @@ function c101102010.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -32,7 +32,7 @@ function c101102010.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c101102010.tfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,c101102010.tfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c101102010.spop(e,tp,eg,ep,ev,re,r,rp) function c101102010.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -42,21 +42,17 @@ function c101102010.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,21 +42,17 @@ function c101102010.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101102010.tgfilter,tp,LOCATION_DECK,0,1,1,nil,type1) local g=Duel.SelectMatchingCard(tp,c101102010.tgfilter,tp,LOCATION_DECK,0,1,1,nil,type1)
local tgc=g:GetFirst() local tgc=g:GetFirst()
local type1=type1+tgc:GetType()&0x7|type1 if tgc and Duel.SendtoGrave(tgc,REASON_EFFECT)~=0 and tgc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e)
if tgc then and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.SendtoGrave(tgc,REASON_EFFECT) local type1=tgc:GetType()&0x7|type1
end local sg=Duel.GetMatchingGroup(c101102010.thfilter,tp,LOCATION_DECK,0,nil,type1)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(101102010,1)) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c101102010.thfilter,tp,LOCATION_DECK,0,nil,type1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(101102010,1)) then local hg=sg:Select(tp,1,1,nil)
Duel.BreakEffect() if #hg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.SendtoHand(hg,nil,REASON_EFFECT)
local g=sg:Select(tp,1,1,nil) Duel.ConfirmCards(1-tp,hg)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end end
end end
end end
......
...@@ -5,7 +5,7 @@ function c101102011.initial_effect(c) ...@@ -5,7 +5,7 @@ function c101102011.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102011,0)) e1:SetDescription(aux.Stringid(101102011,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_DECKDES) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_GRAVE_ACTION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
...@@ -22,7 +22,7 @@ function c101102011.tgfilter(c,type1) ...@@ -22,7 +22,7 @@ function c101102011.tgfilter(c,type1)
return not c:IsType(type1) and c:IsSetCard(0x24e) and c:IsAbleToGrave() return not c:IsType(type1) and c:IsSetCard(0x24e) and c:IsAbleToGrave()
end end
function c101102011.spfilter(c,e,tp,code1) function c101102011.spfilter(c,e,tp,code1)
return c:IsSetCard(0x24e) and not c:IsCode(code1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsSetCard(0x24e) and not c:IsCode(code1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c101102011.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101102011.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c101102011.tfilter(chkc,tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c101102011.tfilter(chkc,tp) end
...@@ -32,7 +32,6 @@ function c101102011.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -32,7 +32,6 @@ function c101102011.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c101102011.tfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,c101102011.tfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c101102011.spop(e,tp,eg,ep,ev,re,r,rp) function c101102011.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -42,33 +41,28 @@ function c101102011.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,33 +41,28 @@ function c101102011.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101102011.tgfilter,tp,LOCATION_DECK,0,1,1,nil,type1) local g=Duel.SelectMatchingCard(tp,c101102011.tgfilter,tp,LOCATION_DECK,0,1,1,nil,type1)
local tgc=g:GetFirst() local tgc=g:GetFirst()
local code1=tgc:GetCode() if tgc and Duel.SendtoGrave(tgc,REASON_EFFECT)~=0 and tgc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e)
if tgc then and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.SendtoGrave(tgc,REASON_EFFECT) local code1=tgc:GetCode()
end local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101102011.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp,code1)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if #sg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(101102011,1)) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101102011.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp,code1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if #sg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(101102011,1)) then local sc=sg:Select(tp,1,1,nil):GetFirst()
Duel.BreakEffect() Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local e1=Effect.CreateEffect(c)
local g=sg:Select(tp,1,1,nil) e1:SetType(EFFECT_TYPE_SINGLE)
local tc=g:GetFirst() e1:SetCode(EFFECT_DISABLE)
if tc then e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
local e1=Effect.CreateEffect(c) sc:RegisterEffect(e1)
e1:SetType(EFFECT_TYPE_SINGLE) local e2=Effect.CreateEffect(c)
e1:SetCode(EFFECT_DISABLE) e2:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e1) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
local e2=Effect.CreateEffect(c) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetType(EFFECT_TYPE_SINGLE) sc:RegisterEffect(e2)
e2:SetCode(EFFECT_DISABLE_EFFECT) Duel.SpecialSummonComplete()
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
end end
end end
end end
......
...@@ -5,7 +5,7 @@ function c101102012.initial_effect(c) ...@@ -5,7 +5,7 @@ function c101102012.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102012,0)) e1:SetDescription(aux.Stringid(101102012,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_DECKDES+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
...@@ -29,7 +29,7 @@ function c101102012.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -29,7 +29,7 @@ function c101102012.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c101102012.tfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,c101102012.tfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c101102012.spop(e,tp,eg,ep,ev,re,r,rp) function c101102012.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -39,20 +39,16 @@ function c101102012.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,20 +39,16 @@ function c101102012.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101102012.tgfilter,tp,LOCATION_DECK,0,1,1,nil,type1) local g=Duel.SelectMatchingCard(tp,c101102012.tgfilter,tp,LOCATION_DECK,0,1,1,nil,type1)
local tgc=g:GetFirst() local tgc=g:GetFirst()
if tgc then if tgc and Duel.SendtoGrave(tgc,REASON_EFFECT)~=0 and tgc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e)
Duel.SendtoGrave(tgc,REASON_EFFECT) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
end local e1=Effect.CreateEffect(c)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then e1:SetCode(EVENT_PHASE+PHASE_END)
local e1=Effect.CreateEffect(c) e1:SetCountLimit(1)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCondition(c101102012.thcon)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetOperation(c101102012.thop)
e1:SetCountLimit(1) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(c101102012.thcon) Duel.RegisterEffect(e1,tp)
e1:SetOperation(c101102012.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end end
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -79,8 +75,8 @@ function c101102012.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,8 +75,8 @@ function c101102012.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101102012.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101102012.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
end end
end end
...@@ -5,7 +5,7 @@ function c101102013.initial_effect(c) ...@@ -5,7 +5,7 @@ function c101102013.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102013,0)) e1:SetDescription(aux.Stringid(101102013,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_DECKDES) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
...@@ -41,20 +41,16 @@ function c101102013.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,20 +41,16 @@ function c101102013.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101102013.tgfilter,tp,LOCATION_DECK,0,1,1,nil,type1) local g=Duel.SelectMatchingCard(tp,c101102013.tgfilter,tp,LOCATION_DECK,0,1,1,nil,type1)
local tgc=g:GetFirst() local tgc=g:GetFirst()
local type1=type1+tgc:GetType()&0x7|type1 if tgc and Duel.SendtoGrave(tgc,REASON_EFFECT)~=0 and tgc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e)
if tgc then and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.SendtoGrave(tgc,REASON_EFFECT) local type1=tgc:GetType()&0x7|type1
end local sg=Duel.GetMatchingGroup(c101102013.tgfilter,tp,LOCATION_DECK,0,nil,type1)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(101102013,1)) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c101102013.tgfilter,tp,LOCATION_DECK,0,nil,type1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(101102013,1)) then local g=sg:Select(tp,1,1,nil)
Duel.BreakEffect() if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.SendtoGrave(g,REASON_EFFECT)
local g=sg:Select(tp,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end end
end end
end end
......
...@@ -47,7 +47,7 @@ function c101102036.rtcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function c101102036.rtcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c101102036.rttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101102036.rttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c101102036.tgfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101102036.tgfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_REMOVED)
end end
function c101102036.rtop(e,tp,eg,ep,ev,re,r,rp) function c101102036.rtop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
function c101102042.initial_effect(c) function c101102042.initial_effect(c)
--xyz summon --xyz summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,3,2,nil,nil,7) aux.AddXyzProcedure(c,nil,3,2,nil,nil,99)
--indes --indes
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102042,0)) e1:SetDescription(aux.Stringid(101102042,0))
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
function c101102043.initial_effect(c) function c101102043.initial_effect(c)
--xyz summon --xyz summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,6,2,nil,nil,7) aux.AddXyzProcedure(c,nil,6,2,nil,nil,99)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102043,0)) e1:SetDescription(aux.Stringid(101102043,0))
......
...@@ -20,7 +20,7 @@ function c101102046.initial_effect(c) ...@@ -20,7 +20,7 @@ function c101102046.initial_effect(c)
e2:SetDescription(aux.Stringid(101102046,1)) e2:SetDescription(aux.Stringid(101102046,1))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101102046+100) e2:SetCountLimit(1,101102046+100)
e2:SetTarget(c101102046.drtg) e2:SetTarget(c101102046.drtg)
...@@ -36,12 +36,26 @@ function c101102046.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,12 +36,26 @@ function c101102046.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c101102046.spop(e,tp,eg,ep,ev,re,r,rp) function c101102046.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101102046.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c101102046.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(0xff,0xff)
e1:SetTarget(aux.NOT(aux.TargetBoolFunction(Card.IsRace,RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST)))
e1:SetValue(c101102046.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101102046.sumlimit(e,c)
if not c then return false end
return c:IsControler(e:GetHandlerPlayer())
end end
function c101102046.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102046.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
...@@ -22,7 +22,7 @@ function c101102047.initial_effect(c) ...@@ -22,7 +22,7 @@ function c101102047.initial_effect(c)
e2:SetDescription(aux.Stringid(101102047,1)) e2:SetDescription(aux.Stringid(101102047,1))
e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101102047+100) e2:SetCountLimit(1,101102047+100)
e2:SetTarget(c101102047.atktg) e2:SetTarget(c101102047.atktg)
...@@ -51,6 +51,7 @@ function c101102047.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,6 +51,7 @@ function c101102047.spop(e,tp,eg,ep,ev,re,r,rp)
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_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
......
...@@ -11,7 +11,7 @@ function c101102048.initial_effect(c) ...@@ -11,7 +11,7 @@ function c101102048.initial_effect(c)
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,101102048) e1:SetCountLimit(1,101102048)
e1:SetTarget(c101102048.rmtg) e1:SetTarget(c101102048.rmtg)
e1:SetOperation(c101102048.rmop) e1:SetOperation(c101102048.rmop)
...@@ -26,7 +26,7 @@ function c101102048.initial_effect(c) ...@@ -26,7 +26,7 @@ function c101102048.initial_effect(c)
e3:SetDescription(aux.Stringid(101102048,1)) e3:SetDescription(aux.Stringid(101102048,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,101102048+100) e3:SetCountLimit(1,101102048+100)
e3:SetTarget(c101102048.thtg) e3:SetTarget(c101102048.thtg)
...@@ -36,10 +36,10 @@ end ...@@ -36,10 +36,10 @@ end
function c101102048.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102048.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 end if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c101102048.rmop(e,tp,eg,ep,ev,re,r,rp) function c101102048.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,CATEGORY_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
...@@ -61,7 +61,7 @@ end ...@@ -61,7 +61,7 @@ end
function c101102048.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102048.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local ct=Duel.GetMatchingGroupCount(c101102048.rfilter,tp,LOCATION_REMOVED,0,nil) local ct=Duel.GetMatchingGroupCount(c101102048.rfilter,tp,LOCATION_REMOVED,0,nil)
return Duel.IsExistingMatchingCard(c101102048.thfilter,tp,LOCATION_DECK,0,1,nil,ct) return ct>0 and Duel.IsExistingMatchingCard(c101102048.thfilter,tp,LOCATION_DECK,0,1,nil,ct)
end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -32,7 +32,7 @@ function c101102052.initial_effect(c) ...@@ -32,7 +32,7 @@ function c101102052.initial_effect(c)
e4:SetDescription(aux.Stringid(101102052,1)) e4:SetDescription(aux.Stringid(101102052,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_DESTROYED)
e4:SetCondition(c101102052.limcon) e4:SetCondition(c101102052.limcon)
e4:SetOperation(c101102052.limop) e4:SetOperation(c101102052.limop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
......
...@@ -45,7 +45,6 @@ function c101102053.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,6 @@ function c101102053.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
...@@ -26,7 +26,7 @@ function c101102055.exfilter1(c) ...@@ -26,7 +26,7 @@ function c101102055.exfilter1(c)
return c:IsFacedown() and c:IsType(TYPE_XYZ+TYPE_SYNCHRO+TYPE_FUSION) return c:IsFacedown() and c:IsType(TYPE_XYZ+TYPE_SYNCHRO+TYPE_FUSION)
end end
function c101102055.exfilter2(c) function c101102055.exfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM+TYPE_LINK) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) or c:IsFacedown() and c:IsType(TYPE_LINK)
end end
function c101102055.fselect(g,ft1,ft2,ect,ft) function c101102055.fselect(g,ft1,ft2,ect,ft)
return aux.dncheck(g) and #g<=ft and #g<=ect return aux.dncheck(g) and #g<=ft and #g<=ect
...@@ -35,12 +35,11 @@ function c101102055.fselect(g,ft1,ft2,ect,ft) ...@@ -35,12 +35,11 @@ function c101102055.fselect(g,ft1,ft2,ect,ft)
end end
function c101102055.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101102055.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local ft=1 local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:GetHandler():IsLocation(LOCATION_SZONE) then ft=0 end if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ft=ft-1 end
return Duel.GetLocationCount(tp,LOCATION_SZONE)>ft return ft>0 and Duel.IsExistingMatchingCard(c101102055.tffilter,tp,LOCATION_DECK,0,1,nil,tp)
and Duel.IsExistingMatchingCard(c101102055.tffilter,tp,LOCATION_DECK,0,1,nil,tp)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_EXTRA)
end end
function c101102055.activate(e,tp,eg,ep,ev,re,r,rp) function c101102055.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
...@@ -50,6 +49,7 @@ function c101102055.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,6 +49,7 @@ function c101102055.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)~=0 then if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)~=0 then
local gc=Duel.GetMatchingGroupCount(c101102055.gtfilter,tp,LOCATION_ONFIELD,0,nil) local gc=Duel.GetMatchingGroupCount(c101102055.gtfilter,tp,LOCATION_ONFIELD,0,nil)
if gc>=2 and Duel.SelectYesNo(tp,aux.Stringid(101102055,1)) then if gc>=2 and Duel.SelectYesNo(tp,aux.Stringid(101102055,1)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -15,45 +15,47 @@ end ...@@ -15,45 +15,47 @@ end
function c101102070.spfilter1(c,e,tp) function c101102070.spfilter1(c,e,tp)
return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end end
function c101102070.fselect1(g,tp,ft) function c101102070.fselect1(g,tp)
return Duel.IsExistingMatchingCard(c101102070.lkfilter,tp,LOCATION_EXTRA,0,1,nil,g,ft) return Duel.IsExistingMatchingCard(c101102070.lkfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end end
function c101102070.lkfilter(c,g,ft) function c101102070.lkfilter(c,g)
return c:IsSetCard(0x24f) and c:IsLinkSummonable(g,nil,g:GetCount(),g:GetCount()) and (not ft or ft>=g:GetCount()) return c:IsSetCard(0x24f) and c:IsLinkSummonable(g,nil,g:GetCount(),g:GetCount())
end end
function c101102070.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101102070.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c101102070.spfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp,ft) if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if chk==0 then return ft>0 and Duel.IsPlayerCanSpecialSummonCount(tp,2) local g=Duel.GetMatchingGroup(c101102070.spfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and g:CheckSubGroup(c101102070.fselect1,1,ft,tp) end if chk==0 then return ft>0 and Duel.IsPlayerCanSpecialSummonCount(tp,2) and g:CheckSubGroup(c101102070.fselect1,1,ft,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end end
function c101102070.activate(e,tp,eg,ep,ev,re,r,rp) function c101102070.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101102070.spfilter1),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp,ft) if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101102070.spfilter1),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if ft>0 then
local sg=g:SelectSubGroup(tp,c101102070.fselect1,false,1,ft,tp)
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
local og=Duel.GetOperatedGroup()
local tg=Duel.GetMatchingGroup(c101102070.lkfilter,tp,LOCATION_EXTRA,0,nil,og,nil)
if og:GetCount()==sg:GetCount() and tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=tg:Select(tp,1,1,nil) local sg=g:SelectSubGroup(tp,c101102070.fselect1,false,1,ft,tp)
Duel.LinkSummon(tp,rg:GetFirst(),og) local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
local og=Duel.GetOperatedGroup()
local tg=Duel.GetMatchingGroup(c101102070.lkfilter,tp,LOCATION_EXTRA,0,nil,og)
if og:GetCount()==sg:GetCount() and tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=tg:Select(tp,1,1,nil)
Duel.LinkSummon(tp,rg:GetFirst(),og)
end
end end
end end
...@@ -40,21 +40,23 @@ function c101102072.tdfilter(c) ...@@ -40,21 +40,23 @@ function c101102072.tdfilter(c)
return c:IsSetCard(0x24e) and c:IsAbleToDeck() and c:IsFaceup() return c:IsSetCard(0x24e) and c:IsAbleToDeck() and c:IsFaceup()
end end
function c101102072.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101102072.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(c101102072.tdfilter,tp,LOCATION_REMOVED,0,nil)
if chkc then return chkc:IsOnField() and chkc:IsFaceup() end if chkc then return chkc:IsOnField() and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(c101102072.tdfilter,tp,LOCATION_REMOVED,0,2,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and g:CheckSubGroup(aux.dncheck,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local tg=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_REMOVED)
end end
function c101102072.operation(e,tp,eg,ep,ev,re,r,rp) function c101102072.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(c101102072.tdfilter,tp,LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c101102072.tdfilter,tp,LOCATION_REMOVED,0,2,2,nil) local sg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
if #g>0 then if sg then
Duel.HintSelection(g) Duel.HintSelection(sg)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) and tc:IsRelateToEffect(e) then if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=0 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end 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