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
b2f1b473
Commit
b2f1b473
authored
Feb 27, 2022
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022/2/27 模块化 MAX1
parent
5e4282f8
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
192 additions
and
377 deletions
+192
-377
script/RDExpand.lua
script/RDExpand.lua
+59
-11
script/c120145037.lua
script/c120145037.lua
+1
-1
script/c120150001.lua
script/c120150001.lua
+3
-13
script/c120150002.lua
script/c120150002.lua
+2
-2
script/c120150003.lua
script/c120150003.lua
+5
-17
script/c120150004.lua
script/c120150004.lua
+4
-10
script/c120150005.lua
script/c120150005.lua
+3
-11
script/c120150006.lua
script/c120150006.lua
+9
-12
script/c120150007.lua
script/c120150007.lua
+5
-24
script/c120150008.lua
script/c120150008.lua
+3
-12
script/c120150009.lua
script/c120150009.lua
+6
-9
script/c120150010.lua
script/c120150010.lua
+4
-10
script/c120150011.lua
script/c120150011.lua
+2
-2
script/c120150012.lua
script/c120150012.lua
+6
-12
script/c120150016.lua
script/c120150016.lua
+3
-10
script/c120150017.lua
script/c120150017.lua
+4
-13
script/c120150018.lua
script/c120150018.lua
+3
-12
script/c120150020.lua
script/c120150020.lua
+4
-13
script/c120150021.lua
script/c120150021.lua
+5
-5
script/c120150022.lua
script/c120150022.lua
+5
-10
script/c120150023.lua
script/c120150023.lua
+4
-8
script/c120150024.lua
script/c120150024.lua
+3
-12
script/c120150025.lua
script/c120150025.lua
+3
-6
script/c120150028.lua
script/c120150028.lua
+8
-18
script/c120150029.lua
script/c120150029.lua
+5
-9
script/c120150033.lua
script/c120150033.lua
+4
-21
script/c120150034.lua
script/c120150034.lua
+2
-12
script/c120150035.lua
script/c120150035.lua
+3
-7
script/c120150036.lua
script/c120150036.lua
+2
-7
script/c120150037.lua
script/c120150037.lua
+4
-16
script/c120150042.lua
script/c120150042.lua
+1
-6
script/c120150043.lua
script/c120150043.lua
+2
-10
script/c120150046.lua
script/c120150046.lua
+2
-2
script/c120150047.lua
script/c120150047.lua
+3
-6
script/c120150049.lua
script/c120150049.lua
+4
-20
script/c120150050.lua
script/c120150050.lua
+6
-8
No files found.
script/RDExpand.lua
View file @
b2f1b473
...
...
@@ -75,6 +75,36 @@ function RushDuel.CreateCannotDirectAttackEffect(e, target, tp, s, o, reset)
Duel
.
RegisterEffect
(
e1
,
tp
)
return
e1
end
-- Can not Summon (Promise)
function
RushDuel
.
CreateCannotSummonEffect
(
e
,
desc
,
target
,
tp
,
s
,
o
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
desc
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetTargetRange
(
s
,
o
)
if
target
~=
nil
then
e1
:
SetTarget
(
target
)
end
e1
:
SetReset
(
reset
)
Duel
.
RegisterEffect
(
e1
,
tp
)
return
e1
end
-- Can not Special Summon (Promise)
function
RushDuel
.
CreateCannotSpecialSummonEffect
(
e
,
desc
,
target
,
tp
,
s
,
o
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
desc
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetTargetRange
(
s
,
o
)
if
target
~=
nil
then
e1
:
SetTarget
(
target
)
end
e1
:
SetReset
(
reset
)
Duel
.
RegisterEffect
(
e1
,
tp
)
return
e1
end
-- Check: Is Life Point Below
function
RushDuel
.
IsLPBelow
(
player
,
lp
)
...
...
@@ -96,6 +126,11 @@ end
function
RushDuel
.
IsSpecialSummonTurn
(
c
)
return
c
:
IsReason
(
REASON_SPSUMMON
)
and
c
:
IsStatus
(
STATUS_SPSUMMON_TURN
)
end
-- Check: Is Defense Above
function
RushDuel
.
IsDefenseAbove
(
c
,
def
)
return
c
:
IsDefenseAbove
(
def
)
and
not
RushDuel
.
IsMaximumMode
(
c
)
end
-- Check: Is Defense Below
function
RushDuel
.
IsDefenseBelow
(
c
,
def
)
return
c
:
IsDefenseBelow
(
def
)
and
not
RushDuel
.
IsMaximumMode
(
c
)
end
...
...
@@ -296,6 +331,12 @@ function RushDuel.Draw(player, count)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
return
Duel
.
Draw
(
player
or
p
,
count
or
d
,
REASON_EFFECT
)
end
-- Action: Can Draw
function
RushDuel
.
CanDraw
(
desc
,
player
,
count
)
if
Duel
.
IsPlayerCanDraw
(
player
,
count
)
and
Duel
.
SelectYesNo
(
player
,
desc
)
then
Duel
.
Draw
(
player
,
count
,
REASON_EFFECT
)
end
end
-- Action: Recover
function
RushDuel
.
Recover
(
player
,
recover
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
...
...
@@ -547,6 +588,7 @@ function RushDuel.SendOpponentHandToGrave(tp, desc, min, max)
local
sg
=
g
:
RandomSelect
(
tp
,
ac
)
return
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
return
0
end
-- Action: Send to Opponent Hand
function
RushDuel
.
SendToOpponentHand
(
target
)
...
...
@@ -571,35 +613,41 @@ end
function
RushDuel
.
SendToOpponentDeckTop
(
target
,
player
)
local
g
=
RushDuel
.
ToMaximunGroup
(
target
)
if
g
:
GetCount
()
==
1
then
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
return
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
else
RushDuel
.
SendToDeckTop
(
target
,
player
,
1
-
player
,
true
)
return
RushDuel
.
SendToDeckTop
(
target
,
player
,
1
-
player
,
true
)
end
end
-- Action: Send to Deck Top (Sort)
function
RushDuel
.
SendToDeckTop
(
target
,
sort_player
,
target_player
,
sort
)
local
g
=
RushDuel
.
ToMaximunGroup
(
target
)
if
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
~=
0
and
sort
then
local
count
=
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
if
count
~=
0
and
sort
then
local
ct
=
Duel
.
GetOperatedGroup
():
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
ct
>
1
then
Duel
.
SortDecktop
(
sort_player
,
target_player
,
ct
)
end
end
return
count
end
-- Action: Send to Deck Bottom (Sort)
function
RushDuel
.
SendToDeckBottom
(
target
,
sort_player
,
target_player
,
sort
)
local
g
=
RushDuel
.
ToMaximunGroup
(
target
)
if
not
sort
then
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
elseif
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
~=
0
then
local
ct
=
Duel
.
GetOperatedGroup
():
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
ct
>
1
then
Duel
.
SortDecktop
(
sort_player
,
target_player
,
ct
)
for
i
=
1
,
ct
do
local
tc
=
Duel
.
GetDecktopGroup
(
target_player
,
1
):
GetFirst
()
Duel
.
MoveSequence
(
tc
,
1
)
return
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
else
local
count
=
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
if
count
~=
0
then
local
ct
=
Duel
.
GetOperatedGroup
():
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
ct
>
1
then
Duel
.
SortDecktop
(
sort_player
,
target_player
,
ct
)
for
i
=
1
,
ct
do
local
tc
=
Duel
.
GetDecktopGroup
(
target_player
,
1
):
GetFirst
()
Duel
.
MoveSequence
(
tc
,
1
)
end
end
end
return
count
end
end
-- Action: Send to Grave and Exists
...
...
script/c120145037.lua
View file @
b2f1b473
...
...
@@ -15,7 +15,7 @@ function cm.initial_effect(c)
end
--Atk Up
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsDefenseAbove
(
2000
)
and
RushDuel
.
IsHasDefense
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
RD
.
IsDefenseAbove
(
c
,
2000
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
...
...
script/c120150001.lua
View file @
b2f1b473
...
...
@@ -17,14 +17,9 @@ function cm.initial_effect(c)
end
--Atk Up
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
RushDuel
.
MaximumMode
(
e
)
and
Duel
.
GetLP
(
tp
)
<
Duel
.
GetLP
(
1
-
tp
)
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
)
return
RD
.
MaximumMode
(
e
)
and
RD
.
IsLPBelowOpponent
(
tp
)
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
true
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
...
...
@@ -33,11 +28,6 @@ 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
=
math.abs
(
Duel
.
GetLP
(
tp
)
-
Duel
.
GetLP
(
1
-
tp
))
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/c120150002.lua
View file @
b2f1b473
...
...
@@ -5,14 +5,14 @@ cm.name="超魔机神 大霸道王"
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
list
[
1
],
list
[
2
])
--Maximum Summon
R
ushDuel
.
AddMaximumProcedure
(
c
,
3500
,
list
[
1
],
list
[
2
])
R
D
.
AddMaximumProcedure
(
c
,
3500
,
list
[
1
],
list
[
2
])
--Indes
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
R
ushDuel
.
MaximumMode
)
e1
:
SetCondition
(
R
D
.
MaximumMode
)
e1
:
SetValue
(
cm
.
efilter
)
c
:
RegisterEffect
(
e1
)
end
...
...
script/c120150003.lua
View file @
b2f1b473
...
...
@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_XMATERIAL
+
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetLabel
(
m
)
e1
:
SetCondition
(
R
ushDuel
.
MaximumMode
)
e1
:
SetCondition
(
R
D
.
MaximumMode
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
...
...
@@ -19,10 +19,7 @@ end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
1
)
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
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
...
...
@@ -30,17 +27,8 @@ end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
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
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
tc
:
GetLevel
()
*
200
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachAtkDef
(
e
,
c
,
g
:
GetFirst
():
GetLevel
()
*
200
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
end
)
end
end
\ No newline at end of file
script/c120150004.lua
View file @
b2f1b473
...
...
@@ -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/c120150005.lua
View file @
b2f1b473
...
...
@@ -19,19 +19,11 @@ end
function
cm
.
costfilter
(
c
)
return
c
:
IsCode
(
list
[
1
])
and
c
:
IsAbleToDeckOrExtraAsCost
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
==
3
end
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
.
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
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
RD
.
Draw
()
end
\ No newline at end of file
script/c120150006.lua
View file @
b2f1b473
...
...
@@ -4,7 +4,7 @@ cm.name="沉默学习"
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_
DRAW
+
CATEGORY_GRAVE_ACTION
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_
GRAVE_ACTION
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
cm
.
condition
)
...
...
@@ -32,17 +32,14 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEDOWN
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
0
,
LOCATION_SZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
RD
.
SelectAndDoAction
(
HINTMSG_FACEDOWN
,
cm
.
filter
,
tp
,
0
,
LOCATION_SZONE
,
1
,
1
,
nil
,
function
(
g
)
Duel
.
ConfirmCards
(
tp
,
g
)
if
g
:
GetFirst
():
IsType
(
TYPE_TRAP
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
and
Duel
.
SendtoDeck
(
sg
,
nil
,
1
,
REASON_EFFECT
)
~=
0
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
if
g
:
GetFirst
():
IsType
(
TYPE_TRAP
)
then
RD
.
SelectAndDoAction
(
HINTMSG_TODECK
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
sg
)
if
RD
.
SendToDeckBottom
(
sg
)
~=
0
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
)
end
end
end
)
end
\ No newline at end of file
script/c120150007.lua
View file @
b2f1b473
...
...
@@ -16,36 +16,17 @@ end
function
cm
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
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
,
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
)
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
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
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_PIERCE
)
e2
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
RD
.
AttachAtkDef
(
e
,
tc
,
400
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
RD
.
AttachPierce
(
e
,
tc
,
aux
.
Stringid
(
m
,
2
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
if
tc
:
IsLevel
(
10
)
then
Duel
.
Damage
(
1
-
tp
,
1000
,
REASON_EFFECT
)
end
end
end
)
end
\ No newline at end of file
script/c120150008.lua
View file @
b2f1b473
...
...
@@ -24,23 +24,14 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
confilter
,
1
,
nil
,
1
-
tp
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
4
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
4
,
4
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendGraveToDeck
(
cm
.
costfilter
,
4
,
4
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
RD
.
SelectAndDoAction
(
HINTMSG_DESTROY
,
nil
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
)
end
\ No newline at end of file
script/c120150009.lua
View file @
b2f1b473
...
...
@@ -16,22 +16,19 @@ end
function
cm
.
confilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_HAND
)
end
function
cm
.
td
filter
(
c
)
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
confilter
,
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
.
td
filter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
td
filter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
function
cm
.
activate
(
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
,
LOCATION_GRAVE
,
1
,
5
,
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
.
filter
),
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
5
,
nil
,
function
(
g
)
RD
.
SendToDeckAndExists
(
g
)
end
)
end
\ No newline at end of file
script/c120150010.lua
View file @
b2f1b473
...
...
@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_XMATERIAL
+
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetLabel
(
m
)
e1
:
SetCondition
(
R
ushDuel
.
MaximumMode
)
e1
:
SetCondition
(
R
D
.
MaximumMode
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
...
...
@@ -19,10 +19,7 @@ end
function
cm
.
desfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
8
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
3
)
end
Duel
.
DiscardDeck
(
tp
,
3
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendDeckTopToGrave
(
3
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
...
...
@@ -30,10 +27,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
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_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
RD
.
SelectAndDoAction
(
HINTMSG_DESTROY
,
cm
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
)
end
\ No newline at end of file
script/c120150011.lua
View file @
b2f1b473
...
...
@@ -5,14 +5,14 @@ cm.name="天帝龙树 世界树龙"
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
list
[
1
],
list
[
2
])
--Maximum Summon
R
ushDuel
.
AddMaximumProcedure
(
c
,
4000
,
list
[
1
],
list
[
2
])
R
D
.
AddMaximumProcedure
(
c
,
4000
,
list
[
1
],
list
[
2
])
--Indes
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
R
ushDuel
.
MaximumMode
)
e1
:
SetCondition
(
R
D
.
MaximumMode
)
e1
:
SetValue
(
cm
.
efilter
)
c
:
RegisterEffect
(
e1
)
end
...
...
script/c120150012.lua
View file @
b2f1b473
...
...
@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_XMATERIAL
+
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetLabel
(
m
)
e1
:
SetCondition
(
R
ushDuel
.
MaximumMode
)
e1
:
SetCondition
(
R
D
.
MaximumMode
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
...
...
@@ -17,12 +17,9 @@ function cm.initial_effect(c)
end
--Position
function
cm
.
posfilter
(
c
)
return
c
:
IsDefensePos
()
and
c
:
IsCanChangePosition
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
3
)
end
Duel
.
DiscardDeck
(
tp
,
3
,
REASON_COST
)
return
c
:
IsDefensePos
()
and
RD
.
IsCanChangePosition
(
c
)
end
cm
.
cost
=
RD
.
CostSendDeckTopToGrave
(
3
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
posfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
...
...
@@ -30,10 +27,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
0
)
end
function
cm
.
operation
(
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
)
Duel
.
ChangePosition
(
g
,
POS_FACEUP_ATTACK
)
end
RD
.
SelectAndDoAction
(
HINTMSG_POSCHANGE
,
cm
.
posfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
ChangePosition
(
g
,
POS_FACEUP_ATTACK
)
end
)
end
\ No newline at end of file
script/c120150016.lua
View file @
b2f1b473
...
...
@@ -32,16 +32,9 @@ end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
~=
0
and
Duel
.
Draw
(
tp
,
2
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
2
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
RD
.
SelectAndDoAction
(
HINTMSG_TODECK
,
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
2
,
2
,
nil
,
function
(
g
)
Duel
.
BreakEffect
()
local
ct
=
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
SortDecktop
(
tp
,
tp
,
ct
)
for
i
=
1
,
ct
do
local
tc
=
Duel
.
GetDecktopGroup
(
tp
,
1
):
GetFirst
()
Duel
.
MoveSequence
(
tc
,
1
)
end
end
RD
.
SendToDeckBottom
(
g
,
tp
,
tp
,
true
)
end
)
end
end
\ No newline at end of file
script/c120150017.lua
View file @
b2f1b473
...
...
@@ -25,13 +25,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
3
,
3
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
SendtoDeck
(
sg
,
nil
,
0
,
REASON_COST
)
local
ct
=
Duel
.
GetOperatedGroup
():
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
Duel
.
SortDecktop
(
tp
,
tp
,
ct
)
for
i
=
1
,
ct
do
local
tc
=
Duel
.
GetDecktopGroup
(
tp
,
1
):
GetFirst
()
Duel
.
MoveSequence
(
tc
,
1
)
end
RD
.
SendToDeckBottom
(
sg
,
tp
,
tp
,
true
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGrave
()
and
Duel
.
IsPlayerCanDraw
(
tp
,
3
)
end
...
...
@@ -41,11 +35,8 @@ end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
~=
0
and
Duel
.
Draw
(
tp
,
3
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
,
0
,
3
,
3
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
RD
.
SelectAndDoAction
(
HINTMSG_TOGRAVE
,
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
,
0
,
3
,
3
,
nil
,
function
(
g
)
RD
.
SendToGraveAndExists
(
g
)
end
)
end
end
\ No newline at end of file
script/c120150018.lua
View file @
b2f1b473
...
...
@@ -31,16 +31,7 @@ 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
(
e
:
GetLabel
()
*
400
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
e
:
GetLabel
()
*
400
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
\ No newline at end of file
script/c120150020.lua
View file @
b2f1b473
...
...
@@ -23,23 +23,14 @@ 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
.
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
)
==
d
then
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
p
,
Card
.
IsAbleToDeck
,
p
,
LOCATION_HAND
,
0
,
2
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
RD
.
SelectAndDoAction
(
HINTMSG_TODECK
,
Card
.
IsAbleToDeck
,
p
,
LOCATION_HAND
,
0
,
2
,
2
,
nil
,
function
(
g
)
Duel
.
BreakEffect
()
local
ct
=
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
SortDecktop
(
p
,
p
,
ct
)
for
i
=
1
,
ct
do
local
tc
=
Duel
.
GetDecktopGroup
(
p
,
1
):
GetFirst
()
Duel
.
MoveSequence
(
tc
,
1
)
end
end
RD
.
SendToDeckBottom
(
g
,
p
,
p
,
true
)
end
)
end
end
\ No newline at end of file
script/c120150021.lua
View file @
b2f1b473
...
...
@@ -31,9 +31,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
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
.
filter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmDecktop
(
tp
,
1
)
end
RD
.
SelectAndDoAction
(
HINTMSG_TODECK
,
aux
.
NecroValleyFilter
(
cm
.
filter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
if
RD
.
SendToDeckTop
(
g
,
tp
,
tp
,
true
)
~=
0
then
Duel
.
ConfirmDecktop
(
tp
,
1
)
end
end
)
end
\ No newline at end of file
script/c120150022.lua
View file @
b2f1b473
...
...
@@ -16,22 +16,17 @@ end
--Draw & Recover
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_SUMMON
)
and
c
:
IsStatus
(
STATUS_SUMMON_TURN
))
or
(
c
:
IsReason
(
REASON_SPSUMMON
)
and
c
:
IsStatus
(
STATUS_SPSUMMON_TURN
))
return
RD
.
IsSummonTurn
(
c
)
or
RD
.
IsSpecialSummonTurn
(
c
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
if
chk
==
0
then
return
ct
>
0
and
Duel
.
IsPlayerCanDraw
(
1
-
tp
,
ct
)
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
ct
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
1
-
tp
,
ct
)
RD
.
TargetDraw
(
1
-
tp
,
ct
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
local
d
=
Duel
.
Draw
(
p
,
ct
,
REASON_EFFECT
)
if
d
>
0
then
local
ct
=
RD
.
Draw
(
nil
,
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
))
if
ct
>
0
then
Duel
.
BreakEffect
()
Duel
.
Recover
(
tp
,
d
*
300
,
REASON_EFFECT
)
Duel
.
Recover
(
tp
,
ct
*
300
,
REASON_EFFECT
)
end
end
\ No newline at end of file
script/c120150023.lua
View file @
b2f1b473
...
...
@@ -23,8 +23,7 @@ function cm.filter(c)
return
c
:
IsCode
(
list
[
1
])
and
c
:
IsAbleToDeck
()
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_SUMMON
)
and
c
:
IsStatus
(
STATUS_SUMMON_TURN
)
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
and
Duel
.
IsExistingMatchingCard
(
cm
.
confilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -34,14 +33,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
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
.
filter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
~=
0
then
RD
.
SelectAndDoAction
(
HINTMSG_TODECK
,
aux
.
NecroValleyFilter
(
cm
.
filter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
if
RD
.
SendToDeckAndExists
(
g
)
then
Duel
.
ShuffleDeck
(
tp
)
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
end
)
end
\ No newline at end of file
script/c120150024.lua
View file @
b2f1b473
...
...
@@ -20,17 +20,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
500
)
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
,
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
)
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
-
500
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
Duel
.
Damage
(
1
-
tp
,
500
,
REASON_EFFECT
)
end
end
)
end
\ No newline at end of file
script/c120150025.lua
View file @
b2f1b473
...
...
@@ -31,10 +31,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
.
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/c120150028.lua
View file @
b2f1b473
...
...
@@ -27,23 +27,13 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
1
-
tp
,
1
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_CARDTYPE
)
local
opt
=
Duel
.
AnnounceType
(
1
-
tp
)
if
Duel
.
DiscardDeck
(
1
-
tp
,
1
,
REASON_EFFECT
)
==
1
then
local
tc
=
Duel
.
GetOperatedGroup
():
GetFirst
()
if
(
opt
==
0
and
not
tc
:
IsType
(
TYPE_MONSTER
))
or
(
opt
==
1
and
not
tc
:
IsType
(
TYPE_SPELL
))
or
(
opt
==
2
and
not
tc
:
IsType
(
TYPE_TRAP
))
then
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
sc
=
g
:
GetFirst
()
while
sc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
sc
:
RegisterEffect
(
e1
)
sc
=
g
:
GetNext
()
end
end
local
function
filter
(
c
)
return
not
c
:
IsType
(
2
^
opt
)
end
if
RD
.
SendDeckTopToGraveAndExists
(
1
-
tp
,
1
,
filter
,
1
,
nil
)
then
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
g
:
ForEach
(
function
(
tc
)
RD
.
AttachDirectAttack
(
e
,
tc
,
aux
.
Stringid
(
m
,
1
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
end
\ No newline at end of file
script/c120150029.lua
View file @
b2f1b473
...
...
@@ -24,14 +24,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
1
-
tp
,
1
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_CARDTYPE
)
local
opt
=
Duel
.
AnnounceType
(
1
-
tp
)
if
Duel
.
DiscardDeck
(
1
-
tp
,
1
,
REASON_EFFECT
)
==
1
then
local
tc
=
Duel
.
GetOperatedGroup
():
GetFirst
()
if
(
opt
==
0
and
not
tc
:
IsType
(
TYPE_MONSTER
))
or
(
opt
==
1
and
not
tc
:
IsType
(
TYPE_SPELL
))
or
(
opt
==
2
and
not
tc
:
IsType
(
TYPE_TRAP
))
then
if
Duel
.
NegateAttack
()
then
Duel
.
Damage
(
1
-
tp
,
300
,
REASON_EFFECT
)
end
end
local
function
filter
(
c
)
return
not
c
:
IsType
(
2
^
opt
)
end
if
RD
.
SendDeckTopToGraveAndExists
(
1
-
tp
,
1
,
filter
,
1
,
nil
)
and
Duel
.
NegateAttack
()
then
Duel
.
Damage
(
1
-
tp
,
300
,
REASON_EFFECT
)
end
end
\ No newline at end of file
script/c120150033.lua
View file @
b2f1b473
...
...
@@ -26,29 +26,12 @@ end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
dam
=
Duel
.
GetMatchingGroupCount
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
*
500
if
chk
==
0
then
return
dam
>
0
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
dam
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
dam
)
RD
.
TargetDamage
(
1
-
tp
,
dam
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
dam
=
Duel
.
GetMatchingGroupCount
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
*
500
Duel
.
Damage
(
p
,
dam
,
REASON_EFFECT
)
RD
.
Damage
(
nil
,
Duel
.
GetMatchingGroupCount
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
*
500
)
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
:
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
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
\ No newline at end of file
script/c120150034.lua
View file @
b2f1b473
...
...
@@ -30,18 +30,8 @@ end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
Duel
.
RegisterEffect
(
e2
,
tp
)
RD
.
CreateCannotSummonEffect
(
e
,
aux
.
Stringid
(
m
,
1
),
nil
,
tp
,
1
,
0
,
RESET_PHASE
+
PHASE_END
)
RD
.
CreateCannotSpecialSummonEffect
(
e
,
aux
.
Stringid
(
m
,
2
),
nil
,
tp
,
1
,
0
,
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
\ No newline at end of file
script/c120150035.lua
View file @
b2f1b473
...
...
@@ -25,11 +25,7 @@ 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
.
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
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
tc
=
g
:
GetFirst
()
Duel
.
Recover
(
tp
,
tc
:
GetAttack
(),
REASON_EFFECT
)
end
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
Duel
.
Recover
(
tp
,
g
:
GetFirst
():
GetAttack
(),
REASON_EFFECT
)
end
)
end
\ No newline at end of file
script/c120150036.lua
View file @
b2f1b473
...
...
@@ -18,7 +18,7 @@ function cm.confilter(c)
return
c
:
IsAttack
(
0
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelAbove
(
7
)
and
c
:
IsAttack
(
0
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
return
c
:
IsLevelAbove
(
7
)
and
c
:
IsAttack
(
0
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP_ATTACK
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
confilter
,
tp
,
LOCATION_GRAVE
,
0
,
8
,
nil
)
...
...
@@ -29,10 +29,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
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
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_ATTACK
)
end
RD
.
SelectAndSpecialSummon
(
cm
.
spfilter
,
e
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
POS_FACEUP_ATTACK
)
end
\ No newline at end of file
script/c120150037.lua
View file @
b2f1b473
...
...
@@ -17,27 +17,15 @@ end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttack
(
0
)
and
c
:
IsLevelAbove
(
1
)
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
,
0
,
1
,
e
:
GetHandler
())
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
1
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
c
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
tc
=
g
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
tc
:
GetLevel
()
*
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
c
,
function
(
g
)
RD
.
AttachAtkDef
(
e
,
c
,
g
:
GetFirst
():
GetLevel
()
*
500
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
end
)
end
end
\ No newline at end of file
script/c120150042.lua
View file @
b2f1b473
...
...
@@ -29,12 +29,7 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
confilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
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
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
2
,
2
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendHandToGrave
(
cm
.
costfilter
,
2
,
2
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
...
...
script/c120150043.lua
View file @
b2f1b473
...
...
@@ -22,18 +22,10 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
confilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
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
.
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
(
600
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
RD
.
AttachAtkDef
(
e
,
c
,
600
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
end
end
\ No newline at end of file
script/c120150046.lua
View file @
b2f1b473
...
...
@@ -13,7 +13,7 @@ function cm.initial_effect(c)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
cm
.
ad
tg
)
e2
:
SetTarget
(
cm
.
up
tg
)
e2
:
SetValue
(
-
300
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
...
...
@@ -21,6 +21,6 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e3
)
end
--Atk & Def
function
cm
.
ad
tg
(
e
,
c
)
function
cm
.
up
tg
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
4
)
end
\ No newline at end of file
script/c120150047.lua
View file @
b2f1b473
...
...
@@ -32,14 +32,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
200
)
end
function
cm
.
activate
(
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
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
RD
.
SelectAndDoAction
(
HINTMSG_RTOHAND
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
g
)
local
lv
=
g
:
GetFirst
():
GetLevel
()
if
Duel
.
Recover
(
tp
,
lv
*
200
,
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
RD
.
SendToHandAndExists
(
g
)
end
end
end
)
end
\ No newline at end of file
script/c120150049.lua
View file @
b2f1b473
...
...
@@ -17,28 +17,12 @@ end
function
cm
.
costfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_CYBERSE
)
and
c
:
IsAbleToGraveAsCost
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
2
,
nil
)
local
ct
=
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
e
:
SetLabel
(
ct
)
end
cm
.
cost
=
RD
.
CostSendMZoneToGrave
(
cm
.
costfilter
,
1
,
2
,
false
,
nil
,
nil
,
Group
.
GetCount
)
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
atk
=
e
:
GetLabel
()
*
300
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
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
-
300
*
e
:
GetLabel
(),
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
\ No newline at end of file
script/c120150050.lua
View file @
b2f1b473
...
...
@@ -23,13 +23,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
99
,
nil
)
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
og
=
Duel
.
GetOperatedGroup
()
local
lv
=
og
:
Filter
(
cm
.
drfilter
,
nil
):
GetSum
(
Card
.
GetLevel
)
if
lv
>=
10
and
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Draw
(
tp
,
2
,
REASON_EFFECT
)
RD
.
SelectAndDoAction
(
HINTMSG_TOGRAVE
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
99
,
nil
,
function
(
g
)
if
RD
.
SendToGraveAndExists
(
g
)
then
if
Duel
.
GetOperatedGroup
():
Filter
(
cm
.
drfilter
,
nil
):
GetSum
(
Card
.
GetLevel
)
>=
10
then
RD
.
CanDraw
(
aux
.
Stringid
(
m
,
1
),
tp
,
2
)
end
end
end
end
)
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment