Commit 82608372 authored by salix5's avatar salix5

fix: once per chain

parent 45d5e0a7
......@@ -57,7 +57,7 @@ function c263926.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler())
end
function c263926.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c263926.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -51,7 +51,8 @@ end
function c2645637.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c2645637.atkfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c2645637.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) and not c:IsStatus(STATUS_CHAINING) end
if chk==0 then return e:GetHandler():GetFlagEffect(2645637)==0 and Duel.IsExistingTarget(c2645637.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
e:GetHandler():RegisterFlagEffect(2645637,RESET_CHAIN,0,1)
local g=Duel.SelectTarget(tp,c2645637.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
......
......@@ -31,8 +31,10 @@ function c3428069.filter(c,e,tp)
end
function c3428069.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c3428069.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if chk==0 then return e:GetHandler():GetFlagEffect(3428069)==0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and eg:IsExists(c3428069.filter,1,nil,e,tp) end
e:GetHandler():RegisterFlagEffect(3428069,RESET_CHAIN,0,1)
local g=eg:Filter(c3428069.filter,nil,e,tp)
local tc=nil
if g:GetCount()>1 then
......
......@@ -37,9 +37,8 @@ function c575512.sccon(e,tp,eg,ep,ev,re,r,rp)
end
function c575512.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetHandler():GetFlagEffect(575512)>0 then return false end
local mg=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0xc1)
return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg)
return e:GetHandler():GetFlagEffect(575512)==0 and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg)
end
e:GetHandler():RegisterFlagEffect(575512,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......
......@@ -43,7 +43,8 @@ function c5821478.desfilter(c)
return c:GetSequence()<5
end
function c5821478.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return e:GetHandler():GetFlagEffect(5821478)==0 end
e:GetHandler():RegisterFlagEffect(5821478,RESET_CHAIN,0,1)
local g=Duel.GetMatchingGroup(c5821478.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
......
......@@ -39,8 +39,10 @@ function c69711728.filter(c,lv,e,tp)
end
function c69711728.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c69711728.filter(chkc,eg:GetFirst():GetLevel(),e,tp) end
if chk==0 then return eg:IsExists(c69711728.cfilter,1,nil,e,tp)
if chk==0 then return e:GetHandler():GetFlagEffect(69711728)==0
and eg:IsExists(c69711728.cfilter,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
e:GetHandler():RegisterFlagEffect(69711728,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c69711728.filter,tp,LOCATION_GRAVE,0,1,1,nil,eg:GetFirst():GetLevel(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
......@@ -48,7 +48,8 @@ function c69868555.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c69868555.cfilter,1,nil) and Duel.IsExistingMatchingCard(c69868555.dfilter,tp,LOCATION_MZONE,0,1,nil,eg)
end
function c69868555.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return e:GetHandler():GetFlagEffect(69868555)==0 end
e:GetHandler():RegisterFlagEffect(69868555,RESET_CHAIN,0,1)
local g=eg:Filter(c69868555.cfilter,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
......
......@@ -42,13 +42,14 @@ function c72971064.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
end
function c72971064.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and not e:GetHandler():IsStatus(STATUS_CHAINING) end
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c72971064.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(Card.IsAbleToHand,nil):Filter(Card.IsLocation,nil,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.IsInGroup(chkc,g) end
if chk==0 then return Duel.IsExistingTarget(aux.IsInGroup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,g) end
if chk==0 then return e:GetHandler():GetFlagEffect(72971064)==0 and Duel.IsExistingTarget(aux.IsInGroup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,g) end
e:GetHandler():RegisterFlagEffect(72971064,RESET_CHAIN,0,1)
local sg
if g:GetCount()==1 then
sg=g:Clone()
......
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