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
b902a59b
Commit
b902a59b
authored
Sep 15, 2022
by
REIKAI
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update c86590310.lua
parent
fc0e21b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
134 additions
and
145 deletions
+134
-145
expansions/script/c86590310.lua
expansions/script/c86590310.lua
+134
-145
No files found.
expansions/script/c86590310.lua
View file @
b902a59b
--未名天使的降临之仪
local
m
=
86590310
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
fselect
(
g
,
lv
,
rc
)
return
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
86590300
)
and
g
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
lv
,
rc
)
end
function
cm
.
filter
(
c
,
e
,
tp
,
g
)
return
c
:
IsSetCard
(
0x965f
)
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
g
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
g
,
c
:
GetLevel
(),
c
))
end
function
cm
.
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
,
m1
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
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
)
Auxiliary
.
GCheckAdditional
=
Auxiliary
.
RitualCheckAdditional
(
c
,
lv
,
greater_or_equal
)
local
res
=
mg
:
CheckSubGroup
(
Auxiliary
.
RitualCheck
,
1
,
lv
,
tp
,
c
,
lv
,
greater_or_equal
)
Auxiliary
.
GCheckAdditional
=
nil
return
res
end
function
cm
.
rtc
(
g
,
c
,
lv
)
Duel
.
SetSelectedCard
(
g
)
return
g
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
lv
,
c
)
and
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
86590300
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
RitualUltimateFilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
cm
.
filter
,
e
,
tp
,
mg
,
mg2
,
Card
.
GetLevel
,
"Greater"
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
mtg
=
Group
.
CreateGroup
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
RitualUltimateFilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
cm
.
filter
,
e
,
tp
,
mg
,
mg2
,
Card
.
GetLevel
,
"Greater"
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
if
tc
:
IsLocation
(
LOCATION_DECK
)
then
mg
=
mg
:
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
,
cm
.
rtc
,
false
,
1
,
tc
:
GetLevel
(),
tc
,
tc
:
GetLevel
())
aux
.
GCheckAdditional
=
nil
if
not
mat
or
mat
:
GetCount
()
==
0
then
return
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
mtg
:
Merge
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
else
mg
=
mg
:
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
,
aux
.
RitualCheck
,
false
,
1
,
tc
:
GetLevel
(),
tp
,
tc
,
tc
:
GetLevel
(),
"Greater"
)
aux
.
GCheckAdditional
=
nil
if
not
mat
or
mat
:
GetCount
()
==
0
then
return
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
mtg
:
Merge
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
if
tc
:
IsFaceup
()
and
#
mtg
>
0
then
Duel
.
BreakEffect
()
local
rtg
=
mtg
:
FilterCount
(
Card
.
IsCode
,
nil
,
86590300
)
if
rtg
>=
1
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
tc
:
RegisterEffect
(
e2
)
end
if
rtg
>=
2
then
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e4
:
SetValue
(
1
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e4
)
tc
:
RegisterFlagEffect
(
m
+
105
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
m
,
0
))
end
if
rtg
>=
3
then
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_CANNOT_INACTIVATE
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetValue
(
cm
.
effectfilter
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e5
:
SetCode
(
EFFECT_CANNOT_DISEFFECT
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetValue
(
cm
.
effectfilter
)
e5
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e5
)
tc
:
RegisterFlagEffect
(
m
+
105
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
m
,
1
))
end
end
end
function
cm
.
effectfilter
(
e
,
ct
)
local
te
=
Duel
.
GetChainInfo
(
ct
,
CHAININFO_TRIGGERING_EFFECT
)
return
te
:
GetHandler
()
==
e
:
GetHandler
()
--未名天使的降临之仪
local
m
=
86590310
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
fselect
(
g
,
lv
,
rc
)
return
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
86590300
)
and
g
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
lv
,
rc
)
end
function
cm
.
filter
(
c
,
e
,
tp
,
g
)
return
c
:
IsSetCard
(
0x965f
)
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
g
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
g
,
c
:
GetLevel
(),
c
))
end
function
cm
.
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
,
m1
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
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
)
Auxiliary
.
GCheckAdditional
=
Auxiliary
.
RitualCheckAdditional
(
c
,
lv
,
greater_or_equal
)
local
res
=
mg
:
CheckSubGroup
(
cm
.
ritualcheckgroup
,
1
,
lv
,
tp
,
c
,
lv
,
greater_or_equal
)
Auxiliary
.
GCheckAdditional
=
nil
return
res
end
function
cm
.
ritualcheckgroup
(
g
,
tp
,
c
,
lv
,
str
)
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
not
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
86590300
)
then
return
false
end
return
Auxiliary
.
RitualCheck
(
g
,
tp
,
c
,
lv
,
str
)
end
function
cm
.
rtc
(
g
,
c
,
lv
)
Duel
.
SetSelectedCard
(
g
)
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
not
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
86590300
)
then
return
false
end
return
g
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
lv
,
c
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
RitualUltimateFilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
cm
.
filter
,
e
,
tp
,
mg
,
mg2
,
Card
.
GetLevel
,
"Greater"
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
mtg
=
Group
.
CreateGroup
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
RitualUltimateFilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
cm
.
filter
,
e
,
tp
,
mg
,
mg2
,
Card
.
GetLevel
,
"Greater"
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
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
,
cm
.
rtc
,
false
,
1
,
tc
:
GetLevel
(),
tc
,
tc
:
GetLevel
())
aux
.
GCheckAdditional
=
nil
if
not
mat
or
mat
:
GetCount
()
==
0
then
return
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
mtg
:
Merge
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
if
tc
:
IsFaceup
()
and
#
mtg
>
0
then
Duel
.
BreakEffect
()
local
rtg
=
mtg
:
FilterCount
(
Card
.
IsCode
,
nil
,
86590300
)
if
rtg
>=
1
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
tc
:
RegisterEffect
(
e2
)
end
if
rtg
>=
2
then
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e4
:
SetValue
(
1
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e4
)
tc
:
RegisterFlagEffect
(
m
+
105
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
m
,
0
))
end
if
rtg
>=
3
then
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_CANNOT_INACTIVATE
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetValue
(
cm
.
effectfilter
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e5
:
SetCode
(
EFFECT_CANNOT_DISEFFECT
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetValue
(
cm
.
effectfilter
)
e5
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e5
)
tc
:
RegisterFlagEffect
(
m
+
105
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
m
,
1
))
end
end
end
function
cm
.
effectfilter
(
e
,
ct
)
local
te
=
Duel
.
GetChainInfo
(
ct
,
CHAININFO_TRIGGERING_EFFECT
)
return
te
:
GetHandler
()
==
e
:
GetHandler
()
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