Commit 4af4efde authored by POLYMER's avatar POLYMER

fix

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