Commit 5eca7fc0 authored by Huangnan's avatar Huangnan

fix

parent fefc5303
No preview for this file type
......@@ -27,7 +27,7 @@ function cm.lcheck(g,lc)
end
--SearchCard
function cm.matfilter(c)
return (c:IsAbleToHand() or c:IsAbleToGrave()) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x859)
return ((c:IsAbleToHand() or c:IsAbleToGrave()) and c:IsType(TYPE_SPELL+TYPE_TRAP)) and c:IsSetCard(0x859)
end
function cm.pbfilter(c)
return not c:IsPublic()
......@@ -41,7 +41,7 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(cm.matfilter,tp,LOCATION_DECK,0,nil)
if #sg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local hg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local hg=Duel.SelectMatchingCard(tp,cm.matfilter,tp,LOCATION_DECK,0,1,1,nil)
if hg:GetCount()<=0 then return end
local hc=hg:GetFirst()
if hc:IsAbleToHand() and (not hc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
......
......@@ -184,10 +184,10 @@ function cm.thfilter(c)
return c:IsFaceupEx() and c:IsSetCard(0xef1) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -141,10 +141,10 @@ function cm.thfilter(c)
return c:IsFaceupEx() and c:IsSetCard(0xef1) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
......
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