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
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
Clara Grace Paulsen
ygopro-rush-duel
Commits
4f6ae1f1
Commit
4f6ae1f1
authored
Mar 21, 2022
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022/3/21 模块化EXT1, 711A, DD01
parent
cd37ac84
Changes
52
Hide whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
322 additions
and
794 deletions
+322
-794
script/RDAction.lua
script/RDAction.lua
+7
-3
script/RDBase.lua
script/RDBase.lua
+41
-0
script/RDFunction.lua
script/RDFunction.lua
+9
-0
script/c120151008.lua
script/c120151008.lua
+1
-1
script/c120196001.lua
script/c120196001.lua
+12
-26
script/c120196002.lua
script/c120196002.lua
+9
-16
script/c120196003.lua
script/c120196003.lua
+10
-22
script/c120196004.lua
script/c120196004.lua
+9
-36
script/c120196005.lua
script/c120196005.lua
+4
-19
script/c120196011.lua
script/c120196011.lua
+5
-21
script/c120196012.lua
script/c120196012.lua
+2
-2
script/c120196013.lua
script/c120196013.lua
+12
-24
script/c120196014.lua
script/c120196014.lua
+4
-9
script/c120196015.lua
script/c120196015.lua
+9
-23
script/c120196016.lua
script/c120196016.lua
+7
-22
script/c120196017.lua
script/c120196017.lua
+7
-16
script/c120196018.lua
script/c120196018.lua
+4
-10
script/c120196019.lua
script/c120196019.lua
+4
-10
script/c120196020.lua
script/c120196020.lua
+9
-30
script/c120196022.lua
script/c120196022.lua
+8
-39
script/c120196023.lua
script/c120196023.lua
+11
-24
script/c120196024.lua
script/c120196024.lua
+3
-12
script/c120196025.lua
script/c120196025.lua
+3
-13
script/c120196027.lua
script/c120196027.lua
+4
-22
script/c120196028.lua
script/c120196028.lua
+2
-13
script/c120196029.lua
script/c120196029.lua
+3
-12
script/c120196030.lua
script/c120196030.lua
+4
-7
script/c120196031.lua
script/c120196031.lua
+6
-17
script/c120196032.lua
script/c120196032.lua
+2
-5
script/c120196033.lua
script/c120196033.lua
+2
-12
script/c120196034.lua
script/c120196034.lua
+3
-8
script/c120196035.lua
script/c120196035.lua
+5
-10
script/c120196036.lua
script/c120196036.lua
+5
-18
script/c120196037.lua
script/c120196037.lua
+6
-16
script/c120196038.lua
script/c120196038.lua
+7
-20
script/c120196039.lua
script/c120196039.lua
+5
-30
script/c120196041.lua
script/c120196041.lua
+3
-11
script/c120196043.lua
script/c120196043.lua
+7
-26
script/c120196044.lua
script/c120196044.lua
+6
-23
script/c120196045.lua
script/c120196045.lua
+6
-19
script/c120196047.lua
script/c120196047.lua
+3
-14
script/c120196048.lua
script/c120196048.lua
+3
-6
script/c120196049.lua
script/c120196049.lua
+5
-10
script/c120197001.lua
script/c120197001.lua
+2
-10
script/c120197002.lua
script/c120197002.lua
+7
-18
script/c120197003.lua
script/c120197003.lua
+5
-19
script/c120197004.lua
script/c120197004.lua
+13
-24
script/c120197005.lua
script/c120197005.lua
+4
-10
script/c120197006.lua
script/c120197006.lua
+4
-10
script/c120197007.lua
script/c120197007.lua
+4
-10
script/c120198002.lua
script/c120198002.lua
+5
-15
script/c120208029.lua
script/c120208029.lua
+1
-1
No files found.
script/RDAction.lua
View file @
4f6ae1f1
...
...
@@ -163,7 +163,9 @@ function RushDuel.SendToHandAndExists(target, confirm_player, filter, count, exp
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
==
0
then
return
false
end
Duel
.
ConfirmCards
(
confirm_player
,
g
)
if
confirm_player
~=
nil
then
Duel
.
ConfirmCards
(
confirm_player
,
g
)
end
return
RushDuel
.
IsOperatedGroupExists
(
filter
,
count
,
expect
)
end
-- 操作: 返回对方手卡, 不能确认那些卡
...
...
@@ -258,8 +260,9 @@ function RushDuel.CanDraw(desc, player, count, break_effect)
if
break_effect
then
Duel
.
BreakEffect
()
end
Duel
.
Draw
(
player
,
count
,
REASON_EFFECT
)
return
Duel
.
Draw
(
player
,
count
,
REASON_EFFECT
)
end
return
0
end
-- 可选操作: 盲堆
...
...
@@ -268,6 +271,7 @@ function RushDuel.CanDiscardDeck(desc, player, count, break_effect)
if
break_effect
then
Duel
.
BreakEffect
()
end
Duel
.
DiscardDeck
(
player
,
count
,
REASON_EFFECT
)
return
Duel
.
DiscardDeck
(
player
,
count
,
REASON_EFFECT
)
end
return
0
end
script/RDBase.lua
View file @
4f6ae1f1
...
...
@@ -151,6 +151,47 @@ function RushDuel.CreateSingleEffect(e, desc, card, code, value, reset)
card
:
RegisterEffect
(
e1
)
return
e1
end
-- 创建效果: 选择效果 (自动生成Target和Operation)
function
RushDuel
.
CreateMultiChooseEffect
(
card
,
hint1
,
condition1
,
operation1
,
hint2
,
condition2
,
operation2
)
local
e1
=
Effect
.
CreateEffect
(
card
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
RushDuel
.
MultiChooseTarget
(
condition1
,
condition2
))
e1
:
SetOperation
(
RushDuel
.
MultiChooseOperation
(
hint1
,
condition1
,
operation1
,
hint2
,
condition2
,
operation2
))
return
e1
end
function
RushDuel
.
MultiChooseTarget
(
condition1
,
condition2
,
target
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
false
)
or
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
false
)
end
if
target
~=
nil
then
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
function
RushDuel
.
MultiChooseOperation
(
hint1
,
condition1
,
operation1
,
hint2
,
condition2
,
operation2
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
effect1
=
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
true
)
local
effect2
=
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
true
)
local
option
=
0
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EFFECT
)
if
effect1
and
effect2
then
option
=
Duel
.
SelectOption
(
tp
,
hint1
,
hint2
)
+
1
elseif
effect1
then
Duel
.
SelectOption
(
tp
,
hint1
)
option
=
1
elseif
effect2
then
Duel
.
SelectOption
(
tp
,
hint2
)
option
=
2
end
if
option
==
1
then
operation1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
elseif
option
==
2
then
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
-- Select Effect
function
RushDuel
.
BaseSelectEffect
(
c
,
eff1hint
,
eff1con
,
eff1op
,
eff2hint
,
eff2con
,
eff2op
)
...
...
script/RDFunction.lua
View file @
4f6ae1f1
...
...
@@ -38,6 +38,15 @@ function RushDuel.Check(check, ...)
return
check
(
g
,
table.unpack
(
args
))
end
end
-- 对卡片组里的全部卡片作位或运算
function
RushDuel
.
GroupBor
(
g
,
func
,
...
)
local
result
=
0
local
args
=
{
...
}
g
:
ForEach
(
function
(
tc
)
result
=
result
|
func
(
tc
,
table.unpack
(
args
))
end
)
return
result
end
-- 显示选择动画, 或者展示卡片组
function
RushDuel
.
HintOrConfirm
(
group
,
hint_selection
,
confirm
,
target_player
)
if
hint_selection
then
...
...
script/c120151008.lua
View file @
4f6ae1f1
...
...
@@ -21,7 +21,7 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
RD
.
IsLPBelowOpponent
(
tp
)
end
cm
.
cost
=
RD
.
CostSendHandToDeckBottom
(
Card
.
IsAbleToDeckAsCost
,
1
,
1
)
cm
.
cost
=
RD
.
CostSendHandToDeckBottom
(
Card
.
IsAbleToDeckAsCost
,
1
,
1
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
2
)
and
Duel
.
IsPlayerCanDiscardDeck
(
1
-
tp
,
2
)
end
...
...
script/c120196001.lua
View file @
4f6ae1f1
...
...
@@ -6,29 +6,23 @@ function cm.initial_effect(c)
aux
.
AddCodeList
(
c
,
list
[
1
],
list
[
2
])
--Fusion Material
aux
.
AddFusionProcCode2
(
c
,
list
[
1
],
list
[
2
],
true
,
true
)
--
Select
Effect
local
e1
=
R
ushDuel
.
BaseSelect
Effect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
--
Multi-Choose
Effect
local
e1
=
R
D
.
CreateMultiChoose
Effect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_ATKCHANGE
)
e1
:
SetCost
(
cm
.
cost
)
c
:
RegisterEffect
(
e1
)
end
--Select Effect
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
1
)
end
Duel
.
DiscardDeck
(
tp
,
1
,
REASON_COST
)
end
--Multi-Choose Effect
cm
.
cost
=
RD
.
CostSendDeckTopToGrave
(
1
)
--Destroy
function
cm
.
eff1con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFacedown
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
function
cm
.
eff1op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFacedown
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
RD
.
SelectAndDoAction
(
HINTMSG_DESTROY
,
Card
.
IsFacedown
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
function
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
)
end
--Atk Up
function
cm
.
filter
(
c
)
...
...
@@ -42,18 +36,10 @@ function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
and
Duel
.
IsExistingMatchingCard
(
cm
.
atkfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
function
cm
.
eff2op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
3
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
ag
=
Duel
.
GetMatchingGroup
(
cm
.
atkfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
atk
=
ag
:
GetSum
(
Card
.
GetAttack
)
local
tc
=
g
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
atkfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
atk
=
g
:
GetSum
(
Card
.
GetAttack
)
if
atk
==
0
then
return
end
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
3
),
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
sg
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
atk
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
\ No newline at end of file
script/c120196002.lua
View file @
4f6ae1f1
...
...
@@ -6,25 +6,21 @@ function cm.initial_effect(c)
aux
.
AddCodeList
(
c
,
list
[
1
],
list
[
2
])
--Fusion Material
aux
.
AddFusionProcCode2
(
c
,
list
[
1
],
list
[
2
],
true
,
true
)
--
Select
Effect
local
e1
=
R
ushDuel
.
BaseSelect
Effect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
--
Multi-Choose
Effect
local
e1
=
R
D
.
CreateMultiChoose
Effect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_POSITION
+
CATEGORY_DESTROY
)
c
:
RegisterEffect
(
e1
)
end
--Position
function
cm
.
posfilter
(
c
)
return
c
:
IsCanChangePosition
()
and
RushDuel
.
IsHasDefense
(
c
)
and
(
not
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
or
c
:
IsCanTurnSet
())
return
RD
.
IsCanChangePosition
(
c
)
and
(
not
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
or
c
:
IsCanTurnSet
())
end
function
cm
.
eff1con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
posfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
function
cm
.
eff1op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
posfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
RD
.
SelectAndDoAction
(
HINTMSG_POSCHANGE
,
cm
.
posfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
local
tc
=
g
:
GetFirst
()
local
pos
=
POS_FACEUP_ATTACK
+
POS_FACEDOWN_DEFENSE
if
tc
:
IsPosition
(
POS_FACEUP_ATTACK
)
then
...
...
@@ -33,8 +29,8 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
pos
=
POS_FACEUP_ATTACK
end
pos
=
Duel
.
SelectPosition
(
tp
,
tc
,
pos
)
Duel
.
ChangePosition
(
tc
,
pos
)
end
RD
.
ChangePosition
(
tc
,
pos
)
end
)
end
--Destroy
function
cm
.
filter
(
c
)
...
...
@@ -49,11 +45,8 @@ function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
end
function
cm
.
eff2op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
ct
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
ct
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
ct
==
0
then
return
end
RD
.
SelectAndDoAction
(
HINTMSG_DESTROY
,
cm
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
ct
,
nil
,
function
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
)
end
\ No newline at end of file
script/c120196003.lua
View file @
4f6ae1f1
...
...
@@ -6,21 +6,15 @@ function cm.initial_effect(c)
aux
.
AddCodeList
(
c
,
list
[
1
],
list
[
2
])
--Fusion Material
aux
.
AddFusionProcCode2
(
c
,
list
[
1
],
list
[
2
],
true
,
true
)
--
Select
Effect
local
e1
=
R
ushDuel
.
BaseSelect
Effect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
--
Multi-Choose
Effect
local
e1
=
R
D
.
CreateMultiChoose
Effect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_GRAVE_ACTION
)
e1
:
SetCost
(
cm
.
cost
)
c
:
RegisterEffect
(
e1
)
end
--Select Effect
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToDeckOrExtraAsCost
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeckOrExtraAsCost
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_COST
)
end
--Multi-Choose Effect
cm
.
cost
=
RD
.
CostSendGraveToDeckBottom
(
Card
.
IsAbleToDeckOrExtraAsCost
,
1
,
1
)
--To Deck(Grave)
function
cm
.
tdfilter1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
...
...
@@ -29,12 +23,9 @@ function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
IsExistingMatchingCard
(
cm
.
tdfilter1
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
end
function
cm
.
eff1op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter1
),
tp
,
0
,
LOCATION_GRAVE
,
1
,
3
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
RD
.
SelectAndDoAction
(
HINTMSG_TODECK
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter1
),
tp
,
0
,
LOCATION_GRAVE
,
1
,
3
,
nil
,
function
(
g
)
RD
.
SendToDeckAndExists
(
g
)
end
)
end
--To Deck(Monstar)
function
cm
.
tdfilter2
(
c
)
...
...
@@ -44,10 +35,7 @@ function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
IsExistingMatchingCard
(
cm
.
tdfilter2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
function
cm
.
eff2op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tdfilter2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
RD
.
SelectAndDoAction
(
HINTMSG_TODECK
,
cm
.
tdfilter2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
2
,
nil
,
function
(
g
)
RD
.
SendToDeckAndExists
(
g
)
end
)
end
\ No newline at end of file
script/c120196004.lua
View file @
4f6ae1f1
...
...
@@ -6,40 +6,23 @@ function cm.initial_effect(c)
aux
.
AddCodeList
(
c
,
list
[
1
],
list
[
2
])
--Fusion Material
aux
.
AddFusionProcCode2
(
c
,
list
[
1
],
list
[
2
],
true
,
true
)
--
Select
Effect
--
Multi-Choose
Effect
local
e1
=
RushDuel
.
BaseSelectEffect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCost
(
cm
.
cost
)
c
:
RegisterEffect
(
e1
)
end
--Select Effect
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
--Multi-Choose Effect
cm
.
cost
=
RD
.
CostSendHandToGrave
(
Card
.
IsAbleToGraveAsCost
,
1
,
1
)
--Atk & Def Down(Single)
function
cm
.
eff1con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
function
cm
.
eff1op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
3
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
tc
=
g
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
1500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
tc
:
RegisterEffect
(
e2
)
end
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
3
),
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
-
1500
,
-
1500
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
--Atk & Def Down(AOE)
function
cm
.
downfilter
(
c
)
...
...
@@ -50,17 +33,7 @@ function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
end
function
cm
.
eff2op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
downfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
2000
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
g
:
ForEach
(
function
(
tc
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
-
2000
,
-
2000
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
\ No newline at end of file
script/c120196005.lua
View file @
4f6ae1f1
...
...
@@ -24,27 +24,12 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
confilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
1
)
end
Duel
.
DiscardDeck
(
tp
,
1
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendDeckTopToGrave
(
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
1
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
tc
=
g
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
tc
:
RegisterEffect
(
e2
)
end
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
-
500
,
-
500
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
\ No newline at end of file
script/c120196011.lua
View file @
4f6ae1f1
...
...
@@ -21,31 +21,15 @@ end
function
cm
.
exfilter
(
c
)
return
c
:
IsCode
(
list
[
1
])
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendHandToGrave
(
Card
.
IsAbleToGraveAsCost
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
1
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
tc
=
g
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
500
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
local
e2
=
e1
:
Clone
()
e2
:
SetValue
(
1000
)
tc
:
RegisterEffect
(
e2
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
1000
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
end
end
)
end
\ No newline at end of file
script/c120196012.lua
View file @
4f6ae1f1
...
...
@@ -14,7 +14,7 @@ function cm.initial_effect(c)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
cm
.
atk
tg
)
e2
:
SetTarget
(
cm
.
down
tg
)
e2
:
SetValue
(
-
300
)
c
:
RegisterEffect
(
e2
)
--Indes
...
...
@@ -35,7 +35,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
IsExistingMatchingCard
(
cm
.
confilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
--Atk Down
function
cm
.
atk
tg
(
e
,
c
)
function
cm
.
down
tg
(
e
,
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
--Indes
...
...
script/c120196013.lua
View file @
4f6ae1f1
...
...
@@ -23,9 +23,9 @@ end
function
cm
.
confilter2
(
c
,
tp
)
return
c
:
GetSummonPlayer
()
==
tp
end
function
cm
.
pos
filter
(
c
)
function
cm
.
filter
(
c
)
return
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
c
:
IsLevelAbove
(
8
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsCanChangePosition
()
and
RushDuel
.
IsHasDefense
(
c
)
and
RD
.
IsCanChangePosition
(
c
)
end
function
cm
.
exfilter
(
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
...
...
@@ -38,34 +38,22 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
and
eg
:
IsExists
(
cm
.
confilter2
,
1
,
nil
,
1
-
tp
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
pos
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
pos
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
0
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
posfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
~=
0
then
local
race
=
0
RD
.
SelectAndDoAction
(
HINTMSG_POSCHANGE
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
g
)
if
RD
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
~=
0
then
local
sg
=
Duel
.
GetMatchingGroup
(
cm
.
exfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
tc
=
sg
:
GetFirst
()
while
tc
do
race
=
bit
.
bor
(
race
,
tc
:
GetRace
())
tc
=
sg
:
GetNext
()
end
if
race
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
race
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
dg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
race
)
if
dg
:
GetCount
()
>
0
then
local
race
=
RD
.
GroupBor
(
sg
,
Card
.
GetRace
)
if
race
~=
0
then
local
filter
=
RD
.
Filter
(
cm
.
desfilter
,
race
)
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
HINTMSG_DESTROY
,
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
dg
)
Duel
.
BreakEffect
()
Duel
.
HintSelection
(
dg
)
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
end
end
)
end
end
end
end
)
end
\ No newline at end of file
script/c120196014.lua
View file @
4f6ae1f1
...
...
@@ -14,13 +14,13 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
confilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
==
Duel
.
GetAttackTarget
()
return
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
==
Duel
.
GetAttackTarget
()
and
c
:
IsPreviousPosition
(
POS_ATTACK
)
and
bit
.
band
(
c
:
GetPreviousAttributeOnField
(),
ATTRIBUTE_LIGHT
)
~=
0
and
RD
.
IsPreviousAttribute
(
c
,
ATTRIBUTE_LIGHT
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
(
c
:
IsRace
(
RACE_CYBORG
)
or
(
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsDefense
(
500
)))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
confilter
,
1
,
nil
,
tp
)
...
...
@@ -31,10 +31,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
end
\ No newline at end of file
script/c120196015.lua
View file @
4f6ae1f1
...
...
@@ -6,18 +6,15 @@ function cm.initial_effect(c)
aux
.
AddCodeList
(
c
,
list
[
1
],
list
[
2
])
--Fusion Material
aux
.
AddFusionProcCode2
(
c
,
list
[
1
],
list
[
2
],
true
,
true
)
--
Select
Effect
local
e1
=
R
ushDuel
.
BaseSelect
Effect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
--
Multi-Choose
Effect
local
e1
=
R
D
.
CreateMultiChoose
Effect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e1
:
SetCost
(
cm
.
cost
)
c
:
RegisterEffect
(
e1
)
end
--Select Effect
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
1
)
end
Duel
.
DiscardDeck
(
tp
,
1
,
REASON_COST
)
end
--Multi-Choose Effect
cm
.
cost
=
RD
.
CostSendDeckTopToGrave
(
1
)
--Atk Up
function
cm
.
atkfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
...
...
@@ -30,12 +27,7 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
atkfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
nil
)
local
atk
=
g
:
GetClassCount
(
Card
.
GetAttribute
)
*
400
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
RD
.
AttachAtkDef
(
e
,
c
,
atk
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
end
end
--To Deck
...
...
@@ -46,16 +38,10 @@ function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
IsExistingMatchingCard
(
cm
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
function
cm
.
eff2op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
3
))
then
Duel
.
BreakEffect
()
RD
.
SelectAndDoAction
(
HINTMSG_TODECK
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
if
RD
.
SendToDeckAndExists
(
g
)
then
Duel
.
ShuffleDeck
(
tp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
RD
.
CanDraw
(
aux
.
Stringid
(
m
,
3
),
tp
,
1
,
true
)
end
end
end
)
end
\ No newline at end of file
script/c120196016.lua
View file @
4f6ae1f1
...
...
@@ -21,37 +21,22 @@ end
function
cm
.
tdfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendHandToGrave
(
Card
.
IsAbleToGraveAsCost
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tdfilter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
tdfilter
,
tp
,
0
,
LOCATION_GRAVE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
0
,
LOCATION_GRAVE
,
1
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
~=
0
RD
.
SelectAndDoAction
(
HINTMSG_TODECK
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
0
,
LOCATION_GRAVE
,
1
,
2
,
nil
,
function
(
g
)
if
RD
.
SendToDeckAndExists
(
g
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc
=
sg
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
tc
=
sg
:
GetNext
()
end
sg
:
ForEach
(
function
(
tc
)
RD
.
AttachAtkDef
(
e
,
tc
,
-
500
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
end
end
)
end
\ No newline at end of file
script/c120196017.lua
View file @
4f6ae1f1
...
...
@@ -18,7 +18,7 @@ function cm.initial_effect(c)
end
--Special Summon
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
...
...
@@ -26,20 +26,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
g
:
GetFirst
():
IsCode
(
list
[
1
])
and
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
1400
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
if
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
~=
0
then
local
tc
=
Duel
.
GetOperatedGroup
():
GetFirst
()
local
c
=
e
:
GetHandler
()
if
tc
:
IsCode
(
list
[
1
])
and
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
RD
.
AttachAtkDef
(
e
,
c
,
1400
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
end
end
end
\ No newline at end of file
script/c120196018.lua
View file @
4f6ae1f1
...
...
@@ -21,20 +21,14 @@ end
function
cm
.
thfilter
(
c
)
return
c
:
IsDefensePos
()
and
c
:
IsAbleToHand
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
500
)
end
Duel
.
PayLPCost
(
tp
,
500
)
end
cm
.
cost
=
RD
.
CostPayLP
(
500
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
thfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
RD
.
SelectAndDoAction
(
HINTMSG_RTOHAND
,
cm
.
thfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
SendToOpponentHand
(
g
)
end
)
end
\ No newline at end of file
script/c120196019.lua
View file @
4f6ae1f1
...
...
@@ -23,19 +23,13 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
<=
1
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
500
)
end
Duel
.
PayLPCost
(
tp
,
500
)
end
cm
.
cost
=
RD
.
CostPayLP
(
500
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
RD
.
SelectAndDoAction
(
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
)
end
\ No newline at end of file
script/c120196020.lua
View file @
4f6ae1f1
...
...
@@ -23,42 +23,21 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
<=
1
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendSelfToGrave
()
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
~=
0
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
cm
.
atktg
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
--Hint
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
RD
.
SelectAndDoAction
(
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
if
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
and
RD
.
CanDraw
(
aux
.
Stringid
(
m
,
1
),
tp
,
1
,
true
)
~=
0
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
RD
.
CreateHintEffect
(
e
,
aux
.
Stringid
(
m
,
2
),
tp
,
1
,
0
,
RESET_PHASE
+
PHASE_END
)
RD
.
CreateAttackLimitEffect
(
e
,
cm
.
atktg
,
tp
,
LOCATION_MZONE
,
0
,
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
)
end
function
cm
.
atktg
(
e
,
c
)
return
c
:
IsLevelBelow
(
6
)
...
...
script/c120196022.lua
View file @
4f6ae1f1
...
...
@@ -6,15 +6,15 @@ function cm.initial_effect(c)
aux
.
AddCodeList
(
c
,
list
[
1
],
list
[
2
])
--Fusion Material
aux
.
AddFusionProcCode2
(
c
,
list
[
1
],
list
[
2
],
true
,
true
)
--
Select
Effect
local
e1
=
R
ushDuel
.
BaseSelect
Effect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
--
Multi-Choose
Effect
local
e1
=
R
D
.
CreateMultiChoose
Effect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetCost
(
cm
.
cost
)
c
:
RegisterEffect
(
e1
)
end
--
Select
Effect
--
Multi-Choose
Effect
function
cm
.
confilter1
(
c
)
return
c
:
IsRace
(
RACE_DRAGON
)
or
c
:
IsRace
(
RACE_HYDRAGON
)
end
...
...
@@ -25,10 +25,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
IsExistingMatchingCard
(
cm
.
confilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
not
Duel
.
IsExistingMatchingCard
(
cm
.
confilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
1
)
end
Duel
.
DiscardDeck
(
tp
,
1
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendDeckTopToGrave
(
1
)
--Atk Up
function
cm
.
eff1con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
true
...
...
@@ -36,21 +33,8 @@ end
function
cm
.
eff1op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
900
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
--Extra Attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_EXTRA_ATTACK_MONSTER
)
e2
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e2
)
RD
.
AttachAtkDef
(
e
,
c
,
900
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
RD
.
AttachExtraAttackMonster
(
e
,
c
,
1
,
aux
.
Stringid
(
m
,
3
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
end
end
--Pierce
...
...
@@ -60,22 +44,7 @@ end
function
cm
.
eff2op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
--Extra Attack
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
4
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
--Pierce
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_PIERCE
)
e2
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e2
)
RD
.
AttachExtraAttack
(
e
,
c
,
1
,
aux
.
Stringid
(
m
,
4
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
RD
.
AttachPierce
(
e
,
c
,
aux
.
Stringid
(
m
,
5
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
end
end
\ No newline at end of file
script/c120196023.lua
View file @
4f6ae1f1
...
...
@@ -6,26 +6,21 @@ function cm.initial_effect(c)
aux
.
AddCodeList
(
c
,
list
[
1
],
list
[
2
])
--Fusion Material
aux
.
AddFusionProcCode2
(
c
,
list
[
1
],
list
[
2
],
true
,
true
)
--
Select
Effect
local
e1
=
R
ushDuel
.
BaseSelect
Effect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
--
Multi-Choose
Effect
local
e1
=
R
D
.
CreateMultiChoose
Effect
(
c
,
aux
.
Stringid
(
m
,
1
),
cm
.
eff1con
,
cm
.
eff1op
,
aux
.
Stringid
(
m
,
2
),
cm
.
eff2con
,
cm
.
eff2op
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_GRAVE_SPSUMMON
+
CATEGORY_TOHAND
+
CATEGORY_GRAVE_ACTION
)
e1
:
SetCost
(
cm
.
cost
)
c
:
RegisterEffect
(
e1
)
end
--
Select
Effect
--
Multi-Choose
Effect
function
cm
.
costfilter
(
c
)
return
not
RushDuel
.
IsLegendCode
(
c
,
list
[
3
])
and
c
:
IsAbleToGrave
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
return
not
c
:
IsCode
(
list
[
3
])
and
c
:
IsAbleToGrave
()
end
cm
.
cost
=
RD
.
CostSendHandToGrave
(
cm
.
costfilter
,
1
,
1
)
--Special Summon
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_HYDRAGON
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsRace
(
RACE_HYDRAGON
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
eff1con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
op
)
local
filter
=
cm
.
spfilter
...
...
@@ -34,25 +29,17 @@ function cm.eff1con(e,tp,eg,ep,ev,re,r,rp,op)
and
Duel
.
IsExistingMatchingCard
(
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
function
cm
.
eff1op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
end
--To Hand
function
cm
.
thfilter
(
c
)
return
RushDuel
.
IsLegendCode
(
c
,
list
[
3
])
and
c
:
IsAbleToHand
()
return
c
:
IsCode
(
list
[
3
])
and
c
:
IsAbleToHand
()
end
function
cm
.
eff2con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
function
cm
.
eff2op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
RD
.
SelectAndDoAction
(
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
)
end
\ No newline at end of file
script/c120196024.lua
View file @
4f6ae1f1
...
...
@@ -24,23 +24,14 @@ 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
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendGraveToDeck
(
cm
.
costfilter
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
RD
.
SelectAndDoAction
(
HINTMSG_DESTROY
,
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
function
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
)
end
\ No newline at end of file
script/c120196025.lua
View file @
4f6ae1f1
...
...
@@ -19,24 +19,14 @@ function cm.costfilter(c)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsLevelBelow
(
6
)
and
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
cm
.
cost
=
RD
.
CostSendHandToGrave
(
cm
.
costfilter
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
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
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
end
\ No newline at end of file
script/c120196027.lua
View file @
4f6ae1f1
...
...
@@ -16,30 +16,12 @@ end
function
cm
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeckOrExtraAsCost
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
3
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendGraveToDeck
(
cm
.
costfilter
,
3
,
3
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
1
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
tc
=
g
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
tc
:
RegisterEffect
(
e2
)
end
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
500
,
500
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
\ No newline at end of file
script/c120196028.lua
View file @
4f6ae1f1
...
...
@@ -19,21 +19,10 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendGraveToDeck
(
cm
.
costfilter
,
1
,
1
)
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
if
tc
and
tc
:
IsRelateToBattle
()
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
400
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
RD
.
AttachAtkDef
(
e
,
tc
,
-
400
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
end
\ No newline at end of file
script/c120196029.lua
View file @
4f6ae1f1
...
...
@@ -22,20 +22,11 @@ end
function
cm
.
costfilter
(
c
)
return
c
:
IsCode
(
list
[
1
],
list
[
2
])
and
c
:
IsAbleToDeckOrExtraAsCost
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendGraveToDeckBottom
(
cm
.
costfilter
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
800
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
800
)
RD
.
TargetDamage
(
1
-
tp
,
800
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
RD
.
Damage
()
end
\ No newline at end of file
script/c120196030.lua
View file @
4f6ae1f1
...
...
@@ -25,22 +25,19 @@ end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
if
chk
==
0
then
return
ct
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
if
ct
>
3
then
ct
=
3
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
ct
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
math.min
(
ct
,
3
)
,
nil
)
local
d
=
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
e
:
SetLabel
(
d
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
local
d
=
e
:
GetLabel
()
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
d
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
d
)
RD
.
TargetDraw
(
tp
,
d
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
~=
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
if
RD
.
Draw
()
~=
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Recover
(
tp
,
900
,
REASON_EFFECT
)
end
end
\ No newline at end of file
script/c120196031.lua
View file @
4f6ae1f1
...
...
@@ -24,26 +24,15 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
1
)
end
Duel
.
DiscardDeck
(
tp
,
1
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendDeckTopToGrave
(
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
500
)
RD
.
TargetRecover
(
tp
,
500
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
99
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
if
RD
.
Recover
()
~=
0
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
99
,
nil
,
function
(
g
)
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
)
end
end
\ No newline at end of file
script/c120196032.lua
View file @
4f6ae1f1
...
...
@@ -15,11 +15,8 @@ end
--Activate
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
500
)
RD
.
TargetRecover
(
tp
,
500
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
RD
.
Recover
()
end
\ No newline at end of file
script/c120196033.lua
View file @
4f6ae1f1
...
...
@@ -16,21 +16,11 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Indes
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
1
)
end
Duel
.
DiscardDeck
(
tp
,
1
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendDeckTopToGrave
(
1
)
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetValue
(
cm
.
efilter
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
RD
.
AttachEffectIndes
(
e
,
c
,
cm
.
efilter
,
aux
.
Stringid
(
m
,
1
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
end
end
function
cm
.
efilter
(
e
,
re
,
rp
)
...
...
script/c120196034.lua
View file @
4f6ae1f1
...
...
@@ -19,11 +19,11 @@ function cm.initial_effect(c)
end
--Special Summon
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsRace
(
RACE_FIEND
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsSummonType
(
SUMMON_TYPE_FUSION
)
and
c
:
IsReason
(
REASON_SPSUMMON
)
and
c
:
IsStatus
(
STATUS_SPSUMMON_TURN
)
return
c
:
IsSummonType
(
SUMMON_TYPE_FUSION
)
and
RD
.
IsSpecialSummonTurn
(
c
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
...
...
@@ -31,10 +31,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
end
\ No newline at end of file
script/c120196035.lua
View file @
4f6ae1f1
...
...
@@ -27,18 +27,13 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
RD
.
TargetDraw
(
tp
,
2
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
RD
.
Draw
()
~=
0
then
RD
.
SelectAndDoAction
(
HINTMSG_TODECK
,
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
function
(
g
)
Duel
.
BreakEffect
()
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
end
RD
.
SendToDeckBottom
(
g
)
end
)
end
end
\ No newline at end of file
script/c120196036.lua
View file @
4f6ae1f1
...
...
@@ -27,28 +27,15 @@ end
function
cm
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_FIELD
)
and
c
:
IsAbleToHand
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendGraveToDeck
(
cm
.
costfilter
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
3
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
3
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
DiscardDeck
(
tp
,
3
,
REASON_EFFECT
)
==
0
then
return
end
local
g
=
Duel
.
GetOperatedGroup
()
if
g
:
IsExists
(
cm
.
exfilter
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
2
,
nil
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
if
RD
.
SendDeckTopToGraveAndExists
(
tp
,
3
,
cm
.
exfilter
,
1
,
nil
)
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
2
,
nil
,
function
(
g
)
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
)
end
end
\ No newline at end of file
script/c120196037.lua
View file @
4f6ae1f1
...
...
@@ -21,7 +21,7 @@ function cm.costfilter(c)
return
c
:
IsRace
(
RACE_DINOSAUR
)
and
c
:
IsAbleToDeckOrExtraAsCost
()
end
function
cm
.
exfilter
(
c
)
return
R
ushDuel
.
IsLegendCode
(
c
,
list
[
3
])
return
R
D
.
IsLegendCode
(
c
,
list
[
3
])
end
function
cm
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
...
...
@@ -37,21 +37,11 @@ end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
700
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
3
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
RD
.
AttachAtkDef
(
e
,
c
,
700
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
3
),
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
)
end
end
end
\ No newline at end of file
script/c120196038.lua
View file @
4f6ae1f1
...
...
@@ -24,10 +24,7 @@ end
function
cm
.
tdfilter
(
c
)
return
c
:
IsCode
(
list
[
3
],
list
[
4
])
and
c
:
IsAbleToDeck
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
600
)
end
Duel
.
PayLPCost
(
tp
,
600
)
end
cm
.
cost
=
RD
.
CostPayLP
(
600
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
end
...
...
@@ -35,22 +32,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
atk
=
Duel
.
GetMatchingGroupCount
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
*
200
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
if
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
RD
.
AttachAtkDef
(
e
,
c
,
atk
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
HINTMSG_TODECK
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
Duel
.
BreakEffect
()
if
RD
.
SendToDeckBottom
(
g
)
~=
0
then
RD
.
CanDraw
(
aux
.
Stringid
(
m
,
2
),
tp
,
1
)
end
end
end
)
end
end
\ No newline at end of file
script/c120196039.lua
View file @
4f6ae1f1
...
...
@@ -20,44 +20,19 @@ function cm.costfilter(c)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToGraveAsCost
()
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
list
[
1
])
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
return
c
:
IsCode
(
list
[
1
])
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
cm
.
cost
=
RD
.
CostSendHandToGrave
(
cm
.
costfilter
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
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
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
RD
.
SelectAndSpecialSummon
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
if
Duel
.
GetFlagEffect
(
tp
,
m
)
~=
0
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
cm
.
atktg
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
--Hint
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
RD
.
CreateHintEffect
(
e
,
aux
.
Stringid
(
m
,
1
),
tp
,
1
,
0
,
RESET_PHASE
+
PHASE_END
)
RD
.
CreateAttackLimitEffect
(
e
,
cm
.
atktg
,
tp
,
LOCATION_MZONE
,
0
,
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
cm
.
atktg
(
e
,
c
)
...
...
script/c120196041.lua
View file @
4f6ae1f1
...
...
@@ -15,19 +15,11 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Damage
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendMZoneToGrave
(
Card
.
IsAbleToGraveAsCost
,
1
,
1
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
500
)
RD
.
TargetDamage
(
1
-
tp
,
500
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
RD
.
Damage
()
end
\ No newline at end of file
script/c120196043.lua
View file @
4f6ae1f1
...
...
@@ -25,36 +25,17 @@ 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
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendHandToGrave
(
cm
.
costfilter
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
1
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
tc
=
g
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
300
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
sg
)
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
-
300
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
2
),
HINTMSG_DESTROY
,
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
function
(
sg
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
end
end
)
end
end
end
)
end
\ No newline at end of file
script/c120196044.lua
View file @
4f6ae1f1
...
...
@@ -22,33 +22,16 @@ end
function
cm
.
exfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevel
(
9
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendGraveToDeck
(
cm
.
costfilter
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
RD
.
TargetDraw
(
tp
,
1
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
if
RD
.
Draw
()
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
400
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
tc
=
g
:
GetNext
()
end
g
:
ForEach
(
function
(
tc
)
RD
.
AttachAtkDef
(
e
,
tc
,
400
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
end
\ No newline at end of file
script/c120196045.lua
View file @
4f6ae1f1
...
...
@@ -16,35 +16,22 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsLevelBelow
(
5
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsLevelBelow
(
5
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
thfilter
(
c
)
return
c
:
IsCode
(
list
[
1
])
and
c
:
IsAbleToHand
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToDeckAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeckAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendHandToDeckBottom
(
Card
.
IsAbleToDeckAsCost
,
1
,
1
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
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
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
then
if
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
~=
0
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
Duel
.
BreakEffect
()
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
)
end
end
\ No newline at end of file
script/c120196047.lua
View file @
4f6ae1f1
...
...
@@ -22,18 +22,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
1
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
tc
=
g
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachBattleIndes
(
e
,
g
:
GetFirst
(),
1
,
aux
.
Stringid
(
m
,
2
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
\ No newline at end of file
script/c120196048.lua
View file @
4f6ae1f1
...
...
@@ -20,10 +20,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
RD
.
SelectAndDoAction
(
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
)
end
\ No newline at end of file
script/c120196049.lua
View file @
4f6ae1f1
...
...
@@ -15,18 +15,13 @@ end
--Activate
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
3
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
3
)
RD
.
TargetDraw
(
tp
,
3
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
,
0
,
2
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
if
RD
.
Draw
()
~=
0
then
RD
.
SelectAndDoAction
(
HINTMSG_TOGRAVE
,
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
,
0
,
2
,
2
,
nil
,
function
(
g
)
Duel
.
BreakEffect
()
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
RD
.
SendToGraveAndExists
(
g
)
end
)
end
end
\ No newline at end of file
script/c120197001.lua
View file @
4f6ae1f1
...
...
@@ -17,10 +17,7 @@ end
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
1
)
end
Duel
.
DiscardDeck
(
tp
,
1
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendDeckTopToGrave
(
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
end
...
...
@@ -29,11 +26,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
atk
=
g
:
GetClassCount
(
Card
.
GetAttribute
)
*
300
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
RD
.
AttachAtkDef
(
e
,
c
,
atk
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
end
end
\ No newline at end of file
script/c120197002.lua
View file @
4f6ae1f1
...
...
@@ -21,34 +21,23 @@ function cm.costfilter(c,e,tp)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelAbove
(
7
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
function
cm
.
exfilter
(
c
)
return
c
:
IsCode
(
list
[
1
])
end
cm
.
cost
=
RD
.
CostSendHandToGrave
(
cm
.
costfilter
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
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
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
g
:
GetFirst
():
IsCode
(
list
[
1
])
if
RD
.
SelectAndSpecialSummon
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
~=
0
and
RD
.
IsOperatedGroupExists
(
cm
.
exfilter
,
1
,
nil
)
and
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
400
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
RD
.
AttachAtkDef
(
e
,
c
,
400
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
end
end
\ No newline at end of file
script/c120197003.lua
View file @
4f6ae1f1
...
...
@@ -25,30 +25,16 @@ end
function
cm
.
atkfilter
(
c
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
1
)
end
Duel
.
DiscardDeck
(
tp
,
1
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendDeckTopToGrave
(
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
1
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
tc
=
g
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
400
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
-
400
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
local
atk
=
Duel
.
GetMatchingGroupCount
(
cm
.
atkfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
*
100
local
e2
=
e1
:
Clone
()
e2
:
SetValue
(
-
atk
)
tc
:
RegisterEffect
(
e2
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
-
atk
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
end
end
)
end
\ No newline at end of file
script/c120197004.lua
View file @
4f6ae1f1
...
...
@@ -19,37 +19,26 @@ end
function
cm
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsAbleToGraveAsCost
()
end
function
cm
.
thfilter1
(
c
)
function
cm
.
filter
(
c
)
return
c
:
IsLevelAbove
(
7
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thfilter2
(
c
)
return
c
:
Is
LevelAbove
(
6
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsAbleToHand
(
)
function
cm
.
exfilter
(
c
)
return
c
:
Is
Code
(
list
[
1
])
and
c
:
IsLocation
(
LOCATION_HAND
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
function
cm
.
thfilter
(
c
)
return
c
:
IsLevelAbove
(
6
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsAbleToHand
()
end
cm
.
cost
=
RD
.
CostSendHandToGrave
(
cm
.
costfilter
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter1
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
g
:
GetFirst
():
IsCode
(
list
[
1
])
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
thfilter2
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter2
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
RD
.
SelectAndDoAction
(
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
filter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
if
RD
.
SendToHandAndExists
(
g
,
1
-
tp
,
cm
.
exfilter
,
1
,
nil
)
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
sg
)
RD
.
SendToHandAndExists
(
sg
,
1
-
tp
)
end
)
end
end
end
)
end
\ No newline at end of file
script/c120197005.lua
View file @
4f6ae1f1
...
...
@@ -23,19 +23,13 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
<=
1
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
500
)
end
Duel
.
PayLPCost
(
tp
,
500
)
end
cm
.
cost
=
RD
.
CostPayLP
(
500
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
RD
.
SelectAndDoAction
(
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
)
end
\ No newline at end of file
script/c120197006.lua
View file @
4f6ae1f1
...
...
@@ -23,19 +23,13 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
<=
1
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
500
)
end
Duel
.
PayLPCost
(
tp
,
500
)
end
cm
.
cost
=
RD
.
CostPayLP
(
500
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
RD
.
SelectAndDoAction
(
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
)
end
\ No newline at end of file
script/c120197007.lua
View file @
4f6ae1f1
...
...
@@ -23,19 +23,13 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
<=
1
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
500
)
end
Duel
.
PayLPCost
(
tp
,
500
)
end
cm
.
cost
=
RD
.
CostPayLP
(
500
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
RD
.
SelectAndDoAction
(
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
)
end
\ No newline at end of file
script/c120198002.lua
View file @
4f6ae1f1
...
...
@@ -21,26 +21,16 @@ end
function
cm
.
exfilter
(
c
)
return
c
:
IsCode
(
list
[
1
])
and
c
:
IsLocation
(
LOCATION_HAND
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
1
)
end
Duel
.
DiscardDeck
(
tp
,
1
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendDeckTopToGrave
(
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
==
0
then
return
end
local
og
=
Duel
.
GetOperatedGroup
()
if
og
:
IsExists
(
cm
.
exfilter
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Draw
(
tp
,
1
,
REASON_DRAW
)
RD
.
SelectAndDoAction
(
HINTMSG_RTOHAND
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
if
RD
.
SendToHandAndExists
(
g
,
nil
,
cm
.
exfilter
,
1
,
nil
)
then
RD
.
CanDraw
(
aux
.
Stringid
(
m
,
1
),
tp
,
1
)
end
end
end
)
end
\ No newline at end of file
script/c120208029.lua
View file @
4f6ae1f1
...
...
@@ -29,7 +29,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
IsExistingMatchingCard
(
cm
.
confilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
not
Duel
.
IsExistingMatchingCard
(
cm
.
confilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
cm
.
cost
=
RD
.
CostSendHandToDeckBottom
(
Card
.
IsAbleToDeckAsCost
,
1
,
1
)
cm
.
cost
=
RD
.
CostSendHandToDeckBottom
(
Card
.
IsAbleToDeckAsCost
,
1
,
1
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
...
...
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