Commit e364460c authored by mercury233's avatar mercury233

fix

parent 0d659dd2
......@@ -77,7 +77,7 @@ function c100418016.drop(e,tp,eg,ep,ev,re,r,rp)
local opval={}
local spg=Duel.GetMatchingGroup(c100418016.spfilter2,tp,LOCATION_HAND,0,nil,e,tp)
local stg=Duel.GetMatchingGroup(Card.IsSSetable,tp,LOCATION_HAND,0,nil)
if #spg>0 then
if #spg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
ops[off]=aux.Stringid(100418016,2)
opval[off-1]=1
off=off+1
......
......@@ -69,7 +69,7 @@ function c100418017.drop(e,tp,eg,ep,ev,re,r,rp)
local opval={}
local spg=Duel.GetMatchingGroup(c100418017.spfilter2,tp,LOCATION_HAND,0,nil,e,tp)
local stg=Duel.GetMatchingGroup(Card.IsSSetable,tp,LOCATION_HAND,0,nil)
if #spg>0 then
if #spg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
ops[off]=aux.Stringid(100418017,2)
opval[off-1]=1
off=off+1
......
......@@ -32,8 +32,8 @@ end
function c100418020.filter(c)
return c:IsSetCard(0x280) and c:IsFaceup()
end
function c100418020.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100418020.filter,tp,LOCATION_MZONE,0,1,nil)
function c100418020.actcon(e)
return Duel.IsExistingMatchingCard(c100418020.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c100418020.acttg(e,c)
return c:GetType()==TYPE_TRAP
......
......@@ -30,10 +30,11 @@ function c100418022.activate(e,tp,eg,ep,ev,re,r,rp)
if tg:GetCount()>0 then
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local ct=tg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
local dem=Duel.GetMatchingGroupCount(c100418022.demfilter,tp,LOCATION_MZONE,0,nil)
local sg=Duel.GetMatchingGroup(c100418022.stfilter,tp,LOCATION_DECK,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ct>0 and dem>0 and sg:GetCount()>=ct and ft>=ct and Duel.SelectYesNo(tp,aux.Stringid(100418022,0)) then
if ct>0 and Duel.IsExistingMatchingCard(c100418022.demfilter,tp,LOCATION_MZONE,0,1,nil)
and sg:GetClassCount(Card.GetCode)>=ct and ft>=ct
and Duel.SelectYesNo(tp,aux.Stringid(100418022,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local stg=sg:SelectSubGroup(tp,aux.dncheck,false,ct,ct)
Duel.SSet(tp,stg)
......
......@@ -30,7 +30,8 @@ function Auxiliary.LabrynthDestroyOp(e,tp,res)
local chk=not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsSetCard(0x1280) and c:GetType()==TYPE_TRAP and e:IsHasType(EFFECT_TYPE_ACTIVATE)
local exc=nil
if c:IsStatus(STATUS_LEAVE_CONFIRMED) then exc=c end
if chk and Duel.IsPlayerAffectedByEffect(tp,100418021)
local te=Duel.IsPlayerAffectedByEffect(tp,100418021)
if chk and te
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,exc)
and Duel.SelectYesNo(tp,aux.Stringid(100418021,0)) then
if res>0 then Duel.BreakEffect() end
......@@ -39,7 +40,6 @@ function Auxiliary.LabrynthDestroyOp(e,tp,res)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,exc)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
local te=Duel.IsPlayerAffectedByEffect(tp,100418021)
te:UseCountLimit(tp)
end
end
......
......@@ -18,7 +18,8 @@ function Auxiliary.LabrynthDestroyOp(e,tp,res)
local chk=not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsSetCard(0x1280) and c:GetType()==TYPE_TRAP and e:IsHasType(EFFECT_TYPE_ACTIVATE)
local exc=nil
if c:IsStatus(STATUS_LEAVE_CONFIRMED) then exc=c end
if chk and Duel.IsPlayerAffectedByEffect(tp,100418021)
local te=Duel.IsPlayerAffectedByEffect(tp,100418021)
if chk and te
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,exc)
and Duel.SelectYesNo(tp,aux.Stringid(100418021,0)) then
if res>0 then Duel.BreakEffect() end
......@@ -27,7 +28,6 @@ function Auxiliary.LabrynthDestroyOp(e,tp,res)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,exc)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
local te=Duel.IsPlayerAffectedByEffect(tp,100418021)
te:UseCountLimit(tp)
end
end
......
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