Commit 404dd713 authored by xiaoye's avatar xiaoye

追加c:IsRelateToEffect(e)

对于“这张卡放置到xxx区域”追加判断
parent 43de9a40
...@@ -11,5 +11,5 @@ end ...@@ -11,5 +11,5 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=vgf.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst() local rc=vgf.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst()
vgf.Sendto(LOCATION_OVERLAY,c,rc) if c:IsRelateToEffect(e) then vgf.Sendto(LOCATION_OVERLAY,c,rc) end
end end
...@@ -8,7 +8,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -8,7 +8,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if vgf.IsCanBeCalled(c,e,tp) then if c:IsRelateToEffect(e) and vgf.IsCanBeCalled(c,e,tp) then
vgf.Sendto(LOCATION_MZONE,c,0,tp) vgf.Sendto(LOCATION_MZONE,c,0,tp)
end end
end end
\ No newline at end of file
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if vgf.IsCanBeCalled(c,e,tp) then if c:IsRelateToEffect(e) and vgf.IsCanBeCalled(c,e,tp) then
vgf.Sendto(LOCATION_MZONE,c,0,tp) vgf.Sendto(LOCATION_MZONE,c,0,tp)
end end
end end
......
...@@ -16,7 +16,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL)
local sg=g:FilterSelect(tp,cm.filter,0,2,nil,e,tp) local sg=g:FilterSelect(tp,cm.filter,0,2,nil,e,tp)
if #sg>0 then if #sg>0 then
vgf.Sendto(LOCATION_MZONE,c,0,tp,31,POS_FACEUP_ATTACK,0) vgf.Sendto(LOCATION_MZONE,sg,0,tp,31,POS_FACEUP_ATTACK,0)
end end
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
end end
......
...@@ -8,7 +8,9 @@ end ...@@ -8,7 +8,9 @@ end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
vgf.Sendto(LOCATION_MZONE,c,0,tp,31,POS_FACEUP_ATTACK,0) if c:IsRelateToEffect(e) and vgf.IsCanBeCalled(c,e,tp) then
vgf.Sendto(LOCATION_MZONE,c,0,tp,nil,nil,0)
end
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -11,6 +11,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -11,6 +11,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_ATKUP,tp,nil,tp,LOCATION_MZONE,0,1,1,nil) local g=vgf.SelectMatchingCard(HINTMSG_ATKUP,tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
VgF.AtkUp(c,g,5000,nil) VgF.AtkUp(c,g,5000,nil)
local rc=vgf.GetVMonster(tp) local rc=vgf.GetVMonster(tp)
c:CancelToGrave() if c:IsRelateToEffect(e) then
vgf.Sendto(LOCATION_OVERLAY,c,rc) c:CancelToGrave()
vgf.Sendto(LOCATION_OVERLAY,c,rc)
end
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