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
List
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
八宫一月
ygopro-scripts
Commits
6142fe0e
Commit
6142fe0e
authored
Dec 25, 2019
by
mercury233
Committed by
GitHub
Dec 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Auxiliary.gfcheck, gffcheck (#1286)
parent
10b125f5
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
49 additions
and
235 deletions
+49
-235
c11366199.lua
c11366199.lua
+3
-22
c19028307.lua
c19028307.lua
+5
-23
c25460258.lua
c25460258.lua
+3
-23
c38695361.lua
c38695361.lua
+3
-22
c55591586.lua
c55591586.lua
+3
-23
c72989439.lua
c72989439.lua
+3
-23
c82301904.lua
c82301904.lua
+3
-23
c86559484.lua
c86559484.lua
+3
-22
c9596126.lua
c9596126.lua
+3
-23
c99365553.lua
c99365553.lua
+6
-31
utility.lua
utility.lua
+14
-0
No files found.
c11366199.lua
View file @
6142fe0e
...
@@ -44,30 +44,11 @@ end
...
@@ -44,30 +44,11 @@ end
function
c11366199
.
spcostfilter
(
c
)
function
c11366199
.
spcostfilter
(
c
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
+
ATTRIBUTE_DARK
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
+
ATTRIBUTE_DARK
)
end
end
function
c11366199
.
spcost_selector
(
c
,
tp
,
g
,
sg
,
i
)
sg
:
AddCard
(
c
)
g
:
RemoveCard
(
c
)
local
flag
=
false
if
i
<
2
then
flag
=
g
:
IsExists
(
c11366199
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
i
+
1
)
else
flag
=
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_WIND
)
>
0
and
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_DARK
)
>
0
end
sg
:
RemoveCard
(
c
)
g
:
AddCard
(
c
)
return
flag
end
function
c11366199
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c11366199
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c11366199
.
spcostfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
-
e
:
GetHandler
():
GetLocation
(),
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c11366199
.
spcostfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
-
e
:
GetHandler
():
GetLocation
(),
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
if
chk
==
0
then
return
g
:
CheckSubGroup
(
aux
.
gfcheck
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_WIND
,
ATTRIBUTE_DARK
)
end
if
chk
==
0
then
return
g
:
IsExists
(
c11366199
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
1
)
end
for
i
=
1
,
2
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c11366199
.
spcost_selector
,
1
,
1
,
nil
,
tp
,
g
,
sg
,
i
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
gfcheck
,
false
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_WIND
,
ATTRIBUTE_DARK
)
sg
:
Merge
(
g1
)
g
:
Sub
(
g1
)
end
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c11366199
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c11366199
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
c19028307.lua
View file @
6142fe0e
...
@@ -18,36 +18,18 @@ end
...
@@ -18,36 +18,18 @@ end
function
c19028307
.
spcostfilter
(
c
)
function
c19028307
.
spcostfilter
(
c
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsRace
(
RACE_BEASTWARRIOR
+
RACE_MACHINE
)
and
(
not
c
:
IsLocation
(
LOCATION_MZONE
)
or
c
:
IsFaceup
())
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsRace
(
RACE_BEASTWARRIOR
+
RACE_MACHINE
)
and
(
not
c
:
IsLocation
(
LOCATION_MZONE
)
or
c
:
IsFaceup
())
end
end
function
c19028307
.
spcost_selector
(
c
,
tp
,
g
,
sg
,
i
)
function
c19028307
.
spcheck
(
sg
,
tp
)
sg
:
AddCard
(
c
)
return
Duel
.
GetMZoneCount
(
tp
,
sg
,
tp
)
>
0
and
aux
.
gfcheck
(
sg
,
Card
.
IsRace
,
RACE_BEASTWARRIOR
,
RACE_MACHINE
)
g
:
RemoveCard
(
c
)
local
flag
=
false
if
i
<
2
then
flag
=
g
:
IsExists
(
c19028307
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
i
+
1
)
else
flag
=
Duel
.
GetMZoneCount
(
tp
,
sg
,
tp
)
>
0
and
sg
:
FilterCount
(
Card
.
IsRace
,
nil
,
RACE_BEASTWARRIOR
)
>
0
and
sg
:
FilterCount
(
Card
.
IsRace
,
nil
,
RACE_MACHINE
)
>
0
end
sg
:
RemoveCard
(
c
)
g
:
AddCard
(
c
)
return
flag
end
end
function
c19028307
.
spcon
(
e
,
c
)
function
c19028307
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
g
=
Duel
.
GetMatchingGroup
(
c19028307
.
spcostfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c19028307
.
spcostfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
c
)
local
sg
=
Group
.
CreateGroup
()
return
g
:
CheckSubGroup
(
c19028307
.
spcheck
,
2
,
2
,
tp
)
return
g
:
IsExists
(
c19028307
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
1
)
end
end
function
c19028307
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c19028307
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c19028307
.
spcostfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c19028307
.
spcostfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
c
)
local
sg
=
Group
.
CreateGroup
()
for
i
=
1
,
2
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c19028307
.
spcost_selector
,
1
,
1
,
nil
,
tp
,
g
,
sg
,
i
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
c19028307
.
spcheck
,
false
,
2
,
2
,
tp
)
sg
:
Merge
(
g1
)
g
:
Sub
(
g1
)
end
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
end
end
c25460258.lua
View file @
6142fe0e
...
@@ -25,37 +25,17 @@ end
...
@@ -25,37 +25,17 @@ end
function
c25460258
.
spcostfilter
(
c
)
function
c25460258
.
spcostfilter
(
c
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
end
end
function
c25460258
.
spcost_selector
(
c
,
tp
,
g
,
sg
,
i
)
sg
:
AddCard
(
c
)
g
:
RemoveCard
(
c
)
local
flag
=
false
if
i
<
2
then
flag
=
g
:
IsExists
(
c25460258
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
i
+
1
)
else
flag
=
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_LIGHT
)
>
0
and
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_DARK
)
>
0
end
sg
:
RemoveCard
(
c
)
g
:
AddCard
(
c
)
return
flag
end
function
c25460258
.
spcon
(
e
,
c
)
function
c25460258
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c25460258
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c25460258
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
return
g
:
CheckSubGroup
(
aux
.
gfcheck
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
return
g
:
IsExists
(
c25460258
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
1
)
end
end
function
c25460258
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c25460258
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c25460258
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c25460258
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
for
i
=
1
,
2
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c25460258
.
spcost_selector
,
1
,
1
,
nil
,
tp
,
g
,
sg
,
i
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
gfcheck
,
false
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
sg
:
Merge
(
g1
)
g
:
Sub
(
g1
)
end
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c25460258
.
cfilter
(
c
)
function
c25460258
.
cfilter
(
c
)
...
...
c38695361.lua
View file @
6142fe0e
...
@@ -83,31 +83,12 @@ end
...
@@ -83,31 +83,12 @@ end
function
c38695361
.
spcostfilter
(
c
)
function
c38695361
.
spcostfilter
(
c
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
end
end
function
c38695361
.
spcost_selector
(
c
,
tp
,
g
,
sg
,
i
)
sg
:
AddCard
(
c
)
g
:
RemoveCard
(
c
)
local
flag
=
false
if
i
<
2
then
flag
=
g
:
IsExists
(
c38695361
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
i
+
1
)
else
flag
=
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_LIGHT
)
>
0
and
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_DARK
)
>
0
end
sg
:
RemoveCard
(
c
)
g
:
AddCard
(
c
)
return
flag
end
function
c38695361
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c38695361
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c38695361
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c38695361
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
c
)
local
sg
=
Group
.
CreateGroup
()
if
chk
==
0
then
return
g
:
CheckSubGroup
(
aux
.
gfcheck
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
end
if
chk
==
0
then
return
g
:
IsExists
(
c38695361
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
1
)
end
for
i
=
1
,
2
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c38695361
.
spcost_selector
,
1
,
1
,
nil
,
tp
,
g
,
sg
,
i
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
gfcheck
,
false
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
sg
:
Merge
(
g1
)
g
:
Sub
(
g1
)
end
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c38695361
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c38695361
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
c55591586.lua
View file @
6142fe0e
...
@@ -58,37 +58,17 @@ end
...
@@ -58,37 +58,17 @@ end
function
c55591586
.
spcostfilter
(
c
)
function
c55591586
.
spcostfilter
(
c
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
end
end
function
c55591586
.
spcost_selector
(
c
,
tp
,
g
,
sg
,
i
)
sg
:
AddCard
(
c
)
g
:
RemoveCard
(
c
)
local
flag
=
false
if
i
<
2
then
flag
=
g
:
IsExists
(
c55591586
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
i
+
1
)
else
flag
=
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_LIGHT
)
>
0
and
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_DARK
)
>
0
end
sg
:
RemoveCard
(
c
)
g
:
AddCard
(
c
)
return
flag
end
function
c55591586
.
spcon
(
e
,
c
)
function
c55591586
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c55591586
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c55591586
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
return
g
:
CheckSubGroup
(
aux
.
gfcheck
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
return
g
:
IsExists
(
c55591586
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
1
)
end
end
function
c55591586
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c55591586
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c55591586
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c55591586
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
for
i
=
1
,
2
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c55591586
.
spcost_selector
,
1
,
1
,
nil
,
tp
,
g
,
sg
,
i
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
gfcheck
,
false
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
sg
:
Merge
(
g1
)
g
:
Sub
(
g1
)
end
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c55591586
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c55591586
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
c72989439.lua
View file @
6142fe0e
...
@@ -35,37 +35,17 @@ end
...
@@ -35,37 +35,17 @@ end
function
c72989439
.
spcostfilter
(
c
)
function
c72989439
.
spcostfilter
(
c
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
end
end
function
c72989439
.
spcost_selector
(
c
,
tp
,
g
,
sg
,
i
)
sg
:
AddCard
(
c
)
g
:
RemoveCard
(
c
)
local
flag
=
false
if
i
<
2
then
flag
=
g
:
IsExists
(
c72989439
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
i
+
1
)
else
flag
=
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_LIGHT
)
>
0
and
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_DARK
)
>
0
end
sg
:
RemoveCard
(
c
)
g
:
AddCard
(
c
)
return
flag
end
function
c72989439
.
spcon
(
e
,
c
)
function
c72989439
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c72989439
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c72989439
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
return
g
:
CheckSubGroup
(
aux
.
gfcheck
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
return
g
:
IsExists
(
c72989439
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
1
)
end
end
function
c72989439
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c72989439
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c72989439
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c72989439
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
for
i
=
1
,
2
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c72989439
.
spcost_selector
,
1
,
1
,
nil
,
tp
,
g
,
sg
,
i
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
gfcheck
,
false
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
sg
:
Merge
(
g1
)
g
:
Sub
(
g1
)
end
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c72989439
.
rmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c72989439
.
rmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
c82301904.lua
View file @
6142fe0e
...
@@ -33,37 +33,17 @@ end
...
@@ -33,37 +33,17 @@ end
function
c82301904
.
spcostfilter
(
c
)
function
c82301904
.
spcostfilter
(
c
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
end
end
function
c82301904
.
spcost_selector
(
c
,
tp
,
g
,
sg
,
i
)
sg
:
AddCard
(
c
)
g
:
RemoveCard
(
c
)
local
flag
=
false
if
i
<
2
then
flag
=
g
:
IsExists
(
c82301904
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
i
+
1
)
else
flag
=
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_LIGHT
)
>
0
and
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_DARK
)
>
0
end
sg
:
RemoveCard
(
c
)
g
:
AddCard
(
c
)
return
flag
end
function
c82301904
.
spcon
(
e
,
c
)
function
c82301904
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c82301904
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c82301904
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
return
g
:
CheckSubGroup
(
aux
.
gfcheck
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
return
g
:
IsExists
(
c82301904
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
1
)
end
end
function
c82301904
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c82301904
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c82301904
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c82301904
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
for
i
=
1
,
2
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c82301904
.
spcost_selector
,
1
,
1
,
nil
,
tp
,
g
,
sg
,
i
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
gfcheck
,
false
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
sg
:
Merge
(
g1
)
g
:
Sub
(
g1
)
end
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c82301904
.
sgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c82301904
.
sgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
c86559484.lua
View file @
6142fe0e
...
@@ -27,30 +27,11 @@ end
...
@@ -27,30 +27,11 @@ end
function
c86559484
.
spcostfilter
(
c
)
function
c86559484
.
spcostfilter
(
c
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsRace
(
RACE_DRAGON
+
RACE_WYRM
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsRace
(
RACE_DRAGON
+
RACE_WYRM
)
end
end
function
c86559484
.
spcost_selector
(
c
,
tp
,
g
,
sg
,
i
)
sg
:
AddCard
(
c
)
g
:
RemoveCard
(
c
)
local
flag
=
false
if
i
<
2
then
flag
=
g
:
IsExists
(
c86559484
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
i
+
1
)
else
flag
=
sg
:
FilterCount
(
Card
.
IsRace
,
nil
,
RACE_DRAGON
)
>
0
and
sg
:
FilterCount
(
Card
.
IsRace
,
nil
,
RACE_WYRM
)
>
0
end
sg
:
RemoveCard
(
c
)
g
:
AddCard
(
c
)
return
flag
end
function
c86559484
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c86559484
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c86559484
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c86559484
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
if
chk
==
0
then
return
g
:
CheckSubGroup
(
aux
.
gfcheck
,
2
,
2
,
Card
.
IsRace
,
RACE_DRAGON
,
RACE_WYRM
)
end
if
chk
==
0
then
return
g
:
IsExists
(
c86559484
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
1
)
end
for
i
=
1
,
2
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c86559484
.
spcost_selector
,
1
,
1
,
nil
,
tp
,
g
,
sg
,
i
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
gfcheck
,
false
,
2
,
2
,
Card
.
IsRace
,
RACE_DRAGON
,
RACE_WYRM
)
sg
:
Merge
(
g1
)
g
:
Sub
(
g1
)
end
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c86559484
.
spfilter
(
c
,
e
,
tp
)
function
c86559484
.
spfilter
(
c
,
e
,
tp
)
...
...
c9596126.lua
View file @
6142fe0e
...
@@ -27,37 +27,17 @@ end
...
@@ -27,37 +27,17 @@ end
function
c9596126
.
spcostfilter
(
c
)
function
c9596126
.
spcostfilter
(
c
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
end
end
function
c9596126
.
spcost_selector
(
c
,
tp
,
g
,
sg
,
i
)
sg
:
AddCard
(
c
)
g
:
RemoveCard
(
c
)
local
flag
=
false
if
i
<
2
then
flag
=
g
:
IsExists
(
c9596126
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
i
+
1
)
else
flag
=
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_LIGHT
)
>
0
and
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_DARK
)
>
0
end
sg
:
RemoveCard
(
c
)
g
:
AddCard
(
c
)
return
flag
end
function
c9596126
.
spcon
(
e
,
c
)
function
c9596126
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c9596126
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c9596126
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
return
g
:
CheckSubGroup
(
aux
.
gfcheck
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
return
g
:
IsExists
(
c9596126
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
1
)
end
end
function
c9596126
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c9596126
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c9596126
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c9596126
.
spcostfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
for
i
=
1
,
2
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c9596126
.
spcost_selector
,
1
,
1
,
nil
,
tp
,
g
,
sg
,
i
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
gfcheck
,
false
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
sg
:
Merge
(
g1
)
g
:
Sub
(
g1
)
end
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c9596126
.
rmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c9596126
.
rmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
c99365553.lua
View file @
6142fe0e
...
@@ -35,37 +35,17 @@ end
...
@@ -35,37 +35,17 @@ end
function
c99365553
.
spcostfilter2
(
c
)
function
c99365553
.
spcostfilter2
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
+
ATTRIBUTE_DARK
)
end
end
function
c99365553
.
spcost_selector
(
c
,
tp
,
g
,
sg
,
i
)
sg
:
AddCard
(
c
)
g
:
RemoveCard
(
c
)
local
flag
=
false
if
i
<
2
then
flag
=
g
:
IsExists
(
c99365553
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
i
+
1
)
else
flag
=
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_LIGHT
)
>
0
and
sg
:
FilterCount
(
Card
.
IsAttribute
,
nil
,
ATTRIBUTE_DARK
)
>
0
end
sg
:
RemoveCard
(
c
)
g
:
AddCard
(
c
)
return
flag
end
function
c99365553
.
spcon1
(
e
,
c
)
function
c99365553
.
spcon1
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c99365553
.
spcostfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c99365553
.
spcostfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
return
g
:
CheckSubGroup
(
aux
.
gfcheck
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
return
g
:
IsExists
(
c99365553
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
1
)
end
end
function
c99365553
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c99365553
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c99365553
.
spcostfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c99365553
.
spcostfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
for
i
=
1
,
2
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c99365553
.
spcost_selector
,
1
,
1
,
nil
,
tp
,
g
,
sg
,
i
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
gfcheck
,
false
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
sg
:
Merge
(
g1
)
g
:
Sub
(
g1
)
end
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c99365553
.
spcon2
(
e
,
c
)
function
c99365553
.
spcon2
(
e
,
c
)
...
@@ -73,18 +53,13 @@ function c99365553.spcon2(e,c)
...
@@ -73,18 +53,13 @@ function c99365553.spcon2(e,c)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
or
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
if
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
or
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c99365553
.
spcostfilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c99365553
.
spcostfilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
return
g
:
CheckSubGroup
(
aux
.
gfcheck
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
return
g
:
IsExists
(
c99365553
.
spcost_selector
,
1
,
nil
,
tp
,
g
,
sg
,
1
)
end
end
function
c99365553
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c99365553
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c99365553
.
spcostfilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c99365553
.
spcostfilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
for
i
=
1
,
2
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c99365553
.
spcost_selector
,
1
,
1
,
nil
,
tp
,
g
,
sg
,
i
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
gfcheck
,
false
,
2
,
2
,
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
,
ATTRIBUTE_DARK
)
sg
:
Merge
(
g1
)
g
:
Sub
(
g1
)
end
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
end
end
function
c99365553
.
spcon3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c99365553
.
spcon3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
utility.lua
View file @
6142fe0e
...
@@ -2230,6 +2230,20 @@ end
...
@@ -2230,6 +2230,20 @@ end
function
Auxiliary
.
drccheck
(
g
)
function
Auxiliary
.
drccheck
(
g
)
return
g
:
GetClassCount
(
Card
.
GetRace
)
==#
g
return
g
:
GetClassCount
(
Card
.
GetRace
)
==#
g
end
end
--check for group with 2 cards, each card match f with a1/a2 as argument
function
Auxiliary
.
gfcheck
(
g
,
f
,
a1
,
a2
)
if
#
g
~=
2
then
return
false
end
local
c1
=
g
:
GetFirst
()
local
c2
=
g
:
GetNext
()
return
f
(
c1
,
a1
)
and
f
(
c2
,
a2
)
or
f
(
c2
,
a1
)
and
f
(
c1
,
a2
)
end
--check for group with 2 cards, each card match f1 with a1, f2 with a2 as argument
function
Auxiliary
.
gffcheck
(
g
,
f1
,
a1
,
f2
,
a2
)
if
#
g
~=
2
then
return
false
end
local
c1
=
g
:
GetFirst
()
local
c2
=
g
:
GetNext
()
return
f1
(
c1
,
a1
)
and
f2
(
c2
,
a2
)
or
f1
(
c2
,
a1
)
and
f2
(
c1
,
a2
)
end
--used for "except this card"
--used for "except this card"
function
Auxiliary
.
ExceptThisCard
(
e
)
function
Auxiliary
.
ExceptThisCard
(
e
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
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