Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
cde70fa1
Commit
cde70fa1
authored
Nov 21, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Auto Push by Nanahira
parent
354e711a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
40 deletions
+72
-40
expansions/script/c37564056.lua
expansions/script/c37564056.lua
+1
-1
expansions/script/c37564423.lua
expansions/script/c37564423.lua
+2
-2
expansions/script/c37564701.lua
expansions/script/c37564701.lua
+17
-4
expansions/script/c37564702.lua
expansions/script/c37564702.lua
+1
-1
expansions/script/c37564765.lua
expansions/script/c37564765.lua
+51
-32
No files found.
expansions/script/c37564056.lua
View file @
cde70fa1
...
@@ -65,7 +65,7 @@ function cm.replace_register_effect(f,p)
...
@@ -65,7 +65,7 @@ function cm.replace_register_effect(f,p)
local
cost
=
e
:
GetCost
()
local
cost
=
e
:
GetCost
()
e
:
SetCost
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetCost
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
let
=
{
Duel
.
FilterPlayer
Effect
(
tp
,
EFFECT_CANNOT_ACTIVATE
)}
local
let
=
{
Duel
.
IsPlayerAffectedBy
Effect
(
tp
,
EFFECT_CANNOT_ACTIVATE
)}
for
_
,
le
in
pairs
(
let
)
do
for
_
,
le
in
pairs
(
let
)
do
local
cres
=
Senya
.
GetEffectValue
(
le
,
c
:
GetActivateEffect
(),
le
:
GetHandlerPlayer
())
local
cres
=
Senya
.
GetEffectValue
(
le
,
c
:
GetActivateEffect
(),
le
:
GetHandlerPlayer
())
if
cres
and
cres
~=
0
then
return
false
end
if
cres
and
cres
~=
0
then
return
false
end
...
...
expansions/script/c37564423.lua
View file @
cde70fa1
...
@@ -37,8 +37,8 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -37,8 +37,8 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
==
0
then
return
end
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
==
0
then
return
end
local
ct
=
1
local
ct
=
1
if
Card
.
Filter
Effect
then
if
Card
.
IsHas
Effect
then
local
exte
=
{
c
:
Filter
Effect
(
37564427
)}
local
exte
=
{
c
:
IsHas
Effect
(
37564427
)}
for
_
,
te
in
ipairs
(
exte
)
do
for
_
,
te
in
ipairs
(
exte
)
do
if
Duel
.
SelectEffectYesNo
(
tp
,
te
:
GetHandler
())
then
if
Duel
.
SelectEffectYesNo
(
tp
,
te
:
GetHandler
())
then
Duel
.
Hint
(
HINT_CARD
,
0
,
te
:
GetHandler
():
GetOriginalCode
())
Duel
.
Hint
(
HINT_CARD
,
0
,
te
:
GetHandler
():
GetOriginalCode
())
...
...
expansions/script/c37564701.lua
View file @
cde70fa1
...
@@ -68,9 +68,16 @@ function cm.xyzcon(e,c,og,min,max)
...
@@ -68,9 +68,16 @@ function cm.xyzcon(e,c,og,min,max)
else
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
mg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter1
,
tp
,
LOCATION_PZONE
,
0
,
nil
,
c
)
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter1
,
tp
,
LOCATION_PZONE
,
0
,
nil
,
c
)
if
exg
:
GetCount
()
==
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
exg
,
c
)
>
0
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
return
true
end
if
exg
:
GetCount
()
==
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
exg
,
c
)
>
0
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
and
not
Duel
.
IsPlayerAffectedByEffect
(
EFFECT_MUST_BE_XMATERIAL
)
then
return
true
end
end
end
return
Senya
.
CheckGroup
(
mg
,
Senya
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
)
local
sg
=
Group
.
CreateGroup
()
local
ce
=
{
Duel
.
IsPlayerAffectedByEffect
(
EFFECT_MUST_BE_XMATERIAL
)}
for
_
,
te
in
ipairs
(
ce
)
do
local
tc
=
te
:
GetHandler
()
if
not
mg
:
IsContains
(
tc
)
then
return
false
end
sg
:
AddCard
(
tc
)
end
return
Senya
.
CheckGroup
(
mg
,
Senya
.
CheckFieldFilter
,
sg
,
minc
,
maxc
,
tp
,
c
)
end
end
function
cm
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
function
cm
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
local
g
=
nil
local
g
=
nil
...
@@ -89,7 +96,7 @@ function cm.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
...
@@ -89,7 +96,7 @@ function cm.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
else
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
mg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter1
,
tp
,
LOCATION_PZONE
,
0
,
nil
,
c
)
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter1
,
tp
,
LOCATION_PZONE
,
0
,
nil
,
c
)
if
exg
:
GetCount
()
==
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
exg
,
c
)
>
0
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
and
(
not
Senya
.
CheckGroup
(
mg
,
Senya
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
)
or
Duel
.
SelectYesNo
(
tp
,
m
*
16
))
then
if
exg
:
GetCount
()
==
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
exg
,
c
)
>
0
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
and
not
Duel
.
IsPlayerAffectedByEffect
(
EFFECT_MUST_BE_XMATERIAL
)
and
(
not
Senya
.
CheckGroup
(
mg
,
Senya
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
)
or
Duel
.
SelectYesNo
(
tp
,
m
*
16
))
then
Duel
.
HintSelection
(
exg
)
Duel
.
HintSelection
(
exg
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
c
:
SetMaterial
(
exg
)
c
:
SetMaterial
(
exg
)
...
@@ -97,7 +104,13 @@ function cm.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
...
@@ -97,7 +104,13 @@ function cm.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
return
return
end
end
end
end
g
=
Senya
.
SelectGroup
(
tp
,
HINTMSG_XMATERIAL
,
mg
,
Senya
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
)
local
sg
=
Group
.
CreateGroup
()
local
ce
=
{
Duel
.
IsPlayerAffectedByEffect
(
EFFECT_MUST_BE_XMATERIAL
)}
for
_
,
te
in
ipairs
(
ce
)
do
local
tc
=
te
:
GetHandler
()
sg
:
AddCard
(
tc
)
end
g
=
Senya
.
SelectGroup
(
tp
,
HINTMSG_XMATERIAL
,
mg
,
Senya
.
CheckFieldFilter
,
sg
,
minc
,
maxc
,
tp
,
c
)
end
end
c
:
SetMaterial
(
g
)
c
:
SetMaterial
(
g
)
Senya
.
OverlayGroup
(
c
,
g
,
false
,
true
)
Senya
.
OverlayGroup
(
c
,
g
,
false
,
true
)
...
...
expansions/script/c37564702.lua
View file @
cde70fa1
expansions/script/c37564765.lua
View file @
cde70fa1
...
@@ -128,7 +128,7 @@ end
...
@@ -128,7 +128,7 @@ end
function
cm
.
CheckGroupRecursive
(
c
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
function
cm
.
CheckGroupRecursive
(
c
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
sg
:
AddCard
(
c
)
sg
:
AddCard
(
c
)
local
ct
=
sg
:
GetCount
()
local
ct
=
sg
:
GetCount
()
local
res
=
(
ct
>=
min
and
f
(
sg
,
table.unpack
(
ext_params
)))
local
res
=
(
ct
>=
min
and
ct
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
)))
or
(
ct
<
max
and
g
:
IsExists
(
cm
.
CheckGroupRecursive
,
1
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
))
or
(
ct
<
max
and
g
:
IsExists
(
cm
.
CheckGroupRecursive
,
1
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
))
sg
:
RemoveCard
(
c
)
sg
:
RemoveCard
(
c
)
return
res
return
res
...
@@ -141,7 +141,7 @@ function cm.CheckGroup(g,f,cg,min,max,...)
...
@@ -141,7 +141,7 @@ function cm.CheckGroup(g,f,cg,min,max,...)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
if
cg
then
sg
:
Merge
(
cg
)
end
if
cg
then
sg
:
Merge
(
cg
)
end
local
ct
=
sg
:
GetCount
()
local
ct
=
sg
:
GetCount
()
if
ct
>=
min
and
ct
<
max
and
f
(
sg
,
...
)
then
return
true
end
if
ct
>=
min
and
ct
<
=
max
and
f
(
sg
,
...
)
then
return
true
end
return
g
:
IsExists
(
cm
.
CheckGroupRecursive
,
1
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
return
g
:
IsExists
(
cm
.
CheckGroupRecursive
,
1
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
end
end
if
Group
.
SelectUnselect
then
if
Group
.
SelectUnselect
then
...
@@ -155,7 +155,7 @@ if Group.SelectUnselect then
...
@@ -155,7 +155,7 @@ if Group.SelectUnselect then
local
ct
=
sg
:
GetCount
()
local
ct
=
sg
:
GetCount
()
local
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
while
ct
<
max
and
ag
:
GetCount
()
>
0
do
while
ct
<
max
and
ag
:
GetCount
()
>
0
do
local
finish
=
(
ct
>=
min
and
f
(
sg
,
...
))
local
finish
=
(
ct
>=
min
and
and
ct
<=
max
and
f
(
sg
,
...
))
local
seg
=
sg
:
Clone
()
local
seg
=
sg
:
Clone
()
local
dmin
=
min
-
cg
:
GetCount
()
local
dmin
=
min
-
cg
:
GetCount
()
local
dmax
=
math.min
(
max
-
cg
:
GetCount
(),
g
:
GetCount
())
local
dmax
=
math.min
(
max
-
cg
:
GetCount
(),
g
:
GetCount
())
...
@@ -183,7 +183,7 @@ if Group.SelectUnselect then
...
@@ -183,7 +183,7 @@ if Group.SelectUnselect then
local
ct
=
sg
:
GetCount
()
local
ct
=
sg
:
GetCount
()
local
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
while
ct
<
max
and
ag
:
GetCount
()
>
0
do
while
ct
<
max
and
ag
:
GetCount
()
>
0
do
local
finish
=
(
ct
>=
min
and
f
(
sg
,
...
))
local
finish
=
(
ct
>=
min
and
ct
<=
max
and
f
(
sg
,
...
))
local
cancel
=
finish
or
ct
==
0
local
cancel
=
finish
or
ct
==
0
local
seg
=
sg
:
Clone
()
local
seg
=
sg
:
Clone
()
local
dmin
=
min
-
cg
:
GetCount
()
local
dmin
=
min
-
cg
:
GetCount
()
...
@@ -218,7 +218,7 @@ else
...
@@ -218,7 +218,7 @@ else
local
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
while
ct
<
max
and
ag
:
GetCount
()
>
0
do
while
ct
<
max
and
ag
:
GetCount
()
>
0
do
local
minc
=
1
local
minc
=
1
local
finish
=
(
ct
>=
min
and
f
(
sg
,
...
))
local
finish
=
(
ct
>=
min
and
ct
<=
max
and
f
(
sg
,
...
))
if
finish
then
if
finish
then
minc
=
0
minc
=
0
if
cm
.
master_rule_3_flag
and
not
Duel
.
SelectYesNo
(
tp
,
210
)
then
break
end
if
cm
.
master_rule_3_flag
and
not
Duel
.
SelectYesNo
(
tp
,
210
)
then
break
end
...
@@ -301,19 +301,13 @@ function cm.XyzProcedureCustomTuneMagicianFilter(c,te)
...
@@ -301,19 +301,13 @@ function cm.XyzProcedureCustomTuneMagicianFilter(c,te)
return
f
(
te
,
c
)
return
f
(
te
,
c
)
end
end
function
cm
.
XyzProcedureCustomTuneMagicianCheck
(
c
,
g
)
function
cm
.
XyzProcedureCustomTuneMagicianCheck
(
c
,
g
)
local
eset
=
{
c
:
Filter
Effect
(
EFFECT_TUNE_MAGICIAN_X
)}
local
eset
=
{
c
:
IsHas
Effect
(
EFFECT_TUNE_MAGICIAN_X
)}
for
_
,
te
in
ipairs
(
eset
)
do
for
_
,
te
in
ipairs
(
eset
)
do
if
g
:
IsExists
(
cm
.
XyzProcedureCustomTuneMagicianFilter
,
1
,
c
,
te
)
then
return
true
end
if
g
:
IsExists
(
cm
.
XyzProcedureCustomTuneMagicianFilter
,
1
,
c
,
te
)
then
return
true
end
end
end
return
false
return
false
end
end
function
cm
.
XyzProcedureCustomCheck
(
g
,
xyzc
,
tp
,
gf
)
function
cm
.
XyzProcedureCustomCheck
(
g
,
xyzc
,
tp
,
gf
)
if
EFFECT_MUST_BE_XMATERIAL
then
local
eset
=
{
Duel
.
FilterPlayerEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)}
for
_
,
te
in
ipairs
(
eset
)
do
if
not
g
:
IsContains
(
te
:
GetHandler
())
then
return
false
end
end
end
if
g
:
IsExists
(
cm
.
XyzProcedureCustomTuneMagicianCheck
,
1
,
nil
,
g
)
then
return
false
end
if
g
:
IsExists
(
cm
.
XyzProcedureCustomTuneMagicianCheck
,
1
,
nil
,
g
)
then
return
false
end
return
not
gf
or
gf
(
g
,
xyzc
,
tp
)
return
not
gf
or
gf
(
g
,
xyzc
,
tp
)
end
end
...
@@ -354,7 +348,14 @@ function cm.XyzProcedureCustomCondition(func,gf,minct,maxct,ext_params)
...
@@ -354,7 +348,14 @@ function cm.XyzProcedureCustomCondition(func,gf,minct,maxct,ext_params)
else
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzProcedureCustomFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
func
,
ext_params
)
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzProcedureCustomFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
func
,
ext_params
)
end
end
return
maxc
>=
minc
and
cm
.
CheckGroup
(
mg
,
cm
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
,
cm
.
XyzProcedureCustomCheck
,
c
,
tp
,
gf
)
local
sg
=
Group
.
CreateGroup
()
local
ce
=
{
Duel
.
IsPlayerAffectedByEffect
(
EFFECT_MUST_BE_XMATERIAL
)}
for
_
,
te
in
ipairs
(
ce
)
do
local
tc
=
te
:
GetHandler
()
if
not
mg
:
IsContains
(
tc
)
then
return
false
end
sg
:
AddCard
(
tc
)
end
return
maxc
>=
minc
and
cm
.
CheckGroup
(
mg
,
cm
.
CheckFieldFilter
,
sg
,
minc
,
maxc
,
tp
,
c
,
cm
.
XyzProcedureCustomCheck
,
c
,
tp
,
gf
)
end
end
end
end
function
cm
.
XyzProcedureCustomTarget
(
func
,
gf
,
minct
,
maxct
,
ext_params
)
function
cm
.
XyzProcedureCustomTarget
(
func
,
gf
,
minct
,
maxct
,
ext_params
)
...
@@ -375,7 +376,12 @@ function cm.XyzProcedureCustomTarget(func,gf,minct,maxct,ext_params)
...
@@ -375,7 +376,12 @@ function cm.XyzProcedureCustomTarget(func,gf,minct,maxct,ext_params)
minc
=
math.max
(
minc
,
min
)
minc
=
math.max
(
minc
,
min
)
maxc
=
math.min
(
maxc
,
max
)
maxc
=
math.min
(
maxc
,
max
)
end
end
g
=
cm
.
SelectGroupWithCancel
(
tp
,
HINTMSG_XMATERIAL
,
mg
,
cm
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
,
cm
.
XyzProcedureCustomCheck
,
c
,
tp
,
gf
)
local
ce
=
{
Duel
.
IsPlayerAffectedByEffect
(
EFFECT_MUST_BE_XMATERIAL
)}
for
_
,
te
in
ipairs
(
ce
)
do
local
tc
=
te
:
GetHandler
()
sg
:
AddCard
(
tc
)
end
g
=
cm
.
SelectGroupWithCancel
(
tp
,
HINTMSG_XMATERIAL
,
mg
,
cm
.
CheckFieldFilter
,
sg
,
minc
,
maxc
,
tp
,
c
,
cm
.
XyzProcedureCustomCheck
,
c
,
tp
,
gf
)
end
end
if
g
then
if
g
then
g
:
KeepAlive
()
g
:
KeepAlive
()
...
@@ -816,8 +822,8 @@ function cm.PrismDamageCheckOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -816,8 +822,8 @@ function cm.PrismDamageCheckOperation(e,tp,eg,ep,ev,re,r,rp)
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
if
ct
==
0
then
return
end
if
ct
==
0
then
return
end
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
Card
.
Filter
Effect
then
if
Card
.
IsHas
Effect
then
local
exte
=
{
c
:
Filter
Effect
(
37564427
)}
local
exte
=
{
c
:
IsHas
Effect
(
37564427
)}
for
_
,
te
in
ipairs
(
exte
)
do
for
_
,
te
in
ipairs
(
exte
)
do
if
Duel
.
SelectEffectYesNo
(
tp
,
te
:
GetHandler
())
then
if
Duel
.
SelectEffectYesNo
(
tp
,
te
:
GetHandler
())
then
Duel
.
Hint
(
HINT_CARD
,
0
,
te
:
GetHandler
():
GetOriginalCode
())
Duel
.
Hint
(
HINT_CARD
,
0
,
te
:
GetHandler
():
GetOriginalCode
())
...
@@ -1094,9 +1100,9 @@ function cm.PendConditionNanahira()
...
@@ -1094,9 +1100,9 @@ function cm.PendConditionNanahira()
else
else
g
=
Duel
.
GetMatchingGroup
(
aux
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
)
g
=
Duel
.
GetMatchingGroup
(
aux
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
)
end
end
if
Card
.
Filter
Effect
then
if
Card
.
IsHas
Effect
then
local
ext1
=
{
c
:
Filter
Effect
(
37564541
)}
local
ext1
=
{
c
:
IsHas
Effect
(
37564541
)}
local
ext2
=
{
rpz
:
Filter
Effect
(
37564541
)}
local
ext2
=
{
rpz
:
IsHas
Effect
(
37564541
)}
for
i
,
te
in
pairs
(
ext1
)
do
for
i
,
te
in
pairs
(
ext1
)
do
local
t
=
cm
.
order_table
[
te
:
GetValue
()]
local
t
=
cm
.
order_table
[
te
:
GetValue
()]
if
(
t
.
location
==
LOCATION_EXTRA
and
eft
>
0
)
or
(
t
.
location
~=
LOCATION_EXTRA
and
mft
>
0
)
then
if
(
t
.
location
==
LOCATION_EXTRA
and
eft
>
0
)
or
(
t
.
location
~=
LOCATION_EXTRA
and
mft
>
0
)
then
...
@@ -1154,9 +1160,9 @@ function cm.PendOperationNanahira()
...
@@ -1154,9 +1160,9 @@ function cm.PendOperationNanahira()
else
else
tg
=
Duel
.
GetMatchingGroup
(
aux
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
)
tg
=
Duel
.
GetMatchingGroup
(
aux
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
)
end
end
if
Card
.
Filter
Effect
then
if
Card
.
IsHas
Effect
then
local
ext1
=
{
c
:
Filter
Effect
(
37564541
)}
local
ext1
=
{
c
:
IsHas
Effect
(
37564541
)}
local
ext2
=
{
rpz
:
Filter
Effect
(
37564541
)}
local
ext2
=
{
rpz
:
IsHas
Effect
(
37564541
)}
for
i
,
te
in
pairs
(
ext1
)
do
for
i
,
te
in
pairs
(
ext1
)
do
local
t
=
cm
.
order_table
[
te
:
GetValue
()]
local
t
=
cm
.
order_table
[
te
:
GetValue
()]
if
(
t
.
location
==
LOCATION_EXTRA
and
eft
>
0
)
or
(
t
.
location
~=
LOCATION_EXTRA
and
mft
>
0
)
then
if
(
t
.
location
==
LOCATION_EXTRA
and
eft
>
0
)
or
(
t
.
location
~=
LOCATION_EXTRA
and
mft
>
0
)
then
...
@@ -1749,13 +1755,19 @@ return function(e,g,gc,chkfnf)
...
@@ -1749,13 +1755,19 @@ return function(e,g,gc,chkfnf)
local
chkf
=
bit
.
band
(
chkfnf
,
0xff
)
local
chkf
=
bit
.
band
(
chkfnf
,
0xff
)
local
mg
=
g
:
Filter
(
cm
.
FusionFilter_3L
,
nil
,
e
:
GetHandler
(),
mf
,
sub
)
local
mg
=
g
:
Filter
(
cm
.
FusionFilter_3L
,
nil
,
e
:
GetHandler
(),
mf
,
sub
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
MyonCheckFilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
c
,
myon
)
mg
:
Merge
(
exg
)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
if
gc
then
if
gc
then
if
not
cm
.
FusionFilter_3L
(
gc
,
fc
,
mf
,
sub
)
then
return
false
end
if
not
cm
.
FusionFilter_3L
(
gc
,
fc
,
mf
,
sub
)
then
return
false
end
sg
:
AddCard
(
gc
)
sg
:
AddCard
(
gc
)
end
end
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
MyonCheckFilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
c
,
myon
)
local
ce
=
{
Duel
.
IsPlayerAffectedByEffect
(
EFFECT_MUST_BE_FMATERIAL
)}
mg
:
Merge
(
exg
)
for
_
,
te
in
ipairs
(
ce
)
do
local
tc
=
te
:
GetHandler
()
if
not
mg
:
IsContains
(
tc
)
then
return
false
end
sg
:
AddCard
(
tc
)
end
return
cm
.
CheckGroup
(
mg
,
cm
.
FusionCheck_3L
,
sg
,
1
,
max
,
min
,
tp
,
c
,
f
,
chkfnf
,
sub
)
return
cm
.
CheckGroup
(
mg
,
cm
.
FusionCheck_3L
,
sg
,
1
,
max
,
min
,
tp
,
c
,
f
,
chkfnf
,
sub
)
end
end
end
end
...
@@ -1764,10 +1776,17 @@ return function(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
...
@@ -1764,10 +1776,17 @@ return function(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
chkf
=
bit
.
band
(
chkfnf
,
0xff
)
local
chkf
=
bit
.
band
(
chkfnf
,
0xff
)
local
mg
=
eg
:
Filter
(
cm
.
FusionFilter_3L
,
nil
,
e
:
GetHandler
(),
mf
,
sub
)
local
mg
=
eg
:
Filter
(
cm
.
FusionFilter_3L
,
nil
,
e
:
GetHandler
(),
mf
,
sub
)
local
sg
=
Group
.
CreateGroup
()
if
gc
then
sg
:
AddCard
(
gc
)
end
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
MyonCheckFilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
c
,
myon
)
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
MyonCheckFilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
c
,
myon
)
mg
:
Merge
(
exg
)
mg
:
Merge
(
exg
)
local
sg
=
Group
.
CreateGroup
()
if
gc
then
sg
:
AddCard
(
gc
)
end
local
ce
=
{
Duel
.
IsPlayerAffectedByEffect
(
EFFECT_MUST_BE_FMATERIAL
)}
for
_
,
te
in
ipairs
(
ce
)
do
local
tc
=
te
:
GetHandler
()
sg
:
AddCard
(
tc
)
end
local
g
=
cm
.
SelectGroup
(
tp
,
HINTMSG_FMATERIAL
,
mg
,
cm
.
FusionCheck_3L
,
sg
,
1
,
max
,
min
,
tp
,
c
,
f
,
chkf
,
sub
)
local
g
=
cm
.
SelectGroup
(
tp
,
HINTMSG_FMATERIAL
,
mg
,
cm
.
FusionCheck_3L
,
sg
,
1
,
max
,
min
,
tp
,
c
,
f
,
chkf
,
sub
)
Duel
.
SetFusionMaterial
(
g
)
Duel
.
SetFusionMaterial
(
g
)
end
end
...
@@ -1884,8 +1903,8 @@ function cm.enable_kaguya_check_3L()
...
@@ -1884,8 +1903,8 @@ function cm.enable_kaguya_check_3L()
Duel
.
RegisterEffect
(
ge3
,
0
)
Duel
.
RegisterEffect
(
ge3
,
0
)
end
end
function
cm
.
CheckKoishiCount
(
c
)
function
cm
.
CheckKoishiCount
(
c
)
if
Card
.
Filter
Effect
then
if
Card
.
IsHas
Effect
then
local
t
=
{
c
:
Filter
Effect
(
37564826
)}
local
t
=
{
c
:
IsHas
Effect
(
37564826
)}
local
res
=
1
local
res
=
1
for
i
,
te
in
pairs
(
t
)
do
for
i
,
te
in
pairs
(
t
)
do
res
=
math.max
(
res
,
te
:
GetValue
())
res
=
math.max
(
res
,
te
:
GetValue
())
...
@@ -1999,8 +2018,8 @@ function cm.RemoveEffect_3L(tp,tc,ct,maxct,chk,...)
...
@@ -1999,8 +2018,8 @@ function cm.RemoveEffect_3L(tp,tc,ct,maxct,chk,...)
local
effect_list
=
cm
.
GetGainedList_3L
(
tc
)
local
effect_list
=
cm
.
GetGainedList_3L
(
tc
)
local
avaliable_list
=
{}
local
avaliable_list
=
{}
local
omit_list
=
{
...
}
local
omit_list
=
{
...
}
if
Card
.
Filter
Effect
then
if
Card
.
IsHas
Effect
then
local
oet
=
{
tc
:
Filter
Effect
(
37564827
)}
local
oet
=
{
tc
:
IsHas
Effect
(
37564827
)}
for
i
,
oe
in
pairs
(
oet
)
do
for
i
,
oe
in
pairs
(
oet
)
do
local
of
=
cm
.
order_table
[
oe
:
GetValue
()]
local
of
=
cm
.
order_table
[
oe
:
GetValue
()]
local
og
=
of
(
tc
)
local
og
=
of
(
tc
)
...
@@ -2465,7 +2484,7 @@ function cm.GetEffectValue(e,...)
...
@@ -2465,7 +2484,7 @@ function cm.GetEffectValue(e,...)
end
end
--custom ocgcore needed
--custom ocgcore needed
function
cm
.
CheckEffect
(
c
,
code
,
...
)
function
cm
.
CheckEffect
(
c
,
code
,
...
)
local
eset
=
{
c
:
Filter
Effect
(
code
)}
local
eset
=
{
c
:
IsHas
Effect
(
code
)}
for
_
,
te
in
ipairs
(
eset
)
do
for
_
,
te
in
ipairs
(
eset
)
do
local
res
=
cm
.
GetEffectValue
(
te
,
...
)
local
res
=
cm
.
GetEffectValue
(
te
,
...
)
if
res
and
res
~=
0
then
return
res
end
if
res
and
res
~=
0
then
return
res
end
...
@@ -2473,7 +2492,7 @@ function cm.CheckEffect(c,code,...)
...
@@ -2473,7 +2492,7 @@ function cm.CheckEffect(c,code,...)
return
false
return
false
end
end
function
cm
.
CheckPlayerEffect
(
p
,
code
,
...
)
function
cm
.
CheckPlayerEffect
(
p
,
code
,
...
)
local
eset
=
{
Duel
.
FilterPlayer
Effect
(
p
,
code
)}
local
eset
=
{
Duel
.
IsPlayerAffectedBy
Effect
(
p
,
code
)}
for
_
,
te
in
ipairs
(
eset
)
do
for
_
,
te
in
ipairs
(
eset
)
do
local
res
=
cm
.
GetEffectValue
(
te
,
...
)
local
res
=
cm
.
GetEffectValue
(
te
,
...
)
if
res
and
res
~=
0
then
return
res
end
if
res
and
res
~=
0
then
return
res
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