Commit 7ae86161 authored by nekrozar's avatar nekrozar Committed by GitHub

fix Duel.SSet (#1265)

* fix sset

* Update c25629622.lua
parent c34f4d37
......@@ -88,7 +88,7 @@ function c15939229.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c15939229.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
......@@ -52,7 +52,7 @@ function c1948619.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c1948619.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsSSetable() then
if tc and tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
......
......@@ -34,7 +34,7 @@ function c20618081.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c20618081.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
......
......@@ -109,7 +109,7 @@ function c24010609.setop(e,tp,eg,ep,ev,re,r,rp)
if #g==0 or ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tg=g:SelectSubGroup(tp,c24010609.gselect,false,1,math.min(ct,ft+1),ft)
Duel.SSet(tp,tg)
if Duel.SSet(tp,tg)==0 then return end
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
......
......@@ -23,8 +23,7 @@ function c24425055.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c24425055.filter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
......@@ -83,11 +83,10 @@ end
function c25629622.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c25629622.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local c=e:GetHandler()
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local c=e:GetHandler()
local fid=c:GetFieldID()
Duel.SSet(tp,tc)
tc:RegisterFlagEffect(25629622,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
......@@ -74,7 +74,7 @@ function c29649320.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
local sg=Group.FromCards(c,tc)
Duel.SSet(tp,sg)
if Duel.SSet(tp,sg)==0 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
......@@ -65,7 +65,7 @@ function c35498188.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c35498188.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
if c:IsRelateToEffect(e) then
Duel.SSet(tp,c)
end
end
......@@ -84,8 +84,7 @@ function c36429703.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c36429703.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
if tc and Duel.SSet(tp,tc)~=0 then
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -55,8 +55,7 @@ function c38363525.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c38363525.setfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0
and c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
and c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
......@@ -59,7 +59,7 @@ function c43930492.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c43930492.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
......@@ -115,7 +115,7 @@ function c44133040.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c44133040.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
if c:IsRelateToEffect(e) then
Duel.SSet(tp,c)
end
end
......@@ -53,8 +53,7 @@ function c44640691.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c44640691.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
......@@ -63,8 +63,7 @@ function c45803070.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c45803070.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.SSet(tp,tc)
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
local fid=e:GetHandler():GetFieldID()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
......@@ -71,9 +71,7 @@ function c48086335.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_MONSTER_SSET)
e1:SetValue(TYPE_SPELL)
tc:RegisterEffect(e1,true)
if tc:IsSSetable() then
Duel.SSet(tp,tc)
end
e1:Reset()
end
end
......@@ -41,8 +41,7 @@ function c494922.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c494922.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and (tc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then
Duel.SSet(tp,tc)
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
......@@ -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()
and Duel.SelectYesNo(tp,aux.Stringid(50237654,0)) then
Duel.BreakEffect()
Duel.SSet(tp,dc,tp,false)
if Duel.SSet(tp,dc,tp,false)==0 then return end
if dc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -71,8 +71,7 @@ function c51339637.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c51339637.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
......@@ -95,7 +95,7 @@ function c52240819.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c52240819.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
......@@ -83,8 +83,7 @@ function c56920308.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c56920308.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
......@@ -86,7 +86,7 @@ function c59054773.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c59054773.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
if c:IsRelateToEffect(e) then
Duel.SSet(tp,c)
end
end
......@@ -36,8 +36,7 @@ function c60990740.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,1)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.DisableShuffleCheck()
if tc:GetType()==TYPE_TRAP and tc:IsSSetable() then
Duel.SSet(tp,tc)
if tc:GetType()==TYPE_TRAP and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
......@@ -42,8 +42,7 @@ function c645794.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c645794.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
......
......@@ -57,9 +57,9 @@ function c64961254.operation(e,tp,eg,ep,ev,re,r,rp)
if tc:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEDOWN_DEFENSE,1-tp) then
Duel.SpecialSummon(tc,0,1-tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)
end
elseif (opt==1 and tc:IsType(TYPE_SPELL)) then
elseif (opt==1 and tc:IsType(TYPE_SPELL) and tc:IsSSetable()) then
Duel.SSet(1-tp,tc)
elseif (opt==2 and tc:IsType(TYPE_TRAP))then
elseif (opt==2 and tc:IsType(TYPE_TRAP) and tc:IsSSetable())then
Duel.SSet(1-tp,tc)
else
Duel.SendtoHand(g,1-tp,REASON_EFFECT)
......
......@@ -56,8 +56,7 @@ function c65330383.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c65330383.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
Duel.SSet(tp,tc)
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
......
......@@ -61,8 +61,7 @@ function c65357623.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c65357623.retfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0
and c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
and c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
......@@ -30,8 +30,7 @@ function c67829249.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67829249.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
......
......@@ -46,7 +46,7 @@ end
function c70564929.setop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
......
......@@ -69,8 +69,7 @@ function c74003290.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c74003290.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
......@@ -49,8 +49,7 @@ function c799183.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c799183.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
......@@ -30,8 +30,7 @@ function c80101899.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g2=Duel.SelectMatchingCard(tp,c80101899.setfilter,tp,LOCATION_DECK,0,1,1,nil,tc1:GetCode())
local tc2=g2:GetFirst()
if tc2 then
Duel.SSet(tp,tc2)
if tc2 and Duel.SSet(tp,tc2)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
......@@ -55,8 +55,7 @@ function c85800949.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c85800949.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
Duel.SSet(tp,tc)
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
......@@ -64,8 +64,7 @@ end
function c88332693.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,c88332693.setfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SSet(tp,tc)
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
......@@ -58,8 +58,7 @@ function c91742238.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c91742238.setfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0
and c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
and c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
......@@ -34,8 +34,7 @@ end
function c93294869.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c93294869.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
if g:GetCount()>0 and Duel.SSet(tp,g)~=0 then
local sg=Duel.GetMatchingGroup(c93294869.filter2,tp,LOCATION_DECK,0,nil)
if e:GetLabel()==1 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(93294869,1)) then
Duel.BreakEffect()
......
......@@ -29,8 +29,7 @@ function c96704974.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c96704974.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
Duel.SSet(tp,tc)
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
......@@ -27,8 +27,7 @@ function c97064649.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c97064649.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.SSet(tp,tc)
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
......
......@@ -54,7 +54,7 @@ function c99004583.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c99004583.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
if c:IsRelateToEffect(e) then
Duel.SSet(tp,c)
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