Commit 1160495f authored by Tachibana's avatar Tachibana

ybb

parent 5cf542d7
Pipeline #9467 passed with stages
in 32 minutes
......@@ -19,19 +19,16 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.filter(c)
return c:IsFaceup()
end
function cm.filter(c)
function cm.filter2(c)
return c:IsFacedown()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter2,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(cm.filter2,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if og:GetCount()>0 and og:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
......
......@@ -32,12 +32,12 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.desconf,tp,LOCATION_MZONE,0,1,nil)
end
function cm.destg(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 sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
--e2
......
......@@ -64,7 +64,7 @@ function c16160011.sppop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c16160011.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
......
......@@ -39,15 +39,14 @@ function cm.ovcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonLocation(LOCATION_GRAVE)
end
function cm.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
end
function cm.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
local sg=nil
local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil)
local hg=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,0,LOCATION_HAND,nil)
local b1=Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,0,LOCATION_HAND,1,nil)
local b2=Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,0,LOCATION_ONFIELD,1,nil)
local b3=Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,0,LOCATION_GRAVE,1,nil)
......@@ -85,7 +84,7 @@ function cm.ovop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(sg)
end
local tc=sg:GetFirst()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
if tc then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
......
......@@ -27,7 +27,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e5)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_RELEASE)
......@@ -203,9 +203,6 @@ end
function cm.rgcheck(g)
return g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=99
end
function cm.extra(c)
return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD)
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
......@@ -217,7 +214,7 @@ function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
aux.RGCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE)
end
function cm.rtop(e,tp,eg,ep,ev,re,r,rp)
local m=Duel.GetRitualMaterial(tp)
......
......@@ -77,9 +77,8 @@ end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 or not e:GetHandler():IsAbleToExtra() then return end
tg:AddCard(e:GetHandler())
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
tg:AddCard(e:GetHandler())
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
--Effect 3
--Effect 4
--Effect 5
......@@ -56,7 +56,7 @@ function c40009491.operation(e,tp,eg,ep,ev,re,r,rp)
end
function c40009491.spxcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and c:IsChainAttackable(0,true)
return Duel.GetAttacker()==c
end
function c40009491.spxfilter(c,e,tp,mc)
return c:IsRankBelow(10) and c:IsType(TYPE_PENDULUM) and mc:IsCanBeXyzMaterial(c)
......
......@@ -113,7 +113,7 @@ function cm.destg(e,tp,eg,ev,ep,re,r,rp,chk)
if chk==0 then return c:IsDestructable(e) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,LOCATION_MZONE)
end
function cm.spfilter(c)
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:GetBaseAttack()==0 and c:IsAttribute(ATTRIBUTE_DARK) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.desop(e,tp,ep,eg,ev,re,r,rp)
......
......@@ -49,6 +49,7 @@ function cm.initial_effect(c)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetRange(LOCATION_SZONE)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetCountLimit(1)
e6:SetCondition(cm.condition)
e6:SetCost(cm.cost1)
e6:SetTarget(cm.tg1)
......@@ -77,15 +78,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if (re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttack(0)) or (re:IsActiveType(TYPE_TRAP) and re:GetHandler()~=e:GetHandler()) then
if (re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttack(0)) or (re:IsActiveType(TYPE_TRAP) and re:GetHandler():IsType(TYPE_CONTINUOUS) and re:GetHandler()~=e:GetHandler()) and rp==tp then
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
end
end
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(m)~=0 and (re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttack(0)) or (re:IsActiveType(TYPE_TRAP) and re:GetHandler()~=e:GetHandler())
return c:GetFlagEffect(m)~=0 and rp==tp and ((re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttack(0)) or (re:IsActiveType(TYPE_TRAP) and re:GetHandler():IsType(TYPE_CONTINUOUS) and re:GetHandler()~=e:GetHandler()))
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,m)
......@@ -201,7 +201,7 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
if opt==0 then
Duel.SSet(tp,tc)
elseif opt==1 then
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
......
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