Commit c6ecec9f authored by nekrozar's avatar nekrozar

fix IGAS

parent d4cfd73d
......@@ -64,32 +64,31 @@ function c11711438.stgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
function c11711438.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x137)
function c11711438.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x137) and c:GetSummonPlayer()==tp
end
function c11711438.tgfilter(c,tp,eg)
return eg:IsContains(c) and Duel.IsExistingMatchingCard(c11711438.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
function c11711438.tgfilter(c,tp,g)
return g:IsContains(c) and Duel.IsExistingMatchingCard(c11711438.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c11711438.thfilter(c,code)
return c:IsSetCard(0x137) and c:IsType(TYPE_MONSTER) and not c:IsCode(code) and c:IsAbleToHand()
end
function c11711438.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and rp==tp and eg:IsExists(c11711438.cfilter,1,nil)
return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and eg:IsExists(c11711438.cfilter,1,nil,tp)
end
function c11711438.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11711438.tgfilter(chkc,tp,eg) end
if chk==0 then return Duel.IsExistingTarget(c11711438.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp,eg) and Duel.GetFlagEffect(tp,c11711438)==0 end
Duel.RegisterFlagEffect(tp,c11711438,RESET_CHAIN,0,1)
if eg:GetCount()==1 then
Duel.SetTargetCard(eg)
local g=eg:Filter(c11711438.cfilter,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11711438.tgfilter(chkc,tp,g) end
if chk==0 then return Duel.IsExistingTarget(c11711438.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp,g) end
if g:GetCount()==1 then
Duel.SetTargetCard(g)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c11711438.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,eg)
Duel.SelectTarget(tp,c11711438.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,g)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11711438.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local code=tc:GetCode()
......@@ -102,13 +101,14 @@ function c11711438.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c11711438.spfilter(c,e,tp)
return c:IsSetCard(0x137) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x137) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11711438.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
end
function c11711438.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c11711438.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11711438.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c11711438.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -62,10 +62,10 @@ function c13923256.descon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x137) and rp==tp and re:GetHandler()~=e:GetHandler() and e:GetHandler():GetFlagEffect(1)>0
end
function c13923256.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_SZONE,1,nil) end
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_SZONE,1,1,nil)
local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c13923256.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -12,11 +12,11 @@ function c1759808.initial_effect(c)
e1:SetOperation(c1759808.activate)
c:RegisterEffect(e1)
end
function c1759808.cfilter1(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c1759808.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function c1759808.cfilter2(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c1759808.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode())
function c1759808.filter(c,e,tp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
return loc~=0 and c:IsFaceup() and Duel.IsExistingMatchingCard(c1759808.spfilter,tp,loc,0,1,nil,e,tp,c:GetCode())
end
function c1759808.cfilter(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c1759808.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode())
......@@ -25,60 +25,36 @@ function c1759808.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1759808.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mz=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ez=Duel.GetLocationCountFromEx(tp)
local b1=Duel.IsExistingTarget(c1759808.cfilter1,tp,0,LOCATION_MZONE,1,nil,e,tp) and mz>0
local b2=Duel.IsExistingTarget(c1759808.cfilter2,tp,0,LOCATION_MZONE,1,nil,e,tp) and ez>0
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c:IsControler(1-tp) and c1759808.cfilter(chkc,e,tp) end
if chk==0 then return b1 or b2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,c1759808.cfilter,tp,0,LOCATION_MZONE,1,1,nil,e,tp)
local tc=g:GetFirst()
local d1=Duel.IsExistingMatchingCard(c1759808.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,tc:GetCode())
local d2=Duel.IsExistingMatchingCard(c1759808.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,tc:GetCode())
if d1 and not d2 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
if not d1 and d2 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
if bit.band(tc:GetType(),TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK+TYPE_PENDULUM)==TYPE_PENDULUM then
if chk==0 then return Duel.IsExistingTarget(c1759808.filter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c1759808.filter,tp,0,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
end
function c1759808.activate(e,tp,eg,ep,ev,re,r,rp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
local tc=Duel.GetFirstTarget()
local mz=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ez=Duel.GetLocationCountFromEx(tp)
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if loc~=0~=0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local code=tc:GetCode()
local d1=Duel.IsExistingMatchingCard(c1759808.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,code)
local d2=Duel.IsExistingMatchingCard(c1759808.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,code)
if (bit.band(tc:GetType(),TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK+TYPE_PENDULUM)==TYPE_PENDULUM
and ((d1 and mz>0) or (d2 and ez>0))) or (d1 and not d2 and mz>0) or (not d1 and d2 and ez>0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.GetMatchingGroup(c1759808.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp,code)
if mz<=0 then
g=g:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
end
if ez<=0 then
g=g:Filter(Card.IsLocation,nil,LOCATION_DECK)
end
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then
sc:RegisterFlagEffect(1759808,RESET_EVENT+RESETS_STANDARD,0,1)
local g=Duel.SelectMatchingCard(tp,c1759808.spfilter,tp,loc,0,1,1,nil,e,tp,code)
local sc=g:GetFirst()
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
tc:RegisterFlagEffect(1759808,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(Duel.GetTurnCount()+1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetLabelObject(sc)
e1:SetCondition(c1759808.tdcon)
e1:SetOperation(c1759808.tdop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
Duel.SpecialSummonComplete()
end
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
......@@ -94,12 +70,7 @@ function c1759808.activate(e,tp,eg,ep,ev,re,r,rp)
end
function c1759808.tdcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(1759808)~=0 then
return Duel.GetTurnCount()==e:GetLabel()
else
e:Reset()
return false
end
return Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(1759808)~=0
end
function c1759808.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
......
......@@ -80,7 +80,8 @@ function c1966438.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function c1966438.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c1966438.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -109,7 +110,8 @@ function c1966438.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(1966438)>0
end
function c1966438.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c1966438.spop2(e,tp,eg,ep,ev,re,r,rp)
......@@ -122,7 +124,7 @@ function c1966438.spop2(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKBOT)
c:RegisterEffect(e1,true)
c:RegisterEffect(e1)
end
end
end
--グラビティ・コントローラー
function c23656668.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c23656668.mfilter,1,1)
--cannot link material
......@@ -29,7 +30,7 @@ function c23656668.initial_effect(c)
c:RegisterEffect(e3)
end
function c23656668.mfilter(c)
return not c:IsType(TYPE_LINK) and c:GetSequence()>4
return not c:IsLinkType(TYPE_LINK) and c:GetSequence()>4
end
function c23656668.lmlimit(e)
local c=e:GetHandler()
......@@ -48,9 +49,7 @@ function c23656668.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if chk==0 then return tc and c:IsAbleToDeck() and tc:IsAbleToDeck() end
local g=Group.CreateGroup()
g:AddCard(c)
g:AddCard(tc)
local g=Group.FromCards(c,tc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
end
function c23656668.tdop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -2,19 +2,14 @@
function c25726386.initial_effect(c)
c:EnableReviveLimit()
--ritual summon
local e1=Effect.CreateEffect(c)
local e1=aux.AddRitualProcGreater2(c,c25726386.filter,nil,nil,c25726386.matfilter)
e1:SetDescription(aux.Stringid(25726386,0))
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,25726386)
e1:SetCondition(c25726386.rscon)
e1:SetCost(c25726386.rscost)
e1:SetTarget(c25726386.rstg)
e1:SetOperation(c25726386.rsop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(25726386,1))
......@@ -29,8 +24,11 @@ function c25726386.initial_effect(c)
e2:SetOperation(c25726386.disop)
c:RegisterEffect(e2)
end
function c25726386.filter(c)
return c:IsSetCard(0x138)
function c25726386.filter(c,e,tp)
return c:IsSetCard(0x138) and c~=e:GetHandler()
end
function c25726386.matfilter(c,e,tp)
return c~=e:GetHandler()
end
function c25726386.rscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
......@@ -39,46 +37,6 @@ function c25726386.rscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c25726386.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
if mg:IsContains(c) then
mg:RemoveCard(c)
end
local sg=nil
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,c,c25726386.filter,e,tp,mg,sg,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c25726386.rsop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,c25726386.filter,e,tp,mg,sg,Card.GetLevel,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if sg then
mg:Merge(sg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c25726386.tfilter(c,tp)
return c:IsOnField() and c:IsControler(tp)
end
......@@ -101,9 +59,8 @@ function c25726386.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c25726386.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c25726386.disfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c25726386.disfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,1,REASON_EFFECT)~=0 then
if g:GetFirst():IsLocation(LOCATION_DECK) and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
......
......@@ -37,7 +37,8 @@ function c2801664.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c2801664.cfilter,tp,LOCATION_MZONE,0,2,nil)
end
function c2801664.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c2801664.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -57,7 +58,7 @@ function c2801664.xatkcon(e,tp,eg,ep,ev,re,r,rp)
end
function c2801664.xatktg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK_MONSTER) end
if chk==0 then return not c:IsHasEffect(EFFECT_EXTRA_ATTACK_MONSTER) end
end
function c2801664.xatkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -26,9 +26,6 @@ function c35394356.initial_effect(c)
e2:SetOperation(c35394356.rop)
c:RegisterEffect(e2)
end
function c35394356.cfilter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function c35394356.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
......@@ -37,10 +34,10 @@ function c35394356.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c35394356.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c35394356.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c35394356.cfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
Duel.SelectTarget(tp,c35394356.cfilter,tp,0,LOCATION_MZONE,1,1,nil)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.nzatk(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.nzatk,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil)
end
function c35394356.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -38,7 +38,8 @@ function c36016907.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c36016907.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c36016907.spop1(e,tp,eg,ep,ev,re,r,rp)
......@@ -56,7 +57,8 @@ end
function c36016907.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c36016907.spfilter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c36016907.spfilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) and c:IsAbleToRemove() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c36016907.spfilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) and c:IsAbleToRemove() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c36016907.spfilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
......@@ -43,62 +43,44 @@ function c36239585.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
end
end
function c36239585.spfilter(c,e,tp)
return c:IsSetCard(0x8d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
function c36239585.setfilter(c,e,tp)
if not c:IsSetCard(0x8d) then return false end
if c:IsType(TYPE_MONSTER) then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
else return c:IsCanTurnSet() end
end
function c36239585.sefilter(c)
return c:IsSetCard(0x8d) and c:IsSSetable()
end
function c36239585.setfilter(c,e,tp)
function c36239585.filter(c,e,tp)
return c:IsSetCard(0x8d) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) or c:IsSSetable())
end
function c36239585.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c36239585.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp)
and (c36239585.spfilter(chkc,e,tp) or c36239585.sefilter(chkc)) end
local mz=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sz=Duel.GetLocationCount(tp,LOCATION_SZONE)
local b1=mz>0 and Duel.IsExistingTarget(c36239585.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
local b2=sz>0 and Duel.IsExistingTarget(c36239585.sefilter,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c36239585.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c36239585.setfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
if b1 and not b2 then
local g=Duel.SelectTarget(tp,c36239585.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local cat=e:GetCategory()
e:SetCategory(bit.bor(cat,CATEGORY_SPECIAL_SUMMON))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
if not b1 and b2 then
Duel.SelectTarget(tp,c36239585.sefilter,tp,LOCATION_GRAVE,0,1,1,nil)
end
if b1 and b2 then
local g=Duel.SelectTarget(tp,c36239585.setfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if bit.band(g:GetFirst():GetOriginalType(),TYPE_MONSTER)~=0 then
local cat=e:GetCategory()
e:SetCategory(bit.bor(cat,CATEGORY_SPECIAL_SUMMON))
if g:GetFirst():IsType(TYPE_MONSTER) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
else
e:SetCategory(CATEGORY_POSITION)
end
end
function c36239585.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local ty=tc:GetOriginalType()
local mz=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sz=Duel.GetLocationCount(tp,LOCATION_SZONE)
if (mz<=0 and bit.band(ty,TYPE_MONSTER)~=0) or (sz<=0 and bit.band(ty,TYPE_SPELL+TYPE_TRAP)~=0) then return end
local set=0
if mz>0 and bit.band(ty,TYPE_MONSTER)~=0 then
set=Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,tc)
local res=false
if tc:IsType(TYPE_MONSTER) then
res=Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)
else
res=Duel.SSet(tp,tc,1-tp)
end
if sz>0 and bit.band(ty,TYPE_SPELL+TYPE_TRAP)~=0 then
set=Duel.SSet(tp,tc)
if res~=0 then
Duel.ConfirmCards(1-tp,tc)
end
if set~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......@@ -106,15 +88,14 @@ function c36239585.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
end
if set~=0 and Duel.IsExistingMatchingCard(Card.IsPosition,tp,LOCATION_ONFIELD,0,1,nil,POS_FACEDOWN)
and Duel.IsExistingMatchingCard(c36239585.posfilter,tp,0,LOCATION_MZONE,1,nil)
local ct=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_ONFIELD,0,nil)
if ct>0 and Duel.IsExistingMatchingCard(c36239585.posfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(36239585,2)) then
Duel.BreakEffect()
local gc=Duel.GetMatchingGroupCount(Card.IsPosition,tp,LOCATION_ONFIELD,0,nil,POS_FACEDOWN)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c36239585.posfilter,tp,0,LOCATION_MZONE,1,gc,nil)
local g=Duel.SelectMatchingCard(tp,c36239585.posfilter,tp,0,LOCATION_MZONE,1,ct,nil)
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
end
......@@ -54,24 +54,19 @@ function c36849933.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
return mg:IsContains(c) and Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,aux.TRUE,e,tp,mg,sg,Card.GetLevel,"Greater",c)
return mg:IsContains(c) and Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,aux.TRUE,e,tp,mg,nil,Card.GetLevel,"Greater",c)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c36849933.rsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
if c:GetControler()~=tp or not c:IsRelateToEffect(e) or not mg:IsContains(c) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,aux.TRUE,e,tp,mg,sg,Card.GetLevel,"Greater",c)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,aux.TRUE,e,tp,mg,nil,Card.GetLevel,"Greater",c)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if sg then
mg:Merge(sg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
......
......@@ -38,34 +38,30 @@ function c37351133.spcon1(e,tp,eg,ep,ev,re,r,rp)
end
function c37351133.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c37351133.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c37351133.cfilter2(c,tp,rp)
return c:GetPreviousControler()==1-tp and c:GetPreviousSequence()>4 and (c:IsReason(REASON_BATTLE)
or (rp==tp and c:IsReason(REASON_EFFECT))) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c37351133.disfilter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT)
return c:GetPreviousControler()==1-tp and c:GetPreviousSequence()>4 and c:IsPreviousLocation(LOCATION_MZONE)
and (c:IsReason(REASON_BATTLE) or (rp==tp and c:IsReason(REASON_EFFECT)))
end
function c37351133.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c37351133.cfilter2,1,nil,tp,rp)
end
function c37351133.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c37351133.disfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(37351133,2)) then
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c37351133.disfilter,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
......@@ -27,18 +27,15 @@ function c38143903.initial_effect(c)
end
c38143903.toss_coin=true
function c38143903.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE and Duel.GetCurrentPhase()~=PHASE_DAMAGE_CAL
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c38143903.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER)
and Duel.IsChainNegatable(ev)
end
function c38143903.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=re:GetHandlerPlayer()
if chk==0 then return e:GetHandler():IsAbleToGrave()
and ((Duel.GetLocationCount(1-p,LOCATION_MZONE)>0 and re:GetHandler():IsControler(p))
or re:GetHandler():IsControler(1-p)
or not re:GetHandler():IsRelateToEffect(re)) end
and (not re:GetHandler():IsRelateToEffect(re) or re:GetHandler():IsAbleToChangeControler()) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,p,1)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
......@@ -47,7 +44,7 @@ function c38143903.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function c38143903.negop(e,tp,eg,ep,ev,re,r,rp)
local p=re:GetHandlerPlayer()
local p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_COIN)
local coin=Duel.AnnounceCoin(p)
local res=Duel.TossCoin(p,1)
......
......@@ -45,12 +45,11 @@ function c38783169.initial_effect(c)
c:RegisterEffect(e5)
end
function c38783169.tntg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsFaceup() and c:IsLevelAbove(1) and not c:IsType(TYPE_TUNER) and c:IsRelateToEffect(e) end
if chk==0 then return not e:GetHandler():IsType(TYPE_TUNER) end
end
function c38783169.tnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsLevelAbove(1) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
......
......@@ -47,14 +47,14 @@ end
function c40140448.atcon(e)
return Duel.IsExistingMatchingCard(c40140448.atfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c40140448.srfilter(c)
return c:IsSetCard(0x137) and c:IsAbleToHand() and not c:IsCode(40140448) and c:IsType(TYPE_MONSTER)
end
function c40140448.srcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c40140448.srfilter(c)
return c:IsSetCard(0x137) and c:IsAbleToHand() and not c:IsCode(40140448) and c:IsType(TYPE_MONSTER)
end
function c40140448.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40140448.srfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......
......@@ -46,14 +46,17 @@ end
function c40428851.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)
end
function c40428851.costfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost()
end
function c40428851.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c40428851.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c40428851.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c40428851.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c40428851.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c40428851.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c40428851.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -68,15 +68,13 @@ function c42149850.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(42149850)>0
end
function c42149850.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsSSetable() end
if chk==0 then return e:GetHandler():IsSSetable() end
end
function c42149850.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local flag=Duel.SSet(tp,c)
if Duel.SSet(tp,c)~=0 then
Duel.ConfirmCards(1-tp,c)
if flag~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
......@@ -14,17 +14,19 @@ end
function c46271408.cfilter(c)
return c:GetSequence()<5
end
function c46271408.thfilter(c)
return c:IsSetCard(0x1115) and c:IsLevel(4) and c:IsAbleToHand()
function c46271408.thfilter(c,e,tp)
return c:IsSetCard(0x1115) and c:IsLevel(4) and (c:IsAbleToHand() or (spchk and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c46271408.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c46271408.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c46271408.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c46271408.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c46271408.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
local spchk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c46271408.thfilter(chkc,e,tp,spchk) end
if chk==0 then return Duel.IsExistingTarget(c46271408.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,spchk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c46271408.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectTarget(tp,c46271408.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,spchk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
......@@ -38,7 +40,6 @@ function c46271408.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
......@@ -36,7 +36,7 @@ function c4810585.initial_effect(c)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,4810585)
e3:SetCondition(c4810585.spcon)
e3:SetCost(c4810585.spcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c4810585.sptg)
e3:SetOperation(c4810585.spop)
c:RegisterEffect(e3)
......@@ -58,7 +58,7 @@ function c4810585.atcon(e,tp,eg,ep,ev,re,r,rp)
end
function c4810585.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsFaceup() and c:IsLocation(LOCATION_SZONE) and c:IsAbleToGraveAsCost() end
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED) end
Duel.SendtoGrave(c,REASON_COST)
end
function c4810585.atop(e,tp,eg,ep,ev,re,r,rp)
......@@ -74,18 +74,14 @@ function c4810585.atlimit(e,c)
return c:IsSetCard(0x137) and c:IsFaceup()
end
function c4810585.spfilter(c,e,tp)
return c:IsSetCard(0x137) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x137) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c4810585.spcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c4810585.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
Duel.Remove(c,POS_FACEUP,REASON_COST)
end
function c4810585.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c4810585.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c4810585.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c4810585.spop(e,tp,eg,ep,ev,re,r,rp)
......
--クロシープ
function c50277355.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2,c50277355.lcheck)
--activate
......@@ -28,15 +29,17 @@ function c50277355.condition(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c50277355.cfilter,1,nil,lg)
end
function c50277355.lkfilter(c,type)
return c:IsFaceup() and c:IsType(type)
end
function c50277355.target(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
local b1=Duel.IsPlayerCanDraw(tp,2) and lg:IsExists(Card.IsType,1,nil,TYPE_RITUAL)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c50277355.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and lg:IsExists(Card.IsType,1,nil,TYPE_FUSION)
local b3=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and lg:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO)
local b4=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and lg:IsExists(Card.IsType,1,nil,TYPE_XYZ)
local b1=Duel.IsPlayerCanDraw(tp,2) and lg:IsExists(c50277355.lkfilter,1,nil,TYPE_RITUAL)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c50277355.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and lg:IsExists(c50277355.lkfilter,1,nil,TYPE_FUSION)
local b3=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and lg:IsExists(c50277355.lkfilter,1,nil,TYPE_SYNCHRO)
local b4=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and lg:IsExists(c50277355.lkfilter,1,nil,TYPE_XYZ)
if chk==0 then return b1 or b2 or b3 or b4 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
......@@ -44,55 +47,57 @@ end
function c50277355.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local lg=e:GetHandler():GetLinkedGroup()
local b1=Duel.IsPlayerCanDraw(tp,2) and lg:IsExists(Card.IsType,1,nil,TYPE_RITUAL)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c50277355.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and lg:IsExists(Card.IsType,1,nil,TYPE_FUSION)
local b3=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and lg:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO)
local b4=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and lg:IsExists(Card.IsType,1,nil,TYPE_XYZ)
local b1=Duel.IsPlayerCanDraw(tp,2) and lg:IsExists(c50277355.lkfilter,1,nil,TYPE_RITUAL)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c50277355.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and lg:IsExists(c50277355.lkfilter,1,nil,TYPE_FUSION)
local b3=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and lg:IsExists(c50277355.lkfilter,1,nil,TYPE_SYNCHRO)
local b4=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and lg:IsExists(c50277355.lkfilter,1,nil,TYPE_XYZ)
local res=0
if b1 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
res=Duel.Draw(p,d,REASON_EFFECT)
res=Duel.Draw(tp,2,REASON_EFFECT)
if res==2 then
Duel.ShuffleHand(p)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
local g=Duel.GetFieldGroup(p,LOCATION_HAND,0)
local sg=g:Select(p,2,2,nil)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
Duel.DiscardHand(tp,aux.TRUE,2,2,REASON_EFFECT+REASON_DISCARD)
end
end
if b2 then
if res~=0 then Duel.BreakEffect() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c50277355.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
res=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c50277355.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
res=Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
end
if b3 then
if res~=0 then Duel.BreakEffect() end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc1=g2:GetFirst()
while tc1 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(700)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc1:RegisterEffect(e1)
res=res+1
tc=g:GetNext()
tc1=g2:GetNext()
end
end
if b4 then
if res~=0 then Duel.BreakEffect() end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-700)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
local g3=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc2=g3:GetFirst()
while tc2 do
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(-700)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc2:RegisterEffect(e2)
tc2=g3:GetNext()
end
end
end
......@@ -50,14 +50,29 @@ function c58116537.actcon(e,tp,eg,ep,ev,re,r,rp)
return sg and sg:GetClassCount(Card.GetAttribute)>=2
end
function c58116537.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then
if g:GetCount()==0 then return false end
local tc=g:GetFirst()
local att=0
while tc do
att=bit.bor(att,tc:GetAttribute())
tc=g:GetNext()
end
return att~=0
end
local tc=g:GetFirst()
local att=0
while tc do
att=bit.bor(att,tc:GetAttribute())
tc=g:GetNext()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0xffff)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
e:SetLabel(att)
local ac=Duel.AnnounceAttribute(tp,1,att)
e:SetLabel(ac)
end
function c58116537.actop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local sg=g:Filter(Card.IsAttribute,nil,e:GetLabel())
if sg:GetCount()<=0 then return end
local tc=sg:GetFirst()
......
......@@ -14,14 +14,11 @@ function c62411042.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_SZONE,0)
e2:SetTarget(c62411042.tgtg)
e2:SetValue(aux.tgoval)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_SPELL+TYPE_TRAP))
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c62411042.indcon(e,c)
return Duel.IsExistingMatchingCard(aux.TRUE,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c62411042.tgtg(e,c)
return c:IsFaceup()
end
......@@ -23,12 +23,12 @@ function c63056220.initial_effect(c)
e2:SetOperation(c63056220.rsop)
c:RegisterEffect(e2)
end
function c63056220.srfilter(c)
return c:IsSetCard(0x138) and c:IsType(TYPE_MONSTER) and not c:IsCode(63056220) and c:IsAbleToHand()
end
function c63056220.srcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c63056220.srfilter(c)
return c:IsSetCard(0x138) and c:IsType(TYPE_MONSTER) and not c:IsCode(63056220) and c:IsAbleToHand()
end
function c63056220.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c63056220.srfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......@@ -45,24 +45,19 @@ function c63056220.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
return mg:IsContains(c) and Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,aux.TRUE,e,tp,mg,sg,Card.GetLevel,"Greater",c)
return mg:IsContains(c) and Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,aux.TRUE,e,tp,mg,nil,Card.GetLevel,"Greater",c)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c63056220.rsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
if c:GetControler()~=tp or not c:IsRelateToEffect(e) or not mg:IsContains(c) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,aux.TRUE,e,tp,mg,sg,Card.GetLevel,"Greater",c)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,aux.TRUE,e,tp,mg,nil,Card.GetLevel,"Greater",c)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if sg then
mg:Merge(sg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
......
......@@ -2,16 +2,13 @@
function c63233638.initial_effect(c)
c:EnableReviveLimit()
--ritual summon
local e1=Effect.CreateEffect(c)
local e1=aux.AddRitualProcGreater2(c,c63233638.filter,nil,nil,c63233638.matfilter)
e1:SetDescription(aux.Stringid(63233638,0))
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(0)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,63233638)
e1:SetCost(c63233638.rscost)
e1:SetTarget(c63233638.rstg)
e1:SetOperation(c63233638.rsop)
c:RegisterEffect(e1)
--atk/def up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
......@@ -24,58 +21,19 @@ function c63233638.initial_effect(c)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
function c63233638.filter(c)
return c:IsSetCard(0x138)
function c63233638.filter(c,e,tp)
return c:IsSetCard(0x138) and c~=e:GetHandler()
end
function c63233638.matfilter(c,e,tp)
return c~=e:GetHandler()
end
function c63233638.rscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c63233638.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
if mg:IsContains(c) then
mg:RemoveCard(c)
end
local sg=nil
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,c,c63233638.filter,e,tp,mg,sg,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c63233638.rsop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,c63233638.filter,e,tp,mg,sg,Card.GetLevel,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if sg then
mg:Merge(sg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c63233638.cfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
function c63233638.val(e,c)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_GRAVE,0)
local sg=g:Filter(c63233638.cfilter,nil)
return sg:GetCount()*300
return Duel.GetMatchingGroupCount(c63233638.cfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)*300
end
......@@ -43,12 +43,12 @@ function c63633694.spcon1(e,tp,eg,ep,ev,re,r,rp)
end
function c63633694.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c63633694.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
......@@ -62,7 +62,8 @@ function c63633694.eqcon(e,tp,eg,ep,ev,re,r,rp)
end
function c63633694.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c63633694.eqfilter(chkc,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c63633694.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c63633694.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c63633694.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
......@@ -97,7 +98,8 @@ function c63633694.spfilter(c,e,tp)
return c:GetEquipTarget()==e:GetHandler() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c63633694.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c63633694.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c63633694.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE)
end
function c63633694.spop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -19,42 +19,40 @@ function c64178868.initial_effect(c)
e2:SetCondition(c64178868.regcon)
e2:SetOperation(c64178868.regop)
c:RegisterEffect(e2)
e1:SetLabelObject(e2)
local ng=Group.CreateGroup()
ng:KeepAlive()
e1:SetLabelObject(ng)
e2:SetLabelObject(ng)
end
function c64178868.regcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c64178868.regop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(Card.IsControler,1,nil,tp) then
local g=eg:Filter(Card.IsControler,nil,tp)
local ng=Group.CreateGroup()
ng:KeepAlive()
ng=e:GetLabelObject()
if ng then
ng:Merge(g)
e:SetLabelObject(ng)
else
g:KeepAlive()
e:SetLabelObject(g)
local c=e:GetHandler()
local sg=e:GetLabelObject()
if c:GetFlagEffect(64178868)==0 then
sg:Clear()
c:RegisterFlagEffect(64178868,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end
local g=eg:Filter(Card.IsControler,nil,tp)
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(64178868,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
sg:AddCard(tc)
tc=g:GetNext()
end
end
end
function c64178868.thfilter(c)
return c:GetFlagEffect(64178868)~=0 and c:IsAbleToHand() and not c:IsCode(64178868)
return c:GetFlagEffect(64178868)~=0 and c:IsAbleToHand() and not c:IsCode(64178868) and c:IsLocation(LOCATION_GRAVE)
end
function c64178868.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ng=e:GetLabelObject():GetLabelObject()
if chk==0 then return ng and ng:IsExists(c64178868.thfilter,1,nil) end
local ng=e:GetLabelObject()
if chk==0 then return ng and ng:GetCount()>0 and ng:IsExists(c64178868.thfilter,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c64178868.thop(e,tp,eg,ep,ev,re,r,rp)
local ng=e:GetLabelObject():GetLabelObject()
if not ng then return end
local ng=e:GetLabelObject()
if not ng or ng:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=ng:FilterSelect(tp,aux.NecroValleyFilter(c64178868.thfilter),1,1,nil)
if g:GetCount()>0 then
......
......@@ -52,13 +52,15 @@ function c74578720.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,74578720,RESET_PHASE+PHASE_END,0,1)
end
function c74578720.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT) and bit.band(c:GetPreviousTypeOnField(),TYPE_XYZ)~=0 and c:IsPreviousLocation(LOCATION_MZONE)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT)
and bit.band(c:GetPreviousTypeOnField(),TYPE_XYZ)~=0 and c:IsPreviousLocation(LOCATION_MZONE)
end
function c74578720.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c74578720.cfilter,1,nil,tp)
end
function c74578720.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c74578720.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -70,6 +72,6 @@ function c74578720.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
c:RegisterEffect(e1)
end
end
......@@ -19,19 +19,19 @@ function c76209339.initial_effect(c)
c:RegisterEffect(e1)
end
function c76209339.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x138) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
return c:IsSetCard(0x138) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c76209339.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c76209339.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c76209339.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c76209339.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c76209339.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c76209339.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......@@ -40,5 +40,4 @@ function c76209339.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(LOCATION_DECKBOT)
tc:RegisterEffect(e1,true)
end
end
end
......@@ -34,10 +34,11 @@ function c76416959.initial_effect(c)
c:RegisterEffect(e3)
end
function c76416959.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)~=0
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)>0
end
function c76416959.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c76416959.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -40,12 +40,13 @@ function c77539547.thfilter(c)
end
function c77539547.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c77539547.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c77539547.tgfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(c77539547.thfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c77539547.tgfilter,tp,LOCATION_SZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c77539547.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c77539547.tgfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c77539547.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
......@@ -57,17 +58,14 @@ function c77539547.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c77539547.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c77539547.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x137) and rp==tp and re:GetHandler()~=e:GetHandler() and e:GetHandler():GetFlagEffect(1)>0
end
function c77539547.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c77539547.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c77539547.disfilter,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,c77539547.disfilter,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c77539547.disop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -17,14 +17,16 @@ function c83266006.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c83266006.cfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_ZOMBIE) and Duel.IsExistingMatchingCard(c83266006.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,c:GetAttribute())
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_ZOMBIE)
and Duel.IsExistingMatchingCard(c83266006.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,c:GetAttribute())
end
function c83266006.spfilter(c,e,tp,att)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsRace(RACE_ZOMBIE) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c83266006.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c83266006.cfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c83266006.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c83266006.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c83266006.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
......@@ -36,14 +38,14 @@ function c83266006.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c83266006.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,att)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local gc=g:GetFirst()
gc:RegisterFlagEffect(83266006,RESET_EVENT+RESETS_STANDARD,0,1)
local tc=g:GetFirst()
tc:RegisterFlagEffect(83266006,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabelObject(gc)
e1:SetLabelObject(tc)
e1:SetCondition(c83266006.rmcon)
e1:SetOperation(c83266006.rmop)
Duel.RegisterEffect(e1,tp)
......
......@@ -39,12 +39,12 @@ end
function c84504242.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x138)
end
function c84504242.thfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c84504242.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c84504242.cfilter,1,nil)
end
function c84504242.thfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c84504242.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c84504242.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c84504242.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
......@@ -56,6 +56,5 @@ function c84504242.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
......@@ -23,7 +23,8 @@ function c9028399.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9028399.cfilter,1,nil,tp)
end
function c9028399.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
nd e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_DECK)
end
......
......@@ -45,24 +45,19 @@ function c90444325.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
return mg:IsContains(c) and Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,aux.TRUE,e,tp,mg,sg,Card.GetLevel,"Greater",c)
return mg:IsContains(c) and Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,aux.TRUE,e,tp,mg,nil,Card.GetLevel,"Greater",c)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c90444325.rsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
if c:GetControler()~=tp or not c:IsRelateToEffect(e) or not mg:IsContains(c) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,aux.TRUE,e,tp,mg,sg,Card.GetLevel,"Greater",c)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,aux.TRUE,e,tp,mg,nil,Card.GetLevel,"Greater",c)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if sg then
mg:Merge(sg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
......
......@@ -24,12 +24,13 @@ function c98806751.initial_effect(c)
c:RegisterEffect(e2)
end
function c98806751.spfilter(c,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove() and Duel.GetMZoneCount(tp,c)>0 and c:IsFaceup()
return c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove() and Duel.GetMZoneCount(tp,c)>0 and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c98806751.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and c98806751.spfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c98806751.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.IsExistingTarget(c98806751.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c98806751.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
......@@ -43,12 +44,13 @@ function c98806751.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c98806751.thfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove() and c:IsFaceup()
return c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c98806751.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and c98806751.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98806751.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c) and c:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(c98806751.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c)
and c:IsAbleToHand() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c98806751.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
......
......@@ -2,16 +2,13 @@
function c99628747.initial_effect(c)
c:EnableReviveLimit()
--ritual summon
local e1=Effect.CreateEffect(c)
local e1=aux.AddRitualProcGreater2(c,c99628747.filter,nil,nil,c99628747.matfilter)
e1:SetDescription(aux.Stringid(99628747,0))
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(0)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,99628747)
e1:SetCost(c99628747.rscost)
e1:SetTarget(c99628747.rstg)
e1:SetOperation(c99628747.rsop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99628747,1))
......@@ -25,53 +22,16 @@ function c99628747.initial_effect(c)
e2:SetOperation(c99628747.desop)
c:RegisterEffect(e2)
end
function c99628747.filter(c)
return c:IsSetCard(0x138)
function c99628747.filter(c,e,tp)
return c:IsSetCard(0x138) and c~=e:GetHandler()
end
function c99628747.matfilter(c,e,tp)
return c~=e:GetHandler()
end
function c99628747.rscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c99628747.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
if mg:IsContains(c) then
mg:RemoveCard(c)
end
local sg=nil
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,c,c99628747.filter,e,tp,mg,sg,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c99628747.rsop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,c99628747.filter,e,tp,mg,sg,Card.GetLevel,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if sg then
mg:Merge(sg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c99628747.cfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
......@@ -80,7 +40,8 @@ function c99628747.descon(e,tp,eg,ep,ev,re,r,rp)
end
function c99628747.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c99628747.cfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c99628747.cfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c99628747.cfilter,tp,LOCATION_GRAVE,0,nil)
local gc=g:GetClassCount(Card.GetCode)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
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