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
Soulgamer
ygopro-222DIY-cards
Commits
a9c2d540
Commit
a9c2d540
authored
Jun 07, 2024
by
聖園ミカ
🐟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vme50
parent
4beb12a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
4 deletions
+70
-4
expansions/script/c50221310.lua
expansions/script/c50221310.lua
+70
-4
No files found.
expansions/script/c50221310.lua
View file @
a9c2d540
--四季轮回
function
c50221310
.
initial_effect
(
c
)
--Activate
local
e1
=
aux
.
AddRitualProcEqual2
(
c
,
c50221310
.
mfilter
,
LOCATION_HAND
+
LOCATION_DECK
,
nil
,
c50221310
.
mfilter
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
50221310
)
e1
:
SetTarget
(
c50221310
.
target
)
e1
:
SetOperation
(
c50221310
.
activate
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
...
...
@@ -14,8 +20,68 @@ function c50221310.initial_effect(c)
e2
:
SetOperation
(
c50221310
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c50221310
.
mfilter
(
c
)
return
c
:
IsSetCard
(
0xcb3
)
function
c50221310
.
filter
(
c
,
e
,
tp
,
chk
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
return
c
:
IsSetCard
(
0xcb3
)
and
(
not
chk
or
c
~=
e
:
GetHandler
())
and
(
not
c
:
IsLocation
(
LOCATION_EXTRA
)
and
Duel
.
GetMZoneCount
(
tp
,
mg
,
tp
)
>
0
or
c
:
IsLocation
(
LOCATION_EXTRA
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mg
,
c
)
>
0
)
end
function
c50221310
.
RitualUltimateFilter
(
c
,
filter
,
e
,
tp
,
m1
,
m2
,
level_function
,
greater_or_equal
,
chk
)
if
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
(
filter
and
not
filter
(
c
,
e
,
tp
,
chk
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
,
POS_FACEUP
)
then
return
false
end
local
mg
=
m1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
if
m2
then
mg
:
Merge
(
m2
)
end
if
c
.
mat_filter
then
mg
=
mg
:
Filter
(
c
.
mat_filter
,
c
,
tp
)
else
mg
:
RemoveCard
(
c
)
end
local
lv
=
level_function
(
c
)
aux
.
GCheckAdditional
=
aux
.
RitualCheckAdditional
(
c
,
lv
,
greater_or_equal
)
local
res
=
mg
:
CheckSubGroup
(
aux
.
RitualCheck
,
1
,
lv
,
tp
,
c
,
lv
,
greater_or_equal
)
aux
.
GCheckAdditional
=
nil
return
res
end
function
c50221310
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
return
Duel
.
IsExistingMatchingCard
(
c50221310
.
RitualUltimateFilter
,
tp
,
0x72
,
0
,
1
,
nil
,
c50221310
.
filter
,
e
,
tp
,
mg1
,
nil
,
Card
.
GetLevel
,
"Greater"
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
0x72
)
end
function
c50221310
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
::
cancel
::
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c50221310
.
RitualUltimateFilter
),
tp
,
0x72
,
0
,
1
,
1
,
nil
,
c50221310
.
filter
,
e
,
tp
,
mg1
,
nil
,
Card
.
GetLevel
,
"Greater"
)
local
tc
=
g
:
GetFirst
()
if
tc
then
local
mg
=
mg1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
if
tc
.
mat_filter
then
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
tc
,
tp
)
else
mg
:
RemoveCard
(
tc
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
aux
.
GCheckAdditional
=
aux
.
RitualCheckAdditional
(
tc
,
tc
:
GetLevel
(),
"Greater"
)
local
mat
=
mg
:
SelectSubGroup
(
tp
,
c50221310
.
RitualCheck
,
true
,
1
,
tc
:
GetLevel
(),
tp
,
tc
,
tc
:
GetLevel
(),
"Greater"
)
aux
.
GCheckAdditional
=
nil
if
not
mat
then
goto
cancel
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
function
c50221310
.
RitualCheck
(
g
,
tp
,
c
,
lv
,
greater_or_equal
)
return
Auxiliary
[
"RitualCheck"
..
greater_or_equal
](
g
,
c
,
lv
)
and
(
not
c
:
IsLocation
(
LOCATION_EXTRA
)
and
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
or
c
:
IsLocation
(
LOCATION_EXTRA
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
c
)
>
0
)
and
(
not
c
.
mat_group_check
or
c
.
mat_group_check
(
g
,
tp
))
and
(
not
Auxiliary
.
RCheckAdditional
or
Auxiliary
.
RCheckAdditional
(
tp
,
g
,
c
))
end
function
c50221310
.
thcfilter
(
c
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c
:
IsSetCard
(
0xcb3
)
and
c
:
IsLocation
(
LOCATION_HAND
)
...
...
@@ -36,4 +102,4 @@ function c50221310.thop(e,tp,eg,ep,ev,re,r,rp)
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
end
\ No newline at end of file
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