Commit 07529349 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 4d58b8ea
Pipeline #30344 passed with stages
in 33 minutes and 50 seconds
......@@ -27,6 +27,7 @@ function c12835101.initial_effect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_PUBLIC)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c12835101.con)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+0x200)
e5:SetTargetRange(2,0)
c:RegisterEffect(e5)
......
......@@ -90,7 +90,7 @@ function c12835102.con6(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
local seq=tc:GetSequence()
local tp=tc:GetControler()
return rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and #g>0 and g:IsContains(tc) and c:GetFlagEffect(12835102)==0 and ((seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)))
return rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and #g>0 and g:IsContains(tc) and c:GetFlagEffect(12835102)==0 and ((seq>0 and Duel.CheckLocation(c:GetControler(),LOCATION_MZONE,seq-1)) or (seq<4 and Duel.CheckLocation(c:GetControler(),LOCATION_MZONE,seq+1)))
end
function c12835102.op6(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(12835102,1)) then
......@@ -102,13 +102,14 @@ function c12835102.op6(e,tp,eg,ep,ev,re,r,rp)
local seq=tc:GetSequence()
if seq>4 then return end
local flag=0
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then
if seq>0 and Duel.CheckLocation(c:GetControler(),LOCATION_MZONE,seq-1) then
flag=flag|(1<<(seq-1)) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then
if seq<4 and Duel.CheckLocation(c:GetControler(),LOCATION_MZONE,seq+1) then
flag=flag|(1<<(seq+1)) end
if flag==0 then return end
Duel.Hint(3,tp,HINTMSG_TOZONE)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,~flag)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,LOCATION_MZONE,~flag)
if c:GetControler()~=tp then s=s>>16 end
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
local g=Group.CreateGroup()
......@@ -124,7 +125,7 @@ function c12835102.con62(e,tp,eg,ep,ev,re,r,rp)
local seq=tc:GetSequence()
local tp=tc:GetControler()
if re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and #g>0 and g:IsContains(tc) then return false end
return rp==1-tp and Duel.GetFlagEffect(tp,12835102)>0 and c:GetFlagEffect(12835102)==0 and ((seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)))
return rp==1-tp and Duel.GetFlagEffect(tp,12835102)>0 and c:GetFlagEffect(12835102)==0 and ((seq>0 and Duel.CheckLocation(c:GetControler(),LOCATION_MZONE,seq-1)) or (seq<4 and Duel.CheckLocation(c:GetControler(),LOCATION_MZONE,seq+1)))
end
function c12835102.op62(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(12835102,2)) then
......@@ -137,13 +138,14 @@ function c12835102.op62(e,tp,eg,ep,ev,re,r,rp)
local seq=tc:GetSequence()
if seq>4 then return end
local flag=0
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then
if seq>0 and Duel.CheckLocation(c:GetControler(),LOCATION_MZONE,seq-1) then
flag=flag|(1<<(seq-1)) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then
if seq<4 and Duel.CheckLocation(c:GetControler(),LOCATION_MZONE,seq+1) then
flag=flag|(1<<(seq+1)) end
if flag==0 then return end
Duel.Hint(3,tp,HINTMSG_TOZONE)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,~flag)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,LOCATION_MZONE,~flag)
if c:GetControler()~=tp then s=s>>16 end
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
local g=Group.CreateGroup()
......
......@@ -63,7 +63,7 @@ function s.cfilter(c,ce)
return (c:GetOriginalType()&(TYPE_SPELL+TYPE_TRAP)>0 and c:IsSetCard(0x3a70) or not c:IsSetCard(0x3a70) and c:IsOnField() and ec:IsLocation(LOCATION_HAND) and ec:IsPublic() and ce:GetType()&EFFECT_TYPE_ACTIVATE==0) and c:IsAbleToGraveAsCost()
end
function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
......@@ -87,7 +87,7 @@ function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c,e) end
if chk==0 then return s.sscost(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local cc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,c,e):GetFirst()
if cc:IsFacedown() then Duel.ConfirmCards(1-tp,cc) end
......
......@@ -58,7 +58,7 @@ function s.pcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPublic()
end
function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
......
......@@ -75,7 +75,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp,chk)
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
......@@ -101,7 +101,7 @@ function s.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return s.sscost(e,tp,eg,ep,ev,re,r,rp,chk) end
Duel.ConfirmCards(1-tp,e:GetHandler())
s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
end
......
......@@ -63,7 +63,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>=3
end
function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
......@@ -89,7 +89,7 @@ function s.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return s.sscost(e,tp,eg,ep,ev,re,r,rp,chk) end
Duel.ConfirmCards(1-tp,e:GetHandler())
s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
end
......
......@@ -63,7 +63,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>=3
end
function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
......@@ -89,7 +89,7 @@ function s.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return s.sscost(e,tp,eg,ep,ev,re,r,rp,chk) end
Duel.ConfirmCards(1-tp,e:GetHandler())
s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
end
......
......@@ -59,7 +59,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetFlagEffect(tp,id)>=3
end
function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
......@@ -85,7 +85,7 @@ function s.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return s.sscost(e,tp,eg,ep,ev,re,r,rp,chk) end
Duel.ConfirmCards(1-tp,e:GetHandler())
s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
end
......
......@@ -65,7 +65,7 @@ function s.cfilter(c)
return (c:GetOriginalType()&TYPE_SPELL+TYPE_TRAP)>0 and c:IsSetCard(0x3a70) and c:IsAbleToGraveAsCost()
end
function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
......
......@@ -29,7 +29,7 @@ function c37900998.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetDescription(1,37900998)
e3:SetCountLimit(1,37900998)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c37900998.tg3)
e3:SetOperation(c37900998.op3)
......@@ -69,7 +69,7 @@ function c37900998.initial_effect(c)
end
return c37900998_SetLP(player,lp)
end
c37900998_PayLPCost = Duel["PayLPCost"]
c37900998_PayLPCost = Duel["PayLPCost"]
Duel["PayLPCost"] =
function (player,lp)
c37900998_dam[player] = c37900998_dam[player] + lp
......@@ -101,7 +101,7 @@ function c37900998.con(e,tp,eg,ep,ev,re,r,rp)
local all=Duel.GetFieldGroup(tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0)
local lp1=Duel.GetLP(tp)
local lp2=Duel.GetLP(1-tp)
return (lp2-lp1)>4000 and #g>0 and #g==#all and Duel.GetLocationCountFromEx(tp,tp,g,c)>0
return lp2>lp1 and (lp2-lp1)>=4000 and #g>0 and #g==#all and Duel.GetLocationCountFromEx(tp,tp,g,c)>0
end
function c37900998.w(c)
return c:IsLocation(LOCATION_HAND) and not c:IsPublic()
......
......@@ -49,18 +49,21 @@ function cm.desfilter(c)
return c:IsSetCard(0x3620) and (c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_ONFIELD) and c:IsFaceup()))
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and cm.desfilter(chkc,tp) end
if chkc then return chkc:IsControler(tp) and cm.desfilter(chkc,tp) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,tp) end
and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,e:GetHandler(),tp)
e:SetLabelObject(g)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
local c=e:GetHandler()
local tc=nil
if Duel.GetFirstTarget() then tc=Duel.GetFirstTarget() else tc=e:GetLabelObject():GetFirst() end
if Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
......@@ -39,16 +39,19 @@ end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and cm.desfilter(chkc,tp) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,tp) end
and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,e:GetHandler(),tp)
e:SetLabelObject(g)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
local tc=nil
if Duel.GetFirstTarget() then tc=Duel.GetFirstTarget() else tc=e:GetLabelObject():GetFirst() end
if Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
......
......@@ -21,7 +21,7 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_EXTRA+LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetCountLimit(1,m+20000000)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
......@@ -69,21 +69,24 @@ function cm.pendvalue(e,c)
return c:IsSetCard(0x3620)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3620)
return c:IsSetCard(0x3620) and (c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_ONFIELD) and c:IsFaceup()))
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and cm.desfilter(chkc,tp) end
if chkc then return chkc:IsControler(tp) and cm.desfilter(chkc,tp) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,e:GetHandler(),tp)
e:SetLabelObject(g)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
local tc=nil
if Duel.GetFirstTarget() then tc=Duel.GetFirstTarget() else tc=e:GetLabelObject():GetFirst() end
if Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment