Commit 35b5e74a authored by GuGu's avatar GuGu

Update c99999026.lua

parent 506e0d12
Pipeline #32927 passed with stage
in 8 seconds
...@@ -40,7 +40,7 @@ function c99999026.thfilter1(c,tp) ...@@ -40,7 +40,7 @@ function c99999026.thfilter1(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
end end
function c99999026.thfilter2(c,tp) function c99999026.thfilter2(c,tp)
return c:IsAbleToChangeControler() and c:IsSummonPlayer(1-tp) and c:IsControler(1-tp) return c:IsAbleToChangeControler() and c:IsSummonPlayer(1-tp) and c:IsControler(1-tp) and c:IsOnField()
end end
function c99999026.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c99999026.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c99999026.thfilter1,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c99999026.thfilter1,tp,LOCATION_MZONE,0,1,nil)
...@@ -53,39 +53,38 @@ end ...@@ -53,39 +53,38 @@ end
function c99999026.thop(e,tp,eg,ep,ev,re,r,rp) function c99999026.thop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.SelectMatchingCard(tp,c99999026.thfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) local g1=Duel.SelectMatchingCard(tp,c99999026.thfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
if g1:GetCount()>0 then if g1:GetCount()>0 then
if Duel.Release(g1,REASON_EFFECT)~=0 then Duel.Release(g1,REASON_EFFECT)~=0 then
local g2=eg:Filter(c99999026.thfilter2,nil,tp) local g2=eg:Filter(c99999026.thfilter2,nil,tp)
local tc=g2:GetFirst() local tc=g2:GetFirst()
if not tc then return end if not tc then return end
if g2:GetCount()>1 then if g2:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
tc=g:Select(tp,1,1,nil):GetFirst() tc=g2:Select(tp,1,1,nil):GetFirst()
end end
if Duel.GetControl(tc,tp)~=0 then if Duel.GetControl(tc,tp)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
--cannot release --cannot release
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UNRELEASABLE_SUM) e3:SetCode(EFFECT_UNRELEASABLE_SUM)
e3:SetValue(1) e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EFFECT_UNRELEASABLE_NONSUM) e4:SetCode(EFFECT_UNRELEASABLE_NONSUM)
tc:RegisterEffect(e4) tc:RegisterEffect(e4)
end
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