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
a2f48855
Commit
a2f48855
authored
Mar 20, 2022
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022/3/20 模块化SBD
parent
983c249b
Changes
50
Hide whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
184 additions
and
397 deletions
+184
-397
script/RDAttach.lua
script/RDAttach.lua
+4
-0
script/RDCondition.lua
script/RDCondition.lua
+16
-0
script/RDCost.lua
script/RDCost.lua
+6
-2
script/RDFunction.lua
script/RDFunction.lua
+1
-1
script/RDMaximum.lua
script/RDMaximum.lua
+1
-1
script/c120110014.lua
script/c120110014.lua
+1
-2
script/c120120048.lua
script/c120120048.lua
+2
-2
script/c120120049.lua
script/c120120049.lua
+2
-2
script/c120120050.lua
script/c120120050.lua
+1
-1
script/c120130050.lua
script/c120130050.lua
+2
-2
script/c120145054.lua
script/c120145054.lua
+1
-1
script/c120145060.lua
script/c120145060.lua
+2
-2
script/c120150020.lua
script/c120150020.lua
+1
-2
script/c120150041.lua
script/c120150041.lua
+2
-2
script/c120150048.lua
script/c120150048.lua
+1
-1
script/c120151033.lua
script/c120151033.lua
+2
-2
script/c120155058.lua
script/c120155058.lua
+2
-2
script/c120170046.lua
script/c120170046.lua
+1
-1
script/c120170062.lua
script/c120170062.lua
+2
-4
script/c120183059.lua
script/c120183059.lua
+2
-2
script/c120184005.lua
script/c120184005.lua
+1
-2
script/c120185001.lua
script/c120185001.lua
+3
-9
script/c120186007.lua
script/c120186007.lua
+3
-14
script/c120186009.lua
script/c120186009.lua
+5
-21
script/c120186010.lua
script/c120186010.lua
+7
-26
script/c120186019.lua
script/c120186019.lua
+7
-11
script/c120186029.lua
script/c120186029.lua
+4
-12
script/c120186032.lua
script/c120186032.lua
+7
-14
script/c120187003.lua
script/c120187003.lua
+3
-18
script/c120187022.lua
script/c120187022.lua
+4
-7
script/c120187023.lua
script/c120187023.lua
+8
-16
script/c120187030.lua
script/c120187030.lua
+3
-8
script/c120188006.lua
script/c120188006.lua
+3
-14
script/c120188027.lua
script/c120188027.lua
+12
-23
script/c120188030.lua
script/c120188030.lua
+5
-10
script/c120189003.lua
script/c120189003.lua
+2
-10
script/c120189012.lua
script/c120189012.lua
+4
-13
script/c120190002.lua
script/c120190002.lua
+6
-16
script/c120190004.lua
script/c120190004.lua
+3
-9
script/c120190026.lua
script/c120190026.lua
+3
-8
script/c120191004.lua
script/c120191004.lua
+3
-13
script/c120191005.lua
script/c120191005.lua
+5
-20
script/c120191015.lua
script/c120191015.lua
+5
-8
script/c120192010.lua
script/c120192010.lua
+3
-8
script/c120192011.lua
script/c120192011.lua
+2
-5
script/c120192017.lua
script/c120192017.lua
+2
-4
script/c120192027.lua
script/c120192027.lua
+2
-2
script/c120193003.lua
script/c120193003.lua
+5
-19
script/c120194004.lua
script/c120194004.lua
+4
-9
script/c120195001.lua
script/c120195001.lua
+8
-16
No files found.
script/RDAttach.lua
View file @
a2f48855
...
...
@@ -98,6 +98,10 @@ end
function
RushDuel
.
AttachCannotSelectBattleTarget
(
e
,
card
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
card
,
EFFECT_CANNOT_SELECT_BATTLE_TARGET
,
value
,
reset
)
end
-- 赋予: 不能用于上级召唤而解放
function
RushDuel
.
AttachCannotTribute
(
e
,
card
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
card
,
EFFECT_UNRELEASABLE_SUM
,
value
,
reset
)
end
-- 赋予: 变更原本攻守
function
RushDuel
.
SetBaseAtkDef
(
e
,
card
,
atk
,
def
,
reset
)
if
atk
~=
nil
then
...
...
script/RDCondition.lua
View file @
a2f48855
...
...
@@ -62,6 +62,22 @@ end
function
RushDuel
.
IsCanBeSpecialSummoned
(
card
,
effect
,
player
,
pos
)
return
card
:
IsCanBeSpecialSummoned
(
effect
,
0
,
player
,
false
,
false
,
pos
)
end
-- 条件: 位置变化前的控制者
function
RushDuel
.
IsPreviousControler
(
card
,
player
)
return
card
:
GetPreviousControler
()
==
player
end
-- 条件: 位置变化前的类型
function
RushDuel
.
IsPreviousType
(
card
,
type
)
return
(
card
:
GetPreviousTypeOnField
()
&
type
)
~=
0
end
-- 条件: 位置变化前的属性
function
RushDuel
.
IsPreviousAttribute
(
card
,
attr
)
return
(
card
:
GetPreviousAttributeOnField
()
&
attr
)
~=
0
end
-- 条件: 位置变化前的种族
function
RushDuel
.
IsPreviousRace
(
card
,
race
)
return
(
card
:
GetPreviousRaceOnField
()
&
race
)
~=
0
end
-- 条件: 可否赋予效果 - 直接攻击
function
RushDuel
.
IsCanAttachDirectAttack
(
card
)
return
not
card
:
IsHasEffect
(
EFFECT_DIRECT_ATTACK
)
and
not
card
:
IsHasEffect
(
EFFECT_CANNOT_ATTACK
)
and
not
card
:
IsHasEffect
(
EFFECT_CANNOT_DIRECT_ATTACK
)
...
...
script/RDCost.lua
View file @
a2f48855
...
...
@@ -119,11 +119,15 @@ function RushDuel.CostSendHandSubToGrave(filter, check, min, max, set_label_befo
end
-- 代价: 把怪兽送去墓地
function
RushDuel
.
CostSendMZoneToGrave
(
filter
,
min
,
max
,
except_self
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
CostSendMatchToGrave
(
filter
,
LOCATION_MZONE
,
min
,
max
,
except_self
,
tru
e
,
false
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
CostSendMatchToGrave
(
filter
,
LOCATION_MZONE
,
min
,
max
,
except_self
,
fals
e
,
false
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
end
-- 代价: 把场上的卡送去墓地
function
RushDuel
.
CostSendOnFieldToGrave
(
filter
,
min
,
max
,
except_self
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
CostSendMatchToGrave
(
filter
,
LOCATION_ONFIELD
,
min
,
max
,
except_self
,
true
,
false
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
CostSendMatchToGrave
(
filter
,
LOCATION_ONFIELD
,
min
,
max
,
except_self
,
false
,
false
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
end
-- 代价: 把场上的卡送去墓地 (子卡片组)
function
RushDuel
.
CostSendOnFieldSubToGrave
(
filter
,
check
,
min
,
max
,
except_self
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
CostSendGroupToGrave
(
filter
,
check
,
LOCATION_ONFIELD
,
min
,
max
,
except_self
,
false
,
false
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
end
-- 代价: 把手卡返回卡组下面
function
RushDuel
.
CostSendHandToDeckBottom
(
filter
,
min
,
max
,
confirm
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
...
...
script/RDFunction.lua
View file @
a2f48855
...
...
@@ -11,7 +11,7 @@ function RushDuel.ResetCostLabel(e)
end
-- 是否设置了Cost标签
function
RushDuel
.
IsCostLabel
(
e
)
return
e
:
GetLabel
()
==
1
return
e
:
GetLabel
()
==
1
end
-- 为效果设置标签
function
RushDuel
.
SetLabelAndObject
(
effect
,
target
,
set_label
,
set_object
)
...
...
script/RDMaximum.lua
View file @
a2f48855
...
...
@@ -107,7 +107,7 @@ function RushDuel.MaximumSummonCheck(g)
return
g
:
GetClassCount
(
Card
.
GetCode
)
==
g
:
GetCount
()
end
function
RushDuel
.
MaximumMode
(
e
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
c
:
IsSummonType
(
SUMMON_TYPE_MAXIMUM
)
and
c
:
GetOverlayCount
()
>
0
end
function
RushDuel
.
MaximumMaterialCondition
(
e
)
...
...
script/c120110014.lua
View file @
a2f48855
...
...
@@ -15,8 +15,7 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
confilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
==
Duel
.
GetAttackTarget
()
and
(
c
:
GetPreviousRaceOnField
()
&
RACE_DRAGON
)
~=
0
return
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
==
Duel
.
GetAttackTarget
()
and
RD
.
IsPreviousRace
(
c
,
RACE_DRAGON
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
confilter
,
1
,
nil
,
tp
)
...
...
script/c120120048.lua
View file @
a2f48855
...
...
@@ -15,8 +15,8 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
confilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
bit
.
band
(
c
:
GetPreviousTypeOnField
(),
TYPE_SPELL
)
~=
0
and
c
:
IsReason
(
REASON_EFFECT
)
return
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
RD
.
IsPreviousType
(
c
,
TYPE_SPELL
)
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
...
...
script/c120120049.lua
View file @
a2f48855
...
...
@@ -15,8 +15,8 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
confilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
bit
.
band
(
c
:
GetPreviousTypeOnField
(),
TYPE_NORMAL
)
~=
0
and
c
:
IsReason
(
REASON_EFFECT
)
return
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
RD
.
IsPreviousType
(
c
,
TYPE_NORMAL
)
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
...
...
script/c120120050.lua
View file @
a2f48855
...
...
@@ -15,7 +15,7 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
confilter
(
c
,
tp
,
rp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
return
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
((
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
))
or
c
==
Duel
.
GetAttackTarget
())
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
...
...
script/c120130050.lua
View file @
a2f48855
...
...
@@ -15,8 +15,8 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
confilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
bit
.
band
(
c
:
GetPreviousTypeOnField
(),
TYPE_TRAP
)
~=
0
and
c
:
IsReason
(
REASON_EFFECT
)
return
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
RD
.
IsPreviousType
(
c
,
TYPE_TRAP
)
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
...
...
script/c120145054.lua
View file @
a2f48855
...
...
@@ -18,7 +18,7 @@ end
--Activate
function
cm
.
confilter
(
c
,
tp
,
rp
)
return
c
:
IsPreviousPosition
(
POS_ATTACK
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
((
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
))
or
c
==
Duel
.
GetAttackTarget
())
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
...
...
script/c120145060.lua
View file @
a2f48855
...
...
@@ -15,8 +15,8 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
confilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
bit
.
band
(
c
:
GetPreviousTypeOnField
(),
TYPE_SPELL
+
TYPE_TRAP
)
~=
0
and
c
:
IsReason
(
REASON_EFFECT
)
return
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
RD
.
IsPreviousType
(
c
,
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsLevelBelow
(
6
)
...
...
script/c120150020.lua
View file @
a2f48855
...
...
@@ -15,8 +15,7 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
confilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
==
Duel
.
GetAttackTarget
()
and
bit
.
band
(
c
:
GetPreviousRaceOnField
(),
RACE_CYBERSE
)
~=
0
return
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
==
Duel
.
GetAttackTarget
()
and
RD
.
IsPreviousRace
(
c
,
RACE_CYBERSE
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
confilter
,
1
,
nil
,
tp
)
...
...
script/c120150041.lua
View file @
a2f48855
...
...
@@ -14,9 +14,9 @@ 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_FACEUP_ATTACK
)
and
bit
.
band
(
c
:
GetPreviousAttributeOnField
(),
ATTRIBUTE_DARK
)
~=
0
and
RD
.
IsPreviousAttribute
(
c
,
ATTRIBUTE_DARK
)
and
c
:
GetPreviousAttackOnField
()
==
0
end
function
cm
.
desfilter
(
c
)
...
...
script/c120150048.lua
View file @
a2f48855
...
...
@@ -13,7 +13,7 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
filter
(
c
,
tp
)
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
GetPreviousControler
()
==
tp
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
RD
.
IsPreviousControler
(
c
,
tp
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
...
...
script/c120151033.lua
View file @
a2f48855
...
...
@@ -14,8 +14,8 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
confilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
==
Duel
.
GetAttackTarget
()
and
bit
.
band
(
c
:
GetPreviousRaceOnField
(),
RACE_WYRM
)
~=
0
return
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
==
Duel
.
GetAttackTarget
()
and
RD
.
IsPreviousRace
(
c
,
RACE_WYRM
)
and
c
:
GetPreviousLevelOnField
()
>=
7
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
...
...
script/c120155058.lua
View file @
a2f48855
...
...
@@ -17,8 +17,8 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
confilter
(
c
,
tp
,
re
,
rp
)
return
c
:
IsPreviousPosition
(
POS_ATTACK
)
and
bit
.
band
(
c
:
GetPreviousRaceOnField
(),
RACE_PYRO
)
~=
0
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
return
c
:
IsPreviousPosition
(
POS_ATTACK
)
and
RD
.
IsPreviousRace
(
c
,
RACE_PYRO
)
and
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
(
c
==
Duel
.
GetAttackTarget
()
or
(
rp
==
1
-
tp
and
re
and
re
:
IsActiveType
(
TYPE_TRAP
)
and
c
:
IsReason
(
REASON_EFFECT
))
)
...
...
script/c120170046.lua
View file @
a2f48855
...
...
@@ -35,7 +35,7 @@ end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
RD
.
SelectAndDoAction
(
HINTMSG_DESTROY
,
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
and
bit
.
band
(
g
:
GetFirst
():
GetPreviousRaceOnField
(),
RACE_SPELLCASTER
)
~=
0
and
RD
.
IsPreviousRace
(
g
:
GetFirst
(),
RACE_SPELLCASTER
)
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
local
dg
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_MZONE
)
...
...
script/c120170062.lua
View file @
a2f48855
...
...
@@ -17,10 +17,8 @@ end
--Activate
function
cm
.
confilter
(
c
,
tp
)
return
(
RD
.
IsLegendCode
(
c
,
list
[
1
])
or
c
:
GetPreviousCodeOnField
()
==
list
[
1
]
or
(
bit
.
band
(
c
:
GetPreviousTypeOnField
(),
TYPE_NORMAL
)
~=
0
and
c
:
GetPreviousLevelOnField
()
>=
7
and
bit
.
band
(
c
:
GetPreviousRaceOnField
(),
RACE_FIEND
)
~=
0
))
and
c
:
GetPreviousControler
()
==
tp
and
c
==
Duel
.
GetAttackTarget
()
RD
.
IsPreviousType
(
c
,
TYPE_NORMAL
)
and
c
:
GetPreviousLevelOnField
()
>=
7
and
RD
.
IsPreviousRace
(
c
,
RACE_FIEND
)
))
and
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
==
Duel
.
GetAttackTarget
()
end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
...
...
script/c120183059.lua
View file @
a2f48855
...
...
@@ -15,8 +15,8 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
confilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
==
Duel
.
GetAttackTarget
()
and
bit
.
band
(
c
:
GetPreviousRaceOnField
(),
RACE_PSYCHO
)
~=
0
return
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
==
Duel
.
GetAttackTarget
()
and
RD
.
IsPreviousRace
(
c
,
RACE_PSYCHO
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
confilter
,
1
,
nil
,
tp
)
...
...
script/c120184005.lua
View file @
a2f48855
...
...
@@ -14,8 +14,7 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
confilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
==
Duel
.
GetAttackTarget
()
and
bit
.
band
(
c
:
GetPreviousRaceOnField
(),
RACE_WARRIOR
)
~=
0
return
RD
.
IsPreviousControler
(
c
,
tp
)
and
c
==
Duel
.
GetAttackTarget
()
and
RD
.
IsPreviousRace
(
c
,
RACE_WARRIOR
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_WARRIOR
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
...
...
script/c120185001.lua
View file @
a2f48855
...
...
@@ -15,19 +15,13 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Draw
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
.
IsPlayerCanDraw
(
1
-
tp
,
2
)
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
1
-
tp
,
2
)
RD
.
TargetDraw
(
1
-
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
if
RD
.
Draw
()
~=
0
then
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
if
ct
>
0
then
Duel
.
BreakEffect
()
...
...
script/c120186007.lua
View file @
a2f48855
...
...
@@ -18,25 +18,14 @@ function cm.costfilter(c)
return
c
:
IsRace
(
RACE_WARRIOR
+
RACE_SPELLCASTER
)
and
c
:
IsAbleToDeckOrExtraAsCost
()
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevel
(
6
)
and
c
:
IsRace
(
RACE_WARRIOR
+
RACE_SPELLCASTER
)
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_GRAVE
,
0
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
return
c
:
IsLevel
(
6
)
and
c
:
IsRace
(
RACE_WARRIOR
+
RACE_SPELLCASTER
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
cm
.
cost
=
RD
.
CostSendGraveToDeck
(
cm
.
costfilter
,
2
,
2
)
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
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
RD
.
SelectAndSpecialSummon
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
end
\ No newline at end of file
script/c120186009.lua
View file @
a2f48855
...
...
@@ -17,30 +17,14 @@ end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
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
,
LOCATION_MZONE
,
0
,
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
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
cm
.
filter
,
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_LEVEL
)
e1
:
SetValue
(
2
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetValue
(
200
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
end
RD
.
AttachLevel
(
e
,
tc
,
2
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
RD
.
AttachAtkDef
(
e
,
tc
,
200
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
\ No newline at end of file
script/c120186010.lua
View file @
a2f48855
...
...
@@ -21,35 +21,16 @@ end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsRace
(
RACE_SPELLCASTER
)
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
true
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
400
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
400
)
RD
.
TargetDamage
(
1
-
tp
,
400
)
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
.
Damage
(
p
,
d
,
REASON_EFFECT
)
~=
0
and
p
==
1
-
tp
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
2
))
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_CHANGE_RACE
)
e1
:
SetValue
(
RACE_SPELLCASTER
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
if
RD
.
Damage
()
~=
0
and
p
==
1
-
tp
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
),
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
ChangeRace
(
e
,
g
:
GetFirst
(),
RACE_SPELLCASTER
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
end
\ No newline at end of file
script/c120186019.lua
View file @
a2f48855
...
...
@@ -21,10 +21,7 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
cm
.
confilter
,
tp
,
LOCATION_GRAVE
,
0
,
4
,
nil
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
300
)
end
Duel
.
PayLPCost
(
tp
,
300
)
end
cm
.
cost
=
RD
.
CostPayLP
(
300
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
,
0
,
3
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
3
)
end
...
...
@@ -32,11 +29,10 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
3
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
,
0
,
3
,
nil
)
then
return
end
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
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
3
,
REASON_EFFECT
)
end
RD
.
SelectAndDoAction
(
HINTMSG_TOGRAVE
,
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
,
0
,
3
,
3
,
nil
,
function
(
g
)
if
RD
.
SendToGraveAndExists
(
g
)
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
3
,
REASON_EFFECT
)
end
end
)
end
\ No newline at end of file
script/c120186029.lua
View file @
a2f48855
...
...
@@ -23,22 +23,14 @@ 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
.
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
.
IsAbleToHand
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToHand
,
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
,
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
SendToOpponentHand
(
g
)
end
)
end
\ No newline at end of file
script/c120186032.lua
View file @
a2f48855
...
...
@@ -22,18 +22,11 @@ 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
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UNRELEASABLE_SUM
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
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
),
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
local
e1
=
RD
.
AttachCannotTribute
(
e
,
g
:
GetFirst
(),
cm
.
sumlimit
,
aux
.
Stringid
(
m
,
2
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetLabel
(
tp
)
end
)
end
function
cm
.
sumlimit
(
e
,
c
)
return
e
:
GetHandlerPlayer
()
~=
e
:
GetLabel
()
end
\ No newline at end of file
script/c120187003.lua
View file @
a2f48855
...
...
@@ -23,28 +23,13 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
confilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
3000
)
end
Duel
.
PayLPCost
(
tp
,
3000
)
end
cm
.
cost
=
RD
.
CostPayLP
(
3000
)
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
(
2000
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
RD
.
AttachAtkDef
(
e
,
c
,
2000
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
0
,
LOCATION_GRAVE
,
8
,
nil
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e2
:
SetValue
(
cm
.
efilter
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e2
)
RD
.
AttachEffectIndes
(
e
,
c
,
cm
.
efilter
,
aux
.
Stringid
(
m
,
1
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
end
end
end
...
...
script/c120187022.lua
View file @
a2f48855
...
...
@@ -13,7 +13,7 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
filter
(
c
)
return
c
:
IsDefensePos
()
and
c
:
IsCanChangePosition
(
)
return
c
:
IsDefensePos
()
and
RD
.
IsCanChangePosition
(
c
)
end
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
...
...
@@ -21,10 +21,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
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
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
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
ChangePosition
(
g
,
POS_FACEUP_ATTACK
)
end
)
end
\ No newline at end of file
script/c120187023.lua
View file @
a2f48855
...
...
@@ -14,9 +14,9 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Activate
function
cm
.
sp
filter
(
c
,
e
,
tp
)
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsLevel
(
5
,
6
)
and
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
exfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
list
[
1
])
...
...
@@ -26,23 +26,15 @@ function cm.thfilter(c)
end
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
.
sp
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
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_HAND
+
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
(
cm
.
exfilter
,
tp
,
LOCATION_MZONE
,
0
,
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
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
then
if
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
filter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
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/c120187030.lua
View file @
a2f48855
...
...
@@ -23,21 +23,16 @@ 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_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
)
local
tc
=
eg
:
GetFirst
()
if
chk
==
0
then
return
R
ushDuel
.
IsHasDefense
(
tc
)
and
tc
:
IsCanTurnSet
()
end
if
chk
==
0
then
return
R
D
.
IsCanChangePosition
(
tc
)
and
tc
:
IsCanTurnSet
()
end
Duel
.
SetTargetCard
(
tc
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
tc
,
1
,
0
,
0
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
ChangePosition
(
tc
,
POS_FACEDOWN_DEFENSE
)
RD
.
ChangePosition
(
tc
,
POS_FACEDOWN_DEFENSE
)
end
end
\ No newline at end of file
script/c120188006.lua
View file @
a2f48855
...
...
@@ -23,24 +23,13 @@ function cm.setfilter(c)
return
c
:
IsCode
(
list
[
1
],
list
[
2
],
list
[
3
])
and
c
:
IsSSetable
()
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
)
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
RD
.
IsSummonTurn
(
e
:
GetHandler
())
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
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
setfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
setfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
)
end
RD
.
SelectAndSet
(
aux
.
NecroValleyFilter
(
cm
.
setfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
)
end
\ No newline at end of file
script/c120188027.lua
View file @
a2f48855
...
...
@@ -14,8 +14,8 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Activate
function
cm
.
pos
filter
(
c
)
return
c
:
IsAttackPos
()
and
c
:
IsCanChangePosition
()
and
RushDuel
.
IsHasDefense
(
c
)
function
cm
.
filter
(
c
)
return
c
:
IsAttackPos
()
and
Rd
.
IsCanChangePosition
(
c
)
end
function
cm
.
tdfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
...
...
@@ -23,31 +23,20 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
r
==
REASON_RULE
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
Duel
.
PayLPCost
(
tp
,
1000
)
end
cm
.
cost
=
RD
.
CostPayLP
(
1000
)
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
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
~=
0
and
Duel
.
GetMatchingGroupCount
(
Card
.
IsDefensePos
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
3
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
0
,
LOCATION_GRAVE
,
1
,
5
,
nil
)
if
sg
:
GetCount
()
>
0
then
RD
.
SelectAndDoAction
(
HINTMSG_POSCHANGE
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
2
,
nil
,
function
(
g
)
if
RD
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
~=
0
and
Duel
.
GetMatchingGroupCount
(
Card
.
IsDefensePos
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
3
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
HINTMSG_TODECK
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
0
,
LOCATION_GRAVE
,
1
,
5
,
nil
,
function
(
sg
)
Duel
.
BreakEffect
()
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
end
RD
.
SendToDeckAndExists
(
sg
)
end
)
end
end
end
)
end
\ No newline at end of file
script/c120188030.lua
View file @
a2f48855
...
...
@@ -18,28 +18,23 @@ end
--Activate
function
cm
.
confilter
(
c
,
tp
,
re
,
rp
)
return
c
:
IsPreviousPosition
(
POS_ATTACK
)
and
c
:
GetPreviousLevelOnField
()
>=
7
and
bit
.
band
(
c
:
GetPreviousRaceOnField
(),
RACE_WARRIOR
)
~=
0
and
RD
.
IsPreviousRace
(
c
,
RACE_WARRIOR
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
(
c
==
Duel
.
GetAttackTarget
()
or
(
rp
==
1
-
tp
and
re
and
re
:
IsActiveType
(
TYPE_TRAP
)
and
c
:
IsReason
(
REASON_EFFECT
))
)
end
function
cm
.
sp
filter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
list
[
1
],
list
[
2
],
list
[
3
])
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
list
[
1
],
list
[
2
],
list
[
3
])
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP_DEFENSE
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
confilter
,
1
,
nil
,
tp
,
re
,
rp
)
end
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
.
sp
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
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_DEFENSE
)
end
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
filter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP_DEFENSE
)
end
\ No newline at end of file
script/c120189003.lua
View file @
a2f48855
...
...
@@ -17,10 +17,7 @@ end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_PSYCHO
)
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
...
...
@@ -28,11 +25,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
=
Duel
.
GetMatchingGroupCount
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
e
:
GetHandler
())
*
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
\ No newline at end of file
script/c120189012.lua
View file @
a2f48855
...
...
@@ -23,27 +23,18 @@ end
function
cm
.
exfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_NORMAL
)
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
.
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
,
1
,
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
,
1
,
nil
,
function
(
g
)
if
RD
.
SendToDeckAndExists
(
g
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Recover
(
tp
,
500
,
REASON_EFFECT
)
end
end
end
)
end
\ No newline at end of file
script/c120190002.lua
View file @
a2f48855
...
...
@@ -20,25 +20,15 @@ function cm.costfilter(c)
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_POSCHANGE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g
)
Duel
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
RD
.
SelectAndDoAction
(
HINTMSG_POSCHANGE
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
end
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
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
,
LOCATION_MZONE
,
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
(
600
)
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
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
600
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
\ No newline at end of file
script/c120190004.lua
View file @
a2f48855
...
...
@@ -16,11 +16,10 @@ end
--Special Summon
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsLevel
(
3
)
and
c
:
IsRace
(
RACE_FIEND
)
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
)
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_SUMMON
)
and
c
:
IsStatus
(
STATUS_SUMMON_TURN
)
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
...
...
@@ -28,10 +27,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/c120190026.lua
View file @
a2f48855
...
...
@@ -28,12 +28,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
2
,
0
,
0
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
filter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
not
g
:
CheckSubGroup
(
cm
.
check
,
2
,
3
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
cm
.
check
,
false
,
2
,
3
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
RD
.
SelectGroupAndDoAction
(
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
filter
),
cm
.
check
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
3
,
nil
,
function
(
g
)
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
)
end
\ No newline at end of file
script/c120191004.lua
View file @
a2f48855
...
...
@@ -25,23 +25,13 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
confilter
,
tp
,
0
,
LOCATION_MZONE
,
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
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
2
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
e
:
SetLabel
(
g
:
GetCount
())
end
cm
.
cost
=
RD
.
CostShowHand
(
cm
.
costfilter
,
1
,
2
,
Group
.
GetCount
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
dam
=
e
:
GetLabel
()
*
300
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
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
dam
=
e
:
GetLabel
()
*
300
Duel
.
Damage
(
p
,
dam
,
REASON_EFFECT
)
RD
.
Damage
(
nil
,
dam
)
end
\ No newline at end of file
script/c120191005.lua
View file @
a2f48855
...
...
@@ -20,29 +20,14 @@ end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_CYBERSE
)
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
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendGraveToDeck
(
cm
.
costfilter
,
2
,
2
)
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
)
local
atk
=
Duel
.
GetMatchingGroupCount
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
*
300
local
atk
=
Duel
.
GetMatchingGroupCount
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
*
-
300
if
atk
==
0
then
return
end
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
(
-
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
(),
atk
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
\ No newline at end of file
script/c120191015.lua
View file @
a2f48855
...
...
@@ -16,22 +16,19 @@ end
function
cm
.
confilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_CYBERSE
)
end
function
cm
.
des
filter
(
c
)
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
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
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
des
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
des
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
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
,
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
RD
.
SelectAndDoAction
(
HINTMSG_DESTROY
,
cm
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
function
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
)
end
\ No newline at end of file
script/c120192010.lua
View file @
a2f48855
...
...
@@ -18,8 +18,7 @@ function cm.exfilter(c)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsRace
(
RACE_WYRM
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
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
(
Card
.
IsFaceup
,
tp
,
LOCATION_FZONE
,
LOCATION_FZONE
,
1
,
nil
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -27,11 +26,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
1
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
DiscardDeck
(
tp
,
1
,
REASON_EFFECT
)
==
0
then
return
end
local
g
=
Duel
.
GetOperatedGroup
()
if
g
:
IsExists
(
cm
.
exfilter
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
if
RD
.
SendDeckTopToGraveAndExists
(
tp
,
1
,
cm
.
exfilter
,
1
,
nil
)
then
RD
.
CanDraw
(
aux
.
Stringid
(
m
,
1
),
tp
,
1
)
end
end
\ No newline at end of file
script/c120192011.lua
View file @
a2f48855
...
...
@@ -25,11 +25,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
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
(
600
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
600
)
RD
.
TargetDamage
(
1
-
tp
,
600
)
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/c120192017.lua
View file @
a2f48855
...
...
@@ -14,8 +14,7 @@ function cm.initial_effect(c)
end
--Confirm Card
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
())
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
0
end
...
...
@@ -25,7 +24,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
if
op
==
1
then
local
tc
=
Duel
.
GetDecktopGroup
(
tp
,
1
):
GetFirst
()
Duel
.
MoveSequence
(
tc
,
1
)
RD
.
SendDeckTopToBottom
(
tp
,
1
)
end
end
\ No newline at end of file
script/c120192027.lua
View file @
a2f48855
...
...
@@ -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
.
ad
tg
)
e2
:
SetTarget
(
cm
.
down
tg
)
e2
:
SetValue
(
-
300
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
...
...
@@ -30,6 +30,6 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return
g
:
GetSum
(
Card
.
GetLevel
)
>=
10
end
--Atk & Def Down
function
cm
.
ad
tg
(
e
,
c
)
function
cm
.
down
tg
(
e
,
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsAttribute
(
ATTRIBUTE_EARTH
)
end
\ No newline at end of file
script/c120193003.lua
View file @
a2f48855
...
...
@@ -25,34 +25,20 @@ function cm.costcheck(g,tp)
return
Duel
.
GetMZoneCount
(
tp
,
g
)
>
0
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsRace
(
RACE_MACHINE
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
confilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
CheckSubGroup
(
cm
.
costcheck
,
2
,
2
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
cm
.
costcheck
,
false
,
2
,
2
,
tp
)
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendOnFieldSubToGrave
(
cm
.
costfilter
,
cm
.
costcheck
,
2
,
2
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
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
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
1000
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
if
RD
.
SelectAndSpecialSummon
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
~=
0
then
local
tc
=
Duel
.
GetOperatedGroup
():
GetFirst
()
RD
.
AttachAtkDef
(
e
,
tc
,
1000
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
end
\ No newline at end of file
script/c120194004.lua
View file @
a2f48855
...
...
@@ -12,19 +12,14 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Activate
function
cm
.
sp
filter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
function
cm
.
filter
(
c
,
e
,
tp
)
return
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
and
Duel
.
IsExistingMatchingCard
(
cm
.
sp
filter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
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
,
LOCATION_GRAVE
,
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
.
filter
),
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
,
e
,
POS_FACEUP
)
end
\ No newline at end of file
script/c120195001.lua
View file @
a2f48855
...
...
@@ -14,10 +14,10 @@ function cm.initial_effect(c)
end
--Position
function
cm
.
filter
(
c
)
return
c
:
IsCanChangePosition
()
and
RushDuel
.
IsHasDefense
(
c
)
return
RD
.
IsCanChangePosition
(
c
)
end
function
cm
.
posfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanChangePosition
()
and
RushDuel
.
IsHasDefense
(
c
)
return
c
:
IsFaceup
()
and
RD
.
IsCanChangePosition
(
c
)
end
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
...
...
@@ -25,19 +25,11 @@ 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
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
,
POS_FACEUP_DEFENSE
,
POS_FACEUP_ATTACK
,
POS_FACEUP_ATTACK
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
posfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
posfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
sg
)
Duel
.
ChangePosition
(
sg
,
POS_FACEUP_DEFENSE
,
POS_FACEUP_DEFENSE
,
POS_FACEUP_ATTACK
,
POS_FACEUP_ATTACK
)
end
RD
.
SelectAndDoAction
(
HINTMSG_POSCHANGE
,
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
2
,
nil
,
function
(
g
)
if
RD
.
ChangePosition
(
g
)
~=
0
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
HINTMSG_POSCHANGE
,
cm
.
posfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
sg
)
RD
.
ChangePosition
(
sg
)
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