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
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
MyCard
ygopro-scripts
Commits
13521a24
Commit
13521a24
authored
Jul 24, 2016
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new
parent
2da67847
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
4 deletions
+72
-4
c29724053.lua
c29724053.lua
+49
-0
utility.lua
utility.lua
+23
-4
No files found.
c29724053.lua
0 → 100644
View file @
13521a24
--サモン・ゲート
function
c29724053
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--summon count limit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
1
,
1
)
e2
:
SetTarget
(
c29724053
.
sumlimit
)
c
:
RegisterEffect
(
e2
)
if
c29724053
.
global_check
==
nil
then
c29724053
.
global_check
=
true
c29724053
[
0
]
=
3
c29724053
[
1
]
=
3
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
ge1
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge1
:
SetOperation
(
c29724053
.
resetop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
ge2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge2
:
SetOperation
(
c29724053
.
checkop
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
function
c29724053
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c29724053
[
sump
]
<=
0
end
function
c29724053
.
resetop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c29724053
[
0
]
=
3
c29724053
[
1
]
=
3
end
function
c29724053
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
while
tc
do
if
tc
:
IsPreviousLocation
(
LOCATION_EXTRA
)
then
local
p
=
tc
:
GetSummonPlayer
()
c29724053
[
p
]
=
c29724053
[
p
]
-
1
end
tc
=
eg
:
GetNext
()
end
end
utility.lua
View file @
13521a24
...
@@ -1553,14 +1553,33 @@ function Auxiliary.PendOperation()
...
@@ -1553,14 +1553,33 @@ function Auxiliary.PendOperation()
if
lscale
>
rscale
then
lscale
,
rscale
=
rscale
,
lscale
end
if
lscale
>
rscale
then
lscale
,
rscale
=
rscale
,
lscale
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
local
tg
=
nil
if
og
then
if
og
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
tg
=
og
:
Filter
(
tp
,
Auxiliary
.
PConditionFilter
,
nil
,
e
,
tp
,
lscale
,
rscale
)
local
g
=
og
:
FilterSelect
(
tp
,
Auxiliary
.
PConditionFilter
,
1
,
ft
,
nil
,
e
,
tp
,
lscale
,
rscale
)
sg
:
Merge
(
g
)
else
else
tg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
lscale
,
rscale
)
end
local
ect
=
c29724053
and
c29724053
[
tp
]
if
ect
and
(
ect
<=
0
or
ect
>
ft
)
then
ect
=
nil
end
if
ect
==
nil
or
tg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_EXTRA
)
<=
ect
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Auxiliary
.
PConditionFilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
ft
,
nil
,
e
,
tp
,
lscale
,
rscale
)
local
g
=
tg
:
Select
(
tp
,
1
,
ft
,
nil
)
sg
:
Merge
(
g
)
sg
:
Merge
(
g
)
else
repeat
local
ct
=
math.min
(
ft
,
ect
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
tg
:
Select
(
tp
,
1
,
ct
,
nil
)
tg
:
Sub
(
g
)
sg
:
Merge
(
g
)
ft
=
ft
-
g
:
GetCount
()
ect
=
ect
-
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_EXTRA
)
until
ft
==
0
or
ect
==
0
or
not
Duel
.
SelectYesNo
(
tp
,
210
)
local
hg
=
tg
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
if
ft
>
0
and
ect
==
0
and
hg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
210
)
then
local
g
=
hg
:
Select
(
tp
,
1
,
ft
,
nil
)
sg
:
Merge
(
g
)
end
end
end
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