Commit f5e26b86 authored by Tachibana's avatar Tachibana

watele

parent b07bcfaa
Pipeline #6671 passed with stages
in 22 minutes and 37 seconds
...@@ -4,6 +4,7 @@ local cm=_G["c"..m] ...@@ -4,6 +4,7 @@ local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,cm.mfilter,1) aux.AddLinkProcedure(c,cm.mfilter,1)
c:EnableReviveLimit()
--cannot remove --cannot remove
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -24,6 +24,48 @@ function cm.initial_effect(c) ...@@ -24,6 +24,48 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--not have souls
local e14=Effect.CreateEffect(c)
e14:SetType(EFFECT_TYPE_FIELD)
e14:SetRange(LOCATION_MZONE)
e14:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e14:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e14:SetTargetRange(1,1)
e14:SetCondition(cm.notcon)
e14:SetTarget(cm.nottg)
c:RegisterEffect(e14)
local e17=e14:Clone()
e17:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e17)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
end
function cm.cfilter(c,set)
return c:IsSetCard(set)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if not eg then return end
local sg=eg:Filter(cm.cfilter,nil,0xafaa)
if #sg>0 then
Duel.RegisterFlagEffect(tp,m+100,0,0,1)
end
local sg1=eg:Filter(cm.cfilter,nil,0x5fac)
if #sg1>0 then
Duel.RegisterFlagEffect(tp,m+200,0,0,1)
end
local sg2=eg:Filter(cm.cfilter,nil,0x6fac)
if #sg2>0 then
Duel.RegisterFlagEffect(tp,m+300,0,0,1)
end
end end
function cm.spcost(e,c,tp) function cm.spcost(e,c,tp)
return Duel.GetFlagEffect(tp,m)==0 or not c:IsLocation(LOCATION_DECK) return Duel.GetFlagEffect(tp,m)==0 or not c:IsLocation(LOCATION_DECK)
...@@ -33,16 +75,23 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,16 +75,23 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end end
end end
function cm.cfiler(c) function cm.cfilter(c)
return srre.check_effect_ignite(c) and c:IsAbleToGraveAsCost() return srre.check_effect_ignite(c) and c:IsAbleToGraveAsCost()
end end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,c)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end
function cm.notcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetFlagEffect(tp,m+100)==0 or Duel.GetFlagEffect(tp,m+200)==0 or Duel.GetFlagEffect(tp,m+300)==0
end
function cm.nottg(e,c)
return c:GetControler()==e:GetHandler():GetOwner()
end end
\ No newline at end of file
...@@ -36,11 +36,11 @@ function cm.initial_effect(c) ...@@ -36,11 +36,11 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,2)) e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_TODECK) e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e1)
end end
function cm.spcost(e,c,tp) function cm.spcost(e,c,tp)
return Duel.GetFlagEffect(tp,m+100)==0 or not c:IsLocation(LOCATION_DECK) return Duel.GetFlagEffect(tp,m+100)==0 or not c:IsLocation(LOCATION_DECK)
...@@ -66,11 +66,14 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,11 +66,14 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,tp,2,REASON_EFFECT) Duel.SendtoDeck(c,tp,2,REASON_EFFECT)
c:ReverseInDeck() c:ReverseInDeck()
Duel.ShuffleDeck(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_HAND,0,1,63,g) local sg=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_HAND,0,0,63,g)
g:Merge(sg) if #sg>0 then
g:Merge(sg)
end
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
for i=1,#g,1 do for i=1,#g,1 do
Duel.RegisterFlagEffect(tp,m,0,0,1) Duel.RegisterFlagEffect(tp,m,0,0,1)
......
...@@ -292,7 +292,7 @@ function c85402430.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -292,7 +292,7 @@ function c85402430.cost(e,tp,eg,ep,ev,re,r,rp,chk)
ng:KeepAlive() ng:KeepAlive()
e:SetLabelObject(ng) e:SetLabelObject(ng)
e:SetLabel(ng:GetFirst():GetCode()) e:SetLabel(ng:GetFirst():GetCode())
elseif Duel.GetMatchingGroupCount(c85402430.fllll2,tp,LOCATION_DECK,0,nil)<=0 then elseif Duel.GetMatchingGroupCount(c85402430.fllll2,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)<=0 then
g:Remove(c85402430.chk2,nil) g:Remove(c85402430.chk2,nil)
local mg=g:Select(tp,1,1,nil) local mg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(mg,REASON_COST) Duel.SendtoGrave(mg,REASON_COST)
......
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