Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
wind2009
ygopro
Commits
0dce7ac0
Commit
0dce7ac0
authored
Jul 24, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
ce44ebc4
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
138 additions
and
163 deletions
+138
-163
ocgcore/card.cpp
ocgcore/card.cpp
+17
-2
ocgcore/card.h
ocgcore/card.h
+1
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+12
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
script/c14735698.lua
script/c14735698.lua
+14
-17
script/c27383110.lua
script/c27383110.lua
+6
-13
script/c28429121.lua
script/c28429121.lua
+19
-28
script/c29904964.lua
script/c29904964.lua
+3
-10
script/c30492798.lua
script/c30492798.lua
+1
-0
script/c33145233.lua
script/c33145233.lua
+1
-0
script/c33245030.lua
script/c33245030.lua
+1
-0
script/c34358408.lua
script/c34358408.lua
+1
-0
script/c4141820.lua
script/c4141820.lua
+1
-0
script/c45410988.lua
script/c45410988.lua
+9
-15
script/c51124303.lua
script/c51124303.lua
+5
-1
script/c77153811.lua
script/c77153811.lua
+1
-0
script/c79306385.lua
script/c79306385.lua
+6
-13
script/c84388461.lua
script/c84388461.lua
+8
-11
script/c8903700.lua
script/c8903700.lua
+1
-0
script/c97211663.lua
script/c97211663.lua
+12
-15
script/utility.lua
script/utility.lua
+17
-38
No files found.
ocgcore/card.cpp
View file @
0dce7ac0
...
...
@@ -2460,7 +2460,7 @@ int32 card::is_can_be_fusion_material(uint8 ignore_mon) {
int32
card
::
is_can_be_synchro_material
(
card
*
scard
,
card
*
tuner
)
{
if
(
data
.
type
&
TYPE_XYZ
)
return
FALSE
;
if
(
!
(
get_type
()
&
TYPE_MONSTER
))
if
(
!
(
get_type
()
&
TYPE_MONSTER
))
return
FALSE
;
if
(
scard
&&
current
.
controler
!=
scard
->
current
.
controler
&&
!
is_affected_by_effect
(
EFFECT_SYNCHRO_MATERIAL
))
return
FALSE
;
...
...
@@ -2478,10 +2478,25 @@ int32 card::is_can_be_synchro_material(card* scard, card* tuner) {
return
FALSE
;
return
TRUE
;
}
int32
card
::
is_can_be_ritual_material
(
card
*
scard
)
{
if
(
data
.
type
&
TYPE_TOKEN
)
return
FALSE
;
if
(
!
(
get_type
()
&
TYPE_MONSTER
))
return
FALSE
;
if
(
current
.
location
==
LOCATION_GRAVE
)
{
effect_set
eset
;
filter_effect
(
EFFECT_EXTRA_RITUAL_MATERIAL
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
if
(
eset
[
i
]
->
get_value
(
scard
))
return
TRUE
;
return
FALSE
;
}
return
TRUE
;
}
int32
card
::
is_can_be_xyz_material
(
card
*
scard
)
{
if
(
data
.
type
&
TYPE_TOKEN
)
return
FALSE
;
if
(
!
(
get_type
()
&
TYPE_MONSTER
))
if
(
!
(
get_type
()
&
TYPE_MONSTER
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_FORBIDDEN
))
return
FALSE
;
...
...
ocgcore/card.h
View file @
0dce7ac0
...
...
@@ -253,6 +253,7 @@ public:
int32
is_capable_be_effect_target
(
effect
*
peffect
,
uint8
playerid
);
int32
is_can_be_fusion_material
(
uint8
ignore_mon
=
FALSE
);
int32
is_can_be_synchro_material
(
card
*
scard
,
card
*
tuner
=
0
);
int32
is_can_be_ritual_material
(
card
*
scard
);
int32
is_can_be_xyz_material
(
card
*
scard
);
};
...
...
ocgcore/interpreter.cpp
View file @
0dce7ac0
...
...
@@ -193,6 +193,7 @@ static const struct luaL_Reg cardlib[] = {
{
"IsCanRemoveCounter"
,
scriptlib
::
card_is_can_remove_counter
},
{
"IsCanBeFusionMaterial"
,
scriptlib
::
card_is_can_be_fusion_material
},
{
"IsCanBeSynchroMaterial"
,
scriptlib
::
card_is_can_be_synchro_material
},
{
"IsCanBeRitualMaterial"
,
scriptlib
::
card_is_can_be_ritual_material
},
{
"IsCanBeXyzMaterial"
,
scriptlib
::
card_is_can_be_xyz_material
},
{
"CheckFusionMaterial"
,
scriptlib
::
card_check_fusion_material
},
{
"IsImmuneToEffect"
,
scriptlib
::
card_is_immune_to_effect
},
...
...
ocgcore/libcard.cpp
View file @
0dce7ac0
...
...
@@ -1820,6 +1820,18 @@ int32 scriptlib::card_is_can_be_synchro_material(lua_State *L) {
lua_pushboolean
(
L
,
pcard
->
is_can_be_synchro_material
(
scard
,
tuner
));
return
1
;
}
int32
scriptlib
::
card_is_can_be_ritual_material
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
scard
=
0
;
if
(
lua_gettop
(
L
)
>=
2
&&
!
lua_isnil
(
L
,
2
))
{
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
scard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
}
lua_pushboolean
(
L
,
pcard
->
is_can_be_ritual_material
(
scard
));
return
1
;
}
int32
scriptlib
::
card_is_can_be_xyz_material
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
ocgcore/scriptlib.h
View file @
0dce7ac0
...
...
@@ -195,6 +195,7 @@ public:
static
int32
card_is_can_remove_counter
(
lua_State
*
L
);
static
int32
card_is_can_be_fusion_material
(
lua_State
*
L
);
static
int32
card_is_can_be_synchro_material
(
lua_State
*
L
);
static
int32
card_is_can_be_ritual_material
(
lua_State
*
L
);
static
int32
card_is_can_be_xyz_material
(
lua_State
*
L
);
static
int32
card_check_fusion_material
(
lua_State
*
L
);
static
int32
card_is_immune_to_effect
(
lua_State
*
L
);
...
...
script/c14735698.lua
View file @
0dce7ac0
...
...
@@ -20,16 +20,14 @@ function c14735698.initial_effect(c)
e2
:
SetOperation
(
c14735698
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c14735698
.
filter
(
c
,
e
,
tp
,
m
)
function
c14735698
.
filter
(
c
,
e
,
tp
,
m
1
,
m2
)
if
not
c
:
IsSetCard
(
0xb4
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
if
c
:
IsCode
(
21105106
)
then
return
c
:
ritual_custom_condition
(
m
)
end
local
mg
=
nil
local
mg
=
m1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
mg
:
Merge
(
m2
)
if
c
:
IsCode
(
21105106
)
then
return
c
:
ritual_custom_condition
(
mg
)
end
if
c
.
mat_filter
then
mg
=
m
:
Filter
(
c
.
mat_filter
,
c
)
else
mg
=
m
:
Clone
()
mg
:
RemoveCard
(
c
)
mg
=
mg
:
Filter
(
c
.
mat_filter
,
nil
)
end
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
end
...
...
@@ -40,30 +38,29 @@ function c14735698.target(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c14735698
.
mfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
return
Duel
.
IsExistingMatchingCard
(
c14735698
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg1
)
return
Duel
.
IsExistingMatchingCard
(
c14735698
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
mg2
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c14735698
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c14735698
.
mfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c14735698
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg1
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c14735698
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg1
,
mg2
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
local
mg
=
mg1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
mg
:
Merge
(
mg2
)
if
tc
:
IsCode
(
21105106
)
then
tc
:
ritual_custom_operation
(
mg
1
)
tc
:
ritual_custom_operation
(
mg
)
local
mat
=
tc
:
GetMaterial
()
Duel
.
ReleaseRitualMaterial
(
mat
)
else
mg1
:
RemoveCard
(
tc
)
if
tc
.
mat_filter
then
mg
1
=
mg1
:
Filter
(
tc
.
mat_filter
,
nil
)
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
1
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
local
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
end
...
...
script/c27383110.lua
View file @
0dce7ac0
...
...
@@ -22,16 +22,9 @@ function c27383110.initial_effect(c)
c
:
RegisterEffect
(
e2
)
end
function
c27383110
.
filter
(
c
,
e
,
tp
,
m
)
local
cd
=
c
:
GetCode
()
if
cd
~=
44665365
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
result
=
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
6
,
1
,
99
,
c
)
m
:
AddCard
(
c
)
else
result
=
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
6
,
1
,
99
,
c
)
end
return
result
if
not
c
:
IsCode
(
44665365
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
6
,
1
,
99
,
c
)
end
function
c27383110
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
...
...
@@ -44,9 +37,9 @@ function c27383110.activate(e,tp,eg,ep,ev,re,r,rp)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c27383110
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
mg
:
RemoveCard
(
tc
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
6
,
1
,
99
,
tc
)
tc
:
SetMaterial
(
mat
)
...
...
script/c28429121.lua
View file @
0dce7ac0
...
...
@@ -20,46 +20,37 @@ function c28429121.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c28429121
.
mfilter
1
(
c
,
e
)
function
c28429121
.
mfilter
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
GetLevel
()
>
0
and
not
c
:
IsImmuneToEffect
(
e
)
and
c
:
IsReleasable
()
end
function
c28429121
.
mfilter2
(
c
)
return
c
:
IsHasEffect
(
EFFECT_EXTRA_RITUAL_MATERIAL
)
and
c
:
IsAbleToRemove
()
end
function
c28429121
.
get_material
(
e
,
tp
)
local
g1
=
Duel
.
GetMatchingGroup
(
c28429121
.
mfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
e
)
local
g2
=
Duel
.
GetMatchingGroup
(
c28429121
.
mfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
g1
:
Merge
(
g2
)
return
g1
end
function
c28429121
.
filter
(
c
,
e
,
tp
,
m
)
if
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsSetCard
(
0x3a
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
false
)
then
return
false
end
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
result
=
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
m
:
AddCard
(
c
)
else
result
=
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
end
return
result
if
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsSetCard
(
0x3a
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
end
function
c28429121
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
false
end
local
mg
=
c28429121
.
get_material
(
e
,
tp
)
return
Duel
.
IsExistingMatchingCard
(
c28429121
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
mg1
:
Remove
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c28429121
.
mfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
e
)
mg1
:
Merge
(
mg2
)
return
Duel
.
IsExistingMatchingCard
(
c28429121
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c28429121
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
mg
=
c28429121
.
get_material
(
e
,
tp
)
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
mg1
:
Remove
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c28429121
.
mfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
e
)
mg1
:
Merge
(
mg2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c28429121
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
mg
:
RemoveCard
(
tc
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c28429121
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
1
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
local
mg
=
mg1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
tc
:
SetMaterial
(
mat
)
...
...
@@ -71,7 +62,7 @@ function c28429121.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetValue
(
tc
:
GetAttack
()
/
2
)
e1
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
tc
:
RegisterEffect
(
e1
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
true
,
fals
e
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
tru
e
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
script/c29904964.lua
View file @
0dce7ac0
...
...
@@ -23,12 +23,8 @@ function c29904964.initial_effect(c)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EXTRA_RITUAL_MATERIAL
)
e3
:
SetValue
(
c29904964
.
mtval
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_RITUAL_LEVEL
)
e4
:
SetValue
(
c29904964
.
rlevel
)
c
:
RegisterEffect
(
e4
)
end
function
c29904964
.
ntcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
...
...
@@ -51,9 +47,6 @@ function c29904964.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c29904964
.
rlevel
(
e
,
rc
)
local
c
=
e
:
GetHandler
()
if
c
:
IsLocation
(
LOCATION_GRAVE
)
and
not
rc
:
IsSetCard
(
0xcf
)
then
return
-
1
else
return
c
:
GetLevel
()
end
function
c29904964
.
mtval
(
e
,
c
)
return
c
:
IsSetCard
(
0xcf
)
end
script/c30492798.lua
View file @
0dce7ac0
...
...
@@ -4,6 +4,7 @@ function c30492798.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EXTRA_RITUAL_MATERIAL
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--become material
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
script/c33145233.lua
View file @
0dce7ac0
...
...
@@ -4,6 +4,7 @@ function c33145233.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EXTRA_RITUAL_MATERIAL
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--become material
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
script/c33245030.lua
View file @
0dce7ac0
...
...
@@ -14,6 +14,7 @@ function c33245030.initial_effect(c)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_EXTRA_RITUAL_MATERIAL
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
end
function
c33245030
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c34358408.lua
View file @
0dce7ac0
...
...
@@ -4,6 +4,7 @@ function c34358408.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EXTRA_RITUAL_MATERIAL
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--become material
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
script/c4141820.lua
View file @
0dce7ac0
...
...
@@ -4,6 +4,7 @@ function c4141820.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EXTRA_RITUAL_MATERIAL
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--become material
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
script/c45410988.lua
View file @
0dce7ac0
...
...
@@ -9,16 +9,11 @@ function c45410988.initial_effect(c)
e1
:
SetOperation
(
c45410988
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c45410988
.
filter
(
c
,
e
,
tp
,
m
)
function
c45410988
.
filter
(
c
,
e
,
tp
,
m
1
,
m2
)
if
not
c
:
IsCode
(
19025379
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
result
=
m
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
8
,
c
)
m
:
AddCard
(
c
)
else
result
=
m
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
8
,
c
)
end
return
result
local
mg
=
m1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
mg
:
Merge
(
m2
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
8
,
1
,
99
,
c
)
end
function
c45410988
.
mfilter
(
c
)
return
c
:
IsSetCard
(
0x3b
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemove
()
...
...
@@ -27,22 +22,21 @@ function c45410988.target(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c45410988
.
mfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
return
Duel
.
IsExistingMatchingCard
(
c45410988
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg1
)
return
Duel
.
IsExistingMatchingCard
(
c45410988
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
mg2
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c45410988
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c45410988
.
mfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c45410988
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg1
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c45410988
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg1
,
mg2
)
local
tc
=
g
:
GetFirst
()
if
tc
then
mg1
:
RemoveCard
(
tc
)
local
mg
=
mg1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
mg
:
Merge
(
mg2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
1
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
8
,
tc
)
local
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
8
,
tc
)
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
...
...
script/c51124303.lua
View file @
0dce7ac0
...
...
@@ -23,6 +23,7 @@ end
function
c51124303
.
spfilter
(
c
,
e
,
tp
,
mc
)
return
c
:
IsSetCard
(
0xb4
)
and
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
(
not
c
.
mat_filter
or
c
.
mat_filter
(
mc
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
and
mc
:
IsCanBeRitualMaterial
(
c
)
end
function
c51124303
.
rfilter
(
c
,
mc
)
local
mlv
=
mc
:
GetRitualLevel
(
c
)
...
...
@@ -39,6 +40,9 @@ end
function
c51124303
.
mfilter
(
c
)
return
c
:
GetLevel
()
>
0
and
c
:
IsAbleToGrave
()
end
function
c51124303
.
mzfilter
(
c
,
tp
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsControler
(
tp
)
end
function
c51124303
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
...
...
@@ -48,7 +52,7 @@ function c51124303.target(e,tp,eg,ep,ev,re,r,rp,chk)
local
mg2
=
Duel
.
GetMatchingGroup
(
c51124303
.
mfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
mg
:
Merge
(
mg2
)
else
mg
=
mg
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_MZONE
)
mg
=
mg
:
Filter
(
c51124303
.
mzfilter
,
nil
,
tp
)
end
return
mg
:
IsExists
(
c51124303
.
filter
,
1
,
nil
,
e
,
tp
)
end
...
...
script/c77153811.lua
View file @
0dce7ac0
...
...
@@ -4,6 +4,7 @@ function c77153811.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EXTRA_RITUAL_MATERIAL
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--become material
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
script/c79306385.lua
View file @
0dce7ac0
...
...
@@ -10,16 +10,9 @@ function c79306385.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c79306385
.
filter
(
c
,
e
,
tp
,
m
)
local
cd
=
c
:
GetCode
()
if
cd
~=
48546368
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
false
)
then
return
false
end
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
result
=
m
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
c
)
m
:
AddCard
(
c
)
else
result
=
m
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
c
)
end
return
result
if
not
c
:
IsCode
(
48546368
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
c
)
end
function
c79306385
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
...
...
@@ -36,15 +29,15 @@ function c79306385.activate(e,tp,eg,ep,ev,re,r,rp)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c79306385
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
:
RemoveCard
(
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
tc
)
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
true
,
fals
e
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
tru
e
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
script/c84388461.lua
View file @
0dce7ac0
...
...
@@ -39,14 +39,11 @@ function c84388461.splimcon(e)
end
function
c84388461
.
filter
(
c
,
e
,
tp
,
m
)
if
not
c
:
IsSetCard
(
0xb4
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
fals
e
)
then
return
false
end
if
c
:
IsCode
(
21105106
)
then
return
c
:
ritual_custom_condition
(
m
)
end
local
mg
=
nil
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
tru
e
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
if
c
:
IsCode
(
21105106
)
then
return
c
:
ritual_custom_condition
(
mg
)
end
if
c
.
mat_filter
then
mg
=
m
:
Filter
(
c
.
mat_filter
,
c
)
else
mg
=
m
:
Clone
()
mg
:
RemoveCard
(
c
)
mg
=
mg
:
Filter
(
c
.
mat_filter
,
nil
)
end
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
end
...
...
@@ -66,14 +63,14 @@ function c84388461.operation(e,tp,eg,ep,ev,re,r,rp)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c84388461
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
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
mg
:
RemoveCard
(
tc
)
if
tc
.
mat_filter
then
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
...
...
@@ -83,7 +80,7 @@ function c84388461.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ReleaseRitualMaterial
(
mat
)
end
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
true
,
fals
e
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
tru
e
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
script/c8903700.lua
View file @
0dce7ac0
...
...
@@ -4,6 +4,7 @@ function c8903700.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EXTRA_RITUAL_MATERIAL
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--become material
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
script/c97211663.lua
View file @
0dce7ac0
...
...
@@ -23,40 +23,37 @@ end
function
c97211663
.
filter
(
c
,
e
,
tp
,
m
)
if
not
c
:
IsSetCard
(
0xb4
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
or
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
then
return
false
end
if
c
:
IsCode
(
21105106
)
then
return
c
:
ritual_custom_condition
(
m
)
end
local
mg
=
nil
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
if
c
:
IsCode
(
21105106
)
then
return
c
:
ritual_custom_condition
(
mg
)
end
if
c
.
mat_filter
then
mg
=
m
:
Filter
(
c
.
mat_filter
,
c
)
else
mg
=
m
:
Clone
()
mg
:
RemoveCard
(
c
)
end
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
end
function
c97211663
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
1
=
Duel
.
GetRitualMaterial
(
tp
)
return
Duel
.
IsExistingMatchingCard
(
c97211663
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
mg
1
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
return
Duel
.
IsExistingMatchingCard
(
c97211663
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
c97211663
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
1
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c97211663
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg1
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c97211663
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
if
tc
:
IsCode
(
21105106
)
then
tc
:
ritual_custom_operation
(
mg
1
)
tc
:
ritual_custom_operation
(
mg
)
local
mat
=
tc
:
GetMaterial
()
Duel
.
ReleaseRitualMaterial
(
mat
)
else
mg1
:
RemoveCard
(
tc
)
if
tc
.
mat_filter
then
mg
1
=
mg1
:
Filter
(
tc
.
mat_filter
,
nil
)
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
1
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
local
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
end
...
...
script/utility.lua
View file @
0dce7ac0
...
...
@@ -112,7 +112,7 @@ function Auxiliary.NonTuner(f,a,b,c)
return
target
:
IsNotTuner
()
and
(
not
f
or
f
(
target
,
a
,
b
,
c
))
end
end
--Synchro
n
monster, 1 tuner + n or more monsters
--Synchro monster, 1 tuner + n or more monsters
function
Auxiliary
.
AddSynchroProcedure
(
c
,
f1
,
f2
,
ct
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
...
...
@@ -154,7 +154,7 @@ function Auxiliary.SynOperation(f1,f2,minct,maxc)
Duel
.
SendtoGrave
(
g
,
REASON_MATERIAL
+
REASON_SYNCHRO
)
end
end
--Synchro
n
monster, 1 tuner + 1 monster
--Synchro monster, 1 tuner + 1 monster
function
Auxiliary
.
AddSynchroProcedure2
(
c
,
f1
,
f2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
...
...
@@ -917,15 +917,8 @@ function Auxiliary.AddRitualProcGreater(c,filter)
end
function
Auxiliary
.
RPGFilter
(
c
,
filter
,
e
,
tp
,
m
)
if
(
filter
and
not
filter
(
c
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
result
=
false
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
result
=
m
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetOriginalLevel
(),
c
)
m
:
AddCard
(
c
)
else
result
=
m
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetOriginalLevel
(),
c
)
end
return
result
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetOriginalLevel
(),
c
)
end
function
Auxiliary
.
RPGTarget
(
filter
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -941,9 +934,9 @@ function Auxiliary.RPGOperation(filter)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
Auxiliary
.
RPGFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
filter
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
mg
:
RemoveCard
(
tc
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetOriginalLevel
(),
tc
)
tc
:
SetMaterial
(
mat
)
...
...
@@ -966,15 +959,8 @@ function Auxiliary.AddRitualProcEqual(c,filter)
end
function
Auxiliary
.
RPEFilter
(
c
,
filter
,
e
,
tp
,
m
)
if
(
filter
and
not
filter
(
c
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
result
=
false
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
result
=
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetOriginalLevel
(),
1
,
99
,
c
)
m
:
AddCard
(
c
)
else
result
=
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetOriginalLevel
(),
1
,
99
,
c
)
end
return
result
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetOriginalLevel
(),
1
,
99
,
c
)
end
function
Auxiliary
.
RPETarget
(
filter
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -990,9 +976,9 @@ function Auxiliary.RPEOperation(filter)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
Auxiliary
.
RPEFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
filter
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
mg
:
RemoveCard
(
tc
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetOriginalLevel
(),
1
,
99
,
tc
)
tc
:
SetMaterial
(
mat
)
...
...
@@ -1015,15 +1001,8 @@ function Auxiliary.AddRitualProcEqual2(c,filter)
end
function
Auxiliary
.
RPEFilter2
(
c
,
filter
,
e
,
tp
,
m
)
if
(
filter
and
not
filter
(
c
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
result
=
false
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
result
=
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
m
:
AddCard
(
c
)
else
result
=
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
end
return
result
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
end
function
Auxiliary
.
RPETarget2
(
filter
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -1039,9 +1018,9 @@ function Auxiliary.RPEOperation2(filter)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
Auxiliary
.
RPEFilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
filter
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
mg
:
RemoveCard
(
tc
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
tc
:
SetMaterial
(
mat
)
...
...
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