Skip to content

Commit fbf2e6d

Browse files
committed
"Speedlift" update
Fixed a bug where the player(s) would be unable to activate cards and effects in a new chain, in response to a summon, even if the monster summoned by "Speedlift" was summoned in a chain link higher than 1
1 parent b18ea4b commit fbf2e6d

1 file changed

Lines changed: 12 additions & 28 deletions

File tree

official/c36730805.lua

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,17 @@ end
3030
function s.activate(e,tp,eg,ep,ev,re,r,rp)
3131
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
3232
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
33-
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
34-
local tc=g:GetFirst()
35-
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
36-
local e1=Effect.CreateEffect(e:GetHandler())
37-
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
38-
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
39-
e1:SetLabelObject(tc)
40-
e1:SetOperation(s.sumop)
41-
Duel.RegisterEffect(e1,tp)
42-
local e2=Effect.CreateEffect(e:GetHandler())
43-
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
44-
e2:SetCode(EVENT_CHAIN_END)
45-
e2:SetLabelObject(e1)
46-
e2:SetOperation(s.cedop)
47-
Duel.RegisterEffect(e2,tp)
33+
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
34+
if tc then
35+
if Duel.GetCurrentChain()==1 then
36+
--Neither player can activate cards or effects when it is summoned
37+
local e1=Effect.CreateEffect(e:GetHandler())
38+
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
39+
e1:SetCode(EVENT_CHAIN_END)
40+
e1:SetCountLimit(1)
41+
e1:SetOperation(function() Duel.SetChainLimitTillChainEnd(aux.FALSE) end)
42+
Duel.RegisterEffect(e1,tp)
43+
end
44+
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
4845
end
49-
Duel.SpecialSummonComplete()
50-
end
51-
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
52-
if eg:IsContains(e:GetLabelObject()) then
53-
e:SetLabel(1)
54-
e:Reset()
55-
else e:SetLabel(0) end
56-
end
57-
function s.cedop(e,tp,eg,ep,ev,re,r,rp)
58-
if Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) and e:GetLabelObject():GetLabel()==1 then
59-
Duel.SetChainLimitTillChainEnd(aux.FALSE)
60-
end
61-
e:Reset()
6246
end

0 commit comments

Comments
 (0)