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
7e53d50f
Commit
7e53d50f
authored
Mar 11, 2022
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022/3/11 模块化Max2
parent
3aca33df
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
227 additions
and
397 deletions
+227
-397
script/RDAction.lua
script/RDAction.lua
+44
-32
script/RDAttach.lua
script/RDAttach.lua
+45
-42
script/RDBase.lua
script/RDBase.lua
+33
-5
script/RDCondition.lua
script/RDCondition.lua
+0
-1
script/RDCost.lua
script/RDCost.lua
+1
-2
script/RDFunction.lua
script/RDFunction.lua
+0
-1
script/RDMaximum.lua
script/RDMaximum.lua
+0
-1
script/RDRule.lua
script/RDRule.lua
+0
-1
script/RDTarget.lua
script/RDTarget.lua
+0
-1
script/c120151010.lua
script/c120151010.lua
+1
-1
script/c120151027.lua
script/c120151027.lua
+4
-10
script/c120151028.lua
script/c120151028.lua
+12
-34
script/c120151031.lua
script/c120151031.lua
+6
-20
script/c120151032.lua
script/c120151032.lua
+6
-14
script/c120151033.lua
script/c120151033.lua
+2
-7
script/c120151035.lua
script/c120151035.lua
+5
-13
script/c120151036.lua
script/c120151036.lua
+5
-25
script/c120151037.lua
script/c120151037.lua
+7
-10
script/c120151038.lua
script/c120151038.lua
+3
-10
script/c120151039.lua
script/c120151039.lua
+4
-18
script/c120151040.lua
script/c120151040.lua
+6
-30
script/c120151041.lua
script/c120151041.lua
+7
-24
script/c120151044.lua
script/c120151044.lua
+5
-15
script/c120151045.lua
script/c120151045.lua
+6
-9
script/c120151046.lua
script/c120151046.lua
+3
-13
script/c120151047.lua
script/c120151047.lua
+4
-15
script/c120151048.lua
script/c120151048.lua
+6
-17
script/c120151049.lua
script/c120151049.lua
+8
-20
script/c120151050.lua
script/c120151050.lua
+3
-6
script/special.lua
script/special.lua
+1
-0
No files found.
script/RDAction.lua
View file @
7e53d50f
-- Rush Duel 操作
RushDuel
=
RushDuel
or
{}
RD
=
RushDuel
-- 内部方法: 选择匹配卡片, 执行操作
function
RushDuel
.
_private_action_select_match
(
hint
,
filter
,
tp
,
s_range
,
o_range
,
min
,
max
,
expect
,
hint_selection
,
confirm
,
action
,
...
)
...
...
@@ -68,77 +67,77 @@ function RushDuel._set_spell_trap(g, e, tp, break_effect)
end
-- 操作: 选择匹配卡片
function
RushDuel
.
SelectAndDoAction
(
hint
,
filter
,
tp
,
s
,
o
,
min
,
max
,
expect
,
action
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
,
o
)
return
RushDuel
.
_private_action_select_match
(
hint
,
filter
,
tp
,
s
,
o
,
min
,
max
,
expect
,
hint_selection
,
false
,
action
)
function
RushDuel
.
SelectAndDoAction
(
hint
,
filter
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
action
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
_range
,
o_range
)
return
RushDuel
.
_private_action_select_match
(
hint
,
filter
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
hint_selection
,
false
,
action
)
end
-- 可选操作: 选择匹配卡片
function
RushDuel
.
CanSelectAndDoAction
(
desc
,
hint
,
filter
,
tp
,
s
,
o
,
min
,
max
,
expect
,
action
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
,
o
)
return
RushDuel
.
_private_action_can_select_match
(
desc
,
hint
,
filter
,
tp
,
s
,
o
,
min
,
max
,
expect
,
hint_selection
,
false
,
action
)
function
RushDuel
.
CanSelectAndDoAction
(
desc
,
hint
,
filter
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
action
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
_range
,
o_range
)
return
RushDuel
.
_private_action_can_select_match
(
desc
,
hint
,
filter
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
hint_selection
,
false
,
action
)
end
-- 操作: 选择子卡片组
function
RushDuel
.
SelectGroupAndDoAction
(
hint
,
filter
,
check
,
tp
,
s
,
o
,
min
,
max
,
expect
,
action
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
,
o
)
return
RushDuel
.
_private_action_select_group
(
hint
,
filter
,
check
,
tp
,
s
,
o
,
min
,
max
,
expect
,
hint_selection
,
false
,
action
)
function
RushDuel
.
SelectGroupAndDoAction
(
hint
,
filter
,
check
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
action
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
_range
,
o_range
)
return
RushDuel
.
_private_action_select_group
(
hint
,
filter
,
check
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
hint_selection
,
false
,
action
)
end
-- 可选操作: 选择子卡片组
function
RushDuel
.
CanSelectGroupAndDoAction
(
desc
,
hint
,
filter
,
check
,
tp
,
s
,
o
,
min
,
max
,
expect
,
action
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
,
o
)
return
RushDuel
.
_private_action_can_select_group
(
desc
,
hint
,
filter
,
check
,
tp
,
s
,
o
,
min
,
max
,
expect
,
hint_selection
,
false
,
action
)
function
RushDuel
.
CanSelectGroupAndDoAction
(
desc
,
hint
,
filter
,
check
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
action
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
_range
,
o_range
)
return
RushDuel
.
_private_action_can_select_group
(
desc
,
hint
,
filter
,
check
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
hint_selection
,
false
,
action
)
end
-- 操作: 选择怪兽特殊召唤
function
RushDuel
.
SelectAndSpecialSummon
(
filter
,
e
,
tp
,
s
,
o
,
min
,
max
,
expect
,
pos
,
break_effect
)
function
RushDuel
.
SelectAndSpecialSummon
(
filter
,
e
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
pos
,
break_effect
)
local
ct
=
RushDuel
.
GetMZoneCount
(
tp
,
max
)
if
ct
>=
min
then
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
,
o
)
return
RushDuel
.
_private_action_select_match
(
HINTMSG_SPSUMMON
,
filter
,
tp
,
s
,
o
,
min
,
ct
,
expect
,
hint_selection
,
false
,
RushDuel
.
_special_summon
,
e
,
tp
,
pos
,
break_effect
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
_range
,
o_range
)
return
RushDuel
.
_private_action_select_match
(
HINTMSG_SPSUMMON
,
filter
,
tp
,
s
_range
,
o_range
,
min
,
ct
,
expect
,
hint_selection
,
false
,
RushDuel
.
_special_summon
,
e
,
tp
,
pos
,
break_effect
)
end
return
0
end
-- 可选操作: 选择怪兽特殊召唤
function
RushDuel
.
CanSelectAndSpecialSummon
(
desc
,
filter
,
e
,
tp
,
s
,
o
,
min
,
max
,
expect
,
pos
,
break_effect
)
function
RushDuel
.
CanSelectAndSpecialSummon
(
desc
,
filter
,
e
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
pos
,
break_effect
)
local
ct
=
RushDuel
.
GetMZoneCount
(
tp
,
max
)
if
ct
>=
min
then
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
,
o
)
return
RushDuel
.
_private_action_can_select_match
(
desc
,
HINTMSG_SPSUMMON
,
filter
,
tp
,
s
,
o
,
min
,
ct
,
expect
,
hint_selection
,
false
,
RushDuel
.
_special_summon
,
e
,
tp
,
pos
,
break_effect
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
_range
,
o_range
)
return
RushDuel
.
_private_action_can_select_match
(
desc
,
HINTMSG_SPSUMMON
,
filter
,
tp
,
s
_range
,
o_range
,
min
,
ct
,
expect
,
hint_selection
,
false
,
RushDuel
.
_special_summon
,
e
,
tp
,
pos
,
break_effect
)
end
return
0
end
-- 操作: 选择魔法·陷阱卡盖放
function
RushDuel
.
SelectAndSet
(
filter
,
e
,
tp
,
s
,
o
,
min
,
max
,
expect
,
break_effect
)
function
RushDuel
.
SelectAndSet
(
filter
,
e
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
break_effect
)
local
ct
=
RushDuel
.
GetSZoneCount
(
tp
,
max
)
if
ct
>=
min
then
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
,
o
)
return
RushDuel
.
_private_action_select_match
(
HINTMSG_SET
,
filter
,
tp
,
s
,
o
,
min
,
ct
,
expect
,
hint_selection
,
false
,
RushDuel
.
_set_spell_trap
,
e
,
tp
,
break_effect
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
_range
,
o_range
)
return
RushDuel
.
_private_action_select_match
(
HINTMSG_SET
,
filter
,
tp
,
s
_range
,
o_range
,
min
,
ct
,
expect
,
hint_selection
,
false
,
RushDuel
.
_set_spell_trap
,
e
,
tp
,
break_effect
)
end
return
0
end
-- 可选操作: 选择魔法·陷阱卡盖放
function
RushDuel
.
CanSelectAndSet
(
desc
,
filter
,
e
,
tp
,
s
,
o
,
min
,
max
,
expect
,
break_effect
)
function
RushDuel
.
CanSelectAndSet
(
desc
,
filter
,
e
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
break_effect
)
local
ct
=
RushDuel
.
GetSZoneCount
(
tp
,
max
)
if
ct
>=
min
then
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
,
o
)
return
RushDuel
.
_private_action_can_select_match
(
desc
,
HINTMSG_SET
,
filter
,
tp
,
s
,
o
,
min
,
ct
,
expect
,
hint_selection
,
false
,
RushDuel
.
_set_spell_trap
,
e
,
tp
,
break_effect
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
_range
,
o_range
)
return
RushDuel
.
_private_action_can_select_match
(
desc
,
HINTMSG_SET
,
filter
,
tp
,
s
_range
,
o_range
,
min
,
ct
,
expect
,
hint_selection
,
false
,
RushDuel
.
_set_spell_trap
,
e
,
tp
,
break_effect
)
end
return
0
end
-- 操作: 选择魔法·陷阱卡盖放 (子卡片组)
function
RushDuel
.
CanSelectGroupAndSet
(
filter
,
check
,
e
,
tp
,
s
,
o
,
min
,
max
,
expect
,
break_effect
)
function
RushDuel
.
CanSelectGroupAndSet
(
filter
,
check
,
e
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
break_effect
)
local
ct
=
RushDuel
.
GetSZoneCount
(
tp
,
max
)
if
ct
>=
min
then
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
,
o
)
return
RushDuel
.
_private_action_select_group
(
HINTMSG_SET
,
filter
,
check
,
tp
,
s
,
o
,
min
,
ct
,
expect
,
hint_selection
,
false
,
RushDuel
.
_set_spell_trap
,
e
,
tp
,
break_effect
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
_range
,
o_range
)
return
RushDuel
.
_private_action_select_group
(
HINTMSG_SET
,
filter
,
check
,
tp
,
s
_range
,
o_range
,
min
,
ct
,
expect
,
hint_selection
,
false
,
RushDuel
.
_set_spell_trap
,
e
,
tp
,
break_effect
)
end
return
0
end
-- 可选操作: 选择魔法·陷阱卡盖放 (子卡片组)
function
RushDuel
.
CanSelectGroupAndSet
(
desc
,
filter
,
check
,
e
,
tp
,
s
,
o
,
min
,
max
,
expect
,
break_effect
)
function
RushDuel
.
CanSelectGroupAndSet
(
desc
,
filter
,
check
,
e
,
tp
,
s
_range
,
o_range
,
min
,
max
,
expect
,
break_effect
)
local
ct
=
RushDuel
.
GetSZoneCount
(
tp
,
max
)
if
ct
>=
min
then
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
,
o
)
return
RushDuel
.
_private_action_can_select_group
(
desc
,
HINTMSG_SET
,
filter
,
check
,
tp
,
s
,
o
,
min
,
ct
,
expect
,
hint_selection
,
false
,
RushDuel
.
_set_spell_trap
,
e
,
tp
,
break_effect
)
local
hint_selection
=
RushDuel
.
_private_is_include_public
(
s
_range
,
o_range
)
return
RushDuel
.
_private_action_can_select_group
(
desc
,
HINTMSG_SET
,
filter
,
check
,
tp
,
s
_range
,
o_range
,
min
,
ct
,
expect
,
hint_selection
,
false
,
RushDuel
.
_set_spell_trap
,
e
,
tp
,
break_effect
)
end
return
0
end
...
...
@@ -236,10 +235,23 @@ function RushDuel.SendToOpponentDeckTop(target, player)
return
ct
end
end
-- 操作: 返回对方卡组下面 (排序)
function
RushDuel
.
SendToOpponentDeckBottom
(
target
,
player
)
local
g
=
RushDuel
.
ToMaximunGroup
(
target
)
if
g
:
GetCount
()
==
1
then
return
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
else
local
og
,
ct
=
RushDuel
.
SendToDeckSort
(
g
,
1
,
REASON_EFFECT
,
player
,
1
-
player
)
return
ct
end
end
-- 可选操作: 抽卡
function
RushDuel
.
CanDraw
(
desc
,
player
,
count
)
function
RushDuel
.
CanDraw
(
desc
,
player
,
count
,
break_effect
)
if
Duel
.
IsPlayerCanDraw
(
player
,
count
)
and
Duel
.
SelectYesNo
(
player
,
desc
)
then
if
break_effect
then
Duel
.
BreakEffect
()
end
Duel
.
Draw
(
player
,
count
,
REASON_EFFECT
)
end
end
script/RDAttach.lua
View file @
7e53d50f
-- Rush Duel 赋予Buff
RushDuel
=
RushDuel
or
{}
RD
=
RushDuel
-- 赋予: 攻守升降
function
RushDuel
.
AttachAtkDef
(
e
,
c
,
atk
,
def
,
reset
)
function
RushDuel
.
AttachAtkDef
(
e
,
c
ard
,
atk
,
def
,
reset
)
if
atk
~=
nil
and
atk
~=
0
then
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
,
EFFECT_UPDATE_ATTACK
,
atk
,
reset
)
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
ard
,
EFFECT_UPDATE_ATTACK
,
atk
,
reset
)
end
if
def
~=
nil
and
def
~=
0
and
RushDuel
.
IsCanChangeDef
(
c
)
then
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
,
EFFECT_UPDATE_DEFENSE
,
def
,
reset
)
if
def
~=
nil
and
def
~=
0
and
RushDuel
.
IsCanChangeDef
(
c
ard
)
then
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
ard
,
EFFECT_UPDATE_DEFENSE
,
def
,
reset
)
end
end
-- 赋予: 等级升降
function
RushDuel
.
AttachLevel
(
e
,
c
,
lv
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
,
EFFECT_UPDATE_LEVEL
,
lv
,
reset
)
function
RushDuel
.
AttachLevel
(
e
,
c
ard
,
level
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
ard
,
EFFECT_UPDATE_LEVEL
,
level
,
reset
)
end
-- 赋予: 直接攻击
function
RushDuel
.
AttachDirectAttack
(
e
,
c
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
,
EFFECT_DIRECT_ATTACK
,
nil
,
reset
)
function
RushDuel
.
AttachDirectAttack
(
e
,
c
ard
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
ard
,
EFFECT_DIRECT_ATTACK
,
nil
,
reset
)
end
-- 赋予: 贯通
function
RushDuel
.
AttachPierce
(
e
,
c
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
,
EFFECT_PIERCE
,
nil
,
reset
)
function
RushDuel
.
AttachPierce
(
e
,
c
ard
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
ard
,
EFFECT_PIERCE
,
nil
,
reset
)
end
-- 赋予: 多次攻击
function
RushDuel
.
AttachExtraAttack
(
e
,
c
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
,
EFFECT_EXTRA_ATTACK
,
value
,
reset
)
function
RushDuel
.
AttachExtraAttack
(
e
,
c
ard
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
ard
,
EFFECT_EXTRA_ATTACK
,
value
,
reset
)
end
-- 赋予: 全体攻击
function
RushDuel
.
AttachAttackAll
(
e
,
c
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
,
EFFECT_ATTACK_ALL
,
value
,
reset
)
function
RushDuel
.
AttachAttackAll
(
e
,
c
ard
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
ard
,
EFFECT_ATTACK_ALL
,
value
,
reset
)
end
-- 赋予: 双重解放
function
RushDuel
.
AttachDoubleTribute
(
e
,
c
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
,
EFFECT_DOUBLE_TRIBUTE
,
value
,
reset
)
function
RushDuel
.
AttachDoubleTribute
(
e
,
card
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
card
,
EFFECT_DOUBLE_TRIBUTE
,
value
,
reset
)
end
-- 赋予: 效果战斗抗性
function
RushDuel
.
AttachBattleIndes
(
e
,
card
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
card
,
EFFECT_INDESTRUCTABLE_BATTLE
,
value
,
reset
)
end
-- 赋予: 效果破坏抗性
function
RushDuel
.
AttachEffectIndes
(
e
,
c
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
,
EFFECT_INDESTRUCTABLE_EFFECT
,
value
,
reset
)
function
RushDuel
.
AttachEffectIndes
(
e
,
c
ard
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
ard
,
EFFECT_INDESTRUCTABLE_EFFECT
,
value
,
reset
)
end
-- 赋予: 攻击宣言特效
function
RushDuel
.
AttachAttackAnnounce
(
e
,
c
,
operation
,
desc
,
reset
)
function
RushDuel
.
AttachAttackAnnounce
(
e
,
c
ard
,
operation
,
desc
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
...
...
@@ -50,45 +53,45 @@ function RushDuel.AttachAttackAnnounce(e, c, operation, desc, reset)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
end
e1
:
SetReset
(
reset
)
c
:
RegisterEffect
(
e1
)
c
ard
:
RegisterEffect
(
e1
)
end
-- 赋予: 不能直接攻击
function
R
D
.
AttachCannotDirectAttack
(
e
,
c
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
,
EFFECT_CANNOT_DIRECT_ATTACK
,
nil
,
reset
)
function
R
ushDuel
.
AttachCannotDirectAttack
(
e
,
card
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
ard
,
EFFECT_CANNOT_DIRECT_ATTACK
,
nil
,
reset
)
end
-- 赋予: 不能选择攻击目标
function
R
D
.
AttachCannotSelectBattleTarget
(
e
,
c
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
,
EFFECT_CANNOT_SELECT_BATTLE_TARGET
,
value
,
reset
)
function
R
ushDuel
.
AttachCannotSelectBattleTarget
(
e
,
card
,
value
,
desc
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
c
ard
,
EFFECT_CANNOT_SELECT_BATTLE_TARGET
,
value
,
reset
)
end
-- 赋予: 变更原本攻守
function
RushDuel
.
SetBaseAtkDef
(
e
,
c
,
atk
,
def
,
reset
)
function
RushDuel
.
SetBaseAtkDef
(
e
,
c
ard
,
atk
,
def
,
reset
)
if
atk
~=
nil
then
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
,
EFFECT_SET_BASE_ATTACK
,
atk
,
reset
)
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
ard
,
EFFECT_SET_BASE_ATTACK
,
atk
,
reset
)
end
if
def
~=
nil
and
RushDuel
.
IsCanChangeDef
(
c
)
then
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
,
EFFECT_SET_BASE_DEFENSE
,
def
,
nil
,
reset
)
if
def
~=
nil
and
RushDuel
.
IsCanChangeDef
(
c
ard
)
then
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
ard
,
EFFECT_SET_BASE_DEFENSE
,
def
,
nil
,
reset
)
end
end
-- 赋予: 交换原本攻守
function
RushDuel
.
SwapBaseAtkDef
(
e
,
c
,
reset
)
if
RushDuel
.
IsCanChangeDef
(
c
)
then
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
,
EFFECT_SWAP_BASE_AD
,
nil
,
reset
)
function
RushDuel
.
SwapBaseAtkDef
(
e
,
c
ard
,
reset
)
if
RushDuel
.
IsCanChangeDef
(
c
ard
)
then
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
ard
,
EFFECT_SWAP_BASE_AD
,
nil
,
reset
)
end
end
-- 赋予: 交换当前攻守
function
RushDuel
.
SwapAtkDef
(
e
,
c
,
reset
)
if
RushDuel
.
IsCanChangeDef
(
c
)
then
local
atk
=
c
:
GetAttack
()
local
def
=
c
:
GetDefense
()
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
,
EFFECT_SET_ATTACK_FINAL
,
def
,
reset
)
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
,
EFFECT_SET_DEFENSE_FINAL
,
atk
,
reset
)
function
RushDuel
.
SwapAtkDef
(
e
,
c
ard
,
reset
)
if
RushDuel
.
IsCanChangeDef
(
c
ard
)
then
local
atk
=
c
ard
:
GetAttack
()
local
def
=
c
ard
:
GetDefense
()
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
ard
,
EFFECT_SET_ATTACK_FINAL
,
def
,
reset
)
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
ard
,
EFFECT_SET_DEFENSE_FINAL
,
atk
,
reset
)
end
end
-- 赋予: 改变属性
function
RushDuel
.
ChangeAttribute
(
e
,
c
,
attribute
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
,
EFFECT_CHANGE_ATTRIBUTE
,
attribute
,
reset
)
function
RushDuel
.
ChangeAttribute
(
e
,
c
ard
,
attribute
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
ard
,
EFFECT_CHANGE_ATTRIBUTE
,
attribute
,
reset
)
end
-- 赋予: 改变种族
function
RushDuel
.
ChangeRace
(
e
,
c
,
race
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
,
EFFECT_CHANGE_RACE
,
race
,
reset
)
function
RushDuel
.
ChangeRace
(
e
,
c
ard
,
race
,
reset
)
return
RushDuel
.
CreateSingleEffect
(
e
,
nil
,
c
ard
,
EFFECT_CHANGE_RACE
,
race
,
reset
)
end
script/RDBase.lua
View file @
7e53d50f
-- Rush Duel 基础
RushDuel
=
RushDuel
or
{}
RD
=
RushDuel
-- 新种族
RACE_CYBORG
=
0x2000000
-- 电子人
...
...
@@ -47,7 +46,7 @@ function RushDuel.CreateHintEffect(e, desc, player, s_range, o_range, reset)
Duel
.
RegisterEffect
(
e1
,
player
)
return
e1
end
-- 创建效果: 不能攻击 (
自肃
)
-- 创建效果: 不能攻击 (
对玩家效果
)
function
RushDuel
.
CreateAttackLimitEffect
(
e
,
target
,
player
,
s_range
,
o_range
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
...
...
@@ -61,7 +60,7 @@ function RushDuel.CreateAttackLimitEffect(e, target, player, s_range, o_range, r
Duel
.
RegisterEffect
(
e1
,
player
)
return
e1
end
-- 创建效果: 不能直接攻击 (
自肃
)
-- 创建效果: 不能直接攻击 (
对玩家效果
)
function
RushDuel
.
CreateCannotDirectAttackEffect
(
e
,
target
,
player
,
s_range
,
o_range
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
...
...
@@ -75,7 +74,21 @@ function RushDuel.CreateCannotDirectAttackEffect(e, target, player, s_range, o_r
Duel
.
RegisterEffect
(
e1
,
player
)
return
e1
end
-- 创建效果: 不能召唤怪兽 (自肃)
-- 创建效果: 不能选择攻击目标 (对玩家效果)
function
RushDuel
.
CreateCannotSelectBattleTargetEffect
(
e
,
target
,
player
,
s_range
,
o_range
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetTargetRange
(
s_range
,
o_range
)
if
target
~=
nil
then
e1
:
SetTarget
(
target
)
end
e1
:
SetReset
(
reset
)
Duel
.
RegisterEffect
(
e1
,
player
)
return
e1
end
-- 创建效果: 不能召唤怪兽 (对玩家效果)
function
RushDuel
.
CreateCannotSummonEffect
(
e
,
desc
,
target
,
player
,
s_range
,
o_range
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
desc
)
...
...
@@ -90,7 +103,22 @@ function RushDuel.CreateCannotSummonEffect(e, desc, target, player, s_range, o_r
Duel
.
RegisterEffect
(
e1
,
player
)
return
e1
end
-- 创建效果: 不能特殊召唤怪兽 (自肃)
-- 创建效果: 不能盖放怪兽 (对玩家效果)
function
RushDuel
.
CreateCannotSetMonsterEffect
(
e
,
desc
,
target
,
player
,
s_range
,
o_range
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
desc
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_MSET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetTargetRange
(
s_range
,
o_range
)
if
target
~=
nil
then
e1
:
SetTarget
(
target
)
end
e1
:
SetReset
(
reset
)
Duel
.
RegisterEffect
(
e1
,
player
)
return
e1
end
-- 创建效果: 不能特殊召唤怪兽 (对玩家效果)
function
RushDuel
.
CreateCannotSpecialSummonEffect
(
e
,
desc
,
target
,
player
,
s_range
,
o_range
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
desc
)
...
...
script/RDCondition.lua
View file @
7e53d50f
-- Rush Duel 条件
RushDuel
=
RushDuel
or
{}
RD
=
RushDuel
-- 条件: 是否为传说卡
function
RushDuel
.
IsLegendCode
(
card
,
...
)
...
...
script/RDCost.lua
View file @
7e53d50f
-- Rush Duel 代价
RushDuel
=
RushDuel
or
{}
RD
=
RushDuel
-- 内部方法: 选择匹配卡片, 执行操作
function
RushDuel
.
_private_cost_select_match
(
hint
,
filter
,
s_range
,
o_range
,
min
,
max
,
except_self
,
action
)
...
...
@@ -72,7 +71,7 @@ end
-- 代价: 选择子卡片组, 返回卡组 (排序)
function
RushDuel
.
CostSendGroupToDeckSort
(
filter
,
check
,
field
,
min
,
max
,
except_self
,
sequence
,
hint_selection
,
confirm
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
local
action
=
RushDuel
.
_private_action_send_deck_sort
(
sequence
,
REASON_COST
,
hint_selection
,
confirm
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
_private_cost_select_group
(
HINTMSG_TO
GRAVE
,
filter
,
check
,
field
,
0
,
min
,
max
,
except_self
,
action
)
return
RushDuel
.
_private_cost_select_group
(
HINTMSG_TO
DECK
,
filter
,
check
,
field
,
0
,
min
,
max
,
except_self
,
action
)
end
-- 代价: 支付LP
...
...
script/RDFunction.lua
View file @
7e53d50f
-- Rush Duel 辅助函数
RushDuel
=
RushDuel
or
{}
RD
=
RushDuel
-- 为效果设置标签
function
RushDuel
.
SetLabelAndObject
(
effect
,
target
,
set_label
,
set_object
)
...
...
script/RDMaximum.lua
View file @
7e53d50f
-- Rush Duel 极大
RushDuel
=
RushDuel
or
{}
RD
=
RushDuel
TYPE_MAXIMUM
=
0x400
-- 极大怪兽
SUMMON_TYPE_MAXIMUM
=
0x45000000
-- 极大模式
...
...
script/RDRule.lua
View file @
7e53d50f
-- Rush Duel 规则
RushDuel
=
RushDuel
or
{}
RD
=
RushDuel
-- 初始化
function
RushDuel
.
Init
()
...
...
script/RDTarget.lua
View file @
7e53d50f
-- Rush Duel 对象
RushDuel
=
RushDuel
or
{}
RD
=
RushDuel
-- 对玩家效果: 抽卡 - 对象
function
RushDuel
.
TargetDraw
(
player
,
count
)
...
...
script/c120151010.lua
View file @
7e53d50f
...
...
@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end
--Draw
function
cm
.
setfilter
(
c
)
return
R
ushDuel
.
IsLegendCode
(
c
,
list
[
1
])
and
c
:
IsSSetable
()
return
R
D
.
IsLegendCode
(
c
,
list
[
1
])
and
c
:
IsSSetable
()
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
==
0
...
...
script/c120151027.lua
View file @
7e53d50f
...
...
@@ -17,7 +17,7 @@ function cm.costfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsAbleToGraveAsCost
()
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
exfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
...
...
@@ -45,16 +45,10 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
e
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
POS_FACEUP
)
~=
0
then
local
sg
=
Duel
.
GetMatchingGroup
(
cm
.
exfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
sg
:
CheckSubGroup
(
cm
.
excheck
,
3
,
3
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
if
sg
:
CheckSubGroup
(
cm
.
excheck
,
3
,
3
)
then
RD
.
CanDraw
(
aux
.
Stringid
(
m
,
1
),
tp
,
1
,
true
)
end
end
end
\ No newline at end of file
script/c120151028.lua
View file @
7e53d50f
...
...
@@ -19,51 +19,29 @@ end
function
cm
.
confilter2
(
c
,
tp
)
return
c
:
GetSummonPlayer
()
==
tp
end
function
cm
.
pos
filter
(
c
)
return
not
c
:
IsPosition
(
POS_FACEUP_DEFENSE
)
and
c
:
IsCanChangePosition
()
and
RushDuel
.
IsHasDefense
(
c
)
function
cm
.
filter
(
c
)
return
not
c
:
IsPosition
(
POS_FACEUP_DEFENSE
)
and
RD
.
IsCanChangePosition
(
c
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroupCount
(
cm
.
confilter1
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
3
and
eg
:
IsExists
(
cm
.
confilter2
,
1
,
nil
,
1
-
tp
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
pos
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
pos
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
0
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
posfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
~=
0
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e2
:
SetCondition
(
cm
.
atkcon
)
e2
:
SetValue
(
cm
.
atklmt
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
--Hint
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetTargetRange
(
0
,
1
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e3
,
tp
)
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
.
GetFlagEffect
(
tp
,
m
)
==
0
then
RD
.
CreateHintEffect
(
e
,
aux
.
Stringid
(
m
,
1
),
tp
,
0
,
1
,
RESET_PHASE
+
PHASE_END
)
RD
.
CreateCannotDirectAttackEffect
(
e
,
nil
,
tp
,
0
,
LOCATION_MZONE
,
RESET_PHASE
+
PHASE_END
)
local
e1
=
RD
.
CreateCannotSelectBattleTargetEffect
(
e
,
nil
,
tp
,
0
,
LOCATION_MZONE
,
RESET_PHASE
+
PHASE_END
)
e1
:
SetCondition
(
cm
.
atkcon
)
e1
:
SetValue
(
cm
.
atklmt
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
)
end
function
cm
.
atkcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDefensePos
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
...
...
script/c120151031.lua
View file @
7e53d50f
...
...
@@ -24,28 +24,14 @@ end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ug
=
Duel
.
GetMatchingGroup
(
cm
.
upfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
ug
:
GetCount
()
==
0
then
return
end
local
tc
=
ug
:
GetFirst
()
while
tc
do
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
)
tc
=
ug
:
GetNext
()
end
ug
:
ForEach
(
function
(
tc
)
RD
.
AttachAtkDef
(
e
,
tc
,
600
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
local
dg
=
Duel
.
GetMatchingGroup
(
cm
.
downfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
dg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
tc
=
dg
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
1200
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
tc
=
dg
:
GetNext
()
end
dg
:
ForEach
(
function
(
tc
)
RD
.
AttachAtkDef
(
e
,
tc
,
-
1200
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
end
\ No newline at end of file
script/c120151032.lua
View file @
7e53d50f
...
...
@@ -13,25 +13,17 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Activate
function
cm
.
des
filter
(
c
)
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendHandToGrave
(
Card
.
IsAbleToGraveAsCost
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
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/c120151033.lua
View file @
7e53d50f
...
...
@@ -19,7 +19,7 @@ function cm.confilter(c,tp)
and
c
:
GetPreviousLevelOnField
()
>=
7
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelAbove
(
7
)
and
c
:
IsRace
(
RACE_WYRM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsLevelAbove
(
7
)
and
c
:
IsRace
(
RACE_WYRM
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
confilter
,
1
,
nil
,
tp
)
...
...
@@ -30,10 +30,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
RD
.
SelectAndSpecialSummon
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
e
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
POS_FACEUP
)
end
\ No newline at end of file
script/c120151035.lua
View file @
7e53d50f
...
...
@@ -21,24 +21,16 @@ function cm.thfilter(c)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsRace
(
RACE_WARRIOR
)
and
c
:
IsAbleToHand
()
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
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
end
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
.
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
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
if
RD
.
SendDeckTopToGraveAndExists
(
tp
,
1
,
cm
.
exfilter
,
1
,
nil
)
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
)
end
end
\ No newline at end of file
script/c120151036.lua
View file @
7e53d50f
...
...
@@ -19,34 +19,14 @@ end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevel
(
7
,
8
)
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
,
5
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
5
,
5
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendGraveToDeck
(
cm
.
costfilter
,
5
,
5
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
1
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
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_ATTACK
)
e1
:
SetValue
(
2000
)
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
)
end
RD
.
AttachAtkDef
(
e
,
tc
,
2000
,
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
)
end
)
end
\ No newline at end of file
script/c120151037.lua
View file @
7e53d50f
...
...
@@ -16,22 +16,19 @@ end
function
cm
.
confilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
5
)
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsRace
(
RACE_WARRIOR
)
end
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
.
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
.
pos
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
pos
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
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
,
0
,
LOCATION_MZONE
,
1
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
end
RD
.
SelectAndDoAction
(
HINTMSG_POSCHANGE
,
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
2
,
nil
,
function
(
g
)
RD
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
end
)
end
\ No newline at end of file
script/c120151038.lua
View file @
7e53d50f
...
...
@@ -31,14 +31,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
1000
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
tc
=
g
:
GetNext
()
end
g
:
ForEach
(
function
(
tc
)
RD
.
AttachAtkDef
(
e
,
tc
,
1000
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
\ No newline at end of file
script/c120151039.lua
View file @
7e53d50f
...
...
@@ -17,26 +17,12 @@ end
function
cm
.
costfilter
(
c
)
return
c
:
IsRace
(
RACE_FAIRY
)
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
.
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
,
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
(
1000
)
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
(),
1000
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
\ No newline at end of file
script/c120151040.lua
View file @
7e53d50f
...
...
@@ -20,42 +20,18 @@ function cm.costfilter(c)
return
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsAbleToDeckOrExtraAsCost
()
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_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_COST
)
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
end
cm
.
cost
=
RD
.
CostSendGraveToDeckBottom
(
cm
.
costfilter
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
RD
.
TargetDraw
(
tp
,
1
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
RD
.
Draw
()
if
Duel
.
GetFlagEffect
(
tp
,
m
)
~=
0
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
cm
.
atktg
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
--Hint
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
RD
.
CreateHintEffect
(
e
,
aux
.
Stringid
(
m
,
1
),
tp
,
1
,
0
,
RESET_PHASE
+
PHASE_END
)
RD
.
CreateAttackLimitEffect
(
e
,
cm
.
atktg
,
tp
,
LOCATION_MZONE
,
0
,
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
cm
.
atktg
(
e
,
c
)
...
...
script/c120151041.lua
View file @
7e53d50f
...
...
@@ -21,32 +21,15 @@ 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
,
2
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
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_MSET
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
e3
=
e1
:
Clone
()
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e3
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e3
:
SetTarget
(
cm
.
splimit
)
Duel
.
RegisterEffect
(
e3
,
tp
)
RD
.
SelectAndDoAction
(
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
2
,
nil
,
function
(
g
)
if
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
RD
.
CreateCannotSummonEffect
(
e
,
aux
.
Stringid
(
m
,
1
),
cm
.
sumlimit
,
tp
,
1
,
0
,
RESET_PHASE
+
PHASE_END
)
RD
.
CreateCannotSetMonsterEffect
(
e
,
aux
.
Stringid
(
m
,
2
),
cm
.
sumlimit
,
tp
,
1
,
0
,
RESET_PHASE
+
PHASE_END
)
RD
.
CreateCannotSpecialSummonEffect
(
e
,
aux
.
Stringid
(
m
,
3
),
cm
.
sumlimit
,
tp
,
1
,
0
,
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
)
end
function
cm
.
s
p
limit
(
e
,
c
)
function
cm
.
s
um
limit
(
e
,
c
)
return
c
:
IsLocation
(
LOCATION_HAND
)
end
\ No newline at end of file
script/c120151044.lua
View file @
7e53d50f
...
...
@@ -23,21 +23,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
)
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
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
(
-
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
if
Duel
.
GetLP
(
1
-
tp
)
-
Duel
.
GetLP
(
tp
)
>=
2000
then
local
e2
=
e1
:
Clone
()
e2
:
SetValue
(
-
1500
)
tc
:
RegisterEffect
(
e2
)
RD
.
AttachAtkDef
(
e
,
tc
,
-
500
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
if
RD
.
IsLPBelowOpponent
(
tp
,
2000
)
then
RD
.
AttachAtkDef
(
e
,
tc
,
-
1500
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
end
end
)
end
\ No newline at end of file
script/c120151045.lua
View file @
7e53d50f
...
...
@@ -16,22 +16,19 @@ end
function
cm
.
confilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_FAIRY
)
end
function
cm
.
td
filter
(
c
)
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToDeck
()
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
.
td
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
td
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_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
,
cm
.
tdfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
end
RD
.
SelectAndDoAction
(
HINTMSG_TODECK
,
cm
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
function
(
g
)
RD
.
SendToOpponentDeckBottom
(
g
,
tp
)
end
)
end
\ No newline at end of file
script/c120151046.lua
View file @
7e53d50f
...
...
@@ -23,19 +23,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
1
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
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
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
RD
.
AttachBattleIndes
(
e
,
tc
,
1
,
aux
.
Stringid
(
m
,
2
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
Duel
.
Recover
(
1
-
tp
,
tc
:
GetAttack
(),
REASON_EFFECT
)
end
end
)
end
\ No newline at end of file
script/c120151047.lua
View file @
7e53d50f
...
...
@@ -24,28 +24,17 @@ function cm.exfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_FAIRY
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsRace
(
RACE_FAIRY
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
confilter
,
1
,
nil
,
1
-
tp
)
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
(
500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
500
)
RD
.
TargetDamage
(
1
-
tp
,
500
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
if
RD
.
Damage
()
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
RD
.
CanSelectAndSpecialSummon
(
aux
.
Stringid
(
m
,
1
),
cm
.
spfilter
,
e
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
POS_FACEUP
)
end
end
\ No newline at end of file
script/c120151048.lua
View file @
7e53d50f
...
...
@@ -17,32 +17,21 @@ function cm.initial_effect(c)
end
--Special Summon
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
6
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsLevelBelow
(
6
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
exfilter
(
c
)
return
RushDuel
.
IsLegendCode
(
c
,
list
[
1
])
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
return
RD
.
IsLegendCode
(
c
,
list
[
1
])
end
cm
.
cost
=
RD
.
CostSendSelfToGrave
()
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
(
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
if
RD
.
SelectAndSpecialSummon
(
cm
.
spfilter
,
e
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
POS_FACEUP
)
~=
0
then
local
tc
=
Duel
.
GetOperatedGroup
():
GetFirst
()
RD
.
AttachAtkDef
(
e
,
tc
,
500
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
Duel
.
Damage
(
1
-
tp
,
500
,
REASON_EFFECT
)
end
...
...
script/c120151049.lua
View file @
7e53d50f
...
...
@@ -16,7 +16,7 @@ function cm.exfilter(c)
return
c
:
IsLocation
(
LOCATION_GRAVE
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
8
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsLevelBelow
(
8
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
...
...
@@ -24,25 +24,13 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
1
,
0
,
0
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGrave
,
tp
,
LOCATION_MZONE
,
0
,
1
,
7
,
nil
)
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
og
=
Duel
.
GetOperatedGroup
()
local
lv
=
og
:
Filter
(
cm
.
exfilter
,
nil
):
GetSum
(
Card
.
GetOriginalLevel
)
if
lv
>=
10
and
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
sg
:
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
(
300
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
RD
.
SelectAndDoAction
(
HINTMSG_TOGRAVE
,
Card
.
IsAbleToGrave
,
tp
,
LOCATION_MZONE
,
0
,
1
,
7
,
nil
,
function
(
g
)
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
lv
=
Duel
.
GetOperatedGroup
():
Filter
(
cm
.
exfilter
,
nil
):
GetSum
(
Card
.
GetOriginalLevel
)
if
lv
>=
10
and
RD
.
CanSelectAndSpecialSummon
(
aux
.
Stringid
(
m
,
1
),
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
e
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
POS_FACEUP
)
~=
0
then
local
tc
=
Duel
.
GetOperatedGroup
():
GetFirst
()
RD
.
AttachAtkDef
(
e
,
tc
,
300
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
end
end
end
)
end
\ No newline at end of file
script/c120151050.lua
View file @
7e53d50f
...
...
@@ -25,10 +25,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
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
,
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
RD
.
SelectAndDoAction
(
HINTMSG_RTOHAND
,
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
RD
.
SendToOpponentHand
(
g
)
end
)
end
\ No newline at end of file
script/special.lua
View file @
7e53d50f
...
...
@@ -8,6 +8,7 @@ Duel.LoadScript("RDCost.lua")
Duel
.
LoadScript
(
"RDTarget.lua"
)
Duel
.
LoadScript
(
"RDAttach.lua"
)
Duel
.
LoadScript
(
"RDAction.lua"
)
RD
=
RushDuel
function
Auxiliary
.
PreloadUds
()
RD
.
Init
()
...
...
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