Commit f84598e5 authored by nekrozar's avatar nekrozar

fix sset

parent fc81ea8b
...@@ -51,6 +51,6 @@ function c23898021.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,6 +51,6 @@ function c23898021.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SET)
local tg=sg:RandomSelect(1-tp,1) local tg=sg:RandomSelect(1-tp,1)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
Duel.SSet(tp,tg,false) Duel.SSet(tp,tg,tp,false)
end end
end end
...@@ -68,6 +68,7 @@ function c36239585.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -68,6 +68,7 @@ function c36239585.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
else else
e:SetCategory(CATEGORY_POSITION) e:SetCategory(CATEGORY_POSITION)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end end
end end
function c36239585.setop(e,tp,eg,ep,ev,re,r,rp) function c36239585.setop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -69,6 +69,7 @@ function c42149850.setcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,6 +69,7 @@ function c42149850.setcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c42149850.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c42149850.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c42149850.setop(e,tp,eg,ep,ev,re,r,rp) function c42149850.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -40,7 +40,7 @@ function c47766694.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,7 @@ function c47766694.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(dp,1,1,nil) local sg=g:Select(dp,1,1,nil)
Duel.SSet(dp,sg,false) Duel.SSet(dp,sg,dp,false)
end end
end end
end end
......
...@@ -52,7 +52,8 @@ function c48086335.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -52,7 +52,8 @@ function c48086335.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c48086335.filter,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingTarget(c48086335.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
Duel.SelectTarget(tp,c48086335.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c48086335.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end end
function c48086335.setop(e,tp,eg,ep,ev,re,r,rp) function c48086335.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -46,7 +46,7 @@ function c50237654.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function c50237654.drop(e,tp,eg,ep,ev,re,r,rp)
if dc:IsType(TYPE_SPELL+TYPE_TRAP) and dc:IsSSetable() if dc:IsType(TYPE_SPELL+TYPE_TRAP) and dc:IsSSetable()
and Duel.SelectYesNo(tp,aux.Stringid(50237654,0)) then and Duel.SelectYesNo(tp,aux.Stringid(50237654,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SSet(tp,dc,false) Duel.SSet(tp,dc,tp,false)
if dc:IsType(TYPE_QUICKPLAY) then if dc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -29,7 +29,7 @@ function c60082869.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,7 @@ function c60082869.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SSet(tp,sg,false) Duel.SSet(tp,sg,tp,false)
end end
end end
end end
...@@ -52,19 +52,20 @@ function c72566043.setcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,19 +52,20 @@ function c72566043.setcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsSummonType(SUMMON_TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c72566043.setfilter(c) function c72566043.setfilter(c,tp)
return c:IsType(TYPE_TRAP) and c:IsSSetable() local chk=not c:IsControler(tp)
return c:IsType(TYPE_TRAP) and c:IsSSetable(chk) and (not chk or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end end
function c72566043.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c72566043.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c72566043.setfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c72566043.setfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c72566043.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c72566043.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c72566043.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectTarget(tp,c72566043.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end end
function c72566043.setop(e,tp,eg,ep,ev,re,r,rp) function c72566043.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
end end
end end
...@@ -48,20 +48,18 @@ function c76589815.cftg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,20 +48,18 @@ function c76589815.cftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end end
function c76589815.cffilter(c) function c76589815.cffilter(c,tp)
return c:IsType(TYPE_SPELL) and c:IsSSetable() return c:IsType(TYPE_SPELL) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end end
function c76589815.cfop(e,tp,eg,ep,ev,re,r,rp) function c76589815.cfop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then local sg=g:Filter(c76589815.cffilter,nil,tp)
local sg=g:Filter(c76589815.cffilter,nil) if sg:GetCount()>0 then
if sg:GetCount()>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local setg=sg:Select(tp,1,1,nil)
local setg=sg:Select(tp,1,1,nil) Duel.SSet(tp,setg:GetFirst())
Duel.SSet(tp,setg:GetFirst())
end
end end
Duel.ShuffleHand(1-tp) Duel.ShuffleHand(1-tp)
end end
...@@ -57,7 +57,7 @@ function c80019195.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -57,7 +57,7 @@ function c80019195.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c80019195.setop(e,tp,eg,ep,ev,re,r,rp) function c80019195.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
end end
end end
...@@ -69,7 +69,7 @@ function c82738277.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +69,7 @@ function c82738277.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SSet(tp,sg,false) Duel.SSet(tp,sg,tp,false)
end end
end end
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