Commit e974281e authored by Vury Leo's avatar Vury Leo

use cate instead of operation info

parent a26b9054
......@@ -18,6 +18,7 @@ function s.desfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
and (c:IsControler(tp) or c:IsFaceup())
end
--- @param e Effect
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp) and chkc~=c end
......@@ -25,7 +26,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c,tp)
if g:IsExists(Card.IsControler,1,nil,tp) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
e:SetCategory(e:GetCategory()|CATEGORY_TOHAND|CATEGORY_GRAVE_ACTION)
e:SetLabel(1)
else
e:SetLabel(0)
......
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