Commit d91e944b authored by Tachibana's avatar Tachibana

1145141919810

parent c628acfd
Pipeline #13870 passed with stages
in 28 minutes and 55 seconds
No preview for this file type
...@@ -6,20 +6,19 @@ function cm.initial_effect(c) ...@@ -6,20 +6,19 @@ function cm.initial_effect(c)
SNNM.GreatCircle(c) SNNM.GreatCircle(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING) e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetOperation(cm.inmop) e3:SetOperation(cm.inmop1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetLabelObject(e3)
e4:SetOperation(cm.inmop2)
c:RegisterEffect(e4)
end end
cm[0]=0 cm[0]=0
function cm.inmop(e,tp,eg,ep,ev,re,r,rp) function cm.inmop1(e,tp,eg,ep,ev,re,r,rp)
if rp==tp then return end if rp==tp then return end
local cg=Duel.GetMatchingGroup(nil,tp,LOCATION_GRAVE,0,nil)
local g,id=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS,CHAININFO_CHAIN_ID)
if #cg>0 and not cg:IsExists(function(c)return not c:IsSetCard(0x3531)end,1,nil) and id~=cm[0] and ((not g) or (not g:IsExists(function(c,tp)return c:IsControler(tp) and c:IsOnField()end,1,nil,tp))) and Duel.IsPlayerCanDiscardDeck(tp,1) then
cm[0]=id
Duel.Hint(HINT_CARD,0,m)
Duel.DiscardDeck(tp,1,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
...@@ -29,7 +28,17 @@ function cm.inmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +28,17 @@ function cm.inmop(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabelObject(re) e1:SetLabelObject(re)
e1:SetReset(RESET_EVENT+RESET_CHAIN) e1:SetReset(RESET_EVENT+RESET_CHAIN)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end e:SetLabelObject(e1)
end
function cm.inmop2(e,tp,eg,ep,ev,re,r,rp)
if rp==tp then return end
local cg=Duel.GetMatchingGroup(nil,tp,LOCATION_GRAVE,0,nil)
local g,id=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS,CHAININFO_CHAIN_ID)
if #cg>0 and not cg:IsExists(function(c)return not c:IsSetCard(0x3531)end,1,nil) and id~=cm[0] and ((not g) or (not g:IsExists(function(c,tp)return c:IsControler(tp) and c:IsOnField()end,1,nil,tp))) and Duel.IsPlayerCanDiscardDeck(tp,1) then
cm[0]=id
Duel.Hint(HINT_CARD,0,m)
Duel.DiscardDeck(tp,1,REASON_EFFECT)
else e:GetLabelObject():GetLabelObject():Reset() end
end end
function cm.efilter(e,re) function cm.efilter(e,re)
return re==e:GetLabelObject() return re==e:GetLabelObject()
......
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