Commit 14c89251 authored by Nemo Ma's avatar Nemo Ma

fix

parent 60234349
......@@ -16,7 +16,7 @@ function cm.initial_effect(c)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--summon success
local e2=Effect.CreateEffect(c)
--[[local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
......@@ -31,7 +31,15 @@ function cm.initial_effect(c)
local e5=e2:Clone()
e5:SetCode(EVENT_TO_GRAVE)
e5:SetOperation(cm.limitop2)
c:RegisterEffect(e5)
c:RegisterEffect(e5)--]]
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(cm.actcon)
c:RegisterEffect(e2)
--tohand
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,1))
......@@ -114,4 +122,16 @@ function cm.thop2(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
function cm.actcon(e,re)
local tp=e:GetHandlerPlayer()
local rc=re:GetHandler()
local b1,eg1=Duel.CheckEvent(EVENT_SUMMON_SUCCESS,true)
local b2,eg2=Duel.CheckEvent(EVENT_FLIP_SUMMON_SUCCESS,true)
local b3,eg3=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
local b4,eg4=Duel.CheckEvent(EVENT_TO_GRAVE,true)
local event=(b1 and eg1:IsExists(cm.cfilter,1,nil,tp)) or (b2 and eg2:IsExists(cm.cfilter,1,nil,tp)) or (b3 and eg3:IsExists(cm.cfilter,1,nil,tp)) or (b4 and eg4:IsExists(cm.cfilter2,1,nil,tp))
local ev=Duel.GetCurrentChain()
local trigger=re:GetType()&(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FLIP)~=0 and (not rc:IsLocation(LOCATION_HAND) or rc:IsPublic())
return event and (ev==0 or trigger)
end
\ No newline at end of file
......@@ -33,11 +33,11 @@ function cm.filter(c)
return c:IsCanOverlay()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) and chkc~=e:GetHandler() end
if chkc then return chkc:IsOnField() and cm.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -47,6 +47,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
tc:CancelToGrave()
Duel.Overlay(c,Group.FromCards(tc))
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