Commit 96041d2d authored by Huangnan's avatar Huangnan

fix

parent e7352799
Pipeline #33316 passed with stages
in 48 minutes and 5 seconds
No preview for this file type
......@@ -25,6 +25,7 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.con)
e2:SetTargetRange(0,1)
e2:SetValue(s.aclimit)
c:RegisterEffect(e2)
......@@ -32,7 +33,9 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetCondition(s.con)
e3:SetTarget(s.sumlimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
......@@ -45,6 +48,10 @@ function s.initial_effect(c)
e4:SetOperation(s.efop)
c:RegisterEffect(e4)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_XYZ)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsCode(52798035)
end
......
......@@ -57,20 +57,20 @@ end
function c62624530.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function c62624530.eqfilter(c,ec)
return c:IsType(TYPE_EQUIP) and c:CheckUniqueOnField() and not c:IsForbidden()
function c62624530.eqfilter(c,ec,tp)
return c:IsType(TYPE_EQUIP) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
and c:CheckEquipTarget(ec)
end
function c62624530.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c62624530.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,c) end
if chk==0 then return Duel.IsExistingMatchingCard(c62624530.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,c,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c62624530.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c62624530.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,c)
local g=Duel.SelectMatchingCard(tp,c62624530.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,c,tp)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
......
......@@ -43,19 +43,19 @@ function c65810120.disfilter(c)
end
function c65810120.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and Duel.IsChainDisablable(ev) and (re:IsActiveType(TYPE_SPELL) or re:IsActiveType(TYPE_TRAP)) and Duel.CheckReleaseGroupEx(c:GetControler(),c65810120.disfilter,1,REASON_EFFECT,true,nil) and e:GetHandler():GetFlagEffect(id)<=0 and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
return rp==1-tp and Duel.IsChainDisablable(ev) and not Duel.IsChainDisabled(ev) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.CheckReleaseGroupEx(c:GetControler(),c65810120.disfilter,1,REASON_EFFECT,true,nil) and Duel.GetFlagEffect(tp,id)==0 and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c65810120.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(65810120,1)) then
if Duel.GetFlagEffect(tp,id)==0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=Duel.SelectMatchingCard(tp,c65810120.disfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil):GetFirst()
if tc and Duel.Release(tc,REASON_EFFECT) then
Duel.Hint(HINT_CARD,0,id)
Duel.NegateEffect(ev)
Duel.Destroy(rc,REASON_EFFECT)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(65810120,2))
Duel.RegisterFlagEffect(tp,id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
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