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
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
八宫一月
ygopro-scripts
Commits
bd5d83c4
Commit
bd5d83c4
authored
Dec 23, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve of rituals
parent
403b3fbf
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
166 deletions
+52
-166
c21105106.lua
c21105106.lua
+1
-1
c73055622.lua
c73055622.lua
+1
-5
c84388461.lua
c84388461.lua
+6
-69
c86758915.lua
c86758915.lua
+3
-70
c94666032.lua
c94666032.lua
+1
-1
utility.lua
utility.lua
+40
-20
No files found.
c21105106.lua
View file @
bd5d83c4
...
@@ -91,5 +91,5 @@ function c21105106.rmop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -91,5 +91,5 @@ function c21105106.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
c21105106
.
mat_group_check
(
g
)
function
c21105106
.
mat_group_check
(
g
)
return
g
:
GetClassCount
(
Card
.
GetRace
)
==
3
return
#
g
==
3
and
g
:
GetClassCount
(
Card
.
GetRace
)
==
3
end
end
c73055622.lua
View file @
bd5d83c4
--霊魂の降神
--霊魂の降神
function
c73055622
.
initial_effect
(
c
)
function
c73055622
.
initial_effect
(
c
)
aux
.
AddRitualProcUltimate
(
c
,
c73055622
.
filter
,
Card
.
GetLevel
,
"Greater"
,
nil
,
c73055622
.
mfilter
)
aux
.
AddRitualProcGreater2Code2
(
c
,
25415052
,
52900000
,
nil
,
c73055622
.
mfilter
)
end
c73055622
.
fit_monster
=
{
25415052
,
52900000
}
function
c73055622
.
filter
(
c
)
return
c
:
IsCode
(
25415052
,
52900000
)
end
end
function
c73055622
.
mfilter
(
c
)
function
c73055622
.
mfilter
(
c
)
return
c
:
IsType
(
TYPE_SPIRIT
)
return
c
:
IsType
(
TYPE_SPIRIT
)
...
...
c84388461.lua
View file @
bd5d83c4
...
@@ -12,88 +12,25 @@ function c84388461.initial_effect(c)
...
@@ -12,88 +12,25 @@ function c84388461.initial_effect(c)
e2
:
SetTarget
(
c84388461
.
splimit
)
e2
:
SetTarget
(
c84388461
.
splimit
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--spsummon
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
aux
.
AddRitualProcEqual2
(
c
,
c84388461
.
filter
,
nil
,
nil
,
c84388461
.
mfilter
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetDescription
(
aux
.
Stringid
(
84388461
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
84388461
,
1
))
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetCode
(
0
)
e3
:
SetCountLimit
(
1
,
84388461
)
e3
:
SetCountLimit
(
1
,
84388461
)
e3
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e3
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e3
:
SetCost
(
c84388461
.
cost
)
e3
:
SetCost
(
c84388461
.
cost
)
e3
:
SetTarget
(
c84388461
.
target
)
e3
:
SetOperation
(
c84388461
.
operation
)
c
:
RegisterEffect
(
e3
)
end
end
function
c84388461
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
function
c84388461
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
if
c
:
IsSetCard
(
0xb4
)
or
c
:
IsSetCard
(
0xc4
)
then
return
false
end
if
c
:
IsSetCard
(
0xb4
)
or
c
:
IsSetCard
(
0xc4
)
then
return
false
end
return
bit
.
band
(
sumtype
,
SUMMON_TYPE_PENDULUM
)
==
SUMMON_TYPE_PENDULUM
return
bit
.
band
(
sumtype
,
SUMMON_TYPE_PENDULUM
)
==
SUMMON_TYPE_PENDULUM
end
end
function
c84388461
.
filter
(
c
,
e
,
tp
,
m
,
ft
)
function
c84388461
.
filter
(
c
)
if
not
c
:
IsSetCard
(
0xb4
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
return
c
:
IsSetCard
(
0xb4
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
if
c
:
IsCode
(
21105106
)
then
return
c
:
ritual_custom_condition
(
mg
,
ft
)
end
if
c
.
mat_filter
then
mg
=
mg
:
Filter
(
c
.
mat_filter
,
nil
)
end
if
ft
>
0
then
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
else
return
ft
>-
1
and
mg
:
IsExists
(
c84388461
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
end
function
c84388461
.
mfilterf
(
c
,
tp
,
mg
,
rc
)
function
c84388461
.
mfilter
(
c
,
e
,
tp
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
return
c
~=
e
:
GetHandler
()
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
else
return
false
end
end
end
function
c84388461
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c84388461
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
end
function
c84388461
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
mg
:
RemoveCard
(
e
:
GetHandler
())
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
)
and
e
:
GetHandler
():
GetSequence
()
<
5
then
ft
=
ft
+
1
end
return
Duel
.
IsExistingMatchingCard
(
c84388461
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c84388461
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c84388461
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
if
tc
:
IsCode
(
21105106
)
then
tc
:
ritual_custom_operation
(
mg
)
local
mat
=
tc
:
GetMaterial
()
Duel
.
ReleaseRitualMaterial
(
mat
)
else
if
tc
.
mat_filter
then
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
c84388461
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
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
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
end
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
c86758915.lua
View file @
bd5d83c4
--魔神儀の祝誕
--魔神儀の祝誕
function
c86758915
.
initial_effect
(
c
)
function
c86758915
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
aux
.
AddRitualProcGreater2
(
c
,
nil
,
nil
,
nil
,
c86758915
.
mfilter
)
e1
:
SetDescription
(
aux
.
Stringid
(
86758915
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
86758915
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c86758915
.
target
)
e1
:
SetOperation
(
c86758915
.
activate
)
c
:
RegisterEffect
(
e1
)
--to hand
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
86758915
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
86758915
,
1
))
...
@@ -21,69 +15,8 @@ function c86758915.initial_effect(c)
...
@@ -21,69 +15,8 @@ function c86758915.initial_effect(c)
e2
:
SetOperation
(
c86758915
.
thop
)
e2
:
SetOperation
(
c86758915
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c86758915
.
filter
(
c
,
e
,
tp
,
m
,
ft
)
function
c86758915
.
mfilter
(
c
)
if
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
return
c
:
IsSetCard
(
0x117
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
if
c
:
IsCode
(
21105106
)
then
return
c
:
ritual_custom_condition
(
mg
,
ft
,
true
)
end
if
c
.
mat_filter
then
mg
=
mg
:
Filter
(
c
.
mat_filter
,
nil
)
end
if
ft
>
0
then
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
c
)
else
return
mg
:
IsExists
(
c86758915
.
filterF
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
c86758915
.
filterF
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
rc
)
else
return
false
end
end
function
c86758915
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
):
Filter
(
Card
.
IsSetCard
,
nil
,
0x117
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c86758915
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c86758915
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
):
Filter
(
Card
.
IsSetCard
,
nil
,
0x117
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c86758915
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
local
mat
=
nil
if
tc
:
IsCode
(
21105106
)
then
tc
:
ritual_custom_operation
(
mg
,
true
)
local
mat
=
tc
:
GetMaterial
()
Duel
.
ReleaseRitualMaterial
(
mat
)
else
if
tc
.
mat_filter
then
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
c86758915
.
filterF
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
tc
)
mat
:
Merge
(
mat2
)
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
end
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
end
function
c86758915
.
cfilter
(
c
,
tp
)
function
c86758915
.
cfilter
(
c
,
tp
)
return
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_HAND
))
and
c
:
IsSetCard
(
0x117
)
and
not
c
:
IsCode
(
86758915
)
return
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_HAND
))
and
c
:
IsSetCard
(
0x117
)
and
not
c
:
IsCode
(
86758915
)
...
...
c94666032.lua
View file @
bd5d83c4
--リヴェンデット・ボーン
--リヴェンデット・ボーン
function
c94666032
.
initial_effect
(
c
)
function
c94666032
.
initial_effect
(
c
)
aux
.
AddRitualProc
Ultimate
(
c
,
c94666032
.
filter
,
Card
.
GetLevel
,
"Greater"
,
LOCATION_HAND
+
LOCATION_GRAVE
,
c94666032
.
mfilter
)
aux
.
AddRitualProc
Greater2
(
c
,
c94666032
.
filter
,
LOCATION_HAND
+
LOCATION_GRAVE
,
c94666032
.
mfilter
)
--destroy replace
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
...
...
utility.lua
View file @
bd5d83c4
...
@@ -1379,14 +1379,14 @@ function Auxiliary.FShaddollOperation(attr)
...
@@ -1379,14 +1379,14 @@ function Auxiliary.FShaddollOperation(attr)
Duel
.
SetFusionMaterial
(
g
)
Duel
.
SetFusionMaterial
(
g
)
end
end
end
end
function
Auxiliary
.
AddRitualProcUltimate
(
c
,
filter
,
level_function
,
greater_or_equal
,
summon_location
,
grave_filter
)
function
Auxiliary
.
AddRitualProcUltimate
(
c
,
filter
,
level_function
,
greater_or_equal
,
summon_location
,
grave_filter
,
mat_filter
)
summon_location
=
summon_location
or
LOCATION_HAND
summon_location
=
summon_location
or
LOCATION_HAND
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
Auxiliary
.
RitualUltimateTarget
(
filter
,
level_function
,
greater_or_equal
,
summon_location
,
grave_filter
))
e1
:
SetTarget
(
Auxiliary
.
RitualUltimateTarget
(
filter
,
level_function
,
greater_or_equal
,
summon_location
,
grave_filter
,
mat_filter
))
e1
:
SetOperation
(
Auxiliary
.
RitualUltimateOperation
(
filter
,
level_function
,
greater_or_equal
,
summon_location
,
grave_filter
))
e1
:
SetOperation
(
Auxiliary
.
RitualUltimateOperation
(
filter
,
level_function
,
greater_or_equal
,
summon_location
,
grave_filter
,
mat_filter
))
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
return
e1
return
e1
end
end
...
@@ -1401,7 +1401,7 @@ function Auxiliary.RitualCheck(g,tp,c,lv,greater_or_equal)
...
@@ -1401,7 +1401,7 @@ function Auxiliary.RitualCheck(g,tp,c,lv,greater_or_equal)
return
Auxiliary
[
"RitualCheck"
..
greater_or_equal
](
g
,
c
,
lv
)
and
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
and
(
not
c
.
mat_group_check
or
c
.
mat_group_check
(
g
,
tp
))
return
Auxiliary
[
"RitualCheck"
..
greater_or_equal
](
g
,
c
,
lv
)
and
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
and
(
not
c
.
mat_group_check
or
c
.
mat_group_check
(
g
,
tp
))
end
end
function
Auxiliary
.
RitualUltimateFilter
(
c
,
filter
,
e
,
tp
,
m1
,
m2
,
level_function
,
greater_or_equal
)
function
Auxiliary
.
RitualUltimateFilter
(
c
,
filter
,
e
,
tp
,
m1
,
m2
,
level_function
,
greater_or_equal
)
if
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
(
filter
and
not
filter
(
c
)
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
if
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
(
filter
and
not
filter
(
c
,
e
,
tp
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
local
mg
=
m1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
if
m2
then
if
m2
then
mg
:
Merge
(
m2
)
mg
:
Merge
(
m2
)
...
@@ -1416,10 +1416,11 @@ end
...
@@ -1416,10 +1416,11 @@ end
function
Auxiliary
.
RitualExtraFilter
(
c
,
f
)
function
Auxiliary
.
RitualExtraFilter
(
c
,
f
)
return
c
:
GetLevel
()
>
0
and
f
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemove
()
return
c
:
GetLevel
()
>
0
and
f
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemove
()
end
end
function
Auxiliary
.
RitualUltimateTarget
(
filter
,
level_function
,
greater_or_equal
,
summon_location
,
grave_filter
)
function
Auxiliary
.
RitualUltimateTarget
(
filter
,
level_function
,
greater_or_equal
,
summon_location
,
grave_filter
,
mat_filter
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
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
)
if
mat_filter
then
mg
=
mg
:
Filter
(
mat_filter
,
nil
,
e
,
tp
)
end
local
exg
=
nil
local
exg
=
nil
if
grave_filter
then
if
grave_filter
then
exg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
RitualExtraFilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
grave_filter
)
exg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
RitualExtraFilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
grave_filter
)
...
@@ -1429,9 +1430,10 @@ function Auxiliary.RitualUltimateTarget(filter,level_function,greater_or_equal,s
...
@@ -1429,9 +1430,10 @@ function Auxiliary.RitualUltimateTarget(filter,level_function,greater_or_equal,s
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
summon_location
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
summon_location
)
end
end
end
end
function
Auxiliary
.
RitualUltimateOperation
(
filter
,
level_function
,
greater_or_equal
,
summon_location
,
grave_filter
)
function
Auxiliary
.
RitualUltimateOperation
(
filter
,
level_function
,
greater_or_equal
,
summon_location
,
grave_filter
,
mat_filter
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
if
mat_filter
then
mg
=
mg
:
Filter
(
mat_filter
,
nil
,
e
,
tp
)
end
local
exg
=
nil
local
exg
=
nil
if
grave_filter
then
if
grave_filter
then
exg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
RitualExtraFilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
grave_filter
)
exg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
RitualExtraFilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
grave_filter
)
...
@@ -1460,44 +1462,62 @@ function Auxiliary.RitualUltimateOperation(filter,level_function,greater_or_equa
...
@@ -1460,44 +1462,62 @@ function Auxiliary.RitualUltimateOperation(filter,level_function,greater_or_equa
end
end
end
end
--Ritual Summon, geq fixed lv
--Ritual Summon, geq fixed lv
function
Auxiliary
.
AddRitualProcGreater
(
c
,
filter
,
summon_location
,
grave_filter
)
function
Auxiliary
.
AddRitualProcGreater
(
c
,
filter
,
summon_location
,
grave_filter
,
mat_filter
)
return
Auxiliary
.
AddRitualProcUltimate
(
c
,
filter
,
Card
.
GetOriginalLevel
,
"Greater"
,
summon_location
,
grave_filter
)
return
Auxiliary
.
AddRitualProcUltimate
(
c
,
filter
,
Card
.
GetOriginalLevel
,
"Greater"
,
summon_location
,
grave_filter
,
mat_filter
)
end
end
function
Auxiliary
.
AddRitualProcGreaterCode
(
c
,
code1
,
summon_location
,
grave_filter
)
function
Auxiliary
.
AddRitualProcGreaterCode
(
c
,
code1
,
summon_location
,
grave_filter
,
mat_filter
)
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
local
mt
=
getmetatable
(
c
)
local
mt
=
getmetatable
(
c
)
mt
.
fit_monster
=
{
code1
}
mt
.
fit_monster
=
{
code1
}
end
end
return
Auxiliary
.
AddRitualProcGreater
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
),
summon_location
,
grave_filter
)
return
Auxiliary
.
AddRitualProcGreater
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
),
summon_location
,
grave_filter
,
mat_filter
)
end
end
--Ritual Summon, equal to fixed lv
--Ritual Summon, equal to fixed lv
function
Auxiliary
.
AddRitualProcEqual
(
c
,
filter
,
summon_location
,
grave_filter
)
function
Auxiliary
.
AddRitualProcEqual
(
c
,
filter
,
summon_location
,
grave_filter
,
mat_filter
)
return
Auxiliary
.
AddRitualProcUltimate
(
c
,
filter
,
Card
.
GetOriginalLevel
,
"Equal"
,
summon_location
,
grave_filter
)
return
Auxiliary
.
AddRitualProcUltimate
(
c
,
filter
,
Card
.
GetOriginalLevel
,
"Equal"
,
summon_location
,
grave_filter
,
mat_filter
)
end
end
function
Auxiliary
.
AddRitualProcEqualCode
(
c
,
code1
,
summon_location
,
grave_filter
)
function
Auxiliary
.
AddRitualProcEqualCode
(
c
,
code1
,
summon_location
,
grave_filter
,
mat_filter
)
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
local
mt
=
getmetatable
(
c
)
local
mt
=
getmetatable
(
c
)
mt
.
fit_monster
=
{
code1
}
mt
.
fit_monster
=
{
code1
}
end
end
return
Auxiliary
.
AddRitualProcEqual
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
),
summon_location
,
grave_filter
)
return
Auxiliary
.
AddRitualProcEqual
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
),
summon_location
,
grave_filter
,
mat_filter
)
end
end
--Ritual Summon, equal to monster lv
--Ritual Summon, equal to monster lv
function
Auxiliary
.
AddRitualProcEqual2
(
c
,
filter
,
summon_location
,
grave_filter
)
function
Auxiliary
.
AddRitualProcEqual2
(
c
,
filter
,
summon_location
,
grave_filter
,
mat_filter
)
return
Auxiliary
.
AddRitualProcUltimate
(
c
,
filter
,
Card
.
GetLevel
,
"Equal"
,
summon_location
,
grave_filter
)
return
Auxiliary
.
AddRitualProcUltimate
(
c
,
filter
,
Card
.
GetLevel
,
"Equal"
,
summon_location
,
grave_filter
,
mat_filter
)
end
end
function
Auxiliary
.
AddRitualProcEqual2Code
(
c
,
code1
,
summon_location
,
grave_filter
)
function
Auxiliary
.
AddRitualProcEqual2Code
(
c
,
code1
,
summon_location
,
grave_filter
,
mat_filter
)
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
local
mt
=
getmetatable
(
c
)
local
mt
=
getmetatable
(
c
)
mt
.
fit_monster
=
{
code1
}
mt
.
fit_monster
=
{
code1
}
end
end
return
Auxiliary
.
AddRitualProcEqual2
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
),
summon_location
,
grave_filter
)
return
Auxiliary
.
AddRitualProcEqual2
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
),
summon_location
,
grave_filter
,
mat_filter
)
end
end
function
Auxiliary
.
AddRitualProcEqual2Code2
(
c
,
code1
,
code2
,
summon_location
,
grave_filter
)
function
Auxiliary
.
AddRitualProcEqual2Code2
(
c
,
code1
,
code2
,
summon_location
,
grave_filter
,
mat_filter
)
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
local
mt
=
getmetatable
(
c
)
local
mt
=
getmetatable
(
c
)
mt
.
fit_monster
=
{
code1
,
code2
}
mt
.
fit_monster
=
{
code1
,
code2
}
end
end
return
Auxiliary
.
AddRitualProcEqual2
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
,
code2
),
summon_location
,
grave_filter
)
return
Auxiliary
.
AddRitualProcEqual2
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
,
code2
),
summon_location
,
grave_filter
,
mat_filter
)
end
--Ritual Summon, geq monster lv
function
Auxiliary
.
AddRitualProcGreater2
(
c
,
filter
,
summon_location
,
grave_filter
,
mat_filter
)
return
Auxiliary
.
AddRitualProcUltimate
(
c
,
filter
,
Card
.
GetLevel
,
"Greater"
,
summon_location
,
grave_filter
,
mat_filter
)
end
function
Auxiliary
.
AddRitualProcGreater2Code
(
c
,
code1
,
summon_location
,
grave_filter
,
mat_filter
)
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
local
mt
=
getmetatable
(
c
)
mt
.
fit_monster
=
{
code1
}
end
return
Auxiliary
.
AddRitualProcGreater2
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
),
summon_location
,
grave_filter
,
mat_filter
)
end
function
Auxiliary
.
AddRitualProcGreater2Code2
(
c
,
code1
,
code2
,
summon_location
,
grave_filter
,
mat_filter
)
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
local
mt
=
getmetatable
(
c
)
mt
.
fit_monster
=
{
code1
,
code2
}
end
return
Auxiliary
.
AddRitualProcGreater2
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
,
code2
),
summon_location
,
grave_filter
,
mat_filter
)
end
end
--add procedure to Pendulum monster, also allows registeration of activation effect
--add procedure to Pendulum monster, also allows registeration of activation effect
function
Auxiliary
.
EnablePendulumAttribute
(
c
,
reg
)
function
Auxiliary
.
EnablePendulumAttribute
(
c
,
reg
)
...
...
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