Commit c606a3a0 authored by gggg's avatar gggg

Merge branch 'master' into develop

parents 4e9ec5f0 4222a5cd
Pipeline #35670 failed with stage
in 45 seconds
......@@ -16,7 +16,8 @@ redtext:
- cd ygopro
- rm -rf expansions
- ln -s ../expansions .
- ls expansions/*.cdb | xargs -I '{}' sqlite3 {} "select id from datas where type != 0x11 and (type & 0x4000) = 0;" | xargs -I {} ./ygopro {} 2>&1 | tee ../redtext.txt
- ls expansions/*.cdb | xargs -I '{}' sqlite3 {} "select id from datas where type != 0x11 and (type & 0x4000) = 0;" | xargs -I {} -P $(nproc) bash -c './ygopro {} 2>&1 | tee ../redtext-{}.txt'
- cd ..
- cat redtext-*.txt > redtext.txt
# if there are any lines in redtext.txt fail the job
- exit $(wc -l < redtext.txt)
No preview for this file type
......@@ -19,7 +19,7 @@ function cm.initial_effect(c)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return Senya.check_set_elem(c) or not c:IsType(TYPE_XYZ) or c:GetSummonLocation()~=LOCATION_EXTRA
return Senya.check_set_elem(c) or c:IsType(TYPE_XYZ) or c:GetSummonLocation()~=LOCATION_EXTRA
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 and
......
......@@ -169,7 +169,7 @@ end
function cm.rcon(e,tp,eg,ep,ev,re,r,rp)
local ct=(ev & 0xffff)
return (r & REASON_COST)~=0 and re:GetHandler()==e:GetHandler() and re:IsHasType(0x7e0)
return (r & REASON_COST)~=0 and re:GetHandler()==e:GetHandler() and re:IsHasType(0x7e0) and Senya.check_set_elem(e:GetHandler())
end
function cm.rop(e,tp,eg,ep,ev,re,r,rp)
e:Reset()
......
......@@ -17,7 +17,7 @@ function cm.initial_effect(c)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return Senya.check_set_elem(c) or not c:IsType(TYPE_XYZ) or c:GetSummonLocation()~=LOCATION_EXTRA
return Senya.check_set_elem(c) or c:IsType(TYPE_XYZ) or c:GetSummonLocation()~=LOCATION_EXTRA
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
......
......@@ -149,13 +149,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.PConditionFilter(c,e,tp,lscale,rscale)
local lv=0
if c.pendulum_level then
lv=c.pendulum_level
else
lv=c:GetLevel()
end
function cm.PConditionFilter(c,e,tp)
local bool=Auxiliary.PendulumSummonableBool(c)
return (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool)
......@@ -163,27 +157,15 @@ function cm.PConditionFilter(c,e,tp,lscale,rscale)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c0=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local c1=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if not c0 or not c1 then return false end
local lscale=c0:GetLeftScale()
local rscale=c1:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
local g=Duel.GetFieldGroup(tp,loc,0)
return g:IsExists(cm.PConditionFilter,1,nil,e,tp,lscale,rscale)
return g:IsExists(cm.PConditionFilter,1,nil,e,tp)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c0=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local c1=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if not c0 or not c1 then return false end
local lscale=c0:GetLeftScale()
local rscale=c1:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local loc=0
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
......@@ -200,11 +182,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(cm.PConditionFilter,tp,loc,0,nil,e,tp,lscale,rscale)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Auxiliary.GCheckAdditional=Auxiliary.PendOperationCheck(ft1,ft2,ft)
local g=tg:SelectSubGroup(tp,Auxiliary.TRUE,true,1,math.min(#tg,ft,2))
local g=tg:SelectSubGroup(tp,Auxiliary.TRUE,false,1,math.min(#tg,ft,2))
Auxiliary.GCheckAdditional=nil
if not g then return end
Duel.HintSelection(Group.FromCards(c0))
Duel.HintSelection(Group.FromCards(c1))
Duel.SpecialSummon(g,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -57,9 +57,6 @@ function s.xyzcon(e,c,og,min,max)
maxc=math.min(maxc,max)
end
if maxc<minc then return false end
if og then
return false
end
local mg=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
if og and not og:Equal(mg) then return false end
local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
......
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