Commit 331bcc53 authored by gg123gg's avatar gg123gg Committed by GitHub

Add files via upload

parent 5fa061e9
--编程-零 错误协议 --编程-零 错误协议
local m=14000605 local m=14000605
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_CodeNull=1 cm.named_with_CodeNull=1
function cm.initial_effect(c) function cm.initial_effect(c)
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCost(cm.eccost) e1:SetCost(cm.eccost)
e1:SetCondition(cm.eccon) e1:SetCondition(cm.eccon)
e1:SetTarget(cm.ectg) e1:SetTarget(cm.ectg)
e1:SetOperation(cm.ecop) e1:SetOperation(cm.ecop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_REMOVE) e2:SetCategory(CATEGORY_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetCost(cm.rmcost) e2:SetCost(cm.rmcost)
e2:SetCondition(cm.rmcon1) e2:SetCondition(cm.rmcon1)
e2:SetTarget(cm.rmtg) e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop) e2:SetOperation(cm.rmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE) e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCondition(cm.rmcon2) e3:SetCondition(cm.rmcon2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.Code0(c) function cm.Code0(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_CodeNull return m and m.named_with_CodeNull
end end
function cm.eccost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.eccost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return not c:IsPublic() and c:GetFlagEffect(m)==0 end if chk==0 then return not c:IsPublic() and c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_CHAIN,0,1) c:RegisterFlagEffect(m,RESET_CHAIN,0,1)
end end
function cm.eccon(e,tp,eg,ep,ev,re,r,rp) function cm.eccon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and ((re:GetHandler():IsRace(RACE_CYBERSE) and rp==tp) or Duel.IsPlayerAffectedByEffect(tp,14000608)) return re:IsActiveType(TYPE_MONSTER) and ((re:GetHandler():IsRace(RACE_CYBERSE) and rp==tp) or Duel.IsPlayerAffectedByEffect(tp,14000608))
end end
function cm.ectg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.ectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
end end
function cm.ecop(e,tp,eg,ep,ev,re,r,rp) function cm.ecop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup() local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g) Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.repop) Duel.ChangeChainOperation(ev,cm.repop)
end end
function cm.repop(e,tp,eg,ep,ev,re,r,rp) function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
function cm.tgfilter(c,e,tp) function cm.tgfilter(c,e,tp)
return c:IsFaceup() and ((c:IsControler(tp) and c:IsRace(RACE_CYBERSE)) or Duel.IsPlayerAffectedByEffect(tp,14000601)) and Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) return c:IsFaceup() and ((c:IsControler(tp) and c:IsRace(RACE_CYBERSE)) or Duel.IsPlayerAffectedByEffect(tp,14000601)) and Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end end
function cm.rmfilter(c,code) function cm.rmfilter(c,code)
return c:IsRace(RACE_CYBERSE) and not c:IsCode(code) return c:IsRace(RACE_CYBERSE) and not c:IsCode(code)
end end
function cm.rmcon1(e,tp,eg,ep,ev,re,r,rp) function cm.rmcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,14000601) return not Duel.IsPlayerAffectedByEffect(tp,14000601)
end end
function cm.rmcon2(e,tp,eg,ep,ev,re,r,rp) function cm.rmcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,14000601) return Duel.IsPlayerAffectedByEffect(tp,14000601)
end end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end if chk==0 then return c:IsAbleToRemoveAsCost() end
Duel.Remove(c,POS_FACEUP,REASON_COST) Duel.Remove(c,POS_FACEUP,REASON_COST)
end end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.tgfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) local g=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp) function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode())
if #g>0 then if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -23,6 +23,15 @@ function cm.initial_effect(c) ...@@ -23,6 +23,15 @@ function cm.initial_effect(c)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetOperation(cm.flag)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
end end
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsAbleToDeck() return c:IsAbleToDeck()
...@@ -42,12 +51,15 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,12 +51,15 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.rmfilter(c) function cm.rmfilter(c)
return not c:IsSetCard(0x701) return not c:IsSetCard(0x3701)
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.rmfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_DECK,0,1,nil) end
end end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_DECK,0,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end end
function cm.flag(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,17090009,0,0,0)
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