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
48d97d08
Commit
48d97d08
authored
Dec 06, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opponent pendulum
parent
9158b588
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
11 deletions
+42
-11
c29432356.lua
c29432356.lua
+1
-0
c31531170.lua
c31531170.lua
+41
-11
No files found.
c29432356.lua
View file @
48d97d08
...
@@ -88,6 +88,7 @@ end
...
@@ -88,6 +88,7 @@ end
function
c29432356
.
penop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c29432356
.
penop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
29432356
,
2
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_EXTRA_PENDULUM_SUMMON
)
e2
:
SetCode
(
EFFECT_EXTRA_PENDULUM_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
...
...
c31531170.lua
View file @
48d97d08
...
@@ -11,7 +11,8 @@ function c31531170.initial_effect(c)
...
@@ -11,7 +11,8 @@ function c31531170.initial_effect(c)
end
end
function
c31531170
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c31531170
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chkc
then
return
false
end
if
chk
==
0
then
return
PENDULUM_CHECKLIST
and
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
~=
0
and
Duel
.
IsExistingTarget
(
nil
,
tp
,
0
,
LOCATION_PZONE
,
2
,
nil
)
end
if
not
PENDULUM_CHECKLIST
then
PENDULUM_CHECKLIST
=
0
end
if
chk
==
0
then
return
(
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
==
0
or
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_EXTRA_PENDULUM_SUMMON
))
and
Duel
.
IsExistingTarget
(
nil
,
tp
,
0
,
LOCATION_PZONE
,
2
,
nil
)
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_PZONE
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_PZONE
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SetTargetCard
(
g
)
end
end
...
@@ -36,6 +37,8 @@ end
...
@@ -36,6 +37,8 @@ end
function
c31531170
.
pendcon
(
e
,
c
,
og
)
function
c31531170
.
pendcon
(
e
,
c
,
og
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
e
:
GetOwnerPlayer
()
local
tp
=
e
:
GetOwnerPlayer
()
local
eset
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_EXTRA_PENDULUM_SUMMON
)}
if
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
~=
0
and
#
eset
==
0
then
return
false
end
local
rpz
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_PZONE
,
1
)
local
rpz
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_PZONE
,
1
)
if
rpz
==
nil
or
rpz
:
GetFieldID
()
~=
c
:
GetFlagEffectLabel
(
31531170
)
then
return
false
end
if
rpz
==
nil
or
rpz
:
GetFieldID
()
~=
c
:
GetFlagEffectLabel
(
31531170
)
then
return
false
end
local
lscale
=
c
:
GetLeftScale
()
local
lscale
=
c
:
GetLeftScale
()
...
@@ -44,14 +47,14 @@ function c31531170.pendcon(e,c,og)
...
@@ -44,14 +47,14 @@ function c31531170.pendcon(e,c,og)
local
ft
=
Duel
.
GetLocationCountFromEx
(
tp
)
local
ft
=
Duel
.
GetLocationCountFromEx
(
tp
)
if
ft
<=
0
then
return
false
end
if
ft
<=
0
then
return
false
end
if
og
then
if
og
then
return
og
:
IsExists
(
aux
.
PConditionFilter
,
1
,
nil
,
e
,
tp
,
lscale
,
rscale
)
return
og
:
IsExists
(
aux
.
PConditionFilter
,
1
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
else
else
return
Duel
.
IsExistingMatchingCard
(
aux
.
PConditionFilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
lscale
,
rscale
)
return
Duel
.
IsExistingMatchingCard
(
aux
.
PConditionFilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
end
end
end
end
function
c31531170
.
pendop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
function
c31531170
.
pendop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
Duel
.
Hint
(
HINT_CARD
,
0
,
31531170
)
local
tp
=
e
:
GetOwnerPlayer
()
local
tp
=
e
:
GetOwnerPlayer
()
local
eset
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_EXTRA_PENDULUM_SUMMON
)}
local
rpz
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_PZONE
,
1
)
local
rpz
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_PZONE
,
1
)
local
lscale
=
c
:
GetLeftScale
()
local
lscale
=
c
:
GetLeftScale
()
local
rscale
=
rpz
:
GetRightScale
()
local
rscale
=
rpz
:
GetRightScale
()
...
@@ -60,16 +63,43 @@ function c31531170.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
...
@@ -60,16 +63,43 @@ function c31531170.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
local
ect
=
c29724053
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
29724053
)
and
c29724053
[
tp
]
local
ect
=
c29724053
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
29724053
)
and
c29724053
[
tp
]
if
ect
~=
nil
then
ft
=
math.min
(
ft
,
ect
)
end
if
ect
~=
nil
then
ft
=
math.min
(
ft
,
ect
)
end
local
tg
=
nil
if
og
then
if
og
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
tg
=
og
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_EXTRA
):
Filter
(
aux
.
PConditionFilter
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
local
g
=
og
:
FilterSelect
(
tp
,
aux
.
PConditionFilter
,
1
,
ft
,
nil
,
e
,
tp
,
lscale
,
rscale
)
sg
:
Merge
(
g
)
else
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
tg
=
Duel
.
GetMatchingGroup
(
aux
.
PConditionFilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
PConditionFilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
ft
,
nil
,
e
,
tp
,
lscale
,
rscale
)
end
sg
:
Merge
(
g
)
local
ce
=
nil
local
b1
=
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
==
0
local
b2
=#
eset
>
0
if
b1
and
b2
then
local
options
=
{
1163
}
for
_
,
te
in
ipairs
(
eset
)
do
table.insert
(
options
,
te
:
GetDescription
())
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
options
))
if
op
>
0
then
ce
=
eset
[
op
]
end
elseif
b2
and
not
b1
then
local
options
=
{}
for
_
,
te
in
ipairs
(
eset
)
do
table.insert
(
options
,
te
:
GetDescription
())
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
options
))
ce
=
eset
[
op
+
1
]
end
end
PENDULUM_CHECKLIST
=
PENDULUM_CHECKLIST
|
(
0x1
<<
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
tg
:
FilterSelect
(
tp
,
aux
.
PConditionExtraFilterSpecific
,
0
,
ft
,
nil
,
e
,
tp
,
lscale
,
rscale
,
ce
)
if
#
g
==
0
then
return
end
if
ce
then
Duel
.
Hint
(
HINT_CARD
,
0
,
ce
:
GetOwner
():
GetOriginalCode
())
ce
:
Reset
()
else
PENDULUM_CHECKLIST
=
PENDULUM_CHECKLIST
|
(
0x1
<<
tp
)
end
Duel
.
Hint
(
HINT_CARD
,
0
,
31531170
)
sg
:
Merge
(
g
)
Duel
.
HintSelection
(
Group
.
FromCards
(
c
))
Duel
.
HintSelection
(
Group
.
FromCards
(
c
))
Duel
.
HintSelection
(
Group
.
FromCards
(
rpz
))
Duel
.
HintSelection
(
Group
.
FromCards
(
rpz
))
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