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
827c6baa
Commit
827c6baa
authored
Dec 05, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ritual subgroup part 1
parent
5e817ef2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
26 deletions
+9
-26
utility.lua
utility.lua
+9
-26
No files found.
utility.lua
View file @
827c6baa
...
@@ -1389,27 +1389,20 @@ function Auxiliary.AddRitualProcGreater(c,filter)
...
@@ -1389,27 +1389,20 @@ function Auxiliary.AddRitualProcGreater(c,filter)
e1
:
SetOperation
(
Auxiliary
.
RitualGreaterOperation
(
filter
))
e1
:
SetOperation
(
Auxiliary
.
RitualGreaterOperation
(
filter
))
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
Auxiliary
.
RitualGreaterFilter
(
c
,
filter
,
e
,
tp
,
m
,
ft
)
function
Auxiliary
.
RitualGreaterCheck
(
g
,
tp
,
c
,
lv
)
Duel
.
SetSelectedCard
(
g
)
return
g
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
lv
,
c
)
and
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
end
function
Auxiliary
.
RitualGreaterFilter
(
c
,
filter
,
e
,
tp
,
m
)
if
(
filter
and
not
filter
(
c
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
if
(
filter
and
not
filter
(
c
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
if
ft
>
0
then
return
mg
:
CheckSubGroup
(
Auxiliary
.
RitualGreaterCheck
,
1
,
63
,
tp
,
c
,
c
:
GetOriginalLevel
())
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetOriginalLevel
(),
c
)
else
return
mg
:
IsExists
(
Auxiliary
.
RitualGreaterFilterF
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
Auxiliary
.
RitualGreaterFilterF
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
rc
:
GetOriginalLevel
(),
rc
)
else
return
false
end
end
end
function
Auxiliary
.
RitualGreaterTarget
(
filter
)
function
Auxiliary
.
RitualGreaterTarget
(
filter
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
Duel
.
IsExistingMatchingCard
(
Auxiliary
.
RitualGreaterFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
filter
,
e
,
tp
,
mg
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
Auxiliary
.
RitualGreaterFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
filter
,
e
,
tp
,
mg
,
ft
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
...
@@ -1423,18 +1416,8 @@ function Auxiliary.RitualGreaterOperation(filter)
...
@@ -1423,18 +1416,8 @@ function Auxiliary.RitualGreaterOperation(filter)
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
if
tc
then
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
local
mat
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
if
ft
>
0
then
local
mat
=
mg
:
SelectSubGroup
(
tp
,
Auxiliary
.
RitualGreaterCheck
,
false
,
1
,
63
,
tp
,
tc
,
tc
:
GetOriginalLevel
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetOriginalLevel
(),
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
Auxiliary
.
RitualGreaterFilterF
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetOriginalLevel
(),
tc
)
mat
:
Merge
(
mat2
)
end
tc
:
SetMaterial
(
mat
)
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
...
...
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