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
da69aa1d
Commit
da69aa1d
authored
Dec 05, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cancalable pendulum summon
parent
930f3d76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
utility.lua
utility.lua
+15
-2
No files found.
utility.lua
View file @
da69aa1d
...
@@ -1469,13 +1469,20 @@ function Auxiliary.AddRitualProcEqual2Code2(c,code1,code2)
...
@@ -1469,13 +1469,20 @@ function Auxiliary.AddRitualProcEqual2Code2(c,code1,code2)
end
end
--add procedure to Pendulum monster, also allows registeration of activation effect
--add procedure to Pendulum monster, also allows registeration of activation effect
function
Auxiliary
.
EnablePendulumAttribute
(
c
,
reg
)
function
Auxiliary
.
EnablePendulumAttribute
(
c
,
reg
)
if
not
PENDULUM_CHECKLIST
then
PENDULUM_CHECKLIST
=
0
local
ge1
=
Effect
.
GlobalEffect
()
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge1
:
SetOperation
(
Auxiliary
.
PendulumReset
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
1163
)
e1
:
SetDescription
(
1163
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC_G
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC_G
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
10000000
)
e1
:
SetCondition
(
Auxiliary
.
PendCondition
())
e1
:
SetCondition
(
Auxiliary
.
PendCondition
())
e1
:
SetOperation
(
Auxiliary
.
PendOperation
())
e1
:
SetOperation
(
Auxiliary
.
PendOperation
())
e1
:
SetValue
(
SUMMON_TYPE_PENDULUM
)
e1
:
SetValue
(
SUMMON_TYPE_PENDULUM
)
...
@@ -1490,6 +1497,9 @@ function Auxiliary.EnablePendulumAttribute(c,reg)
...
@@ -1490,6 +1497,9 @@ function Auxiliary.EnablePendulumAttribute(c,reg)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
end
end
function
Auxiliary
.
PendulumReset
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
PENDULUM_CHECKLIST
=
0
end
function
Auxiliary
.
PConditionFilter
(
c
,
e
,
tp
,
lscale
,
rscale
)
function
Auxiliary
.
PConditionFilter
(
c
,
e
,
tp
,
lscale
,
rscale
)
local
lv
=
0
local
lv
=
0
if
c
.
pendulum_level
then
if
c
.
pendulum_level
then
...
@@ -1506,6 +1516,7 @@ function Auxiliary.PendCondition()
...
@@ -1506,6 +1516,7 @@ function Auxiliary.PendCondition()
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
rpz
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
local
rpz
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
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
()
...
@@ -1552,7 +1563,9 @@ function Auxiliary.PendOperation()
...
@@ -1552,7 +1563,9 @@ function Auxiliary.PendOperation()
tg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
)
tg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
tg
:
SelectSubGroup
(
tp
,
Auxiliary
.
PendOperationCheck
,
false
,
1
,
#
tg
,
tp
)
local
g
=
tg
:
SelectSubGroup
(
tp
,
Auxiliary
.
PendOperationCheck
,
true
,
1
,
#
tg
,
tp
)
if
not
g
then
return
end
PENDULUM_CHECKLIST
=
PENDULUM_CHECKLIST
|
(
0x1
<<
tp
)
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