Commit 6a003db6 authored by mercury233's avatar mercury233 Committed by GitHub

fix クロノダイバー・ダブルバレル

parent 34f4a07e
......@@ -26,7 +26,7 @@ function c91135480.target(e,tp,eg,ep,ev,re,r,rp,chk)
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER)
then return true end
if g:IsExists(Card.IsType,1,nil,TYPE_SPELL)
and Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) then return true end
and Duel.IsExistingMatchingCard(c91135480.ctfilter,tp,0,LOCATION_MZONE,1,nil) then return true end
if g:IsExists(Card.IsType,1,nil,TYPE_TRAP)
and Duel.IsExistingMatchingCard(c91135480.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then return true end
return false
......@@ -40,15 +40,16 @@ end
function c91135480.dfilter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT)
end
function c91135480.ctfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c91135480.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) then return end
local g=c:GetOverlayGroup()
local tg=Group.CreateGroup()
if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) then
tg:Merge(g:Filter(Card.IsType,nil,TYPE_MONSTER))
end
if Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) then
if Duel.IsExistingMatchingCard(c91135480.ctfilter,tp,0,LOCATION_MZONE,1,nil) then
tg:Merge(g:Filter(Card.IsType,nil,TYPE_SPELL))
end
if Duel.IsExistingMatchingCard(c91135480.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then
......@@ -71,7 +72,7 @@ function c91135480.operation(e,tp,eg,ep,ev,re,r,rp)
if sg:IsExists(Card.IsType,1,nil,TYPE_SPELL) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c91135480.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
Duel.GetControl(g:GetFirst(),tp,PHASE_END,1)
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