Commit fc37bad9 authored by 花桃白音's avatar 花桃白音

fix--0004 directattack nil and deck shuffle#07&13

parent 4e8def35
...@@ -87,7 +87,8 @@ function cm.initial_effect(c) ...@@ -87,7 +87,8 @@ function cm.initial_effect(c)
.e("SetCondition",function(e,tp,eg,ep,ev,re,r,rp) .e("SetCondition",function(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
local ta=Duel.GetAttackTarget() local ta=Duel.GetAttackTarget()
return (tc or ta) and (tc:IsCode(4204000) or ta:IsCode(4204000)) return (tc and {tc:IsCode(4204000)} or {false})[1]
oe (ta and {ta:IsCode(4204000)} or {false})[1]
end) end)
.e("SetCountLimit",1,m) .e("SetCountLimit",1,m)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk) .e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -26,11 +26,14 @@ function cm.initial_effect(c) ...@@ -26,11 +26,14 @@ function cm.initial_effect(c)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
end end
if Duel.IsExistingMatchingCard(function(c) return c:IsCode(4204000) end,tp,LOCATION_ONFIELD,0,1,nil) then if Duel.IsExistingMatchingCard(function(c) return c:IsCode(4204000) end,tp,LOCATION_ONFIELD,0,1,nil) then
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(function(c)return c:IsAbleToDeck() end),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(4204013,0)) then if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(function(c)return c:IsAbleToDeck() end),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(4204013,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(function(c) return c:IsAbleToDeck() end),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(function(c) return c:IsAbleToDeck() end),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if #g>0 then if #g>0 then
Duel.BreakEffect()
Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)
end 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