Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
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
Vee4
ygopro-scripts-888
Commits
cf85df7e
Commit
cf85df7e
authored
Mar 26, 2022
by
salix5
Committed by
GitHub
Mar 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workaround fix 流星輝巧群 (#1842)
assumption: the max atk of ritual monster < 65535
parent
5bcebc18
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
c22398665.lua
c22398665.lua
+6
-6
utility.lua
utility.lua
+9
-0
No files found.
c22398665.lua
View file @
cf85df7e
...
...
@@ -50,14 +50,14 @@ end
function
c22398665
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterialEx
(
tp
):
Filter
(
Card
.
IsRace
,
nil
,
RACE_MACHINE
)
return
Duel
.
IsExistingMatchingCard
(
c22398665
.
RitualUltimateFilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
nil
,
e
,
tp
,
mg
,
nil
,
Card
.
Get
Attack
,
"Greater"
)
return
Duel
.
IsExistingMatchingCard
(
c22398665
.
RitualUltimateFilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
nil
,
e
,
tp
,
mg
,
nil
,
aux
.
GetCapped
Attack
,
"Greater"
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
c22398665
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetRitualMaterialEx
(
tp
):
Filter
(
Card
.
IsRace
,
nil
,
RACE_MACHINE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c22398665
.
RitualUltimateFilter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
nil
,
e
,
tp
,
mg
,
nil
,
Card
.
Get
Attack
,
"Greater"
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c22398665
.
RitualUltimateFilter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
nil
,
e
,
tp
,
mg
,
nil
,
aux
.
GetCapped
Attack
,
"Greater"
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
...
...
@@ -84,11 +84,11 @@ end
function
c22398665
.
RitualCheckGreater
(
g
,
c
,
atk
)
if
atk
==
0
then
return
false
end
Duel
.
SetSelectedCard
(
g
)
return
g
:
CheckWithSumGreater
(
Card
.
Get
Attack
,
atk
)
return
g
:
CheckWithSumGreater
(
aux
.
GetCapped
Attack
,
atk
)
end
function
c22398665
.
RitualCheckEqual
(
g
,
c
,
atk
)
if
atk
==
0
then
return
false
end
return
g
:
CheckWithSumEqual
(
Card
.
Get
Attack
,
atk
,
#
g
,
#
g
)
return
g
:
CheckWithSumEqual
(
aux
.
GetCapped
Attack
,
atk
,
#
g
,
#
g
)
end
function
c22398665
.
RitualCheck
(
g
,
tp
,
c
,
atk
,
greater_or_equal
)
return
c22398665
[
"RitualCheck"
..
greater_or_equal
](
g
,
c
,
atk
)
and
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
and
(
not
c
.
mat_group_check
or
c
.
mat_group_check
(
g
,
tp
))
...
...
@@ -97,13 +97,13 @@ end
function
c22398665
.
RitualCheckAdditional
(
c
,
atk
,
greater_or_equal
)
if
greater_or_equal
==
"Equal"
then
return
function
(
g
)
return
(
not
aux
.
RGCheckAdditional
or
aux
.
RGCheckAdditional
(
g
))
and
g
:
GetSum
(
Card
.
Get
Attack
)
<=
atk
return
(
not
aux
.
RGCheckAdditional
or
aux
.
RGCheckAdditional
(
g
))
and
g
:
GetSum
(
aux
.
GetCapped
Attack
)
<=
atk
end
else
return
function
(
g
,
ec
)
if
atk
==
0
then
return
#
g
<=
1
end
if
ec
then
return
(
not
aux
.
RGCheckAdditional
or
aux
.
RGCheckAdditional
(
g
,
ec
))
and
g
:
GetSum
(
Card
.
GetAttack
)
-
Card
.
Get
Attack
(
ec
)
<=
atk
return
(
not
aux
.
RGCheckAdditional
or
aux
.
RGCheckAdditional
(
g
,
ec
))
and
g
:
GetSum
(
aux
.
GetCappedAttack
)
-
aux
.
GetCapped
Attack
(
ec
)
<=
atk
else
return
not
aux
.
RGCheckAdditional
or
aux
.
RGCheckAdditional
(
g
)
end
...
...
utility.lua
View file @
cf85df7e
...
...
@@ -2822,3 +2822,12 @@ function Auxiliary.GetCappedLevel(c)
return
lv
end
end
--
function
Auxiliary
.
GetCappedAttack
(
c
)
local
x
=
c
:
GetAttack
()
if
x
>
MAX_PARAMETER
then
return
MAX_PARAMETER
else
return
x
end
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