Commit 2cee1fb0 authored by REIKAI's avatar REIKAI 💬

buug fix

parent dc03c8dd
Pipeline #20970 passed with stages
in 21 minutes and 49 seconds
......@@ -61,7 +61,12 @@ function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc = Duel.GetFirstTarget()
local count = Duel.GetMatchingGroupCount(nil,tp,LOCATION_ONFIELD,0,nil)
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,1-tp,REASON_EFFECT)
if Duel.IsPlayerCanDraw(1-tp,count) then
Duel.BreakEffect()
Duel.Draw(tp,count,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -29,6 +29,9 @@ function cm.initial_effect(c)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
function cm.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandler():GetControler(),LOCATION_MZONE,0)==0
end
function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xce2) and c:IsAbleToDeck()
end
......@@ -78,7 +81,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc1 = Duel.SelectMatchingCard(tp,cm.check,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
local tc1 = Duel.SelectMatchingCard(tp,cm.check,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc2 = Duel.SelectMatchingCard(tp,cm.check2,tp,0,LOCATION_MZONE,1,1,nil,tc1,e,tp)
local g = Group.FromCards(tc1 , tc2)
......
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