Commit 26b74cac authored by Huangnan's avatar Huangnan

fix

parent 30d69d6f
Pipeline #32745 passed with stages
in 41 minutes and 2 seconds
...@@ -67,6 +67,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -67,6 +67,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=e:GetLabelObject():Filter(cm.filter2,nil) local g1=e:GetLabelObject():Filter(cm.filter2,nil)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter1),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter1),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,e,tp)
g:Sub(g1) g:Sub(g1)
...@@ -94,27 +95,31 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,27 +95,31 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.checkop) e2:SetOperation(cm.checkop)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) end
e3:SetType(EFFECT_TYPE_FIELD) function cm.cfilter(c,tp)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) return c:GetSummonPlayer()==tp and c:IsPreviousLocation(LOCATION_EXTRA)
e3:SetCode(m) end
e3:SetTargetRange(1,0) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_PHASE+PHASE_END) local c=e:GetHandler()
Duel.RegisterEffect(e3,tp) if eg:IsExists(cm.cfilter,1,nil,tp) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp) function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
...@@ -130,20 +135,6 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -130,20 +135,6 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
end end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and aux.ExtraDeckSummonCountLimit[sump]<=0
end
function cm.cfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsPreviousLocation(LOCATION_EXTRA)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(cm.cfilter,1,nil,tp) then
aux.ExtraDeckSummonCountLimit[tp]=aux.ExtraDeckSummonCountLimit[tp]-1
end
if eg:IsExists(cm.cfilter,1,nil,1-tp) then
aux.ExtraDeckSummonCountLimit[1-tp]=aux.ExtraDeckSummonCountLimit[1-tp]-1
end
end
--Remove --Remove
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) 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