Commit 4be6dfce authored by Tachibana's avatar Tachibana

1145141919810

parent 0541dfd4
Pipeline #14443 passed with stages
in 30 minutes and 7 seconds
No preview for this file type
...@@ -8,6 +8,7 @@ function cm.initial_effect(c) ...@@ -8,6 +8,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon rule --special summon rule
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -22,7 +23,6 @@ function cm.initial_effect(c) ...@@ -22,7 +23,6 @@ function cm.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0)) e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
...@@ -62,21 +62,17 @@ function cm.initial_effect(c) ...@@ -62,21 +62,17 @@ function cm.initial_effect(c)
e6:SetCondition(cm.spfcon2) e6:SetCondition(cm.spfcon2)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
--SpecialSummon self --SpecialSummon rule
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function cm.sprfilter(c,tp) function cm.sprfilter(c,tp)
return c:IsFaceup() and c:IsAbleToDeckAsCost() and c:IsSetCard(0x480,0xa01) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsAbleToExtraAsCost() and c:IsSetCard(0x480,0xa01) and c:IsType(TYPE_MONSTER)
end end
function cm.sprfilter0(c,tp) function cm.sprfilter0(c,tp)
return c:IsFaceup() and c:IsAbleToGraveAsCost() and c:IsSetCard(0xa01) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsAbleToExtraAsCost() and c:IsSetCard(0xa01) and c:IsType(TYPE_MONSTER)
and Duel.GetMZoneCount(1-tp,c,tp)>0 and Duel.GetMZoneCount(1-tp,c,tp)>0
end end
function cm.sprfilter1(c,tp,g,sc)
return c:IsType(TYPE_SYNCHRO) and g:IsExists(cm.sprfilter2,1,c,tp,c,sc)
end
function cm.sprfilter2(c,tp,mc,sc)
local sg=Group.FromCards(c,mc)
return Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0
end
function cm.sprcon(e,c) function cm.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
...@@ -86,15 +82,14 @@ function cm.sprcon(e,c) ...@@ -86,15 +82,14 @@ function cm.sprcon(e,c)
end end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c) function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g0=Duel.GetMatchingGroup(cm.sprfilter0,tp,LOCATION_MZONE,0,nil,tp) local g0=Duel.GetMatchingGroup(cm.sprfilter0,tp,LOCATION_MZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local mc=g:Select(tp,1,1,nil) local dg=g0:Select(tp,1,1,nil)
Duel.SendtoGrave(mc,REASON_COST)
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local m1=g:FilterSelect(tp,Card.IsType,1,1,nil,TYPE_SYNCHRO):GetFirst() local m1=g:FilterSelect(tp,Card.IsType,1,1,nil,TYPE_SYNCHRO):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=g:Select(tp,1,1,m1)
dg:AddCard(m1) dg:AddCard(m1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
dg:Merge(g:Select(tp,1,1,m1))
Duel.SendtoDeck(dg,nil,2,REASON_COST) Duel.SendtoDeck(dg,nil,2,REASON_COST)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,99) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,99)
end end
...@@ -102,12 +97,11 @@ end ...@@ -102,12 +97,11 @@ end
function cm.tfcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tfcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function cm.tffilter(c,tp) function cm.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSetCard(0x109) return c:IsType(TYPE_SPELL) and not c:IsType(TYPE_FIELD) and c:IsSetCard(0x480,0xa01) and not c:IsForbidden()
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
...@@ -129,14 +123,14 @@ function cm.spcon(e) ...@@ -129,14 +123,14 @@ function cm.spcon(e)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_HAND,0,nil) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_HAND,0,nil)
if chk==0 then return #sg>0 end if chk==0 then return sg:GetCount()>0 end
Duel.SendtoGrave(sg,REASON_COST) Duel.SendtoGrave(sg,REASON_COST)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsSetCard(0x480,0xa01) and c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x480,0xa01) and c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE+LOCATION_REMOVED)
...@@ -157,13 +151,14 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -157,13 +151,14 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2,true)
tc=g1:GetNext()
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -201,22 +196,15 @@ function cm.spfcon2(e) ...@@ -201,22 +196,15 @@ function cm.spfcon2(e)
local c=e:GetHandler() local c=e:GetHandler()
return Duel.IsExistingMatchingCard(cm.ccfilter,c:GetControler(),LOCATION_SZONE,0,2,nil) return Duel.IsExistingMatchingCard(cm.ccfilter,c:GetControler(),LOCATION_SZONE,0,2,nil)
end end
function cm.costfilter(c,tp) function cm.costfilter(c)
return c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0xa01) return c:IsFaceup() and c:IsSetCard(0xa01) and c:IsReleasable()
and Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_MZONE,0,1,nil,tp,c:GetCode())
end
function cm.costfilter2(c,tp,code)
return c:IsFaceup() and c:IsSetCard(0xa01) and c:IsReleasable() and c:IsControler(tp) and not c:IsCode(code)
end end
function cm.spfcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spfcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil,tp) end local hg=Duel.GetMatchingGroup(cm.costfilter,tp,LOCATION_MZONE,0,nil)
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_COST) if chk==0 then return hg:CheckSubGroup(aux.dncheck,2,99) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil,tp) local g=hg:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Release(g,REASON_COST)
local g2=Duel.SelectReleaseGroup(tp,cm.costfilter2,1,1,nil,tp,g1:GetFirst():GetHandler():GetCode())
g1:Merge(g2)
Duel.Release(g1,REASON_COST)
end end
function cm.spftg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spftg(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
......
...@@ -20,7 +20,7 @@ function cm.initial_effect(c) ...@@ -20,7 +20,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1) e3:SetCountLimit(1,m)
e3:SetCondition(cm.tgcon) e3:SetCondition(cm.tgcon)
e3:SetTarget(cm.tgtg) e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop) e3:SetOperation(cm.tgop)
...@@ -105,7 +105,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -105,7 +105,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) then and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
......
...@@ -56,7 +56,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
-- --
function cm.excon(e,tp,eg,ep,ev,re,r,rp) function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101) return re and re:GetHandler():IsCode(10701101,10701141)
end end
......
...@@ -41,6 +41,7 @@ function c10701061.initial_effect(c) ...@@ -41,6 +41,7 @@ function c10701061.initial_effect(c)
e4:SetOperation(cm.spop) e4:SetOperation(cm.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e41=e4:Clone() local e41=e4:Clone()
e41:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e41:SetCode(EVENT_TO_HAND) e41:SetCode(EVENT_TO_HAND)
e41:SetProperty(EFFECT_FLAG_DELAY) e41:SetProperty(EFFECT_FLAG_DELAY)
e41:SetCondition(cm.excon) e41:SetCondition(cm.excon)
...@@ -117,5 +118,5 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -117,5 +118,5 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
-- --
function cm.excon(e,tp,eg,ep,ev,re,r,rp) function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101) return re and re:GetHandler():IsCode(10701101,10701141)
end end
\ No newline at end of file
...@@ -110,7 +110,7 @@ function cm.spfilter(c,e,tp) ...@@ -110,7 +110,7 @@ function cm.spfilter(c,e,tp)
end end
-- --
function cm.excon(e,tp,eg,ep,ev,re,r,rp) function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101) return re and re:GetHandler():IsCode(10701101,10701141)
end end
...@@ -121,4 +121,3 @@ end ...@@ -121,4 +121,3 @@ end
...@@ -18,7 +18,7 @@ function cm.initial_effect(c) ...@@ -18,7 +18,7 @@ function cm.initial_effect(c)
--tograve and SpecialSummon --tograve and SpecialSummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1)) e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
...@@ -29,6 +29,7 @@ function cm.initial_effect(c) ...@@ -29,6 +29,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EVENT_TO_HAND) e4:SetCode(EVENT_TO_HAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCondition(cm.excon) e4:SetCondition(cm.excon)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
...@@ -52,7 +53,7 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +53,7 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
g:GetFirst():RegisterEffect(e1) g:GetFirst():RegisterEffect(e1)
end end
end end
--SpecialSummon --SpecialSummon
...@@ -89,7 +90,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,7 +90,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
-- --
function cm.excon(e,tp,eg,ep,ev,re,r,rp) function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101) return re and re:GetHandler():IsCode(10701101,10701141)
end end
......
...@@ -37,6 +37,7 @@ function cm.initial_effect(c) ...@@ -37,6 +37,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=e3:Clone() local e5=e3:Clone()
e5:SetCode(EVENT_TO_HAND) e5:SetCode(EVENT_TO_HAND)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(cm.excon) e5:SetCondition(cm.excon)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
...@@ -86,7 +87,6 @@ function cm.tgcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,7 +87,6 @@ function cm.tgcon2(e,tp,eg,ep,ev,re,r,rp)
end end
-- --
function cm.excon(e,tp,eg,ep,ev,re,r,rp) function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101) return re and re:GetHandler():IsCode(10701101,10701141)
end end
...@@ -4,7 +4,7 @@ local cm=_G["c"..m] ...@@ -4,7 +4,7 @@ local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--tograve --tograve
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
...@@ -19,7 +19,6 @@ function cm.initial_effect(c) ...@@ -19,7 +19,6 @@ function cm.initial_effect(c)
--set --set
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1)) e3:SetDescription(aux.Stringid(m,1))
--e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,m+1) e3:SetCountLimit(1,m+1)
...@@ -55,28 +54,30 @@ function cm.fselect(g) ...@@ -55,28 +54,30 @@ function cm.fselect(g)
return aux.dncheck(g) return aux.dncheck(g)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x3481) local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x3481)
local ct=0 local ct=0
if g:Filter(Card.IsType,nil,TYPE_MONSTER)>0 then ct=ct+1 end if g:Filter(Card.IsType,nil,TYPE_MONSTER):GetCount()>0 then ct=ct+1 end
if g:Filter(Card.IsType,nil,TYPE_SPELL)>0 then ct=ct+1 end if g:Filter(Card.IsType,nil,TYPE_SPELL):GetCount()>0 then ct=ct+1 end
if g:Filter(Card.IsType,nil,TYPE_TRAP)>0 then ct=ct+1 end if g:Filter(Card.IsType,nil,TYPE_TRAP):GetCount()>0 then ct=ct+1 end
local hg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil) local hg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:GetCount()>0 and ct>0 and hg:GetCount()>0 and hg:CheckSubGroup(cm.fselect,ct,99) end if chk==0 then return g:GetCount()>0 and ct>0 and hg:GetCount()>0 and hg:CheckSubGroup(cm.fselect,ct,99) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,ct,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,ct,tp,LOCATION_DECK)
end end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp) function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x3481) local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x3481)
local ct=0 local ct=0
if g:Filter(Card.IsType,nil,TYPE_MONSTER)>0 then ct=ct+1 end if g:Filter(Card.IsType,nil,TYPE_MONSTER):GetCount()>0 then ct=ct+1 end
if g:Filter(Card.IsType,nil,TYPE_SPELL)>0 then ct=ct+1 end if g:Filter(Card.IsType,nil,TYPE_SPELL):GetCount()>0 then ct=ct+1 end
if g:Filter(Card.IsType,nil,TYPE_TRAP)>0 then ct=ct+1 end if g:Filter(Card.IsType,nil,TYPE_TRAP):GetCount()>0 then ct=ct+1 end
if ct<1 then return end if ct<1 then return end
local hg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil) local hg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=hg:SelectSubGroup(tp,cm.fselect,false,ct,ct) local tg=hg:SelectSubGroup(tp,cm.fselect,false,ct,ct)
local sg1=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,nil) local sg1=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,nil)
local sg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,nil) local sg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,nil)
if tg:GetCount()>0 and Duel.SendtoGrave(tg,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_ONFIELD,0)==0 and (sg1:GetCount()>0 or sg2:GetCount()>0) then if tg:GetCount()>0 and Duel.SendtoGrave(tg,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 and (sg1:GetCount()>0 or sg2:GetCount()>0) then
sg1=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,nil)
sg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,nil)
local op=-1 local op=-1
if sg1:GetCount()>0 and sg2:GetCount()>0 then if sg1:GetCount()>0 and sg2:GetCount()>0 then
op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2)) op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
...@@ -107,7 +108,7 @@ end ...@@ -107,7 +108,7 @@ end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp) function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer() local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP) and Duel.GetFieldGroupCount(1-tp,0,LOCATION_MZONE)>0 return tn~=tp and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end end
function cm.setfilter1(c) function cm.setfilter1(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_TRAP) and c:IsSSetable() return c:IsSetCard(0x3481) and c:IsType(TYPE_TRAP) and c:IsSSetable()
...@@ -116,7 +117,7 @@ function cm.setfilter2(c) ...@@ -116,7 +117,7 @@ function cm.setfilter2(c)
return c:IsType(TYPE_TRAP) and not c:IsType(TYPE_COUNTER) and c:IsSSetable() return c:IsType(TYPE_TRAP) and not c:IsType(TYPE_COUNTER) and c:IsSSetable()
end end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return (Duel.IsExistingMatchingCard(cm.setfilter,tp,0,LOCATION_HAND,1,nil) or Duel.IsExistingMatchingCard(cm.setfilter2,tp,0,LOCATION_GRAVE,1,nil)) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end if chk==0 then return (Duel.IsExistingMatchingCard(cm.setfilter1,tp,LOCATION_HAND,0,1,nil) or Duel.IsExistingMatchingCard(cm.setfilter2,tp,LOCATION_GRAVE,0,1,nil)) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end end
function cm.setop(e,tp,eg,ep,ev,re,r,rp) function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -143,9 +143,10 @@ function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -143,9 +143,10 @@ function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.damop(e,tp,eg,ep,ev,re,r,rp) function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dam=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*100 local dg=Duel.GetMatchingGroup(cm.damfilter,tp,LOCATION_GRAVE,0,nil)
local dam=dg:GetClassCount(Card.GetCode)*444
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.Damage(p,dam,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_ONFIELD,0)==0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.Damage(p,dam,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g:Select(tp,1,1,nil):GetFirst() local sc=g:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -19,7 +19,7 @@ function cm.initial_effect(c) ...@@ -19,7 +19,7 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,m+1) e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.tgcon) --e2:SetCondition(cm.tgcon)
e2:SetTarget(cm.tgtg) e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop) e2:SetOperation(cm.tgop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -65,7 +65,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_REMOVE) e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(LOCATION_GRAVE+LOCATION_DECK,LOCATION_GRAVE+LOCATION_DECK) e1:SetTargetRange(LOCATION_GRAVE+LOCATION_DECK,LOCATION_GRAVE+LOCATION_DECK)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
...@@ -73,7 +73,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
--disable --disable
function cm.cfilter(c) function cm.cfilter(c)
return c:IsCode() and c:IsFaceup() return c:IsCode(10701101,10701141) and c:IsFaceup()
end end
function cm.discon(e,tp,eg,ep,ev,re,r,rp) function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local loc,pos=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_POSITION) local loc,pos=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_POSITION)
......
...@@ -7,6 +7,7 @@ function cm.initial_effect(c) ...@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
...@@ -30,13 +31,13 @@ function cm.cfilter(c) ...@@ -30,13 +31,13 @@ function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3481) return c:IsFaceup() and c:IsSetCard(0x3481)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil)==0 return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.tgfilter(c) function cm.tgfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil)
...@@ -54,33 +55,34 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,33 +55,34 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sc=sg:Select(tp,g:GetCount(),g:GetCount(),nil) local sc=sg:Select(tp,g:GetCount(),g:GetCount(),nil)
if Duel.SendtoGrave(sc,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) then if Duel.SendtoGrave(sc,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) then
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND,0,1,sg:GetCount(),nil,e,tp):GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
end end
--to grave --to grave
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp) function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil)>0 return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) and aux.exccon(e)
and Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)>Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
end end
function cm.tgfilter(c) function cm.tgcfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsAbleToGrave() return c:IsSetCard(0x3481) and c:IsFaceup() and c:IsAbleToGrave()
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(cm.tgcfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_MZONE)
end end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp) function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,cm.tgcfilter,tp,LOCATION_MZONE,0,1,1,nil)
if #g1==0 then return end if #g1==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) local g2=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
Duel.HintSelection(g1) Duel.HintSelection(g1)
if Duel.SendtoGrave(g1,REASON_EFFECT)>0 and Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)>Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.SendtoGrave(g1,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgdfilter,tp,0,LOCATION_DECK,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.tgdfilter,tp,0,LOCATION_DECK,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
......
...@@ -24,6 +24,12 @@ function c71402001.initial_effect(c) ...@@ -24,6 +24,12 @@ function c71402001.initial_effect(c)
e2:SetCost(c71402001.cost2) e2:SetCost(c71402001.cost2)
e2:SetOperation(c71402001.op2) e2:SetOperation(c71402001.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--double tuner check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(c71402001.valcheck)
c:RegisterEffect(e3)
end end
function c71402001.mfilter(c,sc) function c71402001.mfilter(c,sc)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsNotTuner(sc) or c:IsType(TYPE_TUNER) and c:IsSummonType(SUMMON_TYPE_NORMAL) return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsNotTuner(sc) or c:IsType(TYPE_TUNER) and c:IsSummonType(SUMMON_TYPE_NORMAL)
...@@ -69,4 +75,15 @@ function c71402001.op2(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,4 +75,15 @@ function c71402001.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end end
end end
end
function c71402001.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(21142671)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
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