Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
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
Huangnan
no81cards
Commits
1e8694aa
Commit
1e8694aa
authored
Oct 28, 2020
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rollback and fix
parent
57555171
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
42 additions
and
1565 deletions
+42
-1565
expansions/script/c10199990.lua
expansions/script/c10199990.lua
+41
-107
expansions/script/c65010105.lua
expansions/script/c65010105.lua
+0
-1
expansions/script/c9910628.lua
expansions/script/c9910628.lua
+1
-1
expansions/script/c9980780_1.lua
expansions/script/c9980780_1.lua
+0
-104
expansions/script/c9981290_1.lua
expansions/script/c9981290_1.lua
+0
-159
expansions/script/c9981406_1.lua
expansions/script/c9981406_1.lua
+0
-138
expansions/script/c9981407_1.lua
expansions/script/c9981407_1.lua
+0
-178
expansions/script/c9981408_1.lua
expansions/script/c9981408_1.lua
+0
-56
expansions/script/c9981409_1.lua
expansions/script/c9981409_1.lua
+0
-90
expansions/script/c9981410_1.lua
expansions/script/c9981410_1.lua
+0
-120
expansions/script/c9981411_1.lua
expansions/script/c9981411_1.lua
+0
-123
expansions/script/c9981412_1.lua
expansions/script/c9981412_1.lua
+0
-70
expansions/script/c9981413_1.lua
expansions/script/c9981413_1.lua
+0
-81
expansions/script/c9981414_1.lua
expansions/script/c9981414_1.lua
+0
-135
expansions/script/c9981415_1.lua
expansions/script/c9981415_1.lua
+0
-99
expansions/script/c9981416_1.lua
expansions/script/c9981416_1.lua
+0
-103
No files found.
expansions/script/c10199990.lua
View file @
1e8694aa
--version 20.
10.11
--version 20.
08.25
if
not
pcall
(
function
()
require
(
"expansions/script/c10199991"
)
end
)
then
require
(
"script/c10199991"
)
end
local
m
=
10199990
local
vm
=
10199991
local
Version_Number
=
20201011
if
rsv
.
Library_Switch
then
return
end
rsv
.
Library_Switch
=
true
local
Version_Number
=
20200825
-----------------------"Part_Effect_Base"-----------------------
--Creat Event
function
rsef
.
CreatEvent
(
event_code
,
event1
,
con1
,
...
)
rsef
.
CreatEvent_Switch
=
rsef
.
CreatEvent_Switch
or
{}
if
rsef
.
CreatEvent_Switch
[
event_code
]
then
return
end
rsef
.
CreatEvent_Switch
[
event_code
]
=
true
local
creat_list
=
{
event1
,
con1
,
...
}
local
eff_list
=
{}
for
idx
,
val
in
pairs
(
creat_list
)
do
if
type
(
val
)
==
"number"
then
local
e1
=
rsef
.
FC
({
true
,
0
},
val
)
e1
:
SetOperation
(
rsop
.
CreatEvent
(
creat_list
[
idx
+
1
],
event_code
))
table.insert
(
eff_list
,
e1
)
end
end
return
table.unpack
(
eff_list
)
end
function
rsop
.
CreatEvent
(
con
,
event_code
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
con
=
con
or
aux
.
TRUE
local
res
,
sg
=
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
res
then
return
end
sg
=
sg
or
eg
Duel
.
RaiseEvent
(
sg
,
event_code
,
re
,
r
,
rp
,
ep
,
ev
)
for
tc
in
aux
.
Next
(
sg
)
do
Duel
.
RaiseSingleEvent
(
tc
,
event_code
,
re
,
r
,
rp
,
ep
,
ev
)
end
end
end
--Creat "EVENT_SET"
function
rsef
.
CreatEvent_Set
()
return
rsef
.
CreatEvent
(
rscode
.
Set
,
EVENT_MSET
,
nil
,
EVENT_SSET
,
nil
,
EVENT_SPSUMMON_SUCCESS
,
rscon
.
CreatEvent_Set
,
EVENT_CHANGE_POS
,
rscon
.
CreatEvent_Set
)
if
rsef
.
CreatEvent_Set_Switch
then
return
end
rsef
.
CreatEvent_Set_Switch
=
true
local
e1
=
rsef
.
FC
({
true
,
0
},
EVENT_MSET
)
e1
:
SetOperation
(
rsop
.
CreatEvent_Set
)
local
e2
=
rsef
.
RegisterClone
({
true
,
0
},
e1
,
"code"
,
EVENT_SSET
)
local
e3
=
rsef
.
RegisterClone
({
true
,
0
},
e1
,
"code"
,
EVENT_SPSUMMON_SUCCESS
,
"con"
,
rscon
.
CreatEvent_Set
)
local
e4
=
rsef
.
RegisterClone
({
true
,
0
},
e3
,
"code"
,
EVENT_CHANGE_POS
)
return
e1
,
e2
,
e3
,
e4
end
function
rsop
.
CreatEvent_Set
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
eg
:
Filter
(
Card
.
IsFacedown
,
nil
)
Duel
.
RaiseEvent
(
sg
,
rscode
.
Set
,
re
,
r
,
rp
,
ep
,
ev
)
for
tc
in
aux
.
Next
(
sg
)
do
Duel
.
RaiseSingleEvent
(
tc
,
rscode
.
Set
,
re
,
r
,
rp
,
ep
,
ev
)
end
end
function
rscon
.
CreatEvent_Set
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
eg
:
Filter
(
Card
.
IsFacedown
,
nil
)
return
#
sg
>
0
,
sg
return
eg
:
IsExists
(
Card
.
IsFacedown
,
1
,
nil
)
end
--Effect: Get default hint string for Duel.Hint ,use in effect target
function
rsef
.
GetDefaultHintString
(
cate_list
,
loc_self
,
loc_oppo
,
hint_list
)
if
hint_list
then
...
...
@@ -769,14 +753,14 @@ function rsef.FV_INDESTRUCTABLE(reg_list,inds_list,val_list,tg,tg_range_list,con
end
--Field Val Effect: Other Limit
function
rsef
.
FV_LIMIT
(
reg_list
,
lim_list
,
val_list
,
tg
,
tg_range_list
,
con
,
reset_list
,
flag
,
desc_list
)
local
code_list_1
=
{
"dis"
,
"dise"
,
"tri"
,
"atk"
,
"atkan"
,
"datk"
,
"res"
,
"ress"
,
"resns"
,
"td"
,
"th"
,
"cp"
,
"cpe"
,
"ctrl"
,
"distm"
}
local
code_list_2
=
{
EFFECT_DISABLE
,
EFFECT_DISABLE_EFFECT
,
EFFECT_CANNOT_TRIGGER
,
EFFECT_CANNOT_ATTACK
,
EFFECT_CANNOT_ATTACK_ANNOUNCE
,
EFFECT_CANNOT_DIRECT_ATTACK
,
EFFECT_CANNOT_RELEASE
,
EFFECT_UNRELEASABLE_SUM
,
EFFECT_UNRELEASABLE_NONSUM
,
EFFECT_CANNOT_TO_DECK
,
EFFECT_CANNOT_TO_HAND
,
EFFECT_CANNOT_CHANGE_POSITION
,
EFFECT_CANNOT_CHANGE_POS_E
,
EFFECT_CANNOT_CHANGE_CONTROL
,
EFFECT_DISABLE_TRAPMONSTER
}
local
code_list_1
=
{
"dis"
,
"dise"
,
"tri"
,
"atk"
,
"atkan"
,
"datk"
,
"res"
,
"ress"
,
"resns"
,
"td"
,
"th"
,
"cp"
,
"cpe"
,
"ctrl"
}
local
code_list_2
=
{
EFFECT_DISABLE
,
EFFECT_DISABLE_EFFECT
,
EFFECT_CANNOT_TRIGGER
,
EFFECT_CANNOT_ATTACK
,
EFFECT_CANNOT_ATTACK_ANNOUNCE
,
EFFECT_CANNOT_DIRECT_ATTACK
,
EFFECT_CANNOT_RELEASE
,
EFFECT_UNRELEASABLE_SUM
,
EFFECT_UNRELEASABLE_NONSUM
,
EFFECT_CANNOT_TO_DECK
,
EFFECT_CANNOT_TO_HAND
,
EFFECT_CANNOT_CHANGE_POSITION
,
EFFECT_CANNOT_CHANGE_POS_E
,
EFFECT_CANNOT_CHANGE_CONTROL
}
local
code_list
,
val_list2
=
rsof
.
Table_Suit
(
lim_list
,
code_list_1
,
code_list_2
,
val_list
)
local
eff_list
=
{}
local
range
=
rsef
.
GetRegisterRange
(
reg_list
)
if
not
tg_range_list
then
tg_range_list
=
{
0
,
LOCATION_MZONE
}
end
for
idx
,
eff_code
in
ipairs
(
code_list
)
do
local
flag2
=
rsef
.
GetRegisterProperty
(
flag
)
--
|EFFECT_FLAG_SET_AVAILABLE
local
flag2
=
rsef
.
GetRegisterProperty
(
flag
)
|
EFFECT_FLAG_SET_AVAILABLE
flag2
=
eff_code
==
EFFECT_CANNOT_CHANGE_POSITION
and
flag2
or
flag2
|
EFFECT_FLAG_IGNORE_IMMUNE
local
e1
=
rsef
.
FV
(
reg_list
,
eff_code
,
val_list2
[
idx
],
tg
,
tg_range_list
,
range
,
con
,
reset_list
,
flag2
,
desc_list
)
table.insert
(
eff_list
,
e1
)
...
...
@@ -1186,7 +1170,7 @@ function rsef.FC_AttachEffect_ChangeOp2(baseop)
end
--Effect Function:XXX card/group will leave field in XXX Phase , often use in special summon
function
rsef
.
FC_PHASELEAVE
(
reg_list
,
leave_val
,
times
,
whos
,
phase
,
leaveway
,
reset_list
)
function
rsef
.
FC_PHASELEAVE
(
reg_list
,
sg
,
times
,
whos
,
phase
,
leaveway
,
reset_list
)
--times: nil every phase
-- 0 next phase
-- 1 or + times phase
...
...
@@ -1205,7 +1189,6 @@ function rsef.FC_PHASELEAVE(reg_list,leave_val,times,whos,phase,leaveway,reset_l
if
times
==
0
and
whos
==
1
and
turnp
~=
tp
then
times
=
cphase
<=
phase
and
2
or
1
end
local
sg
=
rsgf
.
Mix2
(
leave_val
)
local
fid
=
reg_owner
:
GetFieldID
()
for
tc
in
aux
.
Next
(
sg
)
do
tc
:
RegisterFlagEffect
(
rscode
.
Phase_Leave_Flag
,
rsreset
.
est
+
RESET_PHASE
+
phase
,
0
,
0
,
fid
)
...
...
@@ -1513,26 +1496,21 @@ function rstg.negsumtg(way_str)
end
--Effect target: Target Cards Main Set
--effect parameter table main set
--warning:
--bugs in {{A,B,C},{A2,B2,C2}},{A3,B3,C3} ,plz use {A3,B3,C3},{{A,B,C},{A2,B2,C2}}
--bugs in {filter,nil,loc},{filter,nil,loc} , plz use "" no nil
function
rsef
.
list
(
list_type_str
,
...
)
function
rsef
.
list
(
list_type_str
,
parameter1
,
...
)
--{cfilter,gfilter}, if you use table, gfilter must be function, if you use gfilter, loc_self must be number !!!!!!!!!
local
parameter
1
,
parameter2
,
parameter3
=
({
...
})[
1
],({
...
})[
2
],({
...
})[
3
]
local
mix_list
=
{
...
}
local
len
=
select
(
'#'
,
...
)
local
parameter
2
,
parameter3
=
({
...
})[
1
],({
...
})[
2
]
local
mix_list
=
{
parameter1
,
...
}
local
len
=
#
mix_list
local
target_list_total
=
{}
--1. cfilter,category,loc_self
if
type
(
parameter1
)
~=
"table"
then
target_list_total
=
{{
...
}}
target_list_total
=
{{
parameter1
,
...
}}
--2. { cfilter,gfilter }, { category_fun,category_str,sel_hint } ,loc_self
elseif
type
(
parameter1
)
==
"table"
and
type
(
parameter1
[
1
])
==
"function"
and
type
(
parameter1
[
2
])
==
"function"
and
type
(
parameter3
)
==
"number"
then
target_list_total
=
{{
...
}}
elseif
type
(
parameter1
)
==
"table"
and
len
>
1
and
type
(
parameter1
[
1
])
==
"function"
and
(
type
(
parameter1
[
2
])
==
"nil"
or
type
(
parameter1
[
2
])
==
"function"
)
and
(
type
(
parameter1
[
2
])
~=
"function"
or
type
(
parameter3
)
==
"number"
)
then
target_list_total
=
{{
parameter1
,
...
}}
--3. {A,B,C},{{D,E,F}} OR {A,B,C},{D,E,F} OR {{A,B,C}},{D,E,F}, to {{A,B,C},{D,E,F}}
else
for
_
,
mix_parammeter
in
pairs
(
mix_list
)
do
--Debug.Message(#mix_parammeter[1])
if
rsof
.
Check_Boolean
(
mix_parammeter
[
0
],
true
)
then
for
idx
,
mix_parammeter2
in
pairs
(
mix_parammeter
)
do
if
idx
~=
0
then
...
...
@@ -1540,7 +1518,6 @@ function rsef.list(list_type_str,...)
end
end
else
mix_parammeter
[
2
]
=
mix_parammeter
[
2
]
or
""
table.insert
(
target_list_total
,
mix_parammeter
)
end
end
...
...
@@ -1596,7 +1573,7 @@ function rsop.target2(endfun,...)
return
rstg
.
target2
(
endfun
,
rsop
.
list
(
...
))
end
function
rsop
.
target3
(
checkfun
,
...
)
return
rstg
.
target
3
(
checkfun
,
rsop
.
list
(
...
))
return
rstg
.
target
2
(
checkfun
,
rsop
.
list
(
...
))
end
--Target function: Get target attributes
function
rstg
.
GetTargetAttribute
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
target_list
)
...
...
@@ -1872,12 +1849,12 @@ function rstg.TargetSelect(e,tp,eg,ep,ev,re,r,rp,target_list_total)
if
not
is_player
then
info_count
=
type
(
minct
)
==
"number"
and
minct
or
#
selected_group
end
if
aux
.
GetValueType
(
selected_group
)
~=
"Group"
or
category
==
CATEGORY_HANDES
then
if
aux
.
GetValueType
(
selected_group
)
~=
"Group"
then
if
(
type
(
loc_self
)
==
"number"
and
loc_self
>
0
)
and
(
type
(
loc_oppo
)
==
"number"
and
loc_oppo
>
0
)
then
info_player
=
PLAYER_ALL
elseif
(
type
(
loc_self
)
==
"number"
and
loc_self
>
0
)
and
(
type
(
loc_oppo
)
~=
"number"
or
loc_oppo
<=
0
)
then
info_player
=
tp
elseif
(
type
(
loc_self
)
~
=
"number"
or
loc_self
<=
0
)
and
(
type
(
loc_oppo
)
==
"number"
and
loc_oppo
>
0
)
then
elseif
(
type
(
loc_self
)
=
=
"number"
or
loc_self
<=
0
)
and
(
type
(
loc_oppo
)
==
"number"
and
loc_oppo
>
0
)
then
info_player
=
1
-
tp
end
end
...
...
@@ -3698,63 +3675,20 @@ function rssf.EnableSpecialProcedure_Op(e,tp)
aux
.
AddXyzProcedure
=
rscf
.
GetBaseXyzProduce1
aux
.
AddXyzProcedureLevelFree
=
rscf
.
GetBaseXyzProduce2
aux
.
AddLinkProcedure
=
rscf
.
GetBaseLinkProduce1
Card
.
RegisterEffect
=
rscf
.
RegisterEffect2
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTarget
(
rssf
.
EnableSpecialProcedure_Op_regop
)
e1
:
SetTargetRange
(
1
,
1
)
Duel
.
RegisterEffect
(
e1
,
0
)
for
tc
in
aux
.
Next
(
g
)
do
tc
:
IsSpecialSummonable
()
local
cid
=
tc
:
CopyEffect
(
tc
:
GetOriginalCode
(),
0
,
1
)
--Method ResetEffect/ReplaceEffect will cause issue at Raise Event
tc
:
ReplaceEffect
(
80316585
,
0
)
local
mt
=
getmetatable
(
tc
)
if
mt
.
initial_effect
then
mt
.
initial_effect
(
tc
)
end
end
aux
.
AddSynchroProcedure
=
f6
aux
.
AddSynchroMixProcedure
=
f7
aux
.
AddXyzProcedure
=
f8
aux
.
AddXyzProcedureLevelFree
=
f9
aux
.
AddLinkProcedure
=
f10
Card
.
RegisterEffect
=
rscf
.
RegisterEffect
e
:
Reset
()
end
function
rssf
.
EnableSpecialProcedure_Op_regop
(
e
,
c
,
tp
,
st
,
sp
,
stp
,
se
)
if
not
c
:
IsType
(
rscf
.
extype
)
then
return
false
end
rscf
.
ssproce
[
c
]
=
rscf
.
ssproce
[
c
]
or
{[
1
]
=
{},[
2
]
=
{}}
if
se
and
se
:
GetCode
()
==
EFFECT_SPSUMMON_PROC
and
not
rsof
.
Table_List
(
rscf
.
ssproce
[
c
][
1
],
se
)
then
c
:
RegisterFlagEffect
(
rscode
.
Special_Procedure
,
0
,
0
,
1
)
table.insert
(
rscf
.
ssproce
[
c
][
1
],
se
)
table.insert
(
rscf
.
ssproce
[
c
][
1
],
se
:
GetCondition
()
or
aux
.
TRUE
)
end
if
se
and
rscf
.
ssproce
[
se
]
then
return
false
end
return
se
and
se
:
GetCode
()
==
EFFECT_SPSUMMON_PROC
end
rscf
.
RegisterEffect
=
Card
.
RegisterEffect
function
rscf
.
RegisterEffect2
(
c
,
e
,
ignore
)
rscf
.
ssproce
[
c
]
=
rscf
.
ssproce
[
c
]
or
{[
1
]
=
{},[
2
]
=
{}}
if
e
:
GetCode
()
==
EFFECT_SPSUMMON_PROC
then
local
flag1
,
flag2
=
e
:
GetProperty
()
local
flag1_uc
=
flag1
if
flag1
&
EFFECT_FLAG_UNCOPYABLE
~=
0
then
flag1_uc
=
flag1
-
EFFECT_FLAG_UNCOPYABLE
end
e
:
SetProperty
(
flag1_uc
,
flag2
)
rscf
.
RegisterEffect
(
c
,
e
,
ignore
)
e
:
SetProperty
(
flag1
,
flag2
)
rscf
.
ssproce
[
e
]
=
true
table.insert
(
rscf
.
ssproce
[
c
][
2
],
e
)
table.insert
(
rscf
.
ssproce
[
c
][
2
],
e
:
GetCondition
()
or
aux
.
TRUE
)
end
return
end
function
rscf
.
SwitchSpecialProcedure_filter
(
c
)
return
c
:
GetFlagEffect
(
rscode
.
Special_Procedure
)
>
0
end
function
rssf
.
SwitchSpecialProcedure
(
dis_idx
,
enb_idx
)
end
function
rscf
.
GetBaseSynchroProduce1
(
c
,
f1
,
f2
,
minc
,
maxc
)
if
c
.
dark_synchro
==
true
then
...
...
expansions/script/c65010105.lua
View file @
1e8694aa
--白色相册
if
not
pcall
(
function
()
require
(
"expansions/script/c10199990"
)
end
)
then
require
(
"script/c10199990"
)
end
local
m
=
65010105
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
...
...
expansions/script/c9910628.lua
View file @
1e8694aa
...
...
@@ -9,7 +9,7 @@ function c9910628.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
9910628
)
e
3
:
SetCost
(
c9910628
.
thcost
)
e
1
:
SetCost
(
c9910628
.
thcost
)
e1
:
SetTarget
(
c9910628
.
thtg
)
e1
:
SetOperation
(
c9910628
.
thop
)
c
:
RegisterEffect
(
e1
)
...
...
expansions/script/c9980780_1.lua
deleted
100644 → 0
View file @
57555171
--欲望战士OOO·重力联组
function
c9980780
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCodeFun
(
c
,
9980777
,
c9980780
.
ffilter
,
1
,
true
,
true
)
--indes
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
c
:
RegisterEffect
(
e4
)
--damage val
local
e5
=
e3
:
Clone
()
e5
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
c
:
RegisterEffect
(
e5
)
--pos
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_SET_POSITION
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e4
:
SetTarget
(
c9980780
.
postg
)
e4
:
SetValue
(
POS_FACEUP_DEFENSE
)
c
:
RegisterEffect
(
e4
)
--disable
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCondition
(
c9980780
.
discon
)
e5
:
SetOperation
(
c9980780
.
disop
)
c
:
RegisterEffect
(
e5
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
9980780
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
9980780
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
c9980780
.
sptg
)
e1
:
SetOperation
(
c9980780
.
spop
)
c
:
RegisterEffect
(
e1
)
--spsummon bgm
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e8
:
SetOperation
(
c9980780
.
sumsuc
)
c
:
RegisterEffect
(
e8
)
local
e9
=
e8
:
Clone
()
e9
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e9
)
end
function
c9980780
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9980780
,
1
))
end
function
c9980780
.
ffilter
(
c
)
return
c
:
IsSetCard
(
0x3bcf
)
and
c
:
IsFusionAttribute
(
ATTRIBUTE_EARTH
)
end
function
c9980780
.
postg
(
e
,
c
)
return
c
:
IsFaceup
()
end
function
c9980780
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
loc
,
pos
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_POSITION
)
return
e
:
GetHandler
():
IsDefensePos
()
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
loc
==
LOCATION_MZONE
and
bit
.
band
(
pos
,
POS_DEFENSE
)
~=
0
and
rp
==
1
-
tp
end
function
c9980780
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
end
function
c9980780
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xabc1
)
and
not
c
:
IsCode
(
9980780
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c9980780
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c9980780
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c9980780
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c9980780
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c9980780
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c9980780
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c9980780
.
splimit
(
e
,
c
)
return
not
c
:
IsSetCard
(
0xabc1
)
end
expansions/script/c9981290_1.lua
deleted
100644 → 0
View file @
57555171
--骑士时刻-真王·逢魔形态
function
c9981290
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0xbca
),
5
)
c
:
EnableReviveLimit
()
--cannot release
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_UNRELEASABLE_SUM
)
e4
:
SetValue
(
1
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_UNRELEASABLE_NONSUM
)
c
:
RegisterEffect
(
e5
)
--immume
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetValue
(
c9981290
.
efilter
)
c
:
RegisterEffect
(
e4
)
--indes battle
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e5
:
SetValue
(
c9981290
.
indes
)
c
:
RegisterEffect
(
e5
)
--atk up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
9981290
,
1
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
9981290
)
e1
:
SetCondition
(
c9981290
.
atkcon
)
e1
:
SetCost
(
c9981290
.
atkcost
)
e1
:
SetOperation
(
c9981290
.
atkop
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981290
,
2
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e2
:
SetCountLimit
(
1
,
99812900
)
e2
:
SetCondition
(
aux
.
bdcon
)
e2
:
SetTarget
(
c9981290
.
destg
)
e2
:
SetOperation
(
c9981290
.
desop
)
c
:
RegisterEffect
(
e2
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981290
,
0
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c9981290
.
discon
)
e2
:
SetCost
(
c9981290
.
discost
)
e2
:
SetTarget
(
c9981290
.
distg
)
e2
:
SetOperation
(
c9981290
.
disop
)
c
:
RegisterEffect
(
e2
)
--spsummon bgm
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e8
:
SetOperation
(
c9981290
.
sumsuc
)
c
:
RegisterEffect
(
e8
)
local
e9
=
e8
:
Clone
()
e9
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e9
)
end
function
c9981290
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9981290
,
0
))
end
function
c9981290
.
chainlm
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c9981290
.
efilter
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
function
c9981290
.
indes
(
e
,
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_DARK
+
ATTRIBUTE_EARTH
+
ATTRIBUTE_WATER
+
ATTRIBUTE_FIRE
+
ATTRIBUTE_WIND
)
end
function
c9981290
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
return
Duel
.
IsChainNegatable
(
ev
)
end
function
c9981290
.
cfilter
(
c
,
g
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xbca
)
and
g
:
IsContains
(
c
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
end
function
c9981290
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c9981290
.
cfilter
,
1
,
nil
,
lg
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c9981290
.
cfilter
,
1
,
1
,
nil
,
lg
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
SetChainLimit
(
c9981290
.
chainlm
)
end
function
c9981290
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c9981290
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9981290
,
0
))
end
function
c9981290
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
and
(
ph
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()))
or
ph
==
PHASE_MAIN1
+
PHASE_MAIN2
end
function
c9981290
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
c
)
Duel
.
Release
(
g
,
REASON_COST
)
e
:
SetLabel
(
g
:
GetFirst
():
GetPreviousAttackOnField
())
Duel
.
SetChainLimit
(
c9981290
.
chainlm
)
end
function
c9981290
.
atkop
(
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
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetValue
(
e
:
GetLabel
())
c
:
RegisterEffect
(
e1
)
end
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9981290
,
0
))
end
function
c9981290
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
+
LOCATION_HAND
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
0
,
LOCATION_MZONE
+
LOCATION_HAND
)
Duel
.
SetChainLimit
(
c9981290
.
chainlm
)
end
function
c9981290
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
1
-
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
0
,
nil
,
TYPE_MONSTER
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g
:
Select
(
1
-
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg
)
if
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
~=
0
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsChainAttackable
()
then
Duel
.
ChainAttack
()
end
end
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9981290
,
0
))
end
\ No newline at end of file
expansions/script/c9981406_1.lua
deleted
100644 → 0
View file @
57555171
--真红眼黑刃龙-强袭形态
function
c9981406
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
nil
,
7
,
3
,
c9981406
.
ovfilter
,
aux
.
Stringid
(
9981406
,
0
))
c
:
EnableReviveLimit
()
--xyzlimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
9981406
,
1
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c9981406
.
descost
)
e1
:
SetTarget
(
c9981406
.
destg
)
e1
:
SetOperation
(
c9981406
.
desop
)
c
:
RegisterEffect
(
e1
)
--equip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
9981406
,
2
))
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c9981406
.
eqcon
)
e1
:
SetTarget
(
c9981406
.
eqtg
)
e1
:
SetOperation
(
c9981406
.
eqop
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981406
,
3
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCondition
(
c9981406
.
ngcon
)
e2
:
SetCost
(
c9981406
.
ngcost
)
e2
:
SetTarget
(
c9981406
.
ngtg
)
e2
:
SetOperation
(
c9981406
.
ngop
)
c
:
RegisterEffect
(
e2
)
end
function
c9981406
.
ovfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3b
)
and
c
:
IsLevel
(
4
,
7
)
end
function
c9981406
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c9981406
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
g
:
GetFirst
():
GetBaseAttack
())
end
function
c9981406
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Duel
.
Damage
(
1
-
tp
,
tc
:
GetBaseAttack
(),
REASON_EFFECT
)
end
end
function
c9981406
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
rp
==
1
-
tp
end
function
c9981406
.
eqfilter
(
c
,
tp
)
return
c
:
IsRace
(
RACE_WARRIOR
,
RACE_DRAGON
)
and
c
:
CheckUniqueOnField
(
tp
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsForbidden
()
end
function
c9981406
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c9981406
.
eqfilter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c9981406
.
eqfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c9981406
.
eqfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
g
,
1
,
0
,
0
)
end
function
c9981406
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Equip
(
tp
,
tc
,
c
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
c9981406
.
eqlimit
)
e1
:
SetLabelObject
(
c
)
tc
:
RegisterEffect
(
e1
)
--atkup
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetValue
(
2400
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c9981406
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
function
c9981406
.
ngcfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsOnField
()
end
function
c9981406
.
ngcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsExists
(
c9981406
.
ngcfilter
,
1
,
nil
,
tp
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c9981406
.
ngfilter
(
c
)
return
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c9981406
.
ngcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c9981406
.
ngfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c9981406
.
ngfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c9981406
.
ngtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c9981406
.
ngop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c9981407_1.lua
deleted
100644 → 0
View file @
57555171
--霸王眷龙-异色眼灵摆龙
function
c9981407
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--pendulum set/spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
9981407
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
2
,
9981407
)
e1
:
SetTarget
(
c9981407
.
rptg
)
e1
:
SetOperation
(
c9981407
.
rpop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981407
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e2
:
SetCost
(
c9981407
.
hspcost
)
e2
:
SetTarget
(
c9981407
.
hsptg
)
e2
:
SetOperation
(
c9981407
.
hspop
)
c
:
RegisterEffect
(
e2
)
--double damage
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CHANGE_BATTLE_DAMAGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
c9981407
.
damtg
)
e3
:
SetValue
(
aux
.
ChangeBattleDamage
(
1
,
DOUBLE_DAMAGE
))
c
:
RegisterEffect
(
e3
)
--fusion
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981407
,
4
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c9981407
.
sptg2
)
e2
:
SetOperation
(
c9981407
.
spop2
)
c
:
RegisterEffect
(
e2
)
--spsummon bgm
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e8
:
SetOperation
(
c9981407
.
sumsuc
)
c
:
RegisterEffect
(
e8
)
local
e9
=
e8
:
Clone
()
e9
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e9
)
end
function
c9981407
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9981407
,
5
))
end
function
c9981407
.
rpfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
16178681
,
9981407
)
and
(
not
c
:
IsForbidden
()
or
(
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)))
end
function
c9981407
.
rptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c9981407
.
rpfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
0
,
tp
,
LOCATION_DECK
)
end
function
c9981407
.
rpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
9981407
,
6
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c9981407
.
rpfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
==
0
then
return
end
local
tc
=
g
:
GetFirst
()
local
op
=
0
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
9981407
,
1
),
aux
.
Stringid
(
9981407
,
2
))
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
9981407
,
1
))
end
if
op
==
0
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
else
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
function
c9981407
.
rfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsSetCard
(
0x20f8
,
0x99
,
0x9f
,
0x98
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
end
function
c9981407
.
hspcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
rg
=
Duel
.
GetReleaseGroup
(
tp
):
Filter
(
c9981407
.
rfilter
,
nil
,
tp
)
if
chk
==
0
then
return
rg
:
CheckSubGroup
(
aux
.
mzctcheckrel
,
2
,
2
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
rg
:
SelectSubGroup
(
tp
,
aux
.
mzctcheckrel
,
false
,
2
,
2
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c9981407
.
hsptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c9981407
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c9981407
.
damtg
(
e
,
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
GetBattleTarget
()
~=
nil
end
function
c9981407
.
filter0
(
c
)
return
c
:
IsOnField
()
and
c
:
IsAbleToRemove
()
end
function
c9981407
.
filter1
(
c
,
e
)
return
c
:
IsOnField
()
and
not
c
:
IsImmuneToEffect
(
e
)
and
c
:
IsAbleToRemove
()
end
function
c9981407
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
c
:
IsRace
(
RACE_DRAGON
)
or
c
:
IsAttribute
(
ATTRIBUTE_DARK
))
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c9981407
.
filter3
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c9981407
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c9981407
.
filter0
,
nil
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c9981407
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c9981407
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c9981407
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
end
function
c9981407
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c9981407
.
filter1
,
nil
,
e
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c9981407
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c9981407
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg3
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c9981407
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
Remove
(
mat1
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
\ No newline at end of file
expansions/script/c9981408_1.lua
deleted
100644 → 0
View file @
57555171
--凶饿毒的捕食者
function
c9981408
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
9981408
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c9981408
.
cost
)
e1
:
SetTarget
(
c9981408
.
target
)
e1
:
SetOperation
(
c9981408
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c9981408
.
costfilter
(
c
,
tp
)
return
Duel
.
GetMZoneCount
(
tp
,
c
)
>
1
end
function
c9981408
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
1
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c9981408
.
costfilter
,
1
,
nil
,
tp
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c9981408
.
costfilter
,
1
,
1
,
nil
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c9981408
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x10f3
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c9981408
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
res
=
e
:
GetLabel
()
==
1
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
1
if
chk
==
0
then
e
:
SetLabel
(
0
)
return
res
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
Duel
.
IsExistingMatchingCard
(
c9981408
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
tp
,
LOCATION_DECK
)
end
function
c9981408
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c9981408
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
2
,
2
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
==
2
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
if
not
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c9981408
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c9981408
.
splimit
(
e
,
c
)
return
not
c
:
IsRace
(
RACE_DRAGON
+
RACE_PLANT
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
expansions/script/c9981409_1.lua
deleted
100644 → 0
View file @
57555171
--叛逆的幻影反抗军
function
c9981409
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
9981409
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c9981409
.
target
)
e1
:
SetOperation
(
c9981409
.
activate
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetDescription
(
aux
.
Stringid
(
9981409
,
0
))
e7
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e7
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e7
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e7
:
SetCode
(
EVENT_FREE_CHAIN
)
e7
:
SetRange
(
LOCATION_GRAVE
)
e7
:
SetCountLimit
(
1
,
9981409
)
e7
:
SetCost
(
aux
.
bfgcost
)
e7
:
SetTarget
(
c9981409
.
sptg
)
e7
:
SetOperation
(
c9981409
.
spop
)
c
:
RegisterEffect
(
e7
)
end
function
c9981409
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x10db
)
and
c
:
IsCanBeEffectTarget
(
e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c9981409
.
xyzfilter
(
c
,
mg
,
ct
)
return
c
:
IsXyzSummonable
(
mg
,
2
,
ct
)
end
function
c9981409
.
fgoal
(
sg
,
exg
)
return
aux
.
dncheck
(
sg
)
and
exg
:
IsExists
(
Card
.
IsXyzSummonable
,
1
,
nil
,
sg
,
#
sg
,
#
sg
)
end
function
c9981409
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
local
mg
=
Duel
.
GetMatchingGroup
(
c9981409
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
local
ct
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
exg
=
Duel
.
GetMatchingGroup
(
c9981409
.
xyzfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
mg
,
ct
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanSpecialSummonCount
(
tp
,
2
)
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
ct
>
1
and
mg
:
CheckSubGroup
(
c9981409
.
fgoal
,
2
,
ct
,
exg
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg1
=
mg
:
SelectSubGroup
(
tp
,
c9981409
.
fgoal
,
false
,
2
,
ct
,
exg
)
Duel
.
SetTargetCard
(
sg1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
sg1
,
sg1
:
GetCount
(),
0
,
0
)
end
function
c9981409
.
filter2
(
c
,
e
,
tp
)
return
c
:
IsRelateToEffect
(
e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c9981409
.
spfilter
(
c
,
mg
,
ct
)
return
c
:
IsXyzSummonable
(
mg
,
ct
,
ct
)
end
function
c9981409
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
c9981409
.
filter2
,
nil
,
e
,
tp
)
local
ct
=
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
xyzg
=
Duel
.
GetMatchingGroup
(
c9981409
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
g
,
ct
)
if
ct
>=
2
and
xyzg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
xyz
=
xyzg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
XyzSummon
(
tp
,
xyz
,
g
)
end
end
function
c9981409
.
spfilter2
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x10db
,
0x13b
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c9981409
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c9981409
.
spfilter2
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c9981409
.
spfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c9981409
.
spfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c9981409
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
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_LEAVE_FIELD_REDIRECT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_REDIRECT
)
e1
:
SetValue
(
LOCATION_REMOVED
)
tc
:
RegisterEffect
(
e1
,
true
)
end
end
expansions/script/c9981410_1.lua
deleted
100644 → 0
View file @
57555171
--幻影骑士团-暗叛逆超量龙-革命
function
c9981410
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x10db
),
3
,
3
)
c
:
EnableReviveLimit
()
--destroy all
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
9981410
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCondition
(
c9981410
.
descon
)
e1
:
SetTarget
(
c9981410
.
destg
)
e1
:
SetOperation
(
c9981410
.
desop
)
c
:
RegisterEffect
(
e1
)
--multi attack
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
9981410
,
0
))
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCondition
(
c9981410
.
atkcon
)
e4
:
SetCost
(
c9981410
.
atkcost
)
e4
:
SetTarget
(
c9981410
.
atktg
)
e4
:
SetOperation
(
c9981410
.
atkop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981410
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
c9981410
.
spcon
)
e2
:
SetTarget
(
c9981410
.
sptg
)
e2
:
SetOperation
(
c9981410
.
spop
)
c
:
RegisterEffect
(
e2
)
--spsummon bgm
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e8
:
SetOperation
(
c9981410
.
sumsuc
)
c
:
RegisterEffect
(
e8
)
local
e9
=
e8
:
Clone
()
e9
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e9
)
end
function
c9981410
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9981410
,
0
))
end
function
c9981410
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c9981410
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c9981410
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
function
c9981410
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsAbleToEnterBP
()
end
function
c9981410
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c9981410
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetEffectCount
(
EFFECT_EXTRA_ATTACK
)
==
0
end
end
function
c9981410
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e1
:
SetValue
(
2
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
function
c9981410
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c9981410
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelAbove
(
3
)
and
c
:
IsSetCard
(
0x10db
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c9981410
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c9981410
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c9981410
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
math.min
((
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)),
3
)
if
ft
<
1
then
return
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c9981410
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
ft
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTarget
(
c9981410
.
splimit
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c9981410
.
splimit
(
e
,
c
)
return
not
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
end
expansions/script/c9981411_1.lua
deleted
100644 → 0
View file @
57555171
--捕食植物融合龙-凶饿毒
function
c9981411
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
c9981411
.
ffilter
,
2
,
false
)
aux
.
AddContactFusionProcedure
(
c
,
Card
.
IsReleasable
,
LOCATION_MZONE
,
0
,
Duel
.
Release
,
REASON_COST
+
REASON_MATERIAL
)
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c9981411
.
splimit
)
c
:
RegisterEffect
(
e1
)
--copy effect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
9981411
,
0
))
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
c9981411
.
copycost
)
e3
:
SetTarget
(
c9981411
.
copytg
)
e3
:
SetOperation
(
c9981411
.
copyop
)
c
:
RegisterEffect
(
e3
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981411
,
1
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetCondition
(
c9981411
.
descon
)
e2
:
SetTarget
(
c9981411
.
destg
)
e2
:
SetOperation
(
c9981411
.
desop
)
c
:
RegisterEffect
(
e2
)
--spsummon bgm
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e8
:
SetOperation
(
c9981411
.
sumsuc
)
c
:
RegisterEffect
(
e8
)
local
e9
=
e8
:
Clone
()
e9
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e9
)
end
function
c9981411
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9981411
,
2
))
end
function
c9981411
.
ffilter
(
c
)
return
c
:
IsFusionAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsRace
(
RACE_PLANT
)
end
function
c9981411
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
function
c9981411
.
copycost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
41209827
)
==
0
end
e
:
GetHandler
():
RegisterFlagEffect
(
41209827
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c9981411
.
copyfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsType
(
TYPE_TOKEN
)
and
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_GRAVE
))
end
function
c9981411
.
copytg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
and
c9981411
.
copyfilter
(
chkc
)
and
chkc
~=
c
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c9981411
.
copyfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c9981411
.
copyfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
1
,
1
,
c
)
end
function
c9981411
.
copyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
(
tc
:
IsFaceup
()
or
tc
:
IsLocation
(
LOCATION_GRAVE
))
then
local
code
=
tc
:
GetOriginalCodeRule
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetValue
(
code
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
if
not
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
local
cid
=
c
:
CopyEffect
(
code
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
1
)
end
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
9981411
,
1
))
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e3
:
SetLabelObject
(
e1
)
e3
:
SetLabel
(
cid
)
e3
:
SetOperation
(
c9981411
.
rstop
)
c
:
RegisterEffect
(
e3
)
end
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_PIERCE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c9981411
.
rstop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
cid
=
e
:
GetLabel
()
if
cid
~=
0
then
c
:
ResetEffect
(
cid
,
RESET_COPY
)
end
local
e1
=
e
:
GetLabelObject
()
e1
:
Reset
()
Duel
.
HintSelection
(
Group
.
FromCards
(
c
))
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c9981411
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
and
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c9981411
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c9981411
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c9981412_1.lua
deleted
100644 → 0
View file @
57555171
--魂之灵摆
function
c9981412
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
9981412
,
0
))
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
9981412
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c9981412
.
cost1
)
e1
:
SetTarget
(
c9981412
.
target1
)
e1
:
SetOperation
(
c9981412
.
activate1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetDescription
(
aux
.
Stringid
(
9981412
,
1
))
e2
:
SetCost
(
c9981412
.
cost2
)
e2
:
SetTarget
(
c9981412
.
target2
)
e2
:
SetOperation
(
c9981412
.
activate2
)
c
:
RegisterEffect
(
e2
)
end
function
c9981412
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
)
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
,
nil
)
end
function
c9981412
.
thfilter1
(
c
)
return
c
:
IsSetCard
(
0x20f8
,
0x99
,
0x9f
,
0x98
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c9981412
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c9981412
.
thfilter1
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetClassCount
(
Card
.
GetCode
)
>=
2
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
2
,
tp
,
LOCATION_DECK
)
end
function
c9981412
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c9981412
.
thfilter1
,
tp
,
LOCATION_DECK
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
hg
=
g
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
2
,
2
)
if
hg
then
Duel
.
SendtoHand
(
hg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
hg
)
end
end
function
c9981412
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0x20f8
,
0x99
,
0x9f
,
0x98
)
and
c
:
IsDiscardable
()
end
function
c9981412
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c9981412
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
)
end
Duel
.
DiscardHand
(
tp
,
c9981412
.
costfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
,
nil
)
end
function
c9981412
.
thfilter2
(
c
)
return
c
:
IsSetCard
(
0x99
,
0xf2
)
and
not
c
:
IsCode
(
9981412
)
and
c
:
IsAbleToHand
()
end
function
c9981412
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c9981412
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetClassCount
(
Card
.
GetCode
)
>=
2
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
2
,
tp
,
LOCATION_DECK
)
end
function
c9981412
.
activate2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c9981412
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
hg
=
g
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
2
,
2
)
if
hg
then
Duel
.
SendtoHand
(
hg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
hg
)
end
end
expansions/script/c9981413_1.lua
deleted
100644 → 0
View file @
57555171
--霸王之融合
function
c9981413
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
9981413
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c9981413
.
target
)
e1
:
SetOperation
(
c9981413
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c9981413
.
filter0
(
c
)
return
c
:
IsOnField
()
and
c
:
IsAbleToRemove
()
end
function
c9981413
.
filter1
(
c
,
e
)
return
c
:
IsOnField
()
and
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c9981413
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsCode
(
13331639
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c9981413
.
filter3
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c9981413
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c9981413
.
filter0
,
nil
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c9981413
.
filter3
,
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c9981413
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c9981413
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
+
LOCATION_EXTRA
)
end
function
c9981413
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c9981413
.
filter1
,
nil
,
e
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c9981413
.
filter3
,
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c9981413
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg3
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c9981413
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
Remove
(
mat1
,
POS_FACEDOWN
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
expansions/script/c9981414_1.lua
deleted
100644 → 0
View file @
57555171
--霸王眷龙-异色眼绝零龙-灵摆-
function
c9981414
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981414
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCountLimit
(
1
,
9981414
)
e2
:
SetCost
(
c9981414
.
spcost
)
e2
:
SetTarget
(
c9981414
.
sptg
)
e2
:
SetOperation
(
c9981414
.
spop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981414
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e2
:
SetCost
(
c9981414
.
hspcost
)
e2
:
SetTarget
(
c9981414
.
hsptg
)
e2
:
SetOperation
(
c9981414
.
hspop
)
c
:
RegisterEffect
(
e2
)
--negate attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c9981414
.
condition
)
e2
:
SetCost
(
c9981414
.
cost
)
e2
:
SetOperation
(
c9981414
.
operation
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981414
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
99814140
)
e2
:
SetCondition
(
c9981414
.
spcon
)
e2
:
SetTarget
(
c9981414
.
sptg2
)
e2
:
SetOperation
(
c9981414
.
spop2
)
c
:
RegisterEffect
(
e2
)
--spsummon bgm
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e8
:
SetOperation
(
c9981414
.
sumsuc
)
c
:
RegisterEffect
(
e8
)
local
e9
=
e8
:
Clone
()
e9
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e9
)
end
function
c9981414
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9981414
,
0
))
end
function
c9981414
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c9981414
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x20f8
,
0x99
)
and
not
c
:
IsCode
(
9981414
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c9981414
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c9981414
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c9981414
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c9981414
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c9981414
.
rfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsSetCard
(
0x20f8
,
0x99
,
0x9f
,
0x98
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
end
function
c9981414
.
hspcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
rg
=
Duel
.
GetReleaseGroup
(
tp
):
Filter
(
c9981414
.
rfilter
,
nil
,
tp
)
if
chk
==
0
then
return
rg
:
CheckSubGroup
(
aux
.
mzctcheckrel
,
2
,
2
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
rg
:
SelectSubGroup
(
tp
,
aux
.
mzctcheckrel
,
false
,
2
,
2
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c9981414
.
hsptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c9981414
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c9981414
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
end
function
c9981414
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroupEx
(
tp
,
Card
.
IsSetCard
,
1
,
nil
,
0x20f8
,
0x99
,
0x9f
,
0x98
)
end
local
g
=
Duel
.
SelectReleaseGroupEx
(
tp
,
Card
.
IsSetCard
,
1
,
1
,
nil
,
0x20f8
,
0x99
,
0x9f
,
0x98
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c9981414
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
NegateAttack
()
then
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE_STEP
,
1
)
end
end
function
c9981414
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsSummonType
(
SUMMON_TYPE_PENDULUM
)
end
function
c9981414
.
spfilter2
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x20f8
,
0x99
)
and
not
c
:
IsCode
(
9981414
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
function
c9981414
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c9981414
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c9981414
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c9981414
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c9981415_1.lua
deleted
100644 → 0
View file @
57555171
--极速同调龙 幻透翼
function
c9981415
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsAttribute
,
ATTRIBUTE_WIND
),
1
)
c
:
EnableReviveLimit
()
--negate
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
9981415
,
0
))
e3
:
SetCategory
(
CATEGORY_DISABLE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
c9981415
.
target
)
e3
:
SetOperation
(
c9981415
.
operation
)
c
:
RegisterEffect
(
e3
)
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981415
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
9981415
)
e2
:
SetTarget
(
c9981415
.
thtg
)
e2
:
SetOperation
(
c9981415
.
thop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCondition
(
c9981415
.
thcon
)
c
:
RegisterEffect
(
e3
)
--spsummon bgm
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e8
:
SetOperation
(
c9981415
.
sumsuc
)
c
:
RegisterEffect
(
e8
)
local
e9
=
e8
:
Clone
()
e9
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e9
)
end
function
c9981415
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9981415
,
0
))
end
function
c9981415
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
aux
.
disfilter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
disfilter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
disfilter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
c9981415
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
((
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
())
or
tc
:
IsType
(
TYPE_TRAPMONSTER
))
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3
)
end
end
end
function
c9981415
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c9981415
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x16
)
and
c
:
IsAbleToHand
()
end
function
c9981415
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c9981415
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c9981415
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c9981415
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c9981416_1.lua
deleted
100644 → 0
View file @
57555171
--疾行加速
function
c9981416
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetOperation
(
c9981416
.
activate
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981416
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_HAND
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c9981416
.
spcon
)
e2
:
SetTarget
(
c9981416
.
sptg
)
e2
:
SetOperation
(
c9981416
.
spop
)
c
:
RegisterEffect
(
e2
)
--synchro summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9981416
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c9981416
.
sccon2
)
e2
:
SetTarget
(
c9981416
.
sctg2
)
e2
:
SetOperation
(
c9981416
.
scop2
)
c
:
RegisterEffect
(
e2
)
end
function
c9981416
.
thcfilter
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
end
function
c9981416
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
>
0
and
not
Duel
.
IsExistingMatchingCard
(
c9981416
.
thcfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c9981416
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x16
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c9981416
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c9981416
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
#
g
>
0
and
c9981416
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
9981416
,
2
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
function
c9981416
.
cfilter1
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c9981416
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c9981416
.
cfilter1
,
1
,
nil
,
1
-
tp
)
end
function
c9981416
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x16
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c9981416
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c9981416
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c9981416
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c9981416
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
function
c9981416
.
scfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x16
)
and
c
:
IsControler
(
tp
)
end
function
c9981416
.
sccon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c9981416
.
scfilter
,
1
,
nil
,
tp
)
end
function
c9981416
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
e
:
GetHandler
():
GetFlagEffect
(
9981416
)
>
0
then
return
false
end
local
mg
=
Duel
.
GetMatchingGroup
(
Card
.
IsSetCard
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
0x16
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
nil
,
mg
)
end
e
:
GetHandler
():
RegisterFlagEffect
(
9981416
,
RESET_CHAIN
,
0
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c9981416
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
mg
=
Duel
.
GetMatchingGroup
(
Card
.
IsSetCard
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
0x16
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
nil
,
mg
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
nil
,
mg
)
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