Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-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
Nguyễn Anh Kiệt
ygopro-222DIY-cards
Commits
d8492de7
Commit
d8492de7
authored
Jan 17, 2020
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
empty pigeon
parent
91655c24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
43 deletions
+28
-43
expansions/script/c17090006.lua
expansions/script/c17090006.lua
+24
-39
expansions/script/c81011003.lua
expansions/script/c81011003.lua
+4
-4
No files found.
expansions/script/c17090006.lua
View file @
d8492de7
...
...
@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
17090006
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
...
...
@@ -37,56 +37,41 @@ end
function
cm
.
Percival
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
(
c
:
IsCode
(
17060925
,
47500507
)
or
cm
.
IsPercival
(
c
))
end
function
cm
.
nmb
(
c
)
return
c
:
IsCode
(
47500507
,
47548001
,
47500503
,
10120011
,
47500505
,
66547759
,
17060857
,
47550010
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
(
cm
.
Vane
(
c
)
or
cm
.
Siegfried
(
c
)
or
cm
.
Lancelot
(
c
)
or
cm
.
Percival
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
and
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
c
:
GetCode
())
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
(
cm
.
Percival
(
c
)
or
cm
.
Lancelot
(
c
)
or
cm
.
Siegfried
(
c
)
or
cm
.
Vane
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
and
(
c
:
IsLocation
(
LOCATION_DECK
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
or
c
:
IsLocation
(
LOCATION_EXTRA
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
)
end
function
cm
.
check
(
g
)
if
#
g
==
1
then
return
true
end
local
res
=
0x0
if
g
:
IsExists
(
cm
.
Vane
,
1
,
nil
)
then
res
=
res
+
0x1
end
if
g
:
IsExists
(
cm
.
Siegfried
,
1
,
nil
)
then
res
=
res
+
0x2
end
if
g
:
IsExists
(
cm
.
Lancelot
,
1
,
nil
)
then
res
=
res
+
0x4
end
if
g
:
IsExists
(
cm
.
Percival
,
1
,
nil
)
then
res
=
res
+
0x8
end
return
res
~=
0x1
and
res
~=
0x2
and
res
~=
0x4
and
res
~=
0x8
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
loc
=
0
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
loc
=
loc
+
LOCATION_DECK
end
if
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
then
loc
=
loc
+
LOCATION_EXTRA
end
return
loc
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
loc
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_EXTRA
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
loc
=
0
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
loc
=
loc
+
LOCATION_DECK
end
if
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
then
loc
=
loc
+
LOCATION_EXTRA
end
if
loc
==
0
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
spfilter
,
tp
,
loc
,
0
,
nil
,
e
,
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g1
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
g1
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
local
vc
=
g1
:
GetFirst
()
if
vc
:
IsType
(
TYPE_XYZ
)
and
cm
.
Siegfried
(
vc
)
then
local
g1
=
g
:
SelectSubGroup
(
tp
,
cm
.
check
,
false
,
1
,
2
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g1
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
local
ng
=
g1
:
Filter
(
cm
.
Siegfried
,
nil
)
local
vc
=
ng
:
GetFirst
()
if
vc
:
IsType
(
TYPE_XYZ
)
then
e
:
GetHandler
():
CancelToGrave
()
Duel
.
Overlay
(
vc
,
Group
.
FromCards
(
e
:
GetHandler
()))
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
return
end
local
t
=
{
cm
.
Vane
,
cm
.
Siegfried
,
cm
.
Lancelot
,
cm
.
Percival
}
for
i
=
1
,
4
do
if
t
[
i
](
g1
:
GetFirst
())
then
g
:
Remove
(
t
[
i
],
nil
)
end
if
Duel
.
GetLocationCountFromEx
(
tp
)
==
0
then
g
:
Remove
(
cm
.
nmb
,
nil
)
end
end
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g2
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
g2
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
local
tc
=
g2
:
GetFirst
()
if
tc
:
IsType
(
TYPE_XYZ
)
and
cm
.
Siegfried
(
tc
)
then
e
:
GetHandler
():
CancelToGrave
()
Duel
.
Overlay
(
tc
,
Group
.
FromCards
(
e
:
GetHandler
()))
end
end
end
expansions/script/c81011003.lua
View file @
d8492de7
...
...
@@ -40,11 +40,11 @@ end
function
c81011003
.
imcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetLinkedGroup
():
IsExists
(
c81011003
.
tgfilter
,
1
,
nil
)
end
function
c81011003
.
efilter
(
e
,
re
,
rp
)
function
c81011003
.
efilter
(
e
,
re
)
if
re
:
GetOwnerPlayer
()
==
e
:
GetOwnerPlayer
()
then
return
false
end
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
true
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
return
not
g
:
IsContains
(
e
:
GetHandler
())
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
true
end
local
g
=
Duel
.
GetChainInfo
(
Duel
.
GetCurrentChain
()
,
CHAININFO_TARGET_CARDS
)
return
not
g
or
not
g
:
IsContains
(
e
:
GetHandler
())
end
function
c81011003
.
cbcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
~=
REASON_REPLACE
...
...
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