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
Reinen
ygopro-scripts
Commits
f3609109
Commit
f3609109
authored
Nov 07, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename PENDULUM_CHECKLIST
parent
1b6c41a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
c31531170.lua
c31531170.lua
+5
-5
utility.lua
utility.lua
+7
-7
No files found.
c31531170.lua
View file @
f3609109
...
...
@@ -11,8 +11,8 @@ function c31531170.initial_effect(c)
end
function
c31531170
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
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
if
not
aux
.
PendulumChecklist
then
aux
.
PendulumChecklist
=
0
end
if
chk
==
0
then
return
(
aux
.
PendulumChecklist
&
(
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
)
Duel
.
SetTargetCard
(
g
)
end
...
...
@@ -38,7 +38,7 @@ function c31531170.pendcon(e,c,og)
if
c
==
nil
then
return
true
end
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
if
aux
.
PendulumChecklist
&
(
0x1
<<
tp
)
~=
0
and
#
eset
==
0
then
return
false
end
local
rpz
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_PZONE
,
1
)
if
rpz
==
nil
or
rpz
:
GetFieldID
()
~=
c
:
GetFlagEffectLabel
(
31531170
)
then
return
false
end
local
lscale
=
c
:
GetLeftScale
()
...
...
@@ -70,7 +70,7 @@ function c31531170.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
tg
=
Duel
.
GetMatchingGroup
(
aux
.
PConditionFilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
end
local
ce
=
nil
local
b1
=
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
==
0
local
b1
=
aux
.
PendulumChecklist
&
(
0x1
<<
tp
)
==
0
local
b2
=#
eset
>
0
if
b1
and
b2
then
local
options
=
{
1163
}
...
...
@@ -96,7 +96,7 @@ function c31531170.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
Duel
.
Hint
(
HINT_CARD
,
0
,
ce
:
GetOwner
():
GetOriginalCode
())
ce
:
Reset
()
else
PENDULUM_CHECKLIST
=
PENDULUM_CHECKLIST
|
(
0x1
<<
tp
)
aux
.
PendulumChecklist
=
aux
.
PendulumChecklist
|
(
0x1
<<
tp
)
end
Duel
.
Hint
(
HINT_CARD
,
0
,
31531170
)
sg
:
Merge
(
g
)
...
...
utility.lua
View file @
f3609109
...
...
@@ -1686,8 +1686,8 @@ function Auxiliary.AddRitualProcGreater2Code2(c,code1,code2,summon_location,grav
end
--add procedure to Pendulum monster, also allows registeration of activation effect
function
Auxiliary
.
EnablePendulumAttribute
(
c
,
reg
)
if
not
PENDULUM_CHECKLIST
then
PENDULUM_CHECKLIST
=
0
if
not
Auxiliary
.
PendulumChecklist
then
Auxiliary
.
PendulumChecklist
=
0
local
ge1
=
Effect
.
GlobalEffect
()
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
...
...
@@ -1715,7 +1715,7 @@ function Auxiliary.EnablePendulumAttribute(c,reg)
end
end
function
Auxiliary
.
PendulumReset
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
PENDULUM_CHECKLIST
=
0
Auxiliary
.
PendulumChecklist
=
0
end
function
Auxiliary
.
PConditionExtraFilterSpecific
(
c
,
e
,
tp
,
lscale
,
rscale
,
te
)
if
not
te
then
return
true
end
...
...
@@ -1739,14 +1739,14 @@ function Auxiliary.PConditionFilter(c,e,tp,lscale,rscale,eset)
return
(
c
:
IsLocation
(
LOCATION_HAND
)
or
(
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_PENDULUM
)))
and
lv
>
lscale
and
lv
<
rscale
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_PENDULUM
,
tp
,
bool
,
bool
)
and
not
c
:
IsForbidden
()
and
(
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
==
0
or
Auxiliary
.
PConditionExtraFilter
(
c
,
e
,
tp
,
lscale
,
rscale
,
eset
))
and
(
Auxiliary
.
PendulumChecklist
&
(
0x1
<<
tp
)
==
0
or
Auxiliary
.
PConditionExtraFilter
(
c
,
e
,
tp
,
lscale
,
rscale
,
eset
))
end
function
Auxiliary
.
PendCondition
()
return
function
(
e
,
c
,
og
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
eset
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_EXTRA_PENDULUM_SUMMON
)}
if
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
~=
0
and
#
eset
==
0
then
return
false
end
if
Auxiliary
.
PendulumChecklist
&
(
0x1
<<
tp
)
~=
0
and
#
eset
==
0
then
return
false
end
local
rpz
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
if
rpz
==
nil
or
c
==
rpz
then
return
false
end
local
lscale
=
c
:
GetLeftScale
()
...
...
@@ -1799,7 +1799,7 @@ function Auxiliary.PendOperation()
tg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
PConditionFilter
,
tp
,
loc
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
,
eset
)
end
local
ce
=
nil
local
b1
=
PENDULUM_CHECKLIST
&
(
0x1
<<
tp
)
==
0
local
b1
=
Auxiliary
.
PendulumChecklist
&
(
0x1
<<
tp
)
==
0
local
b2
=#
eset
>
0
if
b1
and
b2
then
local
options
=
{
1163
}
...
...
@@ -1830,7 +1830,7 @@ function Auxiliary.PendOperation()
Duel
.
Hint
(
HINT_CARD
,
0
,
ce
:
GetOwner
():
GetOriginalCode
())
ce
:
Reset
()
else
PENDULUM_CHECKLIST
=
PENDULUM_CHECKLIST
|
(
0x1
<<
tp
)
Auxiliary
.
PendulumChecklist
=
Auxiliary
.
PendulumChecklist
|
(
0x1
<<
tp
)
end
sg
:
Merge
(
g
)
Duel
.
HintSelection
(
Group
.
FromCards
(
c
))
...
...
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