Commit 2fe07269 authored by GuGu's avatar GuGu

Update c37009.lua 不能使用相关效果椿务局调整

parent 0b2715e1
Pipeline #22027 passed with stage
in 1 minute and 58 seconds
...@@ -41,27 +41,44 @@ function c37009.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,27 +41,44 @@ function c37009.activate(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local g1=Duel.GetMatchingGroup(c37009.filter1,tp,0x12,0x12,nil) local g1=Duel.GetMatchingGroup(c37009.filter1,tp,0x12,0x12,nil)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT) Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
--forbidden
local e2=Effect.CreateEffect(c) local g=Duel.GetMatchingGroup(c37009.banfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) local tc=g:GetFirst()
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) while tc do
e2:SetCode(EFFECT_FORBIDDEN) local pos=0
e2:SetRange(LOCATION_SZONE) if tc:IsFacedown() then pos=1 end
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) --forbidden
e2:SetTarget(c37009.bantg) local e1=Effect.CreateEffect(e:GetHandler())
e2:SetLabel(c:GetFieldID()) e1:SetType(EFFECT_TYPE_FIELD)
e2:SetLabelObject(c) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
c:RegisterEffect(e2) e1:SetCode(EFFECT_FORBIDDEN)
local e3=Effect.CreateEffect(c) e1:SetCondition(c37009.bancon)
e3:SetType(EFFECT_TYPE_FIELD) e1:SetTarget(c37009.bantg)
e3:SetCode(EFFECT_DISABLE) e1:SetLabel(pos)
e3:SetRange(LOCATION_SZONE) e1:SetLabelObject(tc)
e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) Duel.RegisterEffect(e1,tp)
e3:SetTarget(c37009.bantg) tc=g:GetNext()
e3:SetLabel(c:GetFieldID()) end
e3:SetLabelObject(c) end
c:RegisterEffect(e3) function c37009.banfilter(e,c)
return not (c:IsAttribute(ATTRIBUTE_WATER) and c:GetDefense()==900)
end
function c37009.banfilter1(c,e)
return c==e:GetLabelObject() and c:IsFaceup() and c:IsOnField()
end
function c37009.banfilter2(c,e)
return c==e:GetLabelObject() and c:IsFacedown() and c:IsOnField()
end
function c37009.bancon(e)
local tp=e:GetHandlerPlayer()
local tc=e:GetLabelObject()
local pos=e:GetLabel()
if pos==1 and Duel.IsExistingMatchingCard(c37009.banfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e) then return true
else e:SetLabel(0) end
if Duel.IsExistingMatchingCard(c37009.banfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e) then return true end
e:Reset()
return false
end end
function c37009.bantg(e,c) function c37009.bantg(e,c)
return c:GetFieldID()<e:GetLabel() and c~=e:GetLabelObject() and not (c:IsAttribute(ATTRIBUTE_WATER) and c:GetDefense()==900) return c==e:GetLabelObject()
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