Commit e37940d1 authored by salix5's avatar salix5

Merge pull request #1420 from nekrozar/patch-2

fix Monster Recovery
parents 81ed7431 dffe5cb5
......@@ -18,7 +18,7 @@ function c93108433.hfilter(c,tp)
end
function c93108433.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c93108433.mfilter(chkc,tp) end
if chk==0 then return Duel.IsPlayerCanDraw(tp)
if chk==0 then return Duel.IsPlayerCanDraw(tp) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0
and Duel.IsExistingTarget(c93108433.mfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),tp)
and not Duel.IsExistingMatchingCard(c93108433.hfilter,tp,LOCATION_HAND,0,1,nil,tp)
end
......@@ -33,7 +33,7 @@ function c93108433.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local ct=g:GetCount()
if tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) and ct>0 then
g:AddCard(tc)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
......
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