Commit 81906bdc authored by 竹中千惠理's avatar 竹中千惠理

no message

parent 3f133997
No preview for this file type
--鉴明舞
local cm,m,o=GetID()
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2,cm.ovfilter,aux.Stringid(m,0),4,cm.xyzop)
c:EnableReviveLimit()
--code
aux.EnableChangeCode(c,60010111,LOCATION_MZONE)
c:EnableCounterPermit(0x628)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.tg4)
e1:SetOperation(cm.op4)
c:RegisterEffect(e1)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(60010111) and c:IsLevel(4)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_REMOVED,0,6,nil) end
end
function cm.rmfil(c)
return c:IsFaceup() and c:IsType(TYPE_QUICKPLAY) and c:IsType(TYPE_SPELL)
and c:CheckActivateEffect(false,false,false)~=nil
end
function cm.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0x628)
end
function cm.op4(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x628,2)
if Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_REMOVED,0,6,nil) then
local gc=Duel.GetMatchingGroup(cm.rmfil,tp,LOCATION_REMOVED,0,nil):Select(tp,1,1,nil):GetFirst()
local te=gc:GetActivateEffect()
Duel.MoveToField(gc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local cos,tg,op=te:GetCost(),te:GetTarget(),te:GetOperation()
if te and (not cos or cos(te,tp,eg,ep,ev,re,r,rp,0)) and (not tg or tg(te,tp,eg,ep,ev,re,r,rp,0)) then
e:SetProperty(te:GetProperty())
local code=gc:GetOriginalCode()
Duel.Hint(HINT_CARD,tp,code)
Duel.Hint(HINT_CARD,1-tp,code)
te:UseCountLimit(tp,1,true)
gc:CreateEffectRelation(te)
if cos then cos(te,tp,eg,ep,ev,re,r,rp,1) end
if tg then tg(te,tp,eg,ep,ev,re,r,rp,1) end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g and #g~=0 then
local tg=g:GetFirst()
while tg do
tg:CreateEffectRelation(te)
tg=g:GetNext()
end
end
if op then op(te,tp,eg,ep,ev,re,r,rp) end
gc:ReleaseEffectRelation(te)
if g then
tg=g:GetFirst()
while tg do
tg:ReleaseEffectRelation(te)
tg=g:GetNext()
end
end
end
Duel.SendtoDeck(gc,nil,2,REASON_RULE)
else
local rg=Duel.GetDecktopGroup(tp,1)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
...@@ -45,4 +45,6 @@ ...@@ -45,4 +45,6 @@
!setname 0x647 枢机神 !setname 0x647 枢机神
0x626 指示物(愿母神三度为你阖眼) 0x626 枪火指示物
\ No newline at end of file 0x627 指示物(愿母神三度为你阖眼)
0x628 鬼火指示物
\ 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