Commit 30fe0c28 authored by wind2009's avatar wind2009

Fix

parent 628dd056
Pipeline #33635 passed with stages
in 5 minutes and 1 second
No preview for this file type
...@@ -71,7 +71,7 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -71,7 +71,7 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and Duel.IsExistingMatchingCard(s.mtfilter,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingMatchingCard(s.mtfilter,tp,LOCATION_GRAVE,0,1,nil,e) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function s.spop2(e,tp,eg,ep,ev,re,r,rp) function s.spop2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -29,7 +29,8 @@ end ...@@ -29,7 +29,8 @@ end
function s.setfilter(c) function s.setfilter(c)
return c:IsSetCard(0xdc) and c:IsType(TYPE_TRAP) and c:IsSSetable() return c:IsSetCard(0xdc) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return e:GetLabel()==1 and chkc:IsType(TYPE_MONSTER) and s.posfilter(chkc) end
local b1=Duel.IsExistingTarget(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) local b1=Duel.IsExistingTarget(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and (not e:IsCostChecked() or Duel.GetFlagEffect(tp,id)==0) and (not e:IsCostChecked() or Duel.GetFlagEffect(tp,id)==0)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -38,9 +39,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,9 +39,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
or Duel.GetFlagEffect(tp,id+o)==0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)) or Duel.GetFlagEffect(tp,id+o)==0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil))
local b3=Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) local b3=Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil)
and (not e:IsCostChecked() or Duel.GetFlagEffect(tp,id+o*2)==0) and (not e:IsCostChecked() or Duel.GetFlagEffect(tp,id+o*2)==0)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 or b3 end
local op=0 local op=0
if b1 or b2 then if b1 or b2 or b3 then
op=aux.SelectFromOptions(tp, op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),1}, {b1,aux.Stringid(id,1),1},
{b2,aux.Stringid(id,2),2}, {b2,aux.Stringid(id,2),2},
......
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