Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Nanahira-Cards
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
nanahira
Nanahira-Cards
Commits
cf9323e4
Commit
cf9323e4
authored
Dec 06, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
catchup
parent
54b60ff7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
10 deletions
+40
-10
expansions/script/c37564765.lua
expansions/script/c37564765.lua
+40
-10
No files found.
expansions/script/c37564765.lua
View file @
cf9323e4
...
@@ -983,7 +983,7 @@ function cm.NanahiraExtraPendulum(c,scon)
...
@@ -983,7 +983,7 @@ function cm.NanahiraExtraPendulum(c,scon)
end
)
end
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
cm
.
PConditionFilterNanahira
(
c
,
e
,
tp
,
lscale
,
rscale
,
f
,
tc
)
function
cm
.
PConditionFilterNanahira
(
c
,
e
,
tp
,
lscale
,
rscale
,
f
,
tc
,
eset
)
local
lv
=
0
local
lv
=
0
if
c
.
pendulum_level
then
if
c
.
pendulum_level
then
lv
=
c
.
pendulum_level
lv
=
c
.
pendulum_level
...
@@ -992,13 +992,15 @@ function cm.PConditionFilterNanahira(c,e,tp,lscale,rscale,f,tc)
...
@@ -992,13 +992,15 @@ function cm.PConditionFilterNanahira(c,e,tp,lscale,rscale,f,tc)
end
end
local
bool
=
aux
.
PendulumSummonableBool
(
c
)
local
bool
=
aux
.
PendulumSummonableBool
(
c
)
return
lv
>
lscale
and
lv
<
rscale
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_PENDULUM
,
tp
,
bool
,
bool
)
return
lv
>
lscale
and
lv
<
rscale
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_PENDULUM
,
tp
,
bool
,
bool
)
and
(
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
==
0
or
aux
.
PConditionExtraFilter
(
c
,
e
,
tp
,
lscale
,
rscale
,
eset
))
and
not
c
:
IsForbidden
()
and
(
not
f
or
f
(
c
,
tc
))
and
not
c
:
IsForbidden
()
and
(
not
f
or
f
(
c
,
tc
))
end
end
function
cm
.
PendConditionNanahira
()
function
cm
.
PendConditionNanahira
()
return
function
(
e
,
c
,
og
)
return
function
(
e
,
c
,
og
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
~=
0
then
return
false
end
local
eset
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_EXTRA_PENDULUM_SUMMON
)}
if
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
~=
0
and
#
eset
==
0
then
return
false
end
local
rpz
=
cm
.
GetPendulumCard
(
tp
,
1
)
local
rpz
=
cm
.
GetPendulumCard
(
tp
,
1
)
if
rpz
==
nil
or
c
==
rpz
then
return
false
end
if
rpz
==
nil
or
c
==
rpz
then
return
false
end
local
lscale
=
c
:
GetLeftScale
()
local
lscale
=
c
:
GetLeftScale
()
...
@@ -1010,23 +1012,23 @@ function cm.PendConditionNanahira()
...
@@ -1010,23 +1012,23 @@ function cm.PendConditionNanahira()
local
eft
=
Duel
.
GetLocationCountFromEx
(
tp
)
local
eft
=
Duel
.
GetLocationCountFromEx
(
tp
)
local
g
=
nil
local
g
=
nil
if
og
then
if
og
then
g
=
og
:
Filter
(
aux
.
PConditionFilter
,
1
,
nil
,
e
,
tp
,
lscale
,
rscale
)
g
=
og
:
Filter
(
aux
.
PConditionFilter
,
1
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
else
else
g
=
Duel
.
GetMatchingGroup
(
aux
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
)
g
=
Duel
.
GetMatchingGroup
(
aux
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
end
end
local
ext1
=
{
c
:
IsHasEffect
(
37564541
)}
local
ext1
=
{
c
:
IsHasEffect
(
37564541
)}
local
ext2
=
{
rpz
:
IsHasEffect
(
37564541
)}
local
ext2
=
{
rpz
:
IsHasEffect
(
37564541
)}
for
i
,
te
in
pairs
(
ext1
)
do
for
i
,
te
in
pairs
(
ext1
)
do
local
t
=
cm
.
order_table
[
te
:
GetValue
()]
local
t
=
cm
.
order_table
[
te
:
GetValue
()]
if
(
t
.
location
==
LOCATION_EXTRA
and
eft
>
0
)
or
(
t
.
location
~=
LOCATION_EXTRA
and
mft
>
0
)
then
if
(
t
.
location
==
LOCATION_EXTRA
and
eft
>
0
)
or
(
t
.
location
~=
LOCATION_EXTRA
and
mft
>
0
)
then
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
PConditionFilterNanahira
,
tp
,
t
.
location
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
t
.
filter
,
te
:
GetHandler
())
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
PConditionFilterNanahira
,
tp
,
t
.
location
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
t
.
filter
,
te
:
GetHandler
()
,
eset
)
g
:
Merge
(
exg
)
g
:
Merge
(
exg
)
end
end
end
end
for
i
,
te
in
pairs
(
ext2
)
do
for
i
,
te
in
pairs
(
ext2
)
do
local
t
=
cm
.
order_table
[
te
:
GetValue
()]
local
t
=
cm
.
order_table
[
te
:
GetValue
()]
if
(
t
.
location
==
LOCATION_EXTRA
and
eft
>
0
)
or
(
t
.
location
~=
LOCATION_EXTRA
and
mft
>
0
)
then
if
(
t
.
location
==
LOCATION_EXTRA
and
eft
>
0
)
or
(
t
.
location
~=
LOCATION_EXTRA
and
mft
>
0
)
then
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
PConditionFilterNanahira
,
tp
,
t
.
location
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
t
.
filter
,
te
:
GetHandler
())
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
PConditionFilterNanahira
,
tp
,
t
.
location
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
t
.
filter
,
te
:
GetHandler
()
,
eset
)
g
:
Merge
(
exg
)
g
:
Merge
(
exg
)
end
end
end
end
...
@@ -1061,14 +1063,14 @@ function cm.PendOperationNanahira()
...
@@ -1061,14 +1063,14 @@ function cm.PendOperationNanahira()
if
og
then
if
og
then
tg
=
og
:
Filter
(
aux
.
PConditionFilter
,
1
,
nil
,
e
,
tp
,
lscale
,
rscale
)
tg
=
og
:
Filter
(
aux
.
PConditionFilter
,
1
,
nil
,
e
,
tp
,
lscale
,
rscale
)
else
else
tg
=
Duel
.
GetMatchingGroup
(
aux
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
)
tg
=
Duel
.
GetMatchingGroup
(
aux
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
end
end
local
ext1
=
{
c
:
IsHasEffect
(
37564541
)}
local
ext1
=
{
c
:
IsHasEffect
(
37564541
)}
local
ext2
=
{
rpz
:
IsHasEffect
(
37564541
)}
local
ext2
=
{
rpz
:
IsHasEffect
(
37564541
)}
for
i
,
te
in
pairs
(
ext1
)
do
for
i
,
te
in
pairs
(
ext1
)
do
local
t
=
cm
.
order_table
[
te
:
GetValue
()]
local
t
=
cm
.
order_table
[
te
:
GetValue
()]
if
(
t
.
location
==
LOCATION_EXTRA
and
eft
>
0
)
or
(
t
.
location
~=
LOCATION_EXTRA
and
mft
>
0
)
then
if
(
t
.
location
==
LOCATION_EXTRA
and
eft
>
0
)
or
(
t
.
location
~=
LOCATION_EXTRA
and
mft
>
0
)
then
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
PConditionFilterNanahira
,
tp
,
t
.
location
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
t
.
filter
,
te
:
GetHandler
())
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
PConditionFilterNanahira
,
tp
,
t
.
location
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
t
.
filter
,
te
:
GetHandler
()
,
eset
)
tg
:
Merge
(
exg
)
tg
:
Merge
(
exg
)
local
mct
=
t
.
max_count
local
mct
=
t
.
max_count
if
mct
and
mct
>
0
and
mct
<
ft
then
if
mct
and
mct
>
0
and
mct
<
ft
then
...
@@ -1079,7 +1081,7 @@ function cm.PendOperationNanahira()
...
@@ -1079,7 +1081,7 @@ function cm.PendOperationNanahira()
for
i
,
te
in
pairs
(
ext2
)
do
for
i
,
te
in
pairs
(
ext2
)
do
local
t
=
cm
.
order_table
[
te
:
GetValue
()]
local
t
=
cm
.
order_table
[
te
:
GetValue
()]
if
(
t
.
location
==
LOCATION_EXTRA
and
eft
>
0
)
or
(
t
.
location
~=
LOCATION_EXTRA
and
mft
>
0
)
then
if
(
t
.
location
==
LOCATION_EXTRA
and
eft
>
0
)
or
(
t
.
location
~=
LOCATION_EXTRA
and
mft
>
0
)
then
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
PConditionFilterNanahira
,
tp
,
t
.
location
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
t
.
filter
,
te
:
GetHandler
())
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
PConditionFilterNanahira
,
tp
,
t
.
location
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
t
.
filter
,
te
:
GetHandler
()
,
eset
)
tg
:
Merge
(
exg
)
tg
:
Merge
(
exg
)
local
mct
=
t
.
max_count
local
mct
=
t
.
max_count
if
mct
and
mct
>
0
and
mct
<
ft
then
if
mct
and
mct
>
0
and
mct
<
ft
then
...
@@ -1096,9 +1098,37 @@ function cm.PendOperationNanahira()
...
@@ -1096,9 +1098,37 @@ function cm.PendOperationNanahira()
else
else
maxlist
[
LOCATION_EXTRA
]
=
ect
maxlist
[
LOCATION_EXTRA
]
=
ect
end
end
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
if
ce
then
tg
=
tg
:
Filter
(
aux
.
PConditionExtraFilterSpecific
,
nil
,
e
,
tp
,
lscale
,
rscale
,
ce
)
end
local
g
=
cm
.
SelectGroupWithCancel
(
tp
,
HINTMSG_SPSUMMON
,
tg
,
cm
.
PendCheckNanahira
,
nil
,
1
,
ft
,
mft
,
maxlist
)
local
g
=
cm
.
SelectGroupWithCancel
(
tp
,
HINTMSG_SPSUMMON
,
tg
,
cm
.
PendCheckNanahira
,
nil
,
1
,
ft
,
mft
,
maxlist
)
if
not
g
then
return
end
if
not
g
then
return
end
PENDULUM_CHECKLIST
=
PENDULUM_CHECKLIST
|
(
0x1
<<
tp
)
if
ce
then
Duel
.
Hint
(
HINT_CARD
,
0
,
ce
:
GetOwner
():
GetOriginalCode
())
ce
:
Reset
()
else
PENDULUM_CHECKLIST
=
PENDULUM_CHECKLIST
|
(
0x1
<<
tp
)
end
sg
:
Merge
(
g
)
sg
:
Merge
(
g
)
Duel
.
HintSelection
(
Group
.
FromCards
(
c
))
Duel
.
HintSelection
(
Group
.
FromCards
(
c
))
Duel
.
HintSelection
(
Group
.
FromCards
(
rpz
))
Duel
.
HintSelection
(
Group
.
FromCards
(
rpz
))
...
...
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