Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-rush-duel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
5
Issues
5
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
MyCard
ygopro-rush-duel
Commits
00565783
Commit
00565783
authored
Feb 26, 2024
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024/2/26 新增:磁力苏生,CostCheck改用内核的方法
parent
dc40f968
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
88 additions
and
175 deletions
+88
-175
RD Patch.cdb
RD Patch.cdb
+0
-0
script/RDFunction.lua
script/RDFunction.lua
+0
-12
script/c120151016.lua
script/c120151016.lua
+6
-14
script/c120151027.lua
script/c120151027.lua
+4
-15
script/c120155046.lua
script/c120155046.lua
+4
-14
script/c120170039.lua
script/c120170039.lua
+6
-18
script/c120184003.lua
script/c120184003.lua
+8
-15
script/c120205048.lua
script/c120205048.lua
+4
-15
script/c120205049.lua
script/c120205049.lua
+6
-14
script/c120214009.lua
script/c120214009.lua
+4
-14
script/c120217094.lua
script/c120217094.lua
+7
-15
script/c120228046.lua
script/c120228046.lua
+4
-15
script/c120244063.lua
script/c120244063.lua
+4
-14
script/c120260036.lua
script/c120260036.lua
+31
-0
No files found.
RD Patch.cdb
View file @
00565783
No preview for this file type
script/RDFunction.lua
View file @
00565783
-- Rush Duel 辅助函数
RushDuel
=
RushDuel
or
{}
-- 设置Cost标签, 无视Cost发动效果需做额外判断时使用
function
RushDuel
.
SetCostLabel
(
e
)
e
:
SetLabel
(
1
)
end
-- 重置Cost标签, 无视Cost发动效果需做额外判断时使用
function
RushDuel
.
ResetCostLabel
(
e
)
e
:
SetLabel
(
0
)
end
-- 是否设置了Cost标签
function
RushDuel
.
IsCostLabel
(
e
)
return
e
:
GetLabel
()
==
1
end
-- 为效果设置标签
function
RushDuel
.
SetLabelAndObject
(
effect
,
target
,
set_label
,
set_object
)
if
effect
~=
nil
and
target
~=
nil
then
...
...
script/c120151016.lua
View file @
00565783
...
...
@@ -13,27 +13,19 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Activate
function
cm
.
costfilter
(
c
,
tp
)
function
cm
.
costfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_DINOSAUR
)
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelAbove
(
5
)
and
c
:
IsRace
(
RACE_DINOSAUR
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
RD
.
SetCostLabel
(
e
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
e
:
SetLabel
(
g
:
GetFirst
():
GetLevel
())
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendMZoneToGrave
(
cm
.
costfilter
,
1
,
1
,
false
,
nil
,
nil
,
function
(
g
)
return
g
:
GetFirst
():
GetLevel
()
end
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
RD
.
IsCostLabel
(
e
)
or
Duel
.
GetMZoneCount
(
tp
)
>
0
RD
.
ResetCostLabel
(
e
)
return
res
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
(
e
:
IsCostChecked
()
or
Duel
.
GetMZoneCount
(
tp
)
>
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c120151027.lua
View file @
00565783
...
...
@@ -22,28 +22,17 @@ end
function
cm
.
exfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
end
function
cm
.
costcheck
(
g
,
tp
)
function
cm
.
costcheck
(
g
,
e
,
tp
)
return
Duel
.
GetMZoneCount
(
tp
,
g
)
>
0
end
function
cm
.
excheck
(
g
)
return
g
:
GetClassCount
(
Card
.
GetCode
,
nil
)
==
1
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
RD
.
SetCostLabel
(
e
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
CheckSubGroup
(
cm
.
costcheck
,
3
,
3
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
cm
.
costcheck
,
false
,
3
,
3
,
tp
)
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendMZoneSubToGrave
(
cm
.
costfilter
,
cm
.
costcheck
,
3
,
3
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
e
:
GetLabel
()
==
1
or
Duel
.
GetMZoneCount
(
tp
)
>
0
RD
.
ResetCostLabel
(
e
)
return
res
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
(
e
:
IsCostChecked
()
or
Duel
.
GetMZoneCount
(
tp
)
>
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
RD
.
ResetCostLabel
(
e
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
~=
0
then
...
...
script/c120155046.lua
View file @
00565783
...
...
@@ -13,7 +13,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Activate
function
cm
.
costfilter
(
c
,
tp
)
function
cm
.
costfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsAttribute
(
ATTRIBUTE_EARTH
)
and
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
...
...
@@ -21,21 +21,11 @@ function cm.spfilter(c,e,tp)
return
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsAttribute
(
ATTRIBUTE_EARTH
)
and
c
:
IsRace
(
RACE_MACHINE
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
RD
.
SetCostLabel
(
e
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendMZoneToGrave
(
cm
.
costfilter
,
1
,
1
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
e
:
GetLabel
()
==
1
or
Duel
.
GetMZoneCount
(
tp
)
>
0
RD
.
ResetCostLabel
(
e
)
return
res
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
(
e
:
IsCostChecked
()
or
Duel
.
GetMZoneCount
(
tp
)
>
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
RD
.
ResetCostLabel
(
e
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
~=
0
then
...
...
script/c120170039.lua
View file @
00565783
...
...
@@ -21,28 +21,16 @@ end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsLevel
(
7
)
and
c
:
IsRace
(
RACE_PSYCHO
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
RD
.
SetCostLabel
(
e
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
if
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
~=
0
and
tc
:
GetPreviousCodeOnField
()
==
list
[
1
]
then
e
:
SetLabel
(
20170039
)
else
RD
.
ResetCostLabel
(
e
)
end
end
cm
.
cost
=
RD
.
CostSendMZoneToGrave
(
cm
.
costfilter
,
1
,
1
,
false
,
nil
,
nil
,
function
(
g
)
return
g
:
GetFirst
():
GetPreviousCodeOnField
()
end
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
RD
.
IsCostLabel
(
e
)
or
Duel
.
GetMZoneCount
(
tp
)
>
0
RD
.
ResetCostLabel
(
e
)
return
res
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
(
e
:
IsCostChecked
()
or
Duel
.
GetMZoneCount
(
tp
)
>
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
RD
.
SelectAndSpecialSummon
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
~=
0
and
e
:
GetLabel
()
==
20170039
then
if
RD
.
SelectAndSpecialSummon
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
~=
0
and
e
:
GetLabel
()
==
list
[
1
]
then
local
tc
=
Duel
.
GetOperatedGroup
():
GetFirst
()
RD
.
AttachAtkDef
(
e
,
tc
,
1500
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
...
...
script/c120184003.lua
View file @
00565783
...
...
@@ -13,30 +13,23 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Activate
function
cm
.
costfilter
(
c
,
tp
)
function
cm
.
costfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_PSYCHO
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
RD
.
SetCostLabel
(
e
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
cm
.
cost
=
RD
.
CostSendMZoneToGrave
(
cm
.
costfilter
,
1
,
1
,
false
,
nil
,
nil
,
function
(
g
)
local
tc
=
g
:
GetFirst
()
if
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
~=
0
and
tc
:
GetPreviousLevelOnField
()
>
0
and
tc
:
GetPreviousLevelOnField
()
<=
2
then
e
:
SetLabel
(
20184003
)
if
tc
:
GetPreviousLevelOnField
()
>
0
and
tc
:
GetPreviousLevelOnField
()
<=
2
then
return
20184003
else
RD
.
ResetCostLabel
(
e
)
return
0
end
end
end
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
RD
.
IsCostLabel
(
e
)
or
Duel
.
GetMZoneCount
(
tp
)
>
0
RD
.
ResetCostLabel
(
e
)
return
res
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
(
e
:
IsCostChecked
()
or
Duel
.
GetMZoneCount
(
tp
)
>
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c120205048.lua
View file @
00565783
...
...
@@ -19,25 +19,14 @@ end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_PLANT
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
costcheck
(
g
,
tp
)
function
cm
.
costcheck
(
g
,
e
,
tp
)
return
Duel
.
GetMZoneCount
(
tp
,
g
)
>
0
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
RD
.
SetCostLabel
(
e
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
CheckSubGroup
(
cm
.
costcheck
,
2
,
2
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
cm
.
costcheck
,
false
,
2
,
2
,
tp
)
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendMZoneSubToGrave
(
cm
.
costfilter
,
cm
.
costcheck
,
2
,
2
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
RD
.
IsCostLabel
(
e
)
or
Duel
.
GetMZoneCount
(
tp
)
>
0
RD
.
ResetCostLabel
(
e
)
return
res
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
(
e
:
IsCostChecked
()
or
Duel
.
GetMZoneCount
(
tp
)
>
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
RD
.
ResetCostLabel
(
e
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
filter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
...
...
script/c120205049.lua
View file @
00565783
...
...
@@ -13,7 +13,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Activate
function
cm
.
costfilter
(
c
,
tp
)
function
cm
.
costfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
...
...
@@ -23,20 +23,12 @@ end
function
cm
.
desfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
RD
.
SetCostLabel
(
e
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
e
:
SetLabel
(
g
:
GetFirst
():
GetLevel
())
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendMZoneToGrave
(
cm
.
costfilter
,
1
,
1
,
false
,
nil
,
nil
,
function
(
g
)
return
g
:
GetFirst
():
GetPreviousLevelOnField
()
end
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
e
:
GetLabel
()
==
1
or
Duel
.
GetMZoneCount
(
tp
)
>
0
RD
.
ResetCostLabel
(
e
)
return
res
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
(
e
:
IsCostChecked
()
or
Duel
.
GetMZoneCount
(
tp
)
>
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c120214009.lua
View file @
00565783
...
...
@@ -13,27 +13,17 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Activate
function
cm
.
costfilter
(
c
,
tp
)
function
cm
.
costfilter
(
c
,
e
,
tp
)
return
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsLevel
(
7
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
RD
.
SetCostLabel
(
e
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendMZoneToGrave
(
cm
.
costfilter
,
1
,
1
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
e
:
GetLabel
()
==
1
or
Duel
.
GetMZoneCount
(
tp
)
>
0
RD
.
ResetCostLabel
(
e
)
return
res
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
(
e
:
IsCostChecked
()
or
Duel
.
GetMZoneCount
(
tp
)
>
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
RD
.
ResetCostLabel
(
e
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
RD
.
SelectAndSpecialSummon
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
~=
0
then
...
...
script/c120217094.lua
View file @
00565783
...
...
@@ -13,31 +13,23 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Activate
function
cm
.
costfilter
(
c
,
tp
)
function
cm
.
costfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsAttackAbove
(
1600
)
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_EFFECT
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
RD
.
SetCostLabel
(
e
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
cm
.
cost
=
RD
.
CostSendMZoneToGrave
(
cm
.
costfilter
,
1
,
1
,
false
,
function
(
g
)
local
tc
=
g
:
GetFirst
()
if
tc
:
GetOriginalLevel
()
>=
7
and
tc
:
IsType
(
TYPE_EFFECT
)
then
e
:
SetLabel
(
20217094
)
return
20217094
else
RD
.
ResetCostLabel
(
e
)
return
0
end
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
RD
.
IsCostLabel
(
e
)
or
Duel
.
GetMZoneCount
(
tp
)
>
0
RD
.
ResetCostLabel
(
e
)
return
res
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
(
e
:
IsCostChecked
()
or
Duel
.
GetMZoneCount
(
tp
)
>
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c120228046.lua
View file @
00565783
...
...
@@ -17,25 +17,14 @@ cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsLevel
(
8
)
and
RD
.
IsDefense
(
c
,
500
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
costcheck
(
g
,
tp
)
function
cm
.
costcheck
(
g
,
e
,
tp
)
return
Duel
.
GetMZoneCount
(
tp
,
g
)
>
0
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
RD
.
SetCostLabel
(
e
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
CheckSubGroup
(
cm
.
costcheck
,
2
,
2
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
cm
.
costcheck
,
false
,
2
,
2
,
tp
)
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendMZoneSubToGrave
(
Card
.
IsAbleToGraveAsCost
,
cm
.
costcheck
,
2
,
2
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
e
:
GetLabel
()
==
1
or
Duel
.
GetMZoneCount
(
tp
)
>
0
RD
.
ResetCostLabel
(
e
)
return
res
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
(
e
:
IsCostChecked
()
or
Duel
.
GetMZoneCount
(
tp
)
>
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
RD
.
ResetCostLabel
(
e
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
RD
.
SelectAndSpecialSummon
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
~=
0
then
...
...
script/c120244063.lua
View file @
00565783
...
...
@@ -21,7 +21,7 @@ end
function
cm
.
confilter
(
c
,
tp
)
return
c
:
GetSummonPlayer
()
==
tp
and
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
8
)
end
function
cm
.
costfilter
(
c
,
tp
)
function
cm
.
costfilter
(
c
,
e
,
tp
)
return
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
...
...
@@ -30,22 +30,12 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
confilter
,
1
,
nil
,
1
-
tp
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
RD
.
SetCostLabel
(
e
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendMZoneToGrave
(
cm
.
costfilter
,
1
,
1
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
e
:
GetLabel
()
==
1
or
Duel
.
GetMZoneCount
(
tp
)
>
0
RD
.
ResetCostLabel
(
e
)
return
res
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
(
e
:
IsCostChecked
()
or
Duel
.
GetMZoneCount
(
tp
)
>
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetTargetCard
(
eg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
RD
.
ResetCostLabel
(
e
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
RD
.
SelectAndSpecialSummon
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP_ATTACK
)
~=
0
then
...
...
script/c120260036.lua
0 → 100644
View file @
00565783
local
m
=
120260036
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"磁力苏生"
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_GRAVE_SPSUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
end
--Activate
function
cm
.
costfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
4
)
and
c
:
IsRace
(
RACE_ROCK
)
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevel
(
7
,
8
)
and
c
:
IsRace
(
RACE_ROCK
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
cm
.
cost
=
RD
.
CostSendMZoneToGrave
(
cm
.
costfilter
,
1
,
1
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
(
e
:
IsCostChecked
()
or
Duel
.
GetMZoneCount
(
tp
)
>
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
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