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
9158b588
Commit
9158b588
authored
Dec 06, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve
parent
c72ded18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
utility.lua
utility.lua
+17
-14
No files found.
utility.lua
View file @
9158b588
...
@@ -1548,17 +1548,7 @@ function Auxiliary.PendCondition()
...
@@ -1548,17 +1548,7 @@ function Auxiliary.PendCondition()
return
g
:
IsExists
(
Auxiliary
.
PConditionFilter
,
1
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
return
g
:
IsExists
(
Auxiliary
.
PConditionFilter
,
1
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
end
end
end
end
function
Auxiliary
.
PendOperationCheck
(
g
,
tp
)
function
Auxiliary
.
PendOperationCheck
(
g
,
ft1
,
ft2
,
ft
)
local
ft1
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ft2
=
Duel
.
GetLocationCountFromEx
(
tp
)
local
ft
=
Duel
.
GetUsableMZoneCount
(
tp
)
local
ect
=
c29724053
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
29724053
)
and
c29724053
[
tp
]
if
ect
and
ect
<
ft2
then
ft2
=
ect
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
if
ft1
>
0
then
ft1
=
1
end
if
ft2
>
0
then
ft2
=
1
end
ft
=
1
end
local
exg
=
g
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_EXTRA
)
local
exg
=
g
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_EXTRA
)
local
mg
=
g
-
exg
local
mg
=
g
-
exg
return
#
g
<=
ft
and
#
exg
<=
ft2
and
#
mg
<=
ft1
return
#
g
<=
ft
and
#
exg
<=
ft2
and
#
mg
<=
ft1
...
@@ -1571,10 +1561,23 @@ function Auxiliary.PendOperation()
...
@@ -1571,10 +1561,23 @@ function Auxiliary.PendOperation()
if
lscale
>
rscale
then
lscale
,
rscale
=
rscale
,
lscale
end
if
lscale
>
rscale
then
lscale
,
rscale
=
rscale
,
lscale
end
local
eset
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_EXTRA_PENDULUM_SUMMON
)}
local
eset
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_EXTRA_PENDULUM_SUMMON
)}
local
tg
=
nil
local
tg
=
nil
local
loc
=
0
local
ft1
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ft2
=
Duel
.
GetLocationCountFromEx
(
tp
)
local
ft
=
Duel
.
GetUsableMZoneCount
(
tp
)
local
ect
=
c29724053
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
29724053
)
and
c29724053
[
tp
]
if
ect
and
ect
<
ft2
then
ft2
=
ect
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
if
ft1
>
0
then
ft1
=
1
end
if
ft2
>
0
then
ft2
=
1
end
ft
=
1
end
if
ft1
>
0
then
loc
=
loc
|
LOCATION_HAND
end
if
ft2
>
0
then
loc
=
loc
|
LOCATION_EXTRA
end
if
og
then
if
og
then
tg
=
og
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
+
LOCATION_EXTRA
):
Filter
(
Auxiliary
.
PConditionFilter
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
tg
=
og
:
Filter
(
Card
.
IsLocation
,
nil
,
loc
):
Filter
(
Auxiliary
.
PConditionFilter
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
else
else
tg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
tg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
PConditionFilter
,
tp
,
loc
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
end
end
local
ce
=
nil
local
ce
=
nil
local
b1
=
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
==
0
local
b1
=
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
==
0
...
@@ -1600,7 +1603,7 @@ function Auxiliary.PendOperation()
...
@@ -1600,7 +1603,7 @@ function Auxiliary.PendOperation()
tg
=
tg
:
Filter
(
Auxiliary
.
PConditionExtraFilterSpecific
,
nil
,
e
,
tp
,
lscale
,
rscale
,
ce
)
tg
=
tg
:
Filter
(
Auxiliary
.
PConditionExtraFilterSpecific
,
nil
,
e
,
tp
,
lscale
,
rscale
,
ce
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
tg
:
SelectSubGroup
(
tp
,
Auxiliary
.
PendOperationCheck
,
true
,
1
,
#
tg
,
tp
)
local
g
=
tg
:
SelectSubGroup
(
tp
,
Auxiliary
.
PendOperationCheck
,
true
,
1
,
#
tg
,
ft1
,
ft2
,
ft
)
if
not
g
then
return
end
if
not
g
then
return
end
if
ce
then
if
ce
then
Duel
.
Hint
(
HINT_CARD
,
0
,
ce
:
GetOwner
():
GetOriginalCode
())
Duel
.
Hint
(
HINT_CARD
,
0
,
ce
:
GetOwner
():
GetOriginalCode
())
...
...
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