Commit aa1ca5fb authored by fallenstardust's avatar fallenstardust
parent 97744f9f
...@@ -19,6 +19,8 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,6 +19,8 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function s.filter1(c,e,tp) function s.filter1(c,e,tp)
return c:GetRank()>0 and c:IsFaceup() and c:IsSetCard(0xba) return c:GetRank()>0 and c:IsFaceup() and c:IsSetCard(0xba)
function s.filter1(c,e)
return c:GetRank()>0 and c:IsFaceup() and c:IsSetCard(0xba) and c:IsCanBeEffectTarget(e)
end end
function s.filter2(c,e,tp,mg) function s.filter2(c,e,tp,mg)
local rk=0 local rk=0
...@@ -33,6 +35,8 @@ end ...@@ -33,6 +35,8 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter1(chkc,e,tp) end
local rg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e,tp) local rg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e,tp)
if chkc then return false end
local rg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
if chk==0 then return rg:CheckSubGroup(s.fselect,2,99,tp,e) end if chk==0 then return rg:CheckSubGroup(s.fselect,2,99,tp,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local sg=rg:SelectSubGroup(tp,s.fselect,false,2,99,tp,e) local sg=rg:SelectSubGroup(tp,s.fselect,false,2,99,tp,e)
......
...@@ -34,11 +34,11 @@ end ...@@ -34,11 +34,11 @@ end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0xba) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(id) and c:IsAbleToHand() return c:IsSetCard(0xba) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(id) and c:IsAbleToHand()
end end
function s.cfilter(c) function s.cfilter(c,tp)
return c:IsSetCard(0xba) and c:IsControler(tp) and c:IsSummonLocation(LOCATION_EXTRA) return c:IsSetCard(0xba) and c:IsControler(tp) and c:IsSummonLocation(LOCATION_EXTRA)
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(s.cfilter,1,nil) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return eg:IsExists(s.cfilter,1,nil,tp) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.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