Commit 6b2d9ff7 authored by mercury233's avatar mercury233

fix

parent c306b22a
Pipeline #23001 passed with stages
in 40 seconds
...@@ -90,9 +90,10 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,9 +90,10 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain() local ct=Duel.GetCurrentChain()
if ct<2 then return end if ct<2 then return false end
local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local loc1=te and te:GetHandler():IsSetCard(0x17e) if not te then return false end
local loc1=te:GetHandler():IsSetCard(0x17e) and not te:GetHandler():IsCode(id)
local loc2=te:GetActiveType()==TYPE_TRAP and te:IsHasType(EFFECT_TYPE_ACTIVATE) local loc2=te:GetActiveType()==TYPE_TRAP and te:IsHasType(EFFECT_TYPE_ACTIVATE)
return (loc1 or loc2) and p==tp and rp==1-tp return (loc1 or loc2) and p==tp and rp==1-tp
end end
......
...@@ -44,6 +44,13 @@ function s.initial_effect(c) ...@@ -44,6 +44,13 @@ function s.initial_effect(c)
e3:SetOperation(s.thop) e3:SetOperation(s.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.chk(e,tp,eg)
for p=0,1 do
if eg:IsExists(Card.IsSummonPlayer,1,nil,1-p) then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,2)
end
end
end
function s.mfilter(tp) function s.mfilter(tp)
return function(c) return function(c)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetMaxGroup(Card.GetAttack) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetMaxGroup(Card.GetAttack)
......
...@@ -26,7 +26,7 @@ function s.initial_effect(c) ...@@ -26,7 +26,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsType(TYPE_TUNER) or (c:IsLevel(7,8) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO)) return (c:IsType(TYPE_TUNER) or c:IsLevel(7,8) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -47,6 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,6 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(s.limit) e1:SetTarget(s.limit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function s.limit(e,c) function s.limit(e,c)
......
...@@ -61,7 +61,7 @@ function s.rmfilter(c) ...@@ -61,7 +61,7 @@ function s.rmfilter(c)
end end
function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel() local ct=e:GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_EXTRA,0,ct,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_EXTRA,0,ct,ct,nil) local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_EXTRA,0,ct,ct,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_COST) Duel.Remove(g,POS_FACEDOWN,REASON_COST)
......
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