Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-scripts
Commits
88adb0e3
Commit
88adb0e3
authored
Feb 22, 2019
by
mercury233
Committed by
GitHub
Feb 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Auxiliary.GCheckAdditional (#1152)
parent
b1fce4ae
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
139 additions
and
20 deletions
+139
-20
c31444249.lua
c31444249.lua
+15
-2
c48144509.lua
c48144509.lua
+15
-2
c65801012.lua
c65801012.lua
+15
-2
c76647978.lua
c76647978.lua
+7
-0
c87931906.lua
c87931906.lua
+15
-2
utility.lua
utility.lua
+72
-12
No files found.
c31444249.lua
View file @
88adb0e3
...
...
@@ -59,6 +59,9 @@ end
function
c31444249
.
fcheck
(
tp
,
sg
,
fc
)
return
sg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
<=
6
end
function
c31444249
.
fcheck
(
sg
)
return
sg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
<=
6
end
function
c31444249
.
dmcon
(
tp
)
return
not
Duel
.
IsExistingMatchingCard
(
aux
.
FilterEqualFunction
(
Card
.
GetSummonLocation
,
LOCATION_EXTRA
),
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
aux
.
FilterEqualFunction
(
Card
.
GetSummonLocation
,
LOCATION_EXTRA
),
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
...
...
@@ -72,10 +75,12 @@ function c31444249.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if
sg
:
GetCount
()
>
0
then
mg1
:
Merge
(
sg
)
Auxiliary
.
FCheckAdditional
=
c31444249
.
fcheck
Auxiliary
.
GCheckAdditional
=
c31444249
.
gcheck
end
end
local
res
=
Duel
.
IsExistingMatchingCard
(
c31444249
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
...
...
@@ -100,9 +105,13 @@ function c31444249.spop(e,tp,eg,ep,ev,re,r,rp)
exmat
=
true
end
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c31444249
.
fcheck
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c31444249
.
fcheck
Auxiliary
.
GCheckAdditional
=
c31444249
.
gcheck
end
local
sg1
=
Duel
.
GetMatchingGroup
(
c31444249
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
...
...
@@ -119,9 +128,13 @@ function c31444249.spop(e,tp,eg,ep,ev,re,r,rp)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c31444249
.
fcheck
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c31444249
.
fcheck
Auxiliary
.
GCheckAdditional
=
c31444249
.
gcheck
end
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
...
...
c48144509.lua
View file @
88adb0e3
...
...
@@ -26,6 +26,9 @@ end
function
c48144509
.
fcheck
(
tp
,
sg
,
fc
)
return
sg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_EXTRA
)
<=
2
end
function
c48144509
.
gcheck
(
sg
)
return
sg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_EXTRA
)
<=
2
end
function
c48144509
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
...
...
@@ -35,10 +38,12 @@ function c48144509.target(e,tp,eg,ep,ev,re,r,rp,chk)
if
sg
:
GetCount
()
>
0
then
mg1
:
Merge
(
sg
)
Auxiliary
.
FCheckAdditional
=
c48144509
.
fcheck
Auxiliary
.
GCheckAdditional
=
c48144509
.
gcheck
end
end
local
res
=
Duel
.
IsExistingMatchingCard
(
c48144509
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
...
...
@@ -63,9 +68,13 @@ function c48144509.activate(e,tp,eg,ep,ev,re,r,rp)
exmat
=
true
end
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c48144509
.
fcheck
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c48144509
.
fcheck
Auxiliary
.
GCheckAdditional
=
c48144509
.
gcheck
end
local
sg1
=
Duel
.
GetMatchingGroup
(
c48144509
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
...
...
@@ -83,9 +92,13 @@ function c48144509.activate(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
tg
:
GetFirst
()
mg1
:
RemoveCard
(
tc
)
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c48144509
.
fcheck
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c48144509
.
fcheck
Auxiliary
.
GCheckAdditional
=
c48144509
.
gcheck
end
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
...
...
c65801012.lua
View file @
88adb0e3
...
...
@@ -28,6 +28,9 @@ end
function
c65801012
.
fcheck
(
tp
,
sg
,
fc
)
return
sg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
<=
1
end
function
c65801012
.
gcheck
(
sg
)
return
sg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
<=
1
end
function
c65801012
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
...
...
@@ -37,10 +40,12 @@ function c65801012.target(e,tp,eg,ep,ev,re,r,rp,chk)
if
sg
:
GetCount
()
>
0
then
mg1
:
Merge
(
sg
)
Auxiliary
.
FCheckAdditional
=
c65801012
.
fcheck
Auxiliary
.
GCheckAdditional
=
c65801012
.
gcheck
end
end
local
res
=
Duel
.
IsExistingMatchingCard
(
c65801012
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
...
...
@@ -65,9 +70,13 @@ function c65801012.activate(e,tp,eg,ep,ev,re,r,rp)
exmat
=
true
end
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c65801012
.
fcheck
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c65801012
.
fcheck
Auxiliary
.
GCheckAdditional
=
c65801012
.
gcheck
end
local
sg1
=
Duel
.
GetMatchingGroup
(
c65801012
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
...
...
@@ -85,9 +94,13 @@ function c65801012.activate(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
tg
:
GetFirst
()
mg1
:
RemoveCard
(
tc
)
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c65801012
.
fcheck
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c65801012
.
fcheck
Auxiliary
.
GCheckAdditional
=
c65801012
.
gcheck
end
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
tc
:
SetMaterial
(
mat1
)
local
rg
=
mat1
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
mat1
:
Sub
(
rg
)
...
...
c76647978.lua
View file @
88adb0e3
...
...
@@ -30,6 +30,9 @@ end
function
c76647978
.
fcheck
(
tp
,
sg
,
fc
)
return
#
sg
<=
2
end
function
c76647978
.
gcheck
(
sg
)
return
#
sg
<=
2
end
function
c76647978
.
filter1
(
c
,
e
)
return
c
:
IsOnField
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
...
...
@@ -42,6 +45,7 @@ function c76647978.target(e,tp,eg,ep,ev,re,r,rp,chk)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsOnField
,
nil
)
Auxiliary
.
FCheckAdditional
=
c76647978
.
fcheck
Auxiliary
.
GCheckAdditional
=
c76647978
.
gcheck
local
res
=
Duel
.
IsExistingMatchingCard
(
c76647978
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
...
...
@@ -53,6 +57,7 @@ function c76647978.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
...
...
@@ -64,6 +69,7 @@ function c76647978.activate(e,tp,eg,ep,ev,re,r,rp)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c76647978
.
filter1
,
nil
,
e
)
Auxiliary
.
FCheckAdditional
=
c76647978
.
fcheck
Auxiliary
.
GCheckAdditional
=
c76647978
.
gcheck
local
sg1
=
Duel
.
GetMatchingGroup
(
c76647978
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
...
...
@@ -96,6 +102,7 @@ function c76647978.activate(e,tp,eg,ep,ev,re,r,rp)
e
:
GetLabelObject
():
SetLabelObject
(
tc
)
end
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
end
function
c76647978
.
mgfilter
(
c
,
e
,
tp
,
fusc
,
mg
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
...
...
c87931906.lua
View file @
88adb0e3
...
...
@@ -26,6 +26,9 @@ end
function
c87931906
.
fcheck
(
tp
,
sg
,
fc
)
return
sg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
<=
1
end
function
c87931906
.
gcheck
(
sg
)
return
sg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
<=
1
end
function
c87931906
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
...
...
@@ -35,10 +38,12 @@ function c87931906.target(e,tp,eg,ep,ev,re,r,rp,chk)
if
mg2
:
GetCount
()
>
0
then
mg1
:
Merge
(
mg2
)
Auxiliary
.
FCheckAdditional
=
c87931906
.
fcheck
Auxiliary
.
GCheckAdditional
=
c87931906
.
gcheck
end
end
local
res
=
Duel
.
IsExistingMatchingCard
(
c87931906
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
...
...
@@ -63,9 +68,13 @@ function c87931906.activate(e,tp,eg,ep,ev,re,r,rp)
exmat
=
true
end
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c87931906
.
fcheck
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c87931906
.
fcheck
Auxiliary
.
GCheckAdditional
=
c87931906
.
gcheck
end
local
sg1
=
Duel
.
GetMatchingGroup
(
c87931906
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
local
mg3
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
...
...
@@ -83,9 +92,13 @@ function c87931906.activate(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
tg
:
GetFirst
()
mg1
:
RemoveCard
(
tc
)
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c87931906
.
fcheck
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c87931906
.
fcheck
Auxiliary
.
GCheckAdditional
=
c87931906
.
gcheck
end
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
...
...
utility.lua
View file @
88adb0e3
...
...
@@ -534,6 +534,11 @@ function Auxiliary.TuneMagicianCheckX(c,sg,ecode)
end
return
false
end
function
Auxiliary
.
TuneMagicianCheckAdditionalX
(
ecode
)
return
function
(
g
)
return
not
g
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
g
,
ecode
)
end
end
function
Auxiliary
.
XyzAlterFilter
(
c
,
alterf
,
xyzc
,
e
,
tp
,
op
)
return
alterf
(
c
)
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
xyzc
)
>
0
and
Auxiliary
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
and
(
not
op
or
op
(
e
,
tp
,
0
,
c
))
end
...
...
@@ -750,7 +755,6 @@ function Auxiliary.XyzLevelFreeFilter(c,xyzc,f)
return
c
:
IsFaceup
()
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
(
not
f
or
f
(
c
,
xyzc
))
end
function
Auxiliary
.
XyzLevelFreeGoal
(
g
,
tp
,
xyzc
,
gf
)
if
g
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
g
,
EFFECT_TUNE_MAGICIAN_X
)
then
return
false
end
return
(
not
gf
or
gf
(
g
))
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
xyzc
)
>
0
end
function
Auxiliary
.
XyzLevelFreeCondition
(
f
,
gf
,
minct
,
maxct
)
...
...
@@ -774,7 +778,10 @@ function Auxiliary.XyzLevelFreeCondition(f,gf,minct,maxct)
local
sg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
if
sg
:
IsExists
(
Auxiliary
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
Duel
.
SetSelectedCard
(
sg
)
return
mg
:
CheckSubGroup
(
Auxiliary
.
XyzLevelFreeGoal
,
minc
,
maxc
,
tp
,
c
,
gf
)
Auxiliary
.
GCheckAdditional
=
Auxiliary
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
local
res
=
mg
:
CheckSubGroup
(
Auxiliary
.
XyzLevelFreeGoal
,
minc
,
maxc
,
tp
,
c
,
gf
)
Auxiliary
.
GCheckAdditional
=
nil
return
res
end
end
function
Auxiliary
.
XyzLevelFreeTarget
(
f
,
gf
,
minct
,
maxct
)
...
...
@@ -797,7 +804,9 @@ function Auxiliary.XyzLevelFreeTarget(f,gf,minct,maxct)
local
sg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
Auxiliary
.
GCheckAdditional
=
Auxiliary
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
local
g
=
mg
:
SelectSubGroup
(
tp
,
Auxiliary
.
XyzLevelFreeGoal
,
true
,
minc
,
maxc
,
tp
,
c
,
gf
)
Auxiliary
.
GCheckAdditional
=
nil
if
g
and
g
:
GetCount
()
>
0
then
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
...
...
@@ -868,7 +877,10 @@ function Auxiliary.XyzLevelFreeCondition2(f,gf,minct,maxct,alterf,desc,op)
local
sg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
if
sg
:
IsExists
(
Auxiliary
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
Duel
.
SetSelectedCard
(
sg
)
return
mg
:
CheckSubGroup
(
Auxiliary
.
XyzLevelFreeGoal
,
minc
,
maxc
,
tp
,
c
,
gf
)
Auxiliary
.
GCheckAdditional
=
Auxiliary
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
local
res
=
mg
:
CheckSubGroup
(
Auxiliary
.
XyzLevelFreeGoal
,
minc
,
maxc
,
tp
,
c
,
gf
)
Auxiliary
.
GCheckAdditional
=
nil
return
res
end
end
function
Auxiliary
.
XyzLevelFreeTarget2
(
f
,
gf
,
minct
,
maxct
,
alterf
,
desc
,
op
)
...
...
@@ -903,7 +915,9 @@ function Auxiliary.XyzLevelFreeTarget2(f,gf,minct,maxct,alterf,desc,op)
e
:
SetLabel
(
0
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
Auxiliary
.
GCheckAdditional
=
Auxiliary
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
g
=
mg2
:
SelectSubGroup
(
tp
,
Auxiliary
.
XyzLevelFreeGoal
,
true
,
minc
,
maxc
,
tp
,
c
,
gf
)
Auxiliary
.
GCheckAdditional
=
nil
end
if
g
and
g
:
GetCount
()
>
0
then
g
:
KeepAlive
()
...
...
@@ -1400,6 +1414,31 @@ function Auxiliary.RitualCheckEqual(g,c,lv)
end
function
Auxiliary
.
RitualCheck
(
g
,
tp
,
c
,
lv
,
greater_or_equal
)
return
Auxiliary
[
"RitualCheck"
..
greater_or_equal
](
g
,
c
,
lv
)
and
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
and
(
not
c
.
mat_group_check
or
c
.
mat_group_check
(
g
,
tp
))
end
function
Auxiliary
.
RitualCheckAdditionalLevel
(
c
,
rc
)
local
raw_level
=
c
:
GetRitualLevel
(
rc
)
local
lv1
=
raw_level
&
0xffff
local
lv2
=
raw_level
>>
16
if
lv2
>
0
then
return
math.min
(
lv1
,
lv2
)
else
return
lv1
end
end
function
Auxiliary
.
RitualCheckAdditional
(
c
,
lv
,
greater_or_equal
)
if
greater_or_equal
==
"Equal"
then
return
function
(
g
)
return
g
:
GetSum
(
Auxiliary
.
RitualCheckAdditionalLevel
,
c
)
<=
lv
end
else
return
function
(
g
,
ec
)
if
ec
then
return
g
:
GetSum
(
Auxiliary
.
RitualCheckAdditionalLevel
,
c
)
-
Auxiliary
.
RitualCheckAdditionalLevel
(
ec
,
c
)
<=
lv
else
return
true
end
end
end
end
function
Auxiliary
.
RitualUltimateFilter
(
c
,
filter
,
e
,
tp
,
m1
,
m2
,
level_function
,
greater_or_equal
)
if
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
(
filter
and
not
filter
(
c
,
e
,
tp
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
...
...
@@ -1412,7 +1451,11 @@ function Auxiliary.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,great
else
mg
:
RemoveCard
(
c
)
end
return
mg
:
CheckSubGroup
(
Auxiliary
.
RitualCheck
,
1
,
level_function
(
c
),
tp
,
c
,
level_function
(
c
),
greater_or_equal
)
local
lv
=
level_function
(
c
)
Auxiliary
.
GCheckAdditional
=
Auxiliary
.
RitualCheckAdditional
(
c
,
lv
,
greater_or_equal
)
local
res
=
mg
:
CheckSubGroup
(
Auxiliary
.
RitualCheck
,
1
,
lv
,
tp
,
c
,
lv
,
greater_or_equal
)
Auxiliary
.
GCheckAdditional
=
nil
return
res
end
function
Auxiliary
.
RitualExtraFilter
(
c
,
f
)
return
c
:
GetLevel
()
>
0
and
f
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemove
()
...
...
@@ -1453,7 +1496,10 @@ function Auxiliary.RitualUltimateOperation(filter,level_function,greater_or_equa
mg
:
RemoveCard
(
tc
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
:
SelectSubGroup
(
tp
,
Auxiliary
.
RitualCheck
,
false
,
1
,
level_function
(
tc
),
tp
,
tc
,
level_function
(
tc
),
greater_or_equal
)
local
lv
=
level_function
(
tc
)
Auxiliary
.
GCheckAdditional
=
Auxiliary
.
RitualCheckAdditional
(
tc
,
lv
,
greater_or_equal
)
local
mat
=
mg
:
SelectSubGroup
(
tp
,
Auxiliary
.
RitualCheck
,
false
,
1
,
lv
,
tp
,
tc
,
lv
,
greater_or_equal
)
Auxiliary
.
GCheckAdditional
=
nil
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
...
...
@@ -1601,10 +1647,12 @@ function Auxiliary.PendCondition()
return
g
:
IsExists
(
Auxiliary
.
PConditionFilter
,
1
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
end
end
function
Auxiliary
.
PendOperationCheck
(
g
,
ft1
,
ft2
,
ft
)
local
exg
=
g
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_EXTRA
)
local
mg
=
g
-
exg
return
#
g
<=
ft
and
#
exg
<=
ft2
and
#
mg
<=
ft1
function
Auxiliary
.
PendOperationCheck
(
ft1
,
ft2
,
ft
)
return
function
(
g
)
local
exg
=
g
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_EXTRA
)
local
mg
=
g
-
exg
return
#
g
<=
ft
and
#
exg
<=
ft2
and
#
mg
<=
ft1
end
end
function
Auxiliary
.
PendOperation
()
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
...
...
@@ -1656,7 +1704,9 @@ function Auxiliary.PendOperation()
tg
=
tg
:
Filter
(
Auxiliary
.
PConditionExtraFilterSpecific
,
nil
,
e
,
tp
,
lscale
,
rscale
,
ce
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
tg
:
SelectSubGroup
(
tp
,
Auxiliary
.
PendOperationCheck
,
true
,
1
,
math.min
(
#
tg
,
ft
),
ft1
,
ft2
,
ft
)
Auxiliary
.
GCheckAdditional
=
Auxiliary
.
PendOperationCheck
(
ft1
,
ft2
,
ft
)
local
g
=
tg
:
SelectSubGroup
(
tp
,
aux
.
TRUE
,
true
,
1
,
math.min
(
#
tg
,
ft
),
ft1
,
ft2
,
ft
)
Auxiliary
.
GCheckAdditional
=
nil
if
not
g
then
return
end
if
ce
then
Duel
.
Hint
(
HINT_CARD
,
0
,
ce
:
GetOwner
():
GetOriginalCode
())
...
...
@@ -2009,8 +2059,13 @@ function Auxiliary.GetMultiLinkedZone(tp)
return
multi_linked_zone
end
Auxiliary
.
SubGroupCaptured
=
nil
Auxiliary
.
GCheckAdditional
=
nil
function
Auxiliary
.
CheckGroupRecursive
(
c
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
sg
:
AddCard
(
c
)
if
Auxiliary
.
GCheckAdditional
and
not
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
g
,
f
,
min
,
max
,
ext_params
)
then
sg
:
RemoveCard
(
c
)
return
false
end
local
res
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
)))
or
(
#
sg
<
max
and
g
:
IsExists
(
Auxiliary
.
CheckGroupRecursive
,
1
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
))
sg
:
RemoveCard
(
c
)
...
...
@@ -2018,6 +2073,10 @@ function Auxiliary.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
end
function
Auxiliary
.
CheckGroupRecursiveCapture
(
c
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
sg
:
AddCard
(
c
)
if
Auxiliary
.
GCheckAdditional
and
not
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
g
,
f
,
min
,
max
,
ext_params
)
then
sg
:
RemoveCard
(
c
)
return
false
end
local
res
=#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
))
if
res
then
Auxiliary
.
SubGroupCaptured
:
Clear
()
...
...
@@ -2034,8 +2093,9 @@ function Group.CheckSubGroup(g,f,min,max,...)
if
min
>
max
then
return
false
end
local
ext_params
=
{
...
}
local
sg
=
Duel
.
GrabSelectedCard
()
if
#
sg
>
max
or
#
(
g
+
sg
)
<
min
or
#
sg
==
max
and
not
f
(
sg
,
...
)
then
return
false
end
if
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
)
then
return
true
end
if
#
sg
>
max
or
#
(
g
+
sg
)
<
min
then
return
false
end
if
#
sg
==
max
and
(
not
f
(
sg
,
...
)
or
Auxiliary
.
GCheckAdditional
and
not
Auxiliary
.
GCheckAdditional
(
sg
,
nil
,
g
,
f
,
min
,
max
,
ext_params
))
then
return
false
end
if
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
)
and
(
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
nil
,
g
,
f
,
min
,
max
,
ext_params
))
then
return
true
end
local
eg
=
g
:
Clone
()
for
c
in
aux
.
Next
(
g
-
sg
)
do
if
Auxiliary
.
CheckGroupRecursive
(
c
,
sg
,
eg
,
f
,
min
,
max
,
ext_params
)
then
return
true
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment