Commit d1bc9200 authored by POLYMER's avatar POLYMER

fix

parent 96d85302
......@@ -61,11 +61,24 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if ct<=16 then
Duel.SortDecktop(tp,tp,ct)
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451463,2))
local tc=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK):Select(tp,1,1,nil):GetFirst()
if not tc then return end
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
local cg=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK)
local sg=Group.CreateGroup()
local stack={}
while #sg<ct do
local tc=cg:SelectUnselect(sg,tp,false,true,ct,ct)
if not sg:IsContains(tc) then
sg:AddCard(tc)
cg:RemoveCard(tc)
stack[#stack+1]=tc
else
sg:RemoveCard(tc)
cg:AddCard(tc)
for i=#stack,1,-1 do
if stack[i]==tc then table.remove(stack,i) break end
end
end
end
for i=#stack,1,-1 do Duel.MoveSequence(stack[i],0) end
end
local dt=Duel.GetDrawCount(tp)
if tid==1 then
......
......@@ -19,7 +19,7 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(m)
c:RegisterEffect(e2)
local custom_code=cm.RegisterMergedEvent_ToSingleCard(c,m,{EVENT_LEAVE_FIELD,EVENT_LEAVE_GRAVE,EVENT_MOVE,EVENT_CUSTOM+m+1})
local custom_code=cm.RegisterMergedEvent_ToSingleCard(c,m,{EVENT_LEAVE_FIELD,EVENT_LEAVE_GRAVE,EVENT_CUSTOM+m+1})
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(custom_code)
......
......@@ -149,7 +149,7 @@ end
function c28322413.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsAbleToDeck() end
if chk==0 then return e:GetHandler():GetOverlayCount()>=1 and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,ct,nil)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,e:GetHandler():GetOverlayCount(),nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0)
end
function c28322413.tdop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -65,7 +65,7 @@ function c75081033.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c75081033.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(75081033,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c75081033.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c75081033.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
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