Commit 4af4efde authored by POLYMER's avatar POLYMER

fix

parent 13d250f3
...@@ -66,7 +66,7 @@ function cm.GetLinkMaterials(tp,f,lc) ...@@ -66,7 +66,7 @@ function cm.GetLinkMaterials(tp,f,lc)
return mg return mg
end end
function cm.LCheckGoal(sg,tp,lc,gf,lmat) function cm.LCheckGoal(sg,tp,lc,gf,lmat)
return sg:CheckWithSumEqual(Auxiliary.GetLinkCount,lc:GetLink(),#sg,#sg) and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg)) and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp) and (not lmat or sg:IsContains(lmat)) and not sg:IsExists(cm.fdfilter,4,nil) return sg:CheckWithSumEqual(Auxiliary.GetLinkCount,lc:GetLink(),#sg,#sg) and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg)) and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp) and (not lmat or sg:IsContains(lmat)) and sg:IsExists(aux.NOT(cm.fdfilter),1,nil)
end end
function cm.LinkCondition(f,minc,maxc,gf) function cm.LinkCondition(f,minc,maxc,gf)
return function(e,c,og,lmat,min,max) return function(e,c,og,lmat,min,max)
...@@ -205,6 +205,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -205,6 +205,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetOwnerPlayer(tp)
if Duel.GetTurnPlayer()~=tp then if Duel.GetTurnPlayer()~=tp then
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
else else
...@@ -213,5 +214,5 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -213,5 +214,5 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.condition(e) function cm.condition(e)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()~=tp return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()~=e:GetOwnerPlayer()
end end
\ No newline at end of file
...@@ -25,6 +25,8 @@ function cm.filter(c) ...@@ -25,6 +25,8 @@ function cm.filter(c)
return c:IsCode(15003062) and not c:IsPublic() return c:IsCode(15003062) and not c:IsPublic()
end end
function cm.lmop(e) function cm.lmop(e)
if cm[0] then return end
cm[0]=true
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
......
...@@ -17,12 +17,12 @@ function c33700402.initial_effect(c) ...@@ -17,12 +17,12 @@ function c33700402.initial_effect(c)
end end
function c33700402.condition(e,tp,eg,ep,ev,re,r,rp) function c33700402.condition(e,tp,eg,ep,ev,re,r,rp)
local ecount = Duel.GetCustomActivityCount(33700302,1-tp,ACTIVITY_CHAIN) local ecount = Duel.GetCustomActivityCount(33700302,1-tp,ACTIVITY_CHAIN)
return ecount >= 7 return ecount >= 7 and Duel.GetCurrentPhase()~=PHASE_END
end end
function c33700402.operation(e,tp,eg,ep,ev,re,r,rp) function c33700402.operation(e,tp,eg,ep,ev,re,r,rp)
local ecount = Duel.GetCustomActivityCount(33700302,1-tp,ACTIVITY_CHAIN) local ecount = Duel.GetCustomActivityCount(33700302,1-tp,ACTIVITY_CHAIN)
local cph = Duel.GetCurrentPhase() local cph = Duel.GetCurrentPhase()
local turn = {PHASE_STANDBY,PHASE_MAIN1,PHASE_BATTLE,PHASE_MAIN2,PHASE_END} local turn = {PHASE_STANDBY,PHASE_MAIN1,PHASE_BATTLE,PHASE_MAIN2}
for _,ph in pairs(turn) do for _,ph in pairs(turn) do
if cph <= ph then if cph <= ph then
Duel.SkipPhase(Duel.GetTurnPlayer(),ph,RESET_PHASE+PHASE_END,1) Duel.SkipPhase(Duel.GetTurnPlayer(),ph,RESET_PHASE+PHASE_END,1)
......
...@@ -10,7 +10,7 @@ function cm.initial_effect(c) ...@@ -10,7 +10,7 @@ function cm.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(POS_FACEUP,1) e1:SetTargetRange(POS_FACEUP,0)
e1:SetCondition(cm.spcon) e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -29,10 +29,11 @@ function cm.spcon(e,c) ...@@ -29,10 +29,11 @@ function cm.spcon(e,c)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler() local c=e:GetHandler()
local res=false
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,3,3,nil) local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,3,3,nil)
if g:IsExists(Card.IsControler,1,nil,1-tp) then if g:IsExists(Card.IsControler,1,nil,1-tp) then
e:SetTargetRange(POS_FACEUP,0) res=true
end end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -57,6 +58,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -57,6 +58,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
if res then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
...@@ -65,6 +67,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -65,6 +67,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetLabelObject(c) e3:SetLabelObject(c)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp,c) function cm.op(e,tp,eg,ep,ev,re,r,rp,c)
Duel.GetControl(e:GetLabelObject(),1-tp) Duel.GetControl(e:GetLabelObject(),1-tp)
......
...@@ -26,6 +26,7 @@ function cm.initial_effect(c) ...@@ -26,6 +26,7 @@ function cm.initial_effect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e7:SetProperty(EFFECT_FLAG_DELAY) e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCode(EVENT_DRAW) e7:SetCode(EVENT_DRAW)
e7:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e7:SetRange(LOCATION_MZONE) e7:SetRange(LOCATION_MZONE)
e7:SetCondition(cm.con1) e7:SetCondition(cm.con1)
e7:SetTarget(cm.tg1) e7:SetTarget(cm.tg1)
......
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