Commit 9ff876d1 authored by Huangnan's avatar Huangnan

fix

parent c02da634
Pipeline #39076 failed with stages
in 3 minutes and 52 seconds
......@@ -27,9 +27,10 @@ function s.poscon1(e,tp,eg,ep,ev,re,r,rp)
if eg:GetCount()>1 then return false end
local c=e:GetHandler()
local tc=eg:GetFirst()
return tc:IsControler(1-tp) and tc:IsPosition(POS_FACEUP) and c:IsCanChangePosition()
return tc:IsControler(1-tp) and tc:IsPosition(POS_FACEUP) and c:IsCanChangePosition() and not tc:IsType(TYPE_LINK)
end
function s.poscost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAttackPos() end
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE)
end
......
......@@ -115,10 +115,12 @@ function s.spfilter(c,e,tp)
and c:IsFaceupEx()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if #sg>0 then
......
......@@ -46,25 +46,35 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e:Reset()
end)
tc:RegisterEffect(e2)
--summon with 3 tribute
local e1=Effect.CreateEffect(tc)
e1:SetDescription(aux.Stringid(10000010,2))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(cm.ttcon)
e1:SetOperation(cm.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
tc:RegisterEffect(e1)
if tc:IsOriginalCodeRule(10000040) then
--summon with 3 tribute
local e1=Effect.CreateEffect(tc)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(cm.ttcon)
e1:SetOperation(cm.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
e1:SetReset(RESETS_STANDARD+RESET_EVENT)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(tc)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LIMIT_SET_PROC)
e2:SetCondition(cm.ttcon)
e2:SetOperation(cm.ttop)
e2:SetValue(SUMMON_TYPE_ADVANCE)
e2:SetReset(RESETS_STANDARD+RESET_EVENT)
tc:RegisterEffect(e2)
end
end
end
function cm.ttcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function cm.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
\ No newline at end of file
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