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
50106859
Commit
50106859
authored
Sep 08, 2017
by
nekrozar
Committed by
mercury233
Sep 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update aux.AddXyzProcedureLevelFree (#923)
parent
03834b9f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
241 additions
and
184 deletions
+241
-184
c43490025.lua
c43490025.lua
+6
-11
c52653092.lua
c52653092.lua
+10
-96
utility.lua
utility.lua
+225
-77
No files found.
c43490025.lua
View file @
50106859
...
...
@@ -2,7 +2,7 @@
function
c43490025
.
initial_effect
(
c
)
--xyz summon
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedureLevelFree
(
c
,
c43490025
.
mfilter
,
c43490025
.
xyzcheck
,
1
,
2
)
aux
.
AddXyzProcedureLevelFree
(
c
,
c43490025
.
mfilter
,
c43490025
.
xyzcheck
,
2
,
2
,
c43490025
.
ovfilter
,
aux
.
Stringid
(
43490025
,
1
)
)
--atkup
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -31,18 +31,13 @@ function c43490025.initial_effect(c)
end
c43490025
.
xyz_number
=
0
function
c43490025
.
mfilter
(
c
,
xyzc
)
return
(
not
c
:
IsSetCard
(
0x48
)
and
c
:
IsXyzType
(
TYPE_XYZ
))
or
(
c
:
IsSetCard
(
0x107f
)
or
c
:
IsCode
(
65305468
))
end
function
c43490025
.
gfilter
(
c
)
return
c
:
IsSetCard
(
0x48
)
or
not
c
:
IsXyzType
(
TYPE_XYZ
)
return
c
:
IsXyzType
(
TYPE_XYZ
)
and
not
c
:
IsSetCard
(
0x48
)
end
function
c43490025
.
xyzcheck
(
g
,
xyzc
)
if
g
:
GetCount
()
==
1
then
local
tc
=
g
:
GetFirst
()
return
tc
:
IsSetCard
(
0x107f
)
or
tc
:
IsCode
(
65305468
)
else
return
g
:
GetClassCount
(
Card
.
GetRank
)
==
1
and
not
g
:
IsExists
(
c43490025
.
gfilter
,
1
,
nil
)
end
return
g
:
GetClassCount
(
Card
.
GetRank
)
==
1
end
function
c43490025
.
ovfilter
(
c
)
return
c
:
IsFaceup
()
and
(
c
:
IsSetCard
(
0x107f
)
or
c
:
IsCode
(
65305468
))
end
function
c43490025
.
atkfilter
(
c
)
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0x48
)
...
...
c52653092.lua
View file @
50106859
...
...
@@ -2,15 +2,7 @@
function
c52653092
.
initial_effect
(
c
)
--xyz summon
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCondition
(
c52653092
.
xyzcon
)
e1
:
SetOperation
(
c52653092
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
aux
.
AddXyzProcedureLevelFree
(
c
,
c52653092
.
mfilter
,
c52653092
.
xyzcheck
,
3
,
3
,
c52653092
.
ovfilter
,
aux
.
Stringid
(
52653092
,
0
),
c52653092
.
xyzop
)
--cannot disable spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -50,99 +42,21 @@ function c52653092.initial_effect(c)
c
:
RegisterEffect
(
e6
)
end
c52653092
.
xyz_number
=
0
function
c52653092
.
mfilter
(
c
,
xyzc
)
return
c
:
IsFaceup
()
and
c
:
IsXyzType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0x48
)
end
function
c52653092
.
xyzcheck
(
g
,
xyzc
)
return
g
:
GetClassCount
(
Card
.
GetRank
)
==
1
end
function
c52653092
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x95
)
and
c
:
GetType
()
==
TYPE_SPELL
and
c
:
IsDiscardable
()
end
function
c52653092
.
ovfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107f
)
end
function
c52653092
.
mfilter
(
c
,
xyzc
)
return
c
:
IsFaceup
()
and
c
:
IsXyzType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0x48
)
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
end
function
c52653092
.
xyzfilter1
(
c
,
g
)
return
g
:
IsExists
(
c52653092
.
xyzfilter2
,
2
,
c
,
c
:
GetRank
())
end
function
c52653092
.
xyzfilter2
(
c
,
rk
)
return
c
:
GetRank
()
==
rk
end
function
c52653092
.
xyzcon
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ct
=-
ft
if
3
<=
ct
then
return
false
end
if
min
and
(
min
>
3
or
max
<
3
)
then
return
false
end
local
altmg
=
nil
if
og
then
altmg
=
og
else
altmg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
end
if
ct
<
1
and
(
not
min
or
min
<=
1
)
and
altmg
:
IsExists
(
aux
.
XyzAlterFilter
,
1
,
nil
,
c52653092
.
ovfilter
,
c
)
and
Duel
.
IsExistingMatchingCard
(
c52653092
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
then
return
true
end
local
mg
=
nil
if
og
then
mg
=
og
:
Filter
(
c52653092
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c52653092
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
return
mg
:
IsExists
(
c52653092
.
xyzfilter1
,
1
,
nil
,
mg
)
end
function
c52653092
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
local
sg
=
Group
.
CreateGroup
()
local
tc
=
og
:
GetFirst
()
while
tc
do
sg
:
Merge
(
tc
:
GetOverlayGroup
())
tc
=
og
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
c
:
SetMaterial
(
og
)
Duel
.
Overlay
(
c
,
og
)
return
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ct
=-
ft
local
mg
=
nil
local
altmg
=
nil
if
og
then
mg
=
og
:
Filter
(
c52653092
.
mfilter
,
nil
,
c
)
altmg
=
og
else
mg
=
Duel
.
GetMatchingGroup
(
c52653092
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
altmg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
end
local
b1
=
mg
:
IsExists
(
c52653092
.
xyzfilter1
,
1
,
nil
,
mg
)
local
b2
=
ct
<
1
and
(
not
min
or
min
<=
1
)
and
altmg
:
IsExists
(
aux
.
XyzAlterFilter
,
1
,
nil
,
c52653092
.
ovfilter
,
c
)
and
Duel
.
IsExistingMatchingCard
(
c52653092
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
52653092
,
0
)))
then
Duel
.
DiscardHand
(
tp
,
c52653092
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g
=
altmg
:
FilterSelect
(
tp
,
aux
.
XyzAlterFilter
,
1
,
1
,
nil
,
c52653092
.
ovfilter
,
c
)
local
g2
=
g
:
GetFirst
():
GetOverlayGroup
()
if
g2
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
c
,
g2
)
end
c
:
SetMaterial
(
g
)
Duel
.
Overlay
(
c
,
g
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g1
=
mg
:
FilterSelect
(
tp
,
c52653092
.
xyzfilter1
,
1
,
1
,
nil
,
mg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g2
=
mg
:
FilterSelect
(
tp
,
c52653092
.
xyzfilter2
,
2
,
2
,
g1
:
GetFirst
(),
g1
:
GetFirst
():
GetRank
())
g1
:
Merge
(
g2
)
local
sg
=
Group
.
CreateGroup
()
local
tc
=
g1
:
GetFirst
()
while
tc
do
sg
:
Merge
(
tc
:
GetOverlayGroup
())
tc
=
g1
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
c
:
SetMaterial
(
g1
)
Duel
.
Overlay
(
c
,
g1
)
end
function
c52653092
.
xyzop
(
e
,
tp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c52653092
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c52653092
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
,
nil
)
end
function
c52653092
.
effcon
(
e
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
...
...
utility.lua
View file @
50106859
This diff is collapsed.
Click to expand it.
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