Commit 6090c272 authored by 花桃白音's avatar 花桃白音

fix operation

parent b1becd0b
......@@ -24,12 +24,15 @@ function cm.initial_effect(c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
local exc=nil
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then exc=e:GetHandler() end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil)
local tg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,exc)
if tg and Duel.Destroy(tg,REASON_EFFECT)~=0 then
local setg=Duel.GetMatchingGroup(Card.IsSSetable,tp,LOCATION_HAND,0,g):Filter(Card.IsType,nil,TYPE_TRAP)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0
and Duel.Destroy(tg,REASON_EFFECT)~=0
and setg:GetCount()>0 then
if setg:GetCount()>0 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
......@@ -63,6 +66,8 @@ function cm.initial_effect(c)
end
end
end
end
end
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_QUICK_O)
......
......@@ -10,7 +10,7 @@ function cm.initial_effect(c)
.e("SetCountLimit",1,4260609)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemove() end
if chk==0 then return c:IsAbleToRemoveAsCost() end
Duel.Remove(c,POS_FACEUP,REASON_COST) end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 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