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
Ai
ygopro-222DIY-cards
Commits
ed952af1
Commit
ed952af1
authored
Aug 14, 2021
by
Tachibana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndyd
parent
1b7bf044
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
62 deletions
+36
-62
expansions/script/c81004004.lua
expansions/script/c81004004.lua
+36
-62
No files found.
expansions/script/c81004004.lua
View file @
ed952af1
...
@@ -21,84 +21,56 @@ end
...
@@ -21,84 +21,56 @@ end
function
cm
.
dfilter
(
c
)
function
cm
.
dfilter
(
c
)
return
c
:
IsAttack
(
1550
)
and
c
:
IsDefense
(
1050
)
and
c
:
IsLevelAbove
(
1
)
and
c
:
IsAbleToGrave
()
return
c
:
IsAttack
(
1550
)
and
c
:
IsDefense
(
1050
)
and
c
:
IsLevelAbove
(
1
)
and
c
:
IsAbleToGrave
()
end
end
function
cm
.
filter
(
c
,
e
,
tp
,
m
,
ft
)
function
cm
.
filter
(
c
,
e
,
tp
)
if
not
c
:
IsType
(
TYPE_PENDULUM
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
return
c
:
IsType
(
TYPE_PENDULUM
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
local
dg
=
Duel
.
GetMatchingGroup
(
cm
.
dfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
ft
>
0
then
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
or
dg
:
IsExists
(
cm
.
dlvfilter
,
1
,
nil
,
tp
,
mg
,
c
)
else
return
ft
>-
1
and
mg
:
IsExists
(
cm
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
dg
,
c
)
end
end
end
function
cm
.
mfilterf
(
c
,
tp
,
mg
,
dg
,
rc
)
function
cm
.
rcheck
(
tp
,
g
,
c
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
return
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
<=
1
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
or
dg
:
IsExists
(
cm
.
dlvfilter
,
1
,
nil
,
tp
,
mg
,
rc
,
c
)
else
return
false
end
end
end
function
cm
.
dlvfilter
(
c
,
tp
,
mg
,
rc
,
mc
)
function
cm
.
rgcheck
(
g
)
Duel
.
SetSelectedCard
(
Group
.
FromCards
(
c
,
mc
))
return
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
<=
1
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
dg
=
Duel
.
GetMatchingGroup
(
cm
.
dfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
aux
.
RCheckAdditional
=
cm
.
rcheck
aux
.
RGCheckAdditional
=
cm
.
rgcheck
local
res
=
Duel
.
IsExistingMatchingCard
(
aux
.
RitualUltimateFilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
cm
.
filter
,
e
,
tp
,
mg
,
dg
,
Card
.
GetLevel
,
"Equal"
)
aux
.
RCheckAdditional
=
nil
aux
.
RGCheckAdditional
=
nil
return
res
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
m
=
Duel
.
GetRitualMaterial
(
tp
)
local
m
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
dg
=
Duel
.
GetMatchingGroup
(
cm
.
dfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
filter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
m
,
ft
)
aux
.
RCheckAdditional
=
cm
.
rcheck
aux
.
RGCheckAdditional
=
cm
.
rgcheck
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
aux
.
RitualUltimateFilter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
cm
.
filter
,
e
,
tp
,
m
,
dg
,
Card
.
GetLevel
,
"Equal"
)
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
if
tc
then
if
tc
then
local
mat
,
dmat
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
local
dg
=
Duel
.
GetMatchingGroup
(
cm
.
dfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
mg
:
Merge
(
dg
)
if
ft
>
0
then
if
tc
.
mat_filter
then
local
b1
=
dg
:
IsExists
(
cm
.
dlvfilter
,
1
,
nil
,
tp
,
mg
,
tc
)
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
tc
,
tp
)
local
b2
=
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
if
b1
and
(
not
b2
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
)))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
dmat
=
dg
:
FilterSelect
(
tp
,
cm
.
dlvfilter
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
dmat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
:
Merge
(
dmat
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
end
else
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mg
:
RemoveCard
(
tc
)
mat
=
mg
:
FilterSelect
(
tp
,
cm
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
dg
,
tc
)
end
local
b1
=
dg
:
IsExists
(
cm
.
dlvfilter
,
1
,
nil
,
tp
,
mg
,
tc
,
mat
:
GetFirst
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
SetSelectedCard
(
mat
)
aux
.
GCheckAdditional
=
aux
.
RitualCheckAdditional
(
tc
,
tc
:
GetLevel
(),
"Equal"
)
local
b2
=
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
local
mat
=
mg
:
SelectSubGroup
(
tp
,
aux
.
RitualCheck
,
false
,
1
,
tc
:
GetLevel
(),
tp
,
tc
,
tc
:
GetLevel
(),
"Equal"
)
if
b1
and
(
not
b2
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
)))
then
aux
.
GCheckAdditional
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
if
not
mat
or
mat
:
GetCount
()
==
0
then
dmat
=
dg
:
FilterSelect
(
tp
,
cm
.
dlvfilter
,
1
,
1
,
nil
,
tp
,
mg
,
tc
,
mat
:
GetFirst
())
aux
.
RCheckAdditional
=
nil
mat
:
Merge
(
dmat
)
aux
.
RGCheckAdditional
=
nil
Duel
.
SetSelectedCard
(
mat
)
return
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
:
Merge
(
mat2
)
else
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
:
Merge
(
mat2
)
end
end
end
tc
:
SetMaterial
(
mat
)
tc
:
SetMaterial
(
mat
)
if
dmat
then
local
dmat
=
mat
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
dmat
:
GetCount
()
>
0
then
mat
:
Sub
(
dmat
)
mat
:
Sub
(
dmat
)
Duel
.
SendtoGrave
(
dmat
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_RITUAL
)
Duel
.
SendtoGrave
(
dmat
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_RITUAL
)
end
end
...
@@ -111,13 +83,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -111,13 +83,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e2
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_REDIRECT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_REDIRECT
)
e2
:
SetValue
(
LOCATION_REMOVED
)
e2
:
SetValue
(
LOCATION_REMOVED
)
tc
:
RegisterEffect
(
e2
)
tc
:
RegisterEffect
(
e2
,
true
)
end
end
aux
.
RCheckAdditional
=
nil
aux
.
RGCheckAdditional
=
nil
end
end
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