Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
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
Nguyễn Anh Kiệt
ygopro-222DIY-cards
Commits
2fd9e2d3
Commit
2fd9e2d3
authored
Aug 07, 2020
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
771088d4
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1607 additions
and
2881 deletions
+1607
-2881
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c11200034.lua
expansions/script/c11200034.lua
+1
-1
expansions/script/c16104200.lua
expansions/script/c16104200.lua
+117
-57
expansions/script/c16104202.lua
expansions/script/c16104202.lua
+42
-237
expansions/script/c16104204.lua
expansions/script/c16104204.lua
+20
-154
expansions/script/c16104206.lua
expansions/script/c16104206.lua
+83
-63
expansions/script/c16104208.lua
expansions/script/c16104208.lua
+20
-165
expansions/script/c16104210.lua
expansions/script/c16104210.lua
+34
-206
expansions/script/c16104212.lua
expansions/script/c16104212.lua
+9
-63
expansions/script/c16104214.lua
expansions/script/c16104214.lua
+49
-163
expansions/script/c16104216.lua
expansions/script/c16104216.lua
+18
-85
expansions/script/c16104218.lua
expansions/script/c16104218.lua
+17
-77
expansions/script/c16104220.lua
expansions/script/c16104220.lua
+46
-132
expansions/script/c16104224.lua
expansions/script/c16104224.lua
+13
-36
expansions/script/c16104226.lua
expansions/script/c16104226.lua
+31
-93
expansions/script/c16104228.lua
expansions/script/c16104228.lua
+15
-175
expansions/script/c16104230.lua
expansions/script/c16104230.lua
+26
-63
expansions/script/c16104232.lua
expansions/script/c16104232.lua
+56
-113
expansions/script/c16104234.lua
expansions/script/c16104234.lua
+30
-106
expansions/script/c16199990.lua
expansions/script/c16199990.lua
+899
-855
expansions/script/c16199991.lua
expansions/script/c16199991.lua
+51
-18
expansions/script/c16199992.lua
expansions/script/c16199992.lua
+30
-19
No files found.
expansions/222DIY.cdb
View file @
2fd9e2d3
No preview for this file type
expansions/script/c11200034.lua
View file @
2fd9e2d3
--赤口的土著神
--赤口的土著神
local
m
=
1120003
0
local
m
=
1120003
4
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
11200029
)
aux
.
AddCodeList
(
c
,
11200029
)
...
...
expansions/script/c16104200.lua
View file @
2fd9e2d3
--教团的普通骑士
--教团的普通骑士.
local
m
=
16104200
if
not
pcall
(
function
()
require
(
"expansions/script/c16199990"
)
end
)
then
require
(
"script/c16199990"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104200
,
"CHURCH_KNIGHT"
)
c16104200
.
rksetcode
=
"CHURCH_KNIGHT"
if
rsch
then
return
end
function
cm
.
initial_effect
(
c
)
rsch
=
cm
--double tribute
rscf
.
DefineSet
(
rsch
,
"CHURCH"
,
1
)
rscf
.
DefineSet
(
rsch
,
"CHURCH_KNIGHT"
,
2
)
function
rsch
.
GainEffect
(
c
,
code
)
local
e1
=
rsef
.
STO
(
c
,
EVENT_BATTLE_DESTROYING
,{
m
,
1
},
1
,
nil
,
EFFECT_FLAG_NO_TURN_RESET
,
cm
.
gecon
,
nil
,
nil
,
cm
.
geop
)
e1
:
SetLabel
(
code
)
return
e1
end
function
cm
.
gecon
(
e
,
tp
,
eg
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
:
GetPreviousRaceOnField
()
&
RACE_WARRIOR
==
0
end
function
cm
.
geop
(
e
,
tp
)
local
c
=
rscf
.
GetFaceUpSelf
(
e
)
if
not
c
then
return
end
c
:
RegisterFlagEffect
(
e
:
GetLabel
(),
rsreset
.
est
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
m
,
1
))
end
function
rsch
.
gaincon
(
code
)
return
function
(
e
)
return
e
:
GetHandler
():
GetFlagEffect
(
code
)
>
0
or
e
:
GetHandler
():
GetFlagEffect
(
code
+
100
)
>
0
end
end
function
rsch
.
SummonEffect
(
c
,
code
,
op
)
local
e1
=
rsef
.
SC
(
c
,
EVENT_SUMMON_SUCCESS
)
e1
:
RegisterSolve
(
cm
.
secon
,
nil
,
nil
,
cm
.
seop
(
code
,
op
))
return
e1
end
function
cm
.
secfilter
(
c
)
return
c
:
IsRace
(
RACE_WARRIOR
)
or
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
cm
.
secon
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
local
mat
=
c
:
GetMaterial
()
local
b1
=
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
and
mat
:
IsExists
(
cm
.
secfilter
,
1
,
nil
)
local
b2
=
not
mat
or
#
mat
==
0
return
b1
or
b2
end
function
cm
.
seop
(
code
,
op
)
return
function
(
e
,
...
)
rshint
.
Card
(
code
)
op
(
e
,
...
)
end
end
function
rsch
.
SummonEffect2
(
c
,
code
,
cate
,
flag
,
tg
,
op
)
local
e1
=
rsef
.
STO
(
c
,
EVENT_SUMMON_SUCCESS
,{
code
,
0
},
nil
,
cate
,
flag
,
cm
.
secon
,
nil
,
tg
,
op
)
return
e1
end
function
rsch
.
LimitFun
(
c
,
code
)
Duel
.
AddCustomActivityCounter
(
code
,
ACTIVITY_SPSUMMON
,
cm
.
lfct1
)
Duel
.
AddCustomActivityCounter
(
code
,
ACTIVITY_SUMMON
,
cm
.
lfct2
)
end
function
rsch
.
limitcost
(
code
,
cost2
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
code
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
and
Duel
.
GetCustomActivityCount
(
code
,
tp
,
ACTIVITY_SUMMON
)
==
0
and
(
not
cost2
or
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
))
end
e1
,
e2
=
rsef
.
FV_LIMIT_PLAYER
({
e
:
GetHandler
(),
tp
},
"sum,sp"
,
nil
,
cm
.
sltg
,{
1
,
0
},
nil
,
rsreset
.
pend
)
if
cost2
then
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
end
end
function
cm
.
lfct1
(
c
)
return
c
:
IsRace
(
RACE_WARRIOR
)
end
function
cm
.
lfct2
(
c
)
return
c
:
GetSummonLocation
()
~=
LOCATION_EXTRA
end
function
cm
.
sltg
(
e
,
c
)
if
c
:
IsLocation
(
LOCATION_EXTRA
)
then
return
true
end
return
not
c
:
IsRace
(
RACE_WARRIOR
)
end
function
rsch
.
BetrayFun
(
c
,
code
,
code_sum
)
aux
.
AddCodeList
(
c
,
code_sum
)
c
:
SetUniqueOnField
(
1
,
1
,
code
)
local
e1
=
rscf
.
SetSummonCondition
(
c
,
false
,
aux
.
FALSE
)
local
e2
=
rscf
.
SetSpecialSummonProduce
(
c
,
LOCATION_HAND
,
cm
.
bfcon
,
cm
.
bfop
)
e2
:
SetLabel
(
code_sum
)
return
e1
,
e2
end
function
cm
.
bfcon
(
e
,
c
,
tp
)
return
Duel
.
CheckReleaseGroup
(
tp
,
cm
.
bfcfilter
,
1
,
nil
,
tp
,
e
:
GetLabel
())
end
function
cm
.
bfcfilter
(
c
,
tp
,
code
)
return
c
:
IsCode
(
code
)
and
Duel
.
GetMZoneCount
(
tp
,
c
,
tp
)
>
0
end
function
cm
.
bfop
(
e
,
tp
)
local
rg
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
bfcfilter
,
1
,
1
,
nil
,
tp
,
e
:
GetLabel
())
Duel
.
Release
(
rg
,
REASON_COST
)
end
function
rsch
.
DoubleTriFun
(
c
,
tc
,
reset
,
filter
)
tc
=
tc
or
c
local
tg
=
aux
.
TargetBoolFunction
(
rsch
.
IsSet1
)
if
filter
then
tg
=
aux
.
TargetBoolFunction
(
filter
)
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DOUBLE_TRIBUTE
)
e1
:
SetCode
(
EFFECT_DOUBLE_TRIBUTE
)
e1
:
SetValue
(
cm
.
condition
)
if
reset
then
c
:
RegisterEffect
(
e1
)
e1
:
SetReset
(
reset
)
--to hand
end
local
e2
=
Effect
.
CreateEffect
(
c
)
e1
:
SetValue
(
tg
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
tc
:
RegisterEffect
(
e1
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
return
e1
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
end
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
--------------------------------------
return
c
:
GetAttack
()
<=
900
and
c
:
GetLevel
()
<=
3
and
c
:
IsRace
(
RACE_WARRIOR
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
function
cm
.
initial_effect
(
c
)
local
e1
=
rsef
.
STO
(
c
,
EVENT_SPSUMMON_SUCCESS
,{
m
,
0
},{
1
,
m
},
"sp"
,
"de,dsp"
,
nil
,
nil
,
rsop
.
target
(
cm
.
spfilter
,
"sp"
,
LOCATION_DECK
),
cm
.
spop
)
local
e3
=
rsef
.
RegisterClone
(
c
,
e1
,
"code"
,
EVENT_SUMMON_SUCCESS
)
local
e4
=
rsch
.
DoubleTriFun
(
c
)
end
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
spfilter
(
c
,
e
,
tp
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
return
c
:
IsRace
(
RACE_WARRIOR
)
and
c
:
IsAttackBelow
(
899
)
and
c
:
IsLevelBelow
(
3
)
and
rscf
.
spfilter2
()(
c
,
e
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
cm
.
spop
(
e
,
tp
)
function
cm
.
spop
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
rsop
.
SelectSpecialSummon
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,{},
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
e1
,
e2
=
rsef
.
FV_LIMIT_PLAYER
({
c
,
tp
},
"sum,sp"
,
nil
,
cm
.
tg
,{
1
,
0
},
nil
,
rsreset
.
pend
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
end
if
g
:
GetCount
()
>
0
then
function
cm
.
tg
(
e
,
c
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
c
:
IsCode
(
16104222
)
then
return
false
end
end
if
c
:
IsLocation
(
LOCATION_EXTRA
)
then
return
true
end
end
return
not
(
rsch
.
IsSet1
(
c
)
or
c
:
IsSetCard
(
0xccb
))
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTarget
(
cm
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
cm
.
condition
(
e
,
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
end
function
cm
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
or
not
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
or
c
:
IsSetCard
(
0xccb
)
or
c
:
IsCode
(
16104222
))
end
end
\ No newline at end of file
expansions/script/c16104202.lua
View file @
2fd9e2d3
This diff is collapsed.
Click to expand it.
expansions/script/c16104204.lua
View file @
2fd9e2d3
--教团的银骑士 莱特哈尔
--教团的银骑士 莱特哈尔
local
m
=
16104204
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104204
,
"CHURCH_KNIGHT"
)
c16104204
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
--summon success
local
e1
=
rsch
.
SummonEffect
(
c
,
m
,
cm
.
op
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e2
=
rsch
.
GainEffect
(
c
,
m
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
local
e3
=
rsef
.
SC
(
c
,
EVENT_BATTLE_START
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e3
:
RegisterSolve
(
rsch
.
gaincon
(
m
),
nil
,
nil
,
cm
.
desop
)
e1
:
SetOperation
(
cm
.
sumsuc
)
c
:
RegisterEffect
(
e1
)
local
e1_1
=
Effect
.
CreateEffect
(
c
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1_1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1_1
:
SetOperation
(
cm
.
sumsuc1
)
c
:
RegisterEffect
(
e1_1
)
--a d A
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e2
:
SetProperty
(
EFFECT_FLAG_NO_TURN_RESET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
cm
.
gacon
)
e2
:
SetTarget
(
cm
.
gatg
)
e2
:
SetOperation
(
cm
.
gaop
)
c
:
RegisterEffect
(
e2
)
--summon with 1 tribute
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_SUMMON_PROC
)
e4
:
SetCondition
(
cm
.
otcon
)
e4
:
SetOperation
(
cm
.
otop
)
e4
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e5
)
--summon with s/t
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e6
:
SetCode
(
EFFECT_ADD_EXTRA_TRIBUTE
)
e6
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e6
:
SetCondition
(
cm
.
otcon1
)
e6
:
SetTarget
(
cm
.
reltarget
)
e6
:
SetValue
(
POS_FACEUP_ATTACK
)
c
:
RegisterEffect
(
e6
)
end
end
function
cm
.
otcon1
(
e
)
function
cm
.
op
(
e
,
tp
)
return
Duel
.
IsEnvironment
(
16104206
,
e
:
GetOwnerPlayer
(),
LOCATION_FZONE
)
end
function
cm
.
reltarget
(
e
,
c
)
return
c
:
IsFaceup
()
and
(
c
:
IsType
(
TYPE_CONTINUOUS
)
or
c
:
IsType
(
TYPE_EQUIP
))
end
function
cm
.
otfilter
(
c
)
return
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
cm
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
and
Duel
.
IsEnvironment
(
16104206
,
e
:
GetOwnerPlayer
(),
LOCATION_FZONE
)
end
function
cm
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
otfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
cm
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
GetMaterial
():
IsExists
(
cm
.
adfilter
,
1
,
nil
)
or
not
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
then
rsef
.
SV_IMMUNE_EFFECT
(
c
,
cm
.
imval
,
nil
,
rsreset
.
est_pend
)
local
e4
=
Effect
.
CreateEffect
(
c
)
end
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
function
cm
.
imval
(
e
,
re
)
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e4
:
SetValue
(
cm
.
val
)
e4
:
SetOwnerPlayer
(
tp
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e4
)
end
if
e
:
GetHandler
():
GetFlagEffect
(
16104206
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_START
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
sumsuc1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetHandler
():
GetFlagEffect
(
16104220
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_START
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
adfilter
(
c
)
return
c
:
IsRace
(
RACE_WARRIOR
)
or
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
)
end
function
cm
.
val
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsRace
(
RACE_WARRIOR
)
return
not
re
:
GetHandler
():
IsRace
(
RACE_WARRIOR
)
end
end
function
cm
.
gacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
desop
(
e
,
tp
)
local
des
=
eg
:
GetFirst
()
local
rc
=
des
:
GetReasonCard
()
return
(
not
des
:
IsRace
(
RACE_WARRIOR
))
and
rc
:
IsRelateToBattle
()
and
rc
==
e
:
GetHandler
()
end
function
cm
.
gatg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
end
function
cm
.
gaop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_START
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e3
,
true
)
end
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetAttacker
()
if
tc
==
c
then
tc
=
Duel
.
GetAttackTarget
()
end
if
chk
==
0
then
return
tc
and
tc
:
IsFaceup
()
and
not
tc
:
IsRace
(
RACE_WARRIOR
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
0
,
0
)
if
e
:
IsHasType
(
EFFECT_TYPE_TRIGGER_O
)
then
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetAttacker
()
local
bc
=
c
:
GetBattleTarget
()
if
tc
==
c
then
tc
=
Duel
.
GetAttackTarget
()
end
if
bc
:
IsFacedown
()
or
not
bc
:
IsRace
(
RACE_WARRIOR
)
then
if
tc
:
IsRelateToBattle
()
then
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
rshint
.
Card
(
m
)
local
LP1
=
Duel
.
GetLP
(
1
-
tp
)
if
Duel
.
Destroy
(
bc
,
REASON_EFFECT
)
>
0
then
if
tc
:
GetTextAttack
()
>
LP1
then
Duel
.
SetLP
(
1
-
tp
,
0
)
end
local
atk
=
bc
:
GetBaseAttack
()
Duel
.
SetLP
(
1
-
tp
,
LP1
-
tc
:
GetTextAttack
())
end
if
atk
>
0
then
Duel
.
Damage
(
1
-
tp
,
atk
,
REASON_EFFECT
)
end
end
end
end
end
end
\ No newline at end of file
expansions/script/c16104206.lua
View file @
2fd9e2d3
--不灭的圣光教团国
--不灭的圣光教团国
local
m
=
16104206
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104206
,
"CHURCH"
)
c16104206
.
rksetcode
=
"CHURCH"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
rsef
.
ACT
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e2
,
e3
,
e4
=
rsef
.
FV_CANNOT_DISABLE
(
c
,
"sum,sp,fp"
,
nil
,
aux
.
TargetBoolFunction
(
rsch
.
IsSet1
),{
LOCATION_MZONE
,
0
})
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
local
e11
=
rsef
.
QO
(
c
,
nil
,{
m
,
1
},
1
,
"sum"
,
nil
,
LOCATION_FZONE
,
nil
,
nil
,
rsop
.
target
(
cm
.
sumfilter
,
"sum"
,
LOCATION_HAND
),
cm
.
sumop
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
local
e5
=
Effect
.
CreateEffect
(
c
)
c
:
RegisterEffect
(
e0
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
--cannot Disable Sum
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_SUMMON_PROC
)
e3
:
SetCode
(
EFFECT_CANNOT_DISABLE_SUMMON
)
e5
:
SetCondition
(
cm
.
advcon
)
e3
:
SetRange
(
LOCATION_FZONE
)
e5
:
SetOperation
(
cm
.
advop
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_RANGE
+
EFFECT_FLAG_SET_AVAILABLE
)
e5
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
ischurch
))
local
e6
=
Effect
.
CreateEffect
(
c
)
c
:
RegisterEffect
(
e3
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e6
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e6
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e2
:
SetCode
(
EFFECT_CANNOT_DISABLE_SPSUMMON
)
e6
:
SetTarget
(
cm
.
advtg
)
e2
:
SetRange
(
LOCATION_FZONE
)
e6
:
SetLabelObject
(
e5
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_RANGE
+
EFFECT_FLAG_SET_AVAILABLE
)
c
:
RegisterEffect
(
e6
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
ischurch
))
local
e7
=
Effect
.
CreateEffect
(
c
)
c
:
RegisterEffect
(
e2
)
e7
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
local
e1
=
Effect
.
CreateEffect
(
c
)
e7
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_DISABLE_FLIP_SUMMON
)
e7
:
SetCode
(
EFFECT_SET_PROC
)
e1
:
SetRange
(
LOCATION_FZONE
)
e7
:
SetCondition
(
cm
.
advcon
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_RANGE
+
EFFECT_FLAG_SET_AVAILABLE
)
e7
:
SetOperation
(
cm
.
advop
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
ischurch
))
e7
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e1
)
local
e8
=
Effect
.
CreateEffect
(
c
)
--Summon
e8
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e8
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e8
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e4
:
SetCategory
(
CATEGORY_SUMMON
)
e8
:
SetTarget
(
cm
.
advtg
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e8
:
SetLabelObject
(
e7
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e8
)
e4
:
SetRange
(
LOCATION_FZONE
)
local
e9
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCountLimit
(
1
)
e9
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetTarget
(
cm
.
sumtg
)
e9
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e4
:
SetOperation
(
cm
.
sumop
)
e9
:
SetCode
(
EFFECT_ADD_EXTRA_TRIBUTE
)
c
:
RegisterEffect
(
e4
)
e9
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
0
)
e9
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsType
,
TYPE_CONTINUOUS
+
TYPE_EQUIP
))
e9
:
SetValue
(
POS_FACEUP_ATTACK
)
e9
:
SetCondition
(
cm
.
excon
)
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e10
:
SetRange
(
LOCATION_FZONE
)
e10
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e10
:
SetTarget
(
cm
.
advtg
)
e10
:
SetLabelObject
(
e9
)
c
:
RegisterEffect
(
e10
)
end
end
function
cm
.
filter
(
c
)
function
cm
.
excon
(
e
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
c
:
IsSummonable
(
true
,
nil
)
return
not
cm
.
check_s
end
end
function
Card
.
ischurch
(
c
)
function
cm
.
advtg
(
e
,
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
return
rsch
.
IsSet2
(
c
)
and
c
:
IsLevelAbove
(
7
)
end
end
function
cm
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
otfilter
(
c
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
return
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
end
end
function
cm
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
advcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
otfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
cm
.
check_s
=
true
local
res
=
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
cm
.
check_s
=
false
return
res
end
function
cm
.
advop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
cm
.
check_s
=
true
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
otfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
1
,
1
,
mg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
cm
.
check_s
=
false
end
function
cm
.
sumfilter
(
c
,
e
,
tp
)
return
rsch
.
IsSet1
(
c
)
and
c
:
IsSummonable
(
true
,
nil
)
end
function
cm
.
sumop
(
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
sumfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
g
:
GetCount
()
<=
0
then
return
end
if
tc
then
local
sc
=
g
:
GetFirst
()
local
code
=
tc
:
GetOriginalCodeRule
()
if
sc
.
rksetcode
==
"CHURCH_KNIGHT"
and
sc
:
GetOriginalLevel
()
>=
6
then
tc
:
RegisterFlagEffect
(
code
+
100
,
rsreset
.
est
-
RESET_TOFIELD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
16104200
,
2
))
sc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
)
sc
:
RegisterEffect
(
e3
,
true
)
end
end
Duel
.
Summon
(
tp
,
sc
,
true
,
nil
)
end
end
\ No newline at end of file
expansions/script/c16104208.lua
View file @
2fd9e2d3
--教团的苍骑士 IO
--教团的苍骑士 IO
local
m
=
16104208
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104208
,
"CHURCH_KNIGHT"
)
c16104208
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
--summon success
local
e1
=
rsch
.
SummonEffect2
(
c
,
m
,
"tg"
,
nil
,
rsop
.
target
(
cm
.
tgfilter
,
"tg"
,
LOCATION_MZONE
,
LOCATION_MZONE
,
true
),
cm
.
op
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e2
=
rsch
.
GainEffect
(
c
,
m
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
local
e3
=
rsef
.
QO
(
c
,
nil
,{
m
,
1
},
1
,
"des"
,
"tg"
,
LOCATION_MZONE
,
rsch
.
gaincon
(
m
),
nil
,
rstg
.
target2
(
cm
.
fun
,
cm
.
cfilter
,
nil
,
LOCATION_MZONE
,
LOCATION_MZONE
),
cm
.
desop
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCondition
(
cm
.
sucon
)
e1
:
SetOperation
(
cm
.
sumsuc
)
c
:
RegisterEffect
(
e1
)
local
e1_1
=
Effect
.
CreateEffect
(
c
)
e1_1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1_1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1_1
:
SetOperation
(
cm
.
sumsuc1
)
c
:
RegisterEffect
(
e1_1
)
--a d A
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e2
:
SetProperty
(
EFFECT_FLAG_NO_TURN_RESET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
cm
.
gacon
)
e2
:
SetTarget
(
cm
.
gatg
)
e2
:
SetOperation
(
cm
.
gaop
)
c
:
RegisterEffect
(
e2
)
--summon with 1 tribute
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
4
))
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_SUMMON_PROC
)
e4
:
SetCondition
(
cm
.
otcon
)
e4
:
SetOperation
(
cm
.
otop
)
e4
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e5
)
--summon with s/t
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e6
:
SetCode
(
EFFECT_ADD_EXTRA_TRIBUTE
)
e6
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e6
:
SetCondition
(
cm
.
otcon1
)
e6
:
SetTarget
(
cm
.
reltarget
)
e6
:
SetValue
(
POS_FACEUP_ATTACK
)
c
:
RegisterEffect
(
e6
)
end
end
function
cm
.
otcon1
(
e
)
function
cm
.
tgfilter
(
c
)
return
Duel
.
IsEnvironment
(
16104206
,
e
:
GetOwnerPlayer
(),
LOCATION_FZONE
)
return
c
:
IsAbleToGrave
()
and
(
c
:
IsFacedown
()
or
not
c
:
IsRace
(
RACE_WARRIOR
)
)
end
end
function
cm
.
reltarget
(
e
,
c
)
function
cm
.
op
(
e
,
tp
)
return
c
:
IsFaceup
()
and
(
c
:
IsType
(
TYPE_CONTINUOUS
)
or
c
:
IsType
(
TYPE_EQUIP
))
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
tgfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
cm
.
otfilter
(
c
)
function
cm
.
fun
(
g
,
e
,
tp
)
return
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
local
tg
=
g
:
GetFirst
():
GetColumnGroup
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tg
,
#
tg
,
0
,
0
)
end
end
function
cm
.
otcon
(
e
,
c
,
minc
)
function
cm
.
cfilter
(
c
)
if
c
==
nil
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_WARRIOR
)
and
c
:
GetColumnGroupCount
()
>
0
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
and
Duel
.
IsEnvironment
(
16104206
,
e
:
GetOwnerPlayer
(),
LOCATION_FZONE
)
end
end
function
cm
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
cm
.
desop
(
e
,
tp
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
otfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
tc
=
rscf
.
GetTargetCard
()
c
:
SetMaterial
(
sg
)
if
not
tc
then
return
end
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
local
dg
=
tc
:
GetColumnGroup
()
end
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
function
cm
.
des
(
c
)
return
not
c
:
IsRace
(
RACE_WARRIOR
)
end
function
cm
.
sucon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetMaterial
():
IsExists
(
cm
.
adfilter
,
1
,
nil
)
or
not
e
:
GetHandler
():
GetMaterial
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
cm
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
des
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
if
e
:
GetHandler
():
GetFlagEffect
(
16104206
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetTarget
(
cm
.
dstg
)
e1
:
SetOperation
(
cm
.
dsop
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
sumsuc1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetHandler
():
GetFlagEffect
(
16104220
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetTarget
(
cm
.
dstg
)
e1
:
SetOperation
(
cm
.
dsop
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
adfilter
(
c
)
return
c
:
IsRace
(
RACE_WARRIOR
)
or
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
)
end
function
cm
.
gacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
des
=
eg
:
GetFirst
()
local
rc
=
des
:
GetReasonCard
()
return
(
not
des
:
IsRace
(
RACE_WARRIOR
))
and
rc
:
IsRelateToBattle
()
and
rc
==
e
:
GetHandler
()
end
function
cm
.
gatg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
end
function
cm
.
gaop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetTarget
(
cm
.
dstg
)
e1
:
SetOperation
(
cm
.
dsop
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e3
,
true
)
end
end
function
cm
.
filter1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_WARRIOR
)
end
function
cm
.
desfilter
(
c
,
g
)
return
g
:
IsContains
(
c
)
end
function
cm
.
dstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
filter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELECT
)
Duel
.
SelectTarget
(
tp
,
cm
.
filter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_MZONE
)
end
function
cm
.
dsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
sc
=
Duel
.
GetFirstTarget
()
local
cg
=
sc
:
GetColumnGroup
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
sc
,
cg
)
if
sc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
\ No newline at end of file
expansions/script/c16104210.lua
View file @
2fd9e2d3
--教团的翼骑士 韦因
--教团的翼骑士 韦因
local
m
=
16104210
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104210
,
"CHURCH_KNIGHT"
)
c16104210
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
--hand
rsch
.
LimitFun
(
c
,
m
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
rsch
.
GainEffect
(
c
,
m
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
local
e2
=
rsef
.
QO
(
c
,
nil
,{
m
,
0
},
nil
,
nil
,
nil
,
LOCATION_HAND
,
nil
,
rsch
.
limitcost
(
m
,
rscost
.
cost
(
Card
.
IsDiscardable
,
"dish"
)),
rsop
.
target
(
cm
.
cfilter
,
nil
,
LOCATION_HAND
,
0
,
1
,
1
,
c
),
cm
.
sumop
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
local
e3
=
rsef
.
QO
(
c
,
nil
,{
m
,
1
},
nil
,
"dr,tg"
,
nil
,
LOCATION_HAND
,
nil
,
rsch
.
limitcost
(
m
,
rscost
.
cost
(
0
,
"dish"
)),
rsop
.
target
(
1
,
"dr"
),
cm
.
drop
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
local
e4
=
rsef
.
QO
(
c
,
nil
,{
m
,
2
},
1
,
"rm"
,
nil
,
LOCATION_MZONE
,
rsch
.
gaincon
(
m
),
nil
,
rsop
.
target
(
Card
.
IsAbleToRemove
,
"rm"
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
),
cm
.
rmop
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
cm
.
sprcost
)
e1
:
SetTarget
(
cm
.
sprtg
)
e1
:
SetOperation
(
cm
.
sprop
)
c
:
RegisterEffect
(
e1
)
--hand
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_DRAW
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetRange
(
LOCATION_HAND
)
e4
:
SetCost
(
cm
.
sprcost
)
e4
:
SetTarget
(
cm
.
sprtg1
)
e4
:
SetOperation
(
cm
.
sprop1
)
c
:
RegisterEffect
(
e4
)
--a d A
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e2
:
SetProperty
(
EFFECT_FLAG_NO_TURN_RESET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
cm
.
gacon
)
e2
:
SetTarget
(
cm
.
gatg
)
e2
:
SetOperation
(
cm
.
gaop
)
c
:
RegisterEffect
(
e2
)
--summon success
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e0
:
SetOperation
(
cm
.
sumsuc
)
c
:
RegisterEffect
(
e0
)
local
e0_1
=
Effect
.
CreateEffect
(
c
)
e0_1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e0_1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e0_1
:
SetOperation
(
cm
.
sumsuc1
)
c
:
RegisterEffect
(
e0_1
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter1
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SUMMON
,
cm
.
counterfilter
)
end
function
cm
.
counterfilter
(
c
)
return
c
:
IsRace
(
RACE_WARRIOR
)
end
function
cm
.
counterfilter1
(
c
)
return
c
:
GetSummonLocation
()
~=
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_WARRIOR
)
end
function
cm
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetHandler
():
GetFlagEffect
(
16104206
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetTarget
(
cm
.
eqtg
)
e1
:
SetOperation
(
cm
.
eqop
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
sumsuc1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetHandler
():
GetFlagEffect
(
16104220
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetTarget
(
cm
.
eqtg
)
e1
:
SetOperation
(
cm
.
eqop
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
filter
(
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
c
:
GetLevel
()
>=
5
end
function
cm
.
filter1
(
c
)
return
c
:
IsAbleToGrave
()
end
end
function
cm
.
sprcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
cfilter
(
c
)
local
c
=
e
:
GetHandler
()
return
rsch
.
IsSet1
(
c
)
and
c
:
IsLevelAbove
(
5
)
and
not
c
:
IsPublic
()
if
chk
==
0
then
return
c
:
IsDiscardable
()
and
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
and
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_SUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
or
not
c
:
IsRace
(
RACE_WARRIOR
)
end
end
function
cm
.
sprtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
sumop
(
e
,
tp
)
if
chk
==
0
then
rsop
.
SelectSolve
(
HINTMSG_SELF
,
tp
,
cm
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
cm
.
solvefun
,
e
,
tp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
end
end
function
cm
.
sprop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
solvefun
(
g
,
e
,
tp
)
if
not
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
then
return
end
Duel
.
HintSelection
(
g
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
4
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
then
local
c
=
e
:
GetHandler
()
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
Duel
.
ShuffleHand
(
tp
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_PUBLIC
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetReset
(
rsreset
.
pend
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
tc
:
RegisterEffect
(
e1
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_SUMMON_PROC
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCondition
(
cm
.
ntcon
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EFFECT_SUMMON_PROC
)
tc
:
RegisterEffect
(
e1
)
e2
:
SetReset
(
rsreset
.
pend
)
end
e2
:
SetCondition
(
cm
.
ntcon
)
end
tc
:
RegisterEffect
(
e2
)
function
cm
.
sprtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
true
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
end
function
cm
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
and
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
end
function
cm
.
filter3
(
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
end
function
cm
.
sprop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
==
2
then
if
Duel
.
IsExistingMatchingCard
(
cm
.
filter3
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
else
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
function
cm
.
ntcon
(
e
,
c
,
minc
)
function
cm
.
ntcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
return
minc
==
0
and
c
:
IsLevelAbove
(
5
)
and
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
return
minc
==
0
and
c
:
IsLevelAbove
(
5
)
and
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
end
end
function
cm
.
gacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drop
(
e
,
tp
)
local
des
=
eg
:
GetFirst
()
if
Duel
.
Draw
(
tp
,
2
,
REASON_EFFECT
)
>
0
then
local
rc
=
des
:
GetReasonCard
()
rsop
.
SelectToGrave
(
tp
,
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,{})
return
(
not
des
:
IsRace
(
RACE_WARRIOR
))
and
rc
:
IsRelateToBattle
()
and
rc
==
e
:
GetHandler
()
end
function
cm
.
gatg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
end
function
cm
.
gaop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetTarget
(
cm
.
eqtg
)
e1
:
SetOperation
(
cm
.
eqop
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e3
,
true
)
end
end
end
end
function
cm
.
filter1
(
c
)
function
cm
.
rmop
(
e
,
tp
)
return
c
:
IsAbleToRemove
()
local
ct
,
og
,
tc
=
rsop
.
SelectRemove
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,{})
end
if
tc
and
tc
:
IsLocation
(
LOCATION_REMOVED
)
then
function
cm
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
rsef
.
SV_LIMIT
({
e
:
GetHandler
(),
tc
},
"tri"
,
nil
,
nil
,
rsreset
.
est
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
)
end
function
cm
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
):
GetFirst
()
if
tc
and
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_REMOVE
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
\ No newline at end of file
expansions/script/c16104212.lua
View file @
2fd9e2d3
--教团的圣旗手 迪萨贝尔
--教团的圣旗手 迪萨贝尔
local
m
=
16104212
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104212
,
"CHURCH"
)
c16104212
.
rksetcode
=
"CHURCH"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
--summon success
rsch
.
LimitFun
(
c
,
m
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
rsef
.
STO
(
c
,
EVENT_SUMMON_SUCCESS
,{
m
,
0
},
nil
,
"se,th"
,
"de,dsp"
,
nil
,
rsch
.
limitcost
(
m
),
rsop
.
target
(
cm
.
thfilter
,
"th"
,
LOCATION_DECK
),
cm
.
thop
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
local
e2
=
rsef
.
RegisterClone
(
c
,
e1
,
"code"
,
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
local
e3
=
rsch
.
DoubleTriFun
(
c
,
nil
,
nil
,
rsch
.
IsSet2
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e1
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
--double tribute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DOUBLE_TRIBUTE
)
e2
:
SetValue
(
cm
.
condition
)
c
:
RegisterEffect
(
e2
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SUMMON
,
cm
.
counterfilter
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter1
)
end
function
cm
.
counterfilter
(
c
)
return
c
:
IsRace
(
RACE_WARRIOR
)
end
function
cm
.
counterfilter1
(
c
)
return
c
:
GetSummonLocation
()
~=
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_WARRIOR
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
cm
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
or
not
c
:
IsRace
(
RACE_WARRIOR
)
end
end
function
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
c
:
IsAbleToHand
()
return
rsch
.
IsSet1
(
c
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
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
end
function
cm
.
condition
(
e
,
c
)
function
cm
.
thop
(
e
,
tp
)
r
eturn
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
r
sop
.
SelectToHand
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,{}
)
end
end
\ No newline at end of file
expansions/script/c16104214.lua
View file @
2fd9e2d3
--叛教的掠夺骑士 IO
--叛教的掠夺骑士 IO
local
m
=
16104214
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104214
,
"CHURCH_KNIGHT"
)
c16104214
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
16104208
)
local
e1
,
e2
=
rsch
.
BetrayFun
(
c
,
m
,
16104208
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
local
e3
=
rsef
.
SV_CANNOT_BE_TARGET
(
c
,
"effect"
,
aux
.
tgoval
)
--spsummon condition
local
e4
=
rsef
.
QO
(
c
,
nil
,{
m
,
0
},
1
,
"atk,def,dis"
,
"tg"
,
LOCATION_MZONE
,
nil
,
nil
,
rstg
.
target
(
Card
.
IsFaceup
,
nil
,
0
,
LOCATION_MZONE
),
cm
.
op
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetValue
(
cm
.
splimit
)
c
:
RegisterEffect
(
e0
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e4
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetRange
(
LOCATION_HAND
)
e4
:
SetCondition
(
cm
.
sprcon
)
e4
:
SetOperation
(
cm
.
sprop
)
c
:
RegisterEffect
(
e4
)
--indes
--local e1=Effect.CreateEffect(c)
--e1:SetType(EFFECT_TYPE_SINGLE)
--e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
--e1:SetRange(LOCATION_MZONE)
--e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
--e1:SetValue(1)
--c:RegisterEffect(e1)
--cannot target
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e2
)
--disef and gain
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetCategory
(
CATEGORY_DISABLE
+
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
cm
.
distg
)
e3
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e3
)
end
end
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
function
cm
.
op
(
e
,
tp
)
return
se
:
GetHandler
():
IsCode
(
16104226
)
end
function
cm
.
spzfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
16104208
)
and
c
:
IsReleasable
()
and
(
ft
>
0
or
c
:
GetSequence
()
<
5
)
end
function
cm
.
sprcon
(
e
,
c
,
tp
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
spzfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
ft
)
end
function
cm
.
sprop
(
e
,
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spzfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
cm
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
not
(
c
:
IsDisabled
()
and
c
:
GetAttack
()
==
0
and
c
:
GetDefense
()
==
0
)
end
function
cm
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
filter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter1
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELECT
)
Duel
.
SelectTarget
(
tp
,
cm
.
filter1
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
nil
,
1
,
tp
,
LOCATION_MZONE
)
end
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
rscf
.
GetTargetCard
(
Card
.
IsFaceup
)
if
tc
:
IsRelateToEffect
(
e
)
then
if
not
tc
then
return
end
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
b1
=
true
local
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
),
aux
.
Stringid
(
m
,
3
))
local
b2
=
rscf
.
GetFaceUpSelf
(
e
)
and
not
tc
:
IsType
(
TYPE_TOKEN
)
if
op
==
0
then
local
b3
=
b2
and
tc
:
IsType
(
TYPE_EFFECT
)
local
e5
=
Effect
.
CreateEffect
(
c
)
local
op
=
rsop
.
SelectOption
(
tp
,
b1
,{
m
,
1
},
b2
,{
m
,
2
},
b3
,{
m
,
3
})
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
if
op
==
1
then
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e1
,
e2
=
rscf
.
QuickBuff
({
c
,
tc
},
"atkf,deff"
,
0
,
"atk~"
)
e5
:
SetCode
(
EFFECT_SET_ATTACK
)
if
rscf
.
GetFaceUpSelf
(
e
)
then
e5
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
local
e3
,
e4
=
rscf
.
QuickBuff
(
c
,
"atk+,def+"
,{
tc
:
GetBaseAttack
(),
tc
:
GetBaseDefense
()})
e5
:
SetValue
(
0
)
end
tc
:
RegisterEffect
(
e5
)
else
local
e4
=
Effect
.
CreateEffect
(
c
)
local
code
=
tc
:
GetOriginalCodeRule
()
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_SET_DEFENSE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e4
:
SetValue
(
0
)
e1
:
SetValue
(
code
)
tc
:
RegisterEffect
(
e4
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
2
)
local
e6
=
Effect
.
CreateEffect
(
c
)
c
:
RegisterEffect
(
e1
)
e6
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
if
not
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
cid
=
c
:
CopyEffect
(
code
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
2
)
e6
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e6
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e6
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetValue
(
tc
:
GetTextAttack
())
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
4
))
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
2
)
e3
:
SetValue
(
tc
:
GetTextDefense
())
e3
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e3
)
e3
:
SetLabel
(
cid
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetOperation
(
cm
.
rstop
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
c
:
RegisterEffect
(
e3
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
4
))
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
c
:
RegisterEffect
(
e2
,
true
)
end
end
if
op
==
1
then
if
op
==
3
then
local
code
=
tc
:
GetOriginalCodeRule
()
local
e1
=
rscf
.
QuickBuff
({
c
,
tc
},
"dis,dise,tri~"
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_ADD_CODE
)
e1
:
SetValue
(
code
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
,
2
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
,
2
)
c
:
RegisterEffect
(
e2
,
true
)
if
not
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
local
cid
=
c
:
CopyEffect
(
code
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
2
)
end
if
(
not
(
tc
:
IsDisabled
()
or
tc
:
IsType
(
TYPE_NORMAL
)))
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
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
)
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
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
local
e5
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e5
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e5
)
end
end
end
end
end
end
function
cm
.
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
end
\ No newline at end of file
expansions/script/c16104216.lua
View file @
2fd9e2d3
--叛教的异骑士 迪萨贝尔
--叛教的异骑士 迪萨贝尔
local
m
=
16104216
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104216
,
"CHURCH_KNIGHT"
)
c16104216
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
16104212
)
local
e1
,
e2
=
rsch
.
BetrayFun
(
c
,
m
,
16104212
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
local
e3
=
rsef
.
SV_INDESTRUCTABLE
(
c
,
"effect"
)
--spsummon condition
local
e4
=
rsef
.
SV_CANNOT_BE_TARGET
(
c
,
"battle"
)
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e5
=
rsef
.
QO
(
c
,
EVENT_CHAINING
,{
m
,
0
},
1
,
"neg"
,
"dsp,dcal"
,
LOCATION_MZONE
,
rscon
.
negcon
(
0
),
nil
,
cm
.
negtg
,
cm
.
negop
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetValue
(
cm
.
splimit
)
c
:
RegisterEffect
(
e0
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e4
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetRange
(
LOCATION_HAND
)
e4
:
SetCondition
(
cm
.
sprcon
)
e4
:
SetOperation
(
cm
.
sprop
)
c
:
RegisterEffect
(
e4
)
--indes
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--cannot target
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
--disef and gain
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetCategory
(
CATEGORY_DISABLE
+
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
cm
.
discon
)
e3
:
SetTarget
(
cm
.
distg
)
e3
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e3
)
end
end
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
function
cm
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
se
:
GetHandler
():
IsCode
(
16104226
)
end
function
cm
.
spzfilter
(
c
,
ft
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
16104212
)
and
c
:
IsReleasable
()
and
(
ft
>
0
or
c
:
GetSequence
()
<
5
)
end
function
cm
.
sprcon
(
e
,
c
,
tp
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
spzfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
ft
)
end
function
cm
.
sprop
(
e
,
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spzfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
cm
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsDisabled
()
end
function
cm
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
cm
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
e
:
SetCategory
(
CATEGORY_NEGATE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
e
:
SetCategory
(
CATEGORY_NEGATE
)
and
not
re
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
then
if
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
then
e
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
end
end
end
end
end
function
cm
.
dis
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
neg
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
Duel
.
NegateActivation
(
ev
)
and
rc
:
IsRelateToEffect
(
re
)
and
rc
:
IsType
(
TYPE_MONSTER
)
and
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
~=
0
if
not
Duel
.
NegateActivation
(
ev
)
then
return
end
and
not
rc
:
IsRelateToEffect
(
e
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
if
rc
:
IsRelateToEffect
(
re
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
~=
0
and
not
rc
:
IsLocation
(
LOCATION_HAND
+
LOCATION_DECK
)
and
not
rc
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
and
rscf
.
spfilter2
()(
rc
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
SpecialSummon
(
re
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
BreakEffect
(
)
Duel
.
SpecialSummon
Complete
(
)
Duel
.
SpecialSummon
(
rc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
\ No newline at end of file
expansions/script/c16104218.lua
View file @
2fd9e2d3
--骑士的行军
--骑士的行军
local
m
=
16104218
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104218
,
"CHURCH_KNIGHT"
)
c16104218
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--Activate
rsch
.
LimitFun
(
c
,
m
)
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e1
=
rsef
.
ACT
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
local
e2
=
rsef
.
I
(
c
,{
m
,
0
},{
1
,
m
},
"se,th"
,
nil
,
LOCATION_SZONE
,
nil
,
rsch
.
limitcost
(
m
),
rsop
.
target
(
cm
.
thfilter
,
"th"
,
LOCATION_DECK
),
cm
.
thop
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
local
e3
=
rsef
.
I
(
c
,{
m
,
1
},{
1
,
m
+
100
},
"sum"
,
nil
,
LOCATION_GRAVE
,
nil
,
aux
.
bfgcost
,
rsop
.
target
(
cm
.
sumfilter
,
"sum"
,
LOCATION_HAND
),
cm
.
sumop
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
--Grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
cm
.
target1
)
e2
:
SetOperation
(
cm
.
activate1
)
c
:
RegisterEffect
(
e2
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SUMMON
,
cm
.
counterfilter
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter1
)
end
end
function
cm
.
counter
filter
(
c
)
function
cm
.
th
filter
(
c
)
return
c
:
IsRace
(
RACE_WARRIOR
)
return
rsch
.
IsSetM2
(
c
)
and
c
:
IsAbleToHand
(
)
end
end
function
cm
.
counterfilter1
(
c
)
function
cm
.
thop
(
e
,
tp
)
return
c
:
GetSummonLocation
()
~=
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_WARRIOR
)
if
rscf
.
GetSelf
(
e
)
then
end
rsop
.
SelectToHand
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,{})
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
cm
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
(
not
c
:
IsRace
(
RACE_WARRIOR
))
or
c
:
IsLocation
(
LOCATION_EXTRA
)
end
function
cm
.
filter
(
c
)
return
c
.
rksetcode
==
"CHURCH_KNIGHT"
and
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
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
end
end
function
cm
.
filter1
(
c
)
function
cm
.
sumfilter
(
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
c
:
IsSummonable
(
true
,
nil
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
rsch
.
IsSet1
(
c
)
and
c
:
IsSummonable
(
true
,
nil
)
end
function
cm
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
function
cm
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
sumfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
g
:
GetCount
()
>
0
then
if
tc
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
)
Duel
.
Summon
(
tp
,
g
:
GetFirst
(),
true
,
nil
)
end
end
end
end
\ No newline at end of file
expansions/script/c16104220.lua
View file @
2fd9e2d3
--直到最后一刻
--直到最后一刻
local
m
=
16104220
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104220
,
"CHURCH_KNIGHT"
)
c16104220
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
m
)
c
:
SetUniqueOnField
(
1
,
0
,
m
)
--Activate
local
e1
=
rsef
.
ACT
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e2
=
rsef
.
FV_LIMIT
(
c
,
"cp"
,
nil
,
cm
.
tg
,{
LOCATION_MZONE
,
LOCATION_MZONE
})
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
local
e3
,
e4
=
rsef
.
FV_LIMIT_PLAYER
(
c
,
"sum,sp"
,
nil
,
cm
.
tg2
,{
1
,
0
})
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
local
e5
=
rsef
.
QO
(
c
,
nil
,{
m
,
0
},{
1
,
m
},
"rm,sp,tk,sum,ga"
,
"tg"
,
LOCATION_SZONE
,
nil
,
nil
,
rstg
.
target
(
cm
.
filter
,
nil
,
LOCATION_GRAVE
),
cm
.
op
)
c
:
RegisterEffect
(
e0
)
--SpecialSummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e5
:
SetCountLimit
(
1
,
m
)
e5
:
SetTarget
(
cm
.
sptg2
)
e5
:
SetOperation
(
cm
.
spop2
)
c
:
RegisterEffect
(
e5
)
--SpecialSummon Limit
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetTargetRange
(
1
,
0
)
e3
:
SetTarget
(
cm
.
sumlimit
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
c
:
RegisterEffect
(
e4
)
end
end
function
cm
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
function
cm
.
tg
(
e
,
c
)
return
not
c
:
IsRace
(
RACE_WARRIOR
)
return
c
:
IsAttackPos
()
and
rsch
.
IsSet1
(
c
)
end
function
cm
.
spfilter
(
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
c
:
IsAbleToRemove
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
spfilter1
(
c
,
e
,
tp
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
smfilter
(
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
c
:
IsSummonable
(
true
,
nil
)
end
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
tg2
(
e
,
c
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
16104222
,
nil
,
0x21
,
0
,
0
,
1
,
RACE_WARRIOR
,
ATTRIBUTE_LIGHT
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
return
not
c
:
IsRace
(
RACE_WARRIOR
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
0
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
filter
(
c
,
e
,
tp
)
local
c
=
e
:
GetHandler
()
if
not
rsch
.
IsSetM1
(
c
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
local
b1
=
c
:
IsAbleToRemove
()
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
local
atk
,
def
,
code
=
0
,
0
,
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
16104222
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_WARRIOR
,
ATTRIBUTE_LIGHT
)
if
tc
then
local
b2
=
rscf
.
spfilter2
()(
c
,
e
,
tp
)
atk
=
tc
:
GetAttack
()
return
b1
or
b2
def
=
tc
:
GetDefense
()
end
end
function
cm
.
op
(
e
,
tp
)
if
not
(
tc
:
IsRelateToEffect
(
e
)
and
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
)
then
return
end
local
c
=
rscf
.
GetSelf
(
e
)
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
16104222
,
nil
,
0x21
,
atk
,
def
,
1
,
RACE_WARRIOR
,
ATTRIBUTE_LIGHT
)
then
local
tc
=
rscf
.
GetTargetCard
()
if
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
if
not
c
or
not
tc
then
return
end
local
b1
=
tc
:
IsAbleToRemove
()
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
16104222
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_WARRIOR
,
ATTRIBUTE_LIGHT
)
local
b2
=
rscf
.
spfilter2
()(
tc
,
e
,
tp
)
if
not
b1
and
not
b2
then
return
end
local
op
=
rsop
.
SelectOption
(
tp
,
b1
,{
m
,
1
},
b2
,{
m
,
2
})
if
op
==
1
then
if
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
>
0
and
tc
:
IsLocation
(
LOCATION_REMOVED
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
16104222
)
local
token
=
Duel
.
CreateToken
(
tp
,
16104222
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
,
e2
=
rscf
.
QuickBuff
({
c
,
token
,
true
},
"atkf,deff"
,{
tc
:
GetBaseAttack
(),
tc
:
GetBaseDefense
()})
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e3
=
rsch
.
DoubleTriFun
(
c
,
token
,
rsreset
.
est
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
rsop
.
SelectOC
({
m
,
3
},
true
)
e1
:
SetValue
(
atk
)
rsop
.
SelectSolve
(
HINTMSG_SUMMON
,
tp
,
cm
.
sumfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
cm
.
sumfun
,
tp
)
token
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
e2
:
SetValue
(
def
)
token
:
RegisterEffect
(
e2
,
true
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DOUBLE_TRIBUTE
)
e3
:
SetValue
(
cm
.
condition
)
token
:
RegisterEffect
(
e3
,
true
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
smfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
3
))
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
smfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Summon
(
tp
,
g
,
true
,
nil
)
end
end
end
end
end
else
end
if
rssf
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
nil
,
nil
,
"th"
)
>
0
then
function
cm
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
code
=
tc
:
GetOriginalCodeRule
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
cm
.
spfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
tc
:
RegisterFlagEffect
(
code
+
100
,
rsreset
.
est
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
16104200
,
2
))
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
spfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
0
)
end
function
cm
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
not
(
tc
:
IsRelateToEffect
(
e
)
and
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
))
then
return
end
if
tc
.
rksetcode
==
"CHURCH_KNIGHT"
then
tc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
e1_2
=
Effect
.
CreateEffect
(
c
)
e1_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
e1_2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e1_2
:
SetRange
(
LOCATION_MZONE
)
e1_2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
)
tc
:
RegisterEffect
(
e1_2
,
true
)
end
end
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
local
fid
=
e
:
GetHandler
():
GetFieldID
()
tc
:
RegisterFlagEffect
(
m
+
1
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
fid
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetCondition
(
cm
.
thacon
)
e1
:
SetOperation
(
cm
.
thaop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
cm
.
thacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
if
tc
:
GetFlagEffectLabel
(
m
+
1
)
~=
e
:
GetLabel
()
then
e
:
Reset
()
return
false
else
return
true
end
end
end
function
cm
.
thaop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
sumfilter
(
c
)
Duel
.
SendtoHand
(
e
:
GetLabelObject
(),
nil
,
REASON_EFFECT
)
return
rsch
.
IsSet2
(
c
)
and
c
:
IsSummonable
(
true
,
nil
)
end
end
function
cm
.
condition
(
e
,
c
)
function
cm
.
sumfun
(
g
,
tp
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
)
end
return
true
end
end
\ No newline at end of file
expansions/script/c16104224.lua
View file @
2fd9e2d3
--异端剿灭
--异端剿灭
local
m
=
16104224
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104224
,
"CHURCH_KNIGHT"
)
c16104224
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--ACT
local
e1
=
rsef
.
ACT
(
c
,
nil
,
nil
,{
1
,
m
,
1
},
"des"
,
nil
,
cm
.
con
,
nil
,
rsop
.
target
(
cm
.
desfilter
,
"des"
,
0
,
LOCATION_ONFIELD
,
true
),
cm
.
act
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_CONTROL
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
cm
.
descon
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
cfilter1
(
c
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
return
c
:
IsLevelAbove
(
5
)
and
rsch
.
IsSet2
(
c
)
and
c
:
IsFaceup
(
)
end
end
function
cm
.
desfilter
(
c
)
function
cm
.
cfilter2
(
c
)
return
not
(
c
:
IsRace
(
RACE_WARRIOR
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
)
return
c
:
IsFaceup
()
and
not
c
:
IsRace
(
RACE_WARRIOR
)
end
end
function
cm
.
desfilter1
(
c
)
function
cm
.
con
(
e
,
tp
)
return
(
not
c
:
IsRace
(
RACE_WARRIOR
))
and
c
:
IsFaceup
(
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
end
--function cm.ntrfilter(c)
function
cm
.
desfilter
(
c
)
--return c:IsRace(RACE_WARRIOR) and c:IsControlerCanBeChanged() and c:IsFaceup()
return
c
:
IsFacedown
()
or
not
c
:
IsRace
(
RACE_WARRIOR
)
--end
function
cm
.
filter
(
c
)
return
c
.
rksetcode
==
"CHURCH_KNIGHT"
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
GetLevel
()
>=
5
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter1
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
end
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
r
p
)
function
cm
.
act
(
e
,
t
p
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
num
=
g
:
GetCount
()
if
num
<=
0
then
return
end
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
--if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,16104228) and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
--local tc=Duel.SelectMatchingCard(tp,cm.ntrfilter,tp,0,LOCATION_MZONE,1,1,nil)
--Duel.GetControl(tc,tp)
--end
end
end
\ No newline at end of file
expansions/script/c16104226.lua
View file @
2fd9e2d3
--前路的抉择
--前路的抉择
local
m
=
16104226
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104226
,
"CHURCH"
)
c16104226
.
rksetcode
=
"CHURCH"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
rsef
.
ACT
(
c
,
nil
,
nil
,{
1
,
m
,
1
},
"tg,sp"
,
nil
,
nil
,
nil
,
rsop
.
target2
(
cm
.
fun
,
cm
.
tgfilter
,
"tg"
,
LOCATION_MZONE
),
cm
.
act
)
local
e0
=
Effect
.
CreateEffect
(
c
)
end
e0
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
function
cm
.
fun
(
g
,
e
,
tp
)
e0
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOGRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
rsloc
.
hd
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
end
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
function
cm
.
spfilter1
(
c
,
e
,
tp
,
mc
)
e0
:
SetCountLimit
(
1
,
m
)
return
c
:
IsSetCard
(
0xcc4
)
and
aux
.
IsCodeListed
(
c
,
mc
:
GetOriginalCodeRule
())
and
Duel
.
GetMZoneCount
(
tp
,
mc
,
tp
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
e0
:
SetTarget
(
cm
.
sptg
)
end
e0
:
SetOperation
(
cm
.
spop
)
function
cm
.
spfilter2
(
c
,
e
,
tp
,
mc
)
c
:
RegisterEffect
(
e0
)
return
rsch
.
IsSet1
(
c
)
and
aux
.
IsCodeListed
(
mc
,
c
:
GetOriginalCodeRule
())
and
Duel
.
GetMZoneCount
(
tp
,
mc
,
tp
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
--Activate
end
local
e1
=
Effect
.
CreateEffect
(
c
)
function
cm
.
tgfilter
(
c
,
e
,
tp
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
if
c
:
IsFacedown
()
or
not
c
:
IsAbleToGrave
()
then
return
false
end
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOGRAVE
)
local
b1
=
rsch
.
IsSet1
(
c
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter1
,
tp
,
rsloc
.
hd
,
0
,
1
,
nil
,
e
,
tp
,
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
local
b2
=
c
:
IsSetCard
(
0xcc4
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter2
,
tp
,
rsloc
.
hd
,
0
,
1
,
nil
,
e
,
tp
,
c
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
return
b1
or
b2
e1
:
SetCountLimit
(
1
,
m
)
end
e1
:
SetTarget
(
cm
.
sptg1
)
function
cm
.
act
(
e
,
tp
)
e1
:
SetOperation
(
cm
.
spop1
)
local
ct
,
og
,
tc
=
rsop
.
SelectToGrave
(
tp
,
cm
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,{},
e
,
tp
)
c
:
RegisterEffect
(
e1
)
if
not
tc
then
return
end
end
if
not
tc
:
IsSetCard
(
0xcc4
)
then
function
cm
.
filter
(
c
,
e
,
tp
)
rsop
.
SelectSpecialSummon
(
tp
,
cm
.
spfilter1
,
tp
,
rsloc
.
hd
,
0
,
1
,
1
,
nil
,{
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
,
nil
,{
"cp"
}},
e
,
tp
,
tc
)
return
c
:
IsFaceup
()
and
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
else
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
c
:
GetCode
(),
e
,
tp
)
local
ct
,
og
,
sc
=
rsop
.
SelectSpecialSummon
(
tp
,
cm
.
spfilter2
,
tp
,
rsloc
.
hd
,
0
,
1
,
1
,
nil
,{},
e
,
tp
,
tc
)
end
if
sc
then
function
cm
.
spfilter
(
c
,
code
,
e
,
tp
)
local
code
=
sc
:
GetOriginalCodeRule
()
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
aux
.
IsCodeListed
(
c
,
code
)
and
c
:
IsSetCard
(
0xcc4
)
sc
:
RegisterFlagEffect
(
code
+
100
,
rsreset
.
est
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
16104200
,
1
))
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
local
code
=
tc
:
GetCode
()
if
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
code
,
e
,
tp
)
if
sg
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
sg
:
GetFirst
():
CompleteProcedure
()
end
end
function
cm
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xcc4
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
c
,
e
,
tp
)
end
function
cm
.
spfilter1
(
c
,
cad
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
aux
.
IsCodeListed
(
cad
,
c
:
GetCode
())
and
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
not
c
:
IsSetCard
(
0xcc4
)
end
function
cm
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
)
end
function
cm
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
tc
,
e
,
tp
)
if
sg
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
local
sc
=
sg
:
GetFirst
()
if
sc
.
rksetcode
==
"CHURCH_KNIGHT"
then
if
sc
:
GetActivateEffect
()
and
e
:
GetOperation
()
then
local
e
=
sc
:
GetActivateEffect
()
local
op
=
e
:
GetOperation
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetOperation
(
op
)
sc
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
)
sc
:
RegisterEffect
(
e3
,
true
)
end
end
end
end
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
Duel
.
SpecialSummonComplete
()
end
end
\ No newline at end of file
expansions/script/c16104228.lua
View file @
2fd9e2d3
--教团的异骑士 燎煌
--教团的异骑士 燎煌
local
m
=
16104228
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104228
,
"CHURCH_KNIGHT"
)
c16104228
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
--summon success
local
e1
=
rsch
.
SummonEffect
(
c
,
m
,
cm
.
op
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e2
=
rsch
.
GainEffect
(
c
,
m
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
local
e3
=
rsef
.
QO
(
c
,
nil
,{
m
,
0
},
1
,
"des,dam"
,
nil
,
LOCATION_MZONE
,
rsch
.
gaincon
(
m
),
nil
,
rsop
.
target
(
aux
.
TRUE
,
"des"
,
0
,
LOCATION_ONFIELD
),
cm
.
desop
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetOperation
(
cm
.
sumsuc
)
c
:
RegisterEffect
(
e1
)
local
e1_1
=
Effect
.
CreateEffect
(
c
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1_1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1_1
:
SetOperation
(
cm
.
sumsuc1
)
c
:
RegisterEffect
(
e1_1
)
--a d A
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e2
:
SetProperty
(
EFFECT_FLAG_NO_TURN_RESET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
cm
.
gacon
)
e2
:
SetTarget
(
cm
.
gatg
)
e2
:
SetOperation
(
cm
.
gaop
)
c
:
RegisterEffect
(
e2
)
--summon with 1 tribute
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_SUMMON_PROC
)
e4
:
SetCondition
(
cm
.
otcon
)
e4
:
SetOperation
(
cm
.
otop
)
e4
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e5
)
--summon with s/t
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e6
:
SetCode
(
EFFECT_ADD_EXTRA_TRIBUTE
)
e6
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e6
:
SetCondition
(
cm
.
otcon1
)
e6
:
SetTarget
(
cm
.
reltarget
)
e6
:
SetValue
(
POS_FACEUP_ATTACK
)
c
:
RegisterEffect
(
e6
)
end
end
function
cm
.
otcon1
(
e
)
function
cm
.
op
(
e
,
tp
)
return
Duel
.
IsEnvironment
(
16104206
,
e
:
GetOwnerPlayer
(),
LOCATION_FZONE
)
end
function
cm
.
reltarget
(
e
,
c
)
return
c
:
IsFaceup
()
and
(
c
:
IsType
(
TYPE_CONTINUOUS
)
or
c
:
IsType
(
TYPE_EQUIP
))
end
function
cm
.
otfilter
(
c
)
return
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
cm
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
and
Duel
.
IsEnvironment
(
16104206
,
e
:
GetOwnerPlayer
(),
LOCATION_FZONE
)
end
function
cm
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
otfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
cm
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
(
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
and
c
:
GetMaterial
():
IsExists
(
cm
.
adfilter
,
1
,
nil
))
or
not
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
then
local
e1
=
rsef
.
FV_LIMIT
({
c
,
tp
},
"dis"
,
nil
,
nil
,{
0
,
LOCATION_MZONE
},
nil
,
rsreset
.
pend
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e2
=
rsef
.
FV_LIMIT_PLAYER
({
c
,
tp
},
"act"
,
cm
.
val
,
nil
,{
1
,
1
},
nil
,
rsreset
.
pend
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
cm
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e2
:
SetTarget
(
cm
.
disable
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
if
e
:
GetHandler
():
GetFlagEffect
(
16104206
)
~=
0
then
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
cm
.
destg
)
e3
:
SetOperation
(
cm
.
desop
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e3
)
end
end
function
cm
.
sumsuc1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetHandler
():
GetFlagEffect
(
16104220
)
~=
0
then
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
cm
.
destg
)
e3
:
SetOperation
(
cm
.
desop
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e3
)
end
end
end
function
cm
.
adfilter
(
c
)
function
cm
.
val
(
e
,
re
)
return
c
:
IsRace
(
RACE_WARRIOR
)
or
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
)
local
rc
=
re
:
GetHandler
()
end
return
rc
:
IsType
(
TYPE_MONSTER
)
and
rc
:
IsOnField
()
and
rc
:
IsControler
(
1
-
e
:
GetHandlerPlayer
())
function
cm
.
aclimit
(
e
,
re
,
tp
)
return
re
:
GetHandler
():
IsOnField
()
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
cm
.
disable
(
e
,
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
gacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
des
=
eg
:
GetFirst
()
local
rc
=
des
:
GetReasonCard
()
return
(
not
des
:
IsRace
(
RACE_WARRIOR
))
and
rc
:
IsRelateToBattle
()
and
rc
==
e
:
GetHandler
()
end
function
cm
.
gatg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
end
function
cm
.
gaop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
cm
.
destg
)
e2
:
SetOperation
(
cm
.
desop
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e3
,
true
)
end
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
0
)
end
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
desop
(
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
ct
,
og
,
tc
=
rsop
.
SelectDestroy
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,{})
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
tc
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
GetBaseAttack
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Damage
(
1
-
tp
,
tc
:
GetBaseAttack
(),
REASON_EFFECT
)
if
g
:
GetFirst
():
IsType
(
TYPE_MONSTER
)
then
local
atk
=
g
:
GetFirst
():
GetTextAttack
()
if
atk
<
0
then
atk
=
0
end
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
Duel
.
Damage
(
1
-
tp
,
atk
,
REASON_EFFECT
)
end
else
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
end
end
\ No newline at end of file
expansions/script/c16104230.lua
View file @
2fd9e2d3
--终末之歌
--终末之歌
local
m
=
16104230
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104230
,
"CHURCH_KNIGHT"
)
c16104230
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
rsef
.
ACT
(
c
,
nil
,
nil
,{
1
,
m
,
1
},
"tg"
,
nil
,
nil
,
nil
,
rsop
.
target
(
cm
.
tgfilter
,
"tg"
,
LOCATION_MZONE
,
0
,
true
),
cm
.
act
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e2
=
rsef
.
I
(
c
,{
m
,
0
},{
1
,
m
+
100
},
"td,dr"
,
nil
,
LOCATION_GRAVE
,
nil
,
nil
,
rsop
.
target
({
Card
.
IsAbleToDeck
,
"td"
},{
cm
.
tdfilter
,
"td"
,
LOCATION_GRAVE
+
LOCATION_REMOVED
}),
cm
.
drop
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
--Activate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetTarget
(
cm
.
target1
)
e2
:
SetOperation
(
cm
.
activate1
)
c
:
RegisterEffect
(
e2
)
end
end
function
cm
.
filter
(
c
)
function
cm
.
tgfilter
(
c
)
return
c
.
rksetcode
==
"CHURCH_KNIGHT"
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsAbleToGrave
()
and
c
:
IsFaceup
()
and
rsch
.
IsSet1
(
c
)
and
c
:
IsAbleToGrave
()
and
c
:
IsFaceup
()
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
act
(
e
,
tp
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
sg
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
#
g
>
0
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
>
0
then
if
sg
:
GetCount
()
>
0
then
local
atk
=
Duel
.
GetOperatedGroup
():
GetSum
(
Card
.
GetBaseAttack
)
local
atk
=
sg
:
GetSum
(
Card
.
GetAttack
)
for
p
=
0
,
1
do
Duel
.
SetLP
(
p
,
math.max
(
0
,
Duel
.
GetLP
(
p
)
-
atk
))
end
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RELEASE
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
end
function
cm
.
filter2
(
c
)
function
cm
.
tdfilter
(
c
)
if
c
:
IsPreviousPosition
(
POS_FACEUP
)
then
return
rsch
.
IsSet1
(
c
)
and
c
:
IsAbleToDeck
()
return
c
:
GetPreviousAttackOnField
()
else
return
0
end
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drop
(
e
,
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
c
=
rscf
.
GetSelf
(
e
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
if
not
c
then
return
end
local
og
=
Duel
.
GetOperatedGroup
()
rsop
.
SelectSolve
(
HINTMSG_TODECK
,
tp
,
aux
.
NecroValleyFilter
(
cm
.
tdfilter
),
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
2
,
c
,
cm
.
solvefun
,
c
)
local
atk
=
og
:
GetSum
(
cm
.
filter2
)
local
LP1
=
Duel
.
GetLP
(
tp
)
local
LP2
=
Duel
.
GetLP
(
1
-
tp
)
if
LP1
-
atk
<
0
then
Duel
.
SetLP
(
tp
,
0
)
end
if
LP2
-
atk
<
0
then
Duel
.
SetLP
(
1
-
tp
,
0
)
end
if
LP1
-
atk
>=
0
then
Duel
.
SetLP
(
tp
,
LP1
-
atk
)
end
if
LP2
-
atk
>=
0
then
Duel
.
SetLP
(
1
-
tp
,
LP2
-
atk
)
end
end
end
function
cm
.
filter1
(
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
c
:
IsAbleToDeck
()
end
function
cm
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
+
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
filter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter1
,
tp
,
LOCATION_REMOVED
+
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
cm
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
solvefun
(
g
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
g
:
AddCard
(
c
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter1
,
tp
,
LOCATION_REMOVED
+
LOCATION_GRAVE
,
0
,
1
,
2
,
e
:
GetHandler
())
if
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
>
0
and
Duel
.
GetOperatedGroup
():
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
rsloc
.
de
)
then
if
Duel
.
SendtoDeck
(
tg
+
e
:
GetHandler
(),
nil
,
2
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
GetOperatedGroup
():
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
BreakEffect
()
Duel
.
ShuffleDeck
(
tp
)
end
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
return
true
end
end
\ No newline at end of file
expansions/script/c16104232.lua
View file @
2fd9e2d3
--教团的圣女 让·达克
--教团的圣女 让·达克
local
m
=
16104232
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104232
,
"CHURCH"
)
c16104232
.
rksetcode
=
"CHURCH"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
--Sumeffect
local
e1
=
rsef
.
STO
(
c
,
EVENT_SUMMON_SUCCESS
,{
m
,
0
},{
1
,
m
},
"disd"
,
"de,dsp"
,
nil
,
nil
,
rsop
.
target
(
cm
.
setfilter
,
nil
,
LOCATION_DECK
,
0
,
3
),
cm
.
setop
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e2
=
rsef
.
RegisterClone
(
c
,
e1
,
"code"
,
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
local
e3
=
rsef
.
STO
(
c
,
EVENT_RELEASE
,{
m
,
1
},{
1
,
m
+
1
},
"th"
,
"de,dsp"
,
cm
.
thcon
,
nil
,
rsop
.
target
(
cm
.
thfilter
,
"th"
,
LOCATION_GRAVE
),
cm
.
thop
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
local
e4
=
rsch
.
DoubleTriFun
(
c
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--to hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
m
+
1
)
e3
:
SetCondition
(
cm
.
thcon
)
e3
:
SetTarget
(
cm
.
thtg
)
e3
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e3
)
--double tribute
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_DOUBLE_TRIBUTE
)
e4
:
SetValue
(
cm
.
condition
)
c
:
RegisterEffect
(
e4
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SUMMON
,
cm
.
counterfilter
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter1
)
end
function
cm
.
counterfilter
(
c
)
return
c
:
IsRace
(
RACE_WARRIOR
)
end
function
cm
.
counterfilter1
(
c
)
return
c
:
GetSummonLocation
()
~=
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_WARRIOR
)
end
function
cm
.
condition
(
e
,
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToDeck
()
end
end
function
cm
.
setfilter
(
c
)
function
cm
.
setfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsSSetable
()
and
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
return
rsch
.
IsSetS1
(
c
)
and
c
:
IsSSetable
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
and
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_SUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
cm
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
(
not
c
:
IsRace
(
RACE_WARRIOR
))
or
c
:
IsLocation
(
LOCATION_EXTRA
)
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
setop
(
e
,
tp
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
3
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
if
Duel
.
IsPlayerCanSummon
(
tp
)
and
Duel
.
IsPlayerCanAdditionalSummon
(
tp
)
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
if
not
(
Duel
.
IsExistingMatchingCard
(
cm
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
3
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
)
then
return
end
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
e1
:
SetTargetRange
(
LOCATION_HAND
,
0
)
if
g
:
GetCount
()
>=
3
then
e1
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
e1
:
SetValue
(
0x1
)
local
sg
=
g
:
Select
(
tp
,
3
,
3
,
nil
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_SET
)
local
e2
=
e1
:
Clone
()
local
tg
=
sg
:
Select
(
1
-
tp
,
1
,
1
,
nil
)
e2
:
SetCode
(
EFFECT_EXTRA_SET_COUNT
)
Duel
.
SSet
(
tp
,
tg
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
SendtoGrave
(
sg
-
tg
,
REASON_EFFECT
)
end
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
if
#
g
<
3
then
return
end
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
rshint
.
Select
(
tp
,
HINTMSG_SELF
)
e1
:
SetTargetRange
(
LOCATION_HAND
,
0
)
local
sg
=
g
:
Select
(
tp
,
3
,
3
,
nil
)
e1
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
e1
:
SetValue
(
0x1
)
rshint
.
Select
(
1
-
tp
,
HINTMSG_SET
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
local
tg
=
sg
:
Select
(
1
-
tp
,
1
,
1
,
nil
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
HintSelection
(
tg
)
local
e2
=
e1
:
Clone
()
Duel
.
SSet
(
tp
,
tg
:
GetFirst
())
e2
:
SetCode
(
EFFECT_EXTRA_SET_COUNT
)
sg
:
Sub
(
tg
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
cm
.
thfilter
(
c
)
function
cm
.
thcon
(
e
,
tp
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
c
:
IsAbleToHand
()
local
c
=
e
:
GetHandler
()
return
c
:
IsComplexReason
(
REASON_SUMMON
+
REASON_MATERIAL
)
end
end
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
thfilter
(
c
)
return
e
:
GetHandler
():
GetReason
()
==
26
if
not
rsch
.
IsSet2
(
c
)
then
return
false
end
local
b1
=
c
:
IsAbleToHand
()
local
b2
=
c
:
IsComplexType
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
)
return
b1
or
b2
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
thop
(
e
,
tp
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
cm
.
thfilter
(
chkc
)
end
rsop
.
SelectSolve
(
HINTMSG_SELF
,
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
cm
.
solvefun
,
tp
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
g
,
1
,
0
,
0
)
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
solvefun
(
g
,
tp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
g
:
GetFirst
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
b1
=
tc
:
IsAbleToHand
()
if
tc
:
IsType
(
TYPE_CONTINUOUS
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
local
b2
=
tc
:
IsComplexType
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
and
tc
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
)
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
op
=
rsop
.
SelectOption
(
tp
,
b1
,{
m
,
1
},
b2
,{
m
,
2
})
else
if
op
==
1
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
else
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
end
end
return
true
end
end
\ No newline at end of file
expansions/script/c16104234.lua
View file @
2fd9e2d3
--于圣殿前起誓
--于圣殿前起誓
local
m
=
16104234
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
cm
=
_G
[
"c"
..
m
]
local
m
,
cm
=
rscf
.
DefineCard
(
16104234
,
"CHURCH"
)
c16104234
.
rksetcode
=
"CHURCH"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
rsef
.
ACT
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e2
=
rsef
.
FV_CANNOT_BE_TARGET
(
c
,
"effect"
,
aux
.
tgoval
,
aux
.
TargetBoolFunction
(
rsch
.
IsSet1
),{
LOCATION_ONFIELD
,
0
})
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
local
e3
=
rsef
.
FV_INDESTRUCTABLE
(
c
,
"effect"
,
1
,
aux
.
TargetBoolFunction
(
rsch
.
IsSet1
),{
LOCATION_ONFIELD
,
0
})
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
local
e4
=
rsef
.
FV_LIMIT_PLAYER
(
c
,
"act"
,
cm
.
limitval
,
nil
,{
1
,
1
})
c
:
RegisterEffect
(
e0
)
local
e5
,
e6
=
rsef
.
FV_LIMIT_PLAYER
(
c
,
"sp,sum"
,
nil
,
cm
.
sptg
,{
1
,
0
})
--intg
local
e7
=
rsef
.
QO
(
c
,
nil
,{
m
,
0
},
1
,
"td"
,
nil
,
LOCATION_GRAVE
,
nil
,
nil
,
rsop
.
target
(
cm
.
tdfilter
,
"td"
,
rsloc
.
gr
,
0
,
1
,
1
,
c
),
cm
.
actop
)
local
e1
=
Effect
.
CreateEffect
(
c
)
end
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
function
cm
.
limitval
(
e
,
re
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
local
rc
=
re
:
GetHandler
()
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
if
rc
:
IsRace
(
RACE_WARRIOR
)
then
return
false
end
e1
:
SetRange
(
LOCATION_SZONE
)
return
rc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
or
rc
:
IsComplexReason
(
REASON_DESTROY
,
true
,
REASON_EFFECT
,
REASON_BATTLE
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
end
e1
:
SetTarget
(
cm
.
ntgtg
)
function
cm
.
sptg
(
e
,
c
)
e1
:
SetValue
(
aux
.
tgoval
)
if
c
:
IsCode
(
16104222
)
then
return
false
end
c
:
RegisterEffect
(
e1
)
return
not
rsch
.
IsSet1
(
c
)
--indes
end
local
e1_1
=
Effect
.
CreateEffect
(
c
)
function
cm
.
tdfilter
(
c
,
e
,
tp
)
e1_1
:
SetType
(
EFFECT_TYPE_FIELD
)
return
rsch
.
IsSet1
(
c
)
and
c
:
IsAbleToDeck
()
and
e
:
GetHandler
():
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
e1_1
:
SetCode
(
EFFECT_INDESTRUCTABLE
)
end
e1_1
:
SetRange
(
LOCATION_SZONE
)
function
cm
.
actop
(
e
,
tp
)
e1_1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
local
c
=
rscf
.
GetSelf
(
e
)
e1_1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
ischurch
))
if
c
and
rsop
.
SelectToDeck
(
tp
,
cm
.
tdfilter
,
tp
,
rsloc
.
gr
,
0
,
1
,
3
,
c
,{},
e
,
tp
)
>
0
then
e1_1
:
SetValue
(
cm
.
indesval
)
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
c
:
RegisterEffect
(
e1_1
)
local
te
=
c
:
GetActivateEffect
()
--EFFECT_LIMIT
te
:
UseCountLimit
(
tp
,
1
,
true
)
local
e1_2
=
Effect
.
CreateEffect
(
c
)
local
tep
=
c
:
GetControler
()
e1_2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
local
cost
=
te
:
GetCost
()
e1_2
:
SetCode
(
EVENT_DESTROYED
)
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
e1_2
:
SetRange
(
LOCATION_SZONE
)
e1_2
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1_2
)
--SpecialSummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_LEAVE_GRAVE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
--SpecialSummon Limit
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetTargetRange
(
1
,
0
)
e3
:
SetTarget
(
cm
.
sumlimit
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
c
:
RegisterEffect
(
e4
)
end
function
Card
.
ischurch
(
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
end
function
cm
.
disfilter
(
c
)
return
(
not
c
:
IsRace
(
RACE_WARRIOR
))
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
d
=
eg
:
Filter
(
cm
.
disfilter
,
nil
)
if
d
==
nil
then
return
end
local
tc
=
d
:
GetFirst
()
while
tc
do
if
not
tc
then
return
end
if
tc
:
IsReason
(
REASON_DESTROY
)
and
tc
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
=
d
:
GetNext
()
end
end
end
function
cm
.
indesval
(
e
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_RULE
+
REASON_BATTLE
)
==
0
end
function
cm
.
ntgtg
(
e
,
c
)
return
c
:
IsFaceup
()
and
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
end
function
cm
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
return
not
((
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
or
c
:
IsCode
(
16104222
))
end
function
cm
.
tffilter
(
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
c
:
IsAbleToDeck
()
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
tffilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
tffilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELECT
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tffilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
3
,
e
:
GetHandler
())
if
Duel
.
SendtoDeck
(
tg
,
nil
,
2
,
REASON_EFFECT
)
~=
0
then
Duel
.
MoveToField
(
e
:
GetHandler
(),
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
end
end
end
\ No newline at end of file
expansions/script/c16199990.lua
View file @
2fd9e2d3
This diff is collapsed.
Click to expand it.
expansions/script/c16199991.lua
View file @
2fd9e2d3
--Real Scl Version - Variable
--Real Scl Version - Variable
local
Version_Number
=
20200
430
local
Version_Number
=
20200
807
local
m
=
16199990
local
m
=
16199990
local
vm
=
16199991
local
vm
=
16199991
rsv
=
{}
--"Base Function"
rsv
=
{}
--"Base Function"
...
@@ -21,14 +21,18 @@ rsreset={} --"Reset Function"
...
@@ -21,14 +21,18 @@ rsreset={} --"Reset Function"
rshint
=
{}
--"Hint Function"
rshint
=
{}
--"Hint Function"
rsloc
=
{}
--"Location Function"
rsloc
=
{}
--"Location Function"
rsdv
=
"Divide_Variable"
--Info Variable
--Info Variable
rs
ef
.
valinfo
=
{}
--"Value for inside series, inside type etc."
rs
val
.
valinfo
=
{}
--"Value for inside series, inside type etc."
rscost
.
costinfo
=
{}
--"Cost information, for record cost value"
rscost
.
costinfo
=
{}
--"Cost information, for record cost value"
rsef
.
targetlist
=
{}
--"Target group list, for rstg.GetTargetAttribute"
rsop
.
opinfo
=
{}
--"Operation information, for record something"
rsef
.
relationinfo
=
{}
--"Field,Pendulum,Continous leave field"
rstg
.
targetlist
=
{}
--"Target group list, for rstg.GetTargetAttribute"
rsef
.
attacheffect
=
{}
--"Effect information for attach effects"
rsef
.
attacheffect
=
{}
--"Effect information for attach effects"
rsef
.
attacheffectf
=
{}
rsef
.
attacheffectf
=
{}
rsef
.
solveeffect
=
{}
rsef
.
solveeffect
=
{}
rs
ef
.
baseop
=
{}
rs
op
.
baseop
=
{}
rscf
.
synchro_material_action
=
{}
--"Custom syn material's action"
rscf
.
synchro_material_action
=
{}
--"Custom syn material's action"
rscf
.
xyz_material_action
=
{}
--"Custom xyz material's action"
rscf
.
xyz_material_action
=
{}
--"Custom xyz material's action"
...
@@ -55,26 +59,29 @@ rsreset.ered = RESET_EVENT+RESETS_REDIRECT
...
@@ -55,26 +59,29 @@ rsreset.ered = RESET_EVENT+RESETS_REDIRECT
--Code Variable
--Code Variable
rscode
.
Extra_Effect_Activate
=
m
+
100
--"Attach Effect"
rscode
.
Extra_Effect_Activate
=
m
+
100
--"Attach Effect"
rscode
.
Extra_Effect_BSolve
=
m
+
200
rscode
.
Extra_Effect_BSolve
=
m
+
101
rscode
.
Extra_Effect_ASolve
=
m
+
800
rscode
.
Extra_Effect_ASolve
=
m
+
102
rscode
.
Phase_Leave_Flag
=
m
+
200
--"Summon Flag for SummonBuff"
rscode
.
Extra_Synchro_Material
=
m
+
300
--"Extra Synchro Material"
rscode
.
Extra_Xyz_Material
=
m
+
301
--"Extra Xyz Material"
rscode
.
Utility_Xyz_Material
=
m
+
400
--"Utility Xyz Material"
rscode
.
Previous_Set_Code
=
m
+
500
--"Previous Set Code"
rscode
.
Synchro_Material
=
m
+
600
--"Record synchro proceudre target"
rscode
.
Pre_Complete_Proc
=
m
+
700
--"Previous c:CompleteProcedure"
rscode
.
Phase_Leave_Flag
=
m
+
300
--"Summon Flag for SummonBuff"
rscode
.
Set
=
m
+
800
--"EVENT_SET"
rscode
.
Extra_Synchro_Material
=
m
+
400
--"Extra Synchro Material"
rscode
.
Extra_Xyz_Material
=
m
+
401
--"Extra Xyz Material"
rscode
.
Utility_Xyz_Material
=
m
+
500
--"Utility Xyz Material"
rscode
.
Previous_Set_Code
=
m
+
600
--"Previous Set Code"
rscode
.
Synchro_Material
=
m
+
700
--"Record synchro proceudre target"
--Hint Message Variable
--Hint Message Variable
rshint
.
act
=
aux
.
Stringid
(
m
,
0
)
--"activate spell/trap"
rshint
.
act
=
aux
.
Stringid
(
m
,
0
)
--"activate spell/trap"
rshint
.
dis
=
aux
.
Stringid
(
m
,
1
)
--"cards will be disable effects "
rshint
.
dis
=
aux
.
Stringid
(
38265153
,
3
)
--"cards will be disable effects "
rshint
.
ad
=
aux
.
Stringid
(
m
,
2
)
--"cards will be change Atk/Def"
rshint
.
ad
=
aux
.
Stringid
(
m
,
2
)
--"cards will be change Atk/Def"
rshint
.
rtg
=
aux
.
Stringid
(
48976825
,
0
)
--"return to grave"
rshint
.
rtg
=
aux
.
Stringid
(
48976825
,
0
)
--"return to grave"
rshint
.
spproc
=
aux
.
Stringid
(
m
,
4
)
--"SS by self produce"
rshint
.
spproc
=
aux
.
Stringid
(
m
,
4
)
--"SS by self produce"
rshint
.
negeffect
=
aux
.
Stringid
(
19502505
,
1
)
--"negate activation"
rshint
.
negeffect
=
aux
.
Stringid
(
19502505
,
1
)
--"negate activation"
rshint
.
eq
=
aux
.
Stringid
(
68184115
,
0
)
--"cards will equip"
rshint
.
eq
=
aux
.
Stringid
(
68184115
,
0
)
--"cards will equip"
rshint
.
te
=
aux
.
Stringid
(
24094258
,
3
)
--"add to extra deck"
rshint
.
te
=
aux
.
Stringid
(
24094258
,
3
)
--"add to extra deck"
rshint
.
xyz
=
HINTMSG_XMATERIAL
--"cards will be overlay cards"
rshint
.
xyz
=
HINTMSG_XMATERIAL
--"cards will be
come
overlay cards"
rshint
.
diseffect
=
aux
.
Stringid
(
39185163
,
1
)
--"negate effect"
rshint
.
diseffect
=
aux
.
Stringid
(
39185163
,
1
)
--"negate effect"
rshint
.
negsum
=
aux
.
Stringid
(
m
+
1
,
1
)
--"negate summon"
rshint
.
negsum
=
aux
.
Stringid
(
m
+
1
,
1
)
--"negate summon"
rshint
.
negsp
=
aux
.
Stringid
(
74892653
,
0
)
--"negate special summon"
rshint
.
negsp
=
aux
.
Stringid
(
74892653
,
0
)
--"negate special summon"
...
@@ -83,12 +90,29 @@ rshint.darksynchro=aux.Stringid(m,15) --"treat as dark synchro"
...
@@ -83,12 +90,29 @@ rshint.darksynchro=aux.Stringid(m,15) --"treat as dark synchro"
rshint
.
choose
=
aux
.
Stringid
(
23912837
,
1
)
--"choose 1 effect"
rshint
.
choose
=
aux
.
Stringid
(
23912837
,
1
)
--"choose 1 effect"
rshint
.
epleave
=
aux
.
Stringid
(
m
,
3
)
--"end phase leave field"
rshint
.
epleave
=
aux
.
Stringid
(
m
,
3
)
--"end phase leave field"
rshint
.
finshcopy
=
aux
.
Stringid
(
43387895
,
1
)
--"reset copy effect"
rshint
.
finshcopy
=
aux
.
Stringid
(
43387895
,
1
)
--"reset copy effect"
rshint
.
act2
=
aux
.
Stringid
(
m
,
1
)
--"select card to activate"
rshint
.
tgct
=
aux
.
Stringid
(
83531441
,
2
)
--"select send to the GY number"
rshint
.
drct
=
aux
.
Stringid
(
m
,
5
)
--"select draw number"
--[[
rshint.isss=aux.Stringid(17535764,1) --"would you SS a monster?"
rshint.istg=aux.Stringid(62834295,2) --"would you send to GY?"
rshint.isdes=aux.Stringid(20590515,2) --"would you destroy?"
rshint.istd=aux.Stringid(m,1) --"would you send to Deck?"
rshint.isrm=aux.Stringid(93191801,2) --"would you reomve?"
rshint.isset=aux.Stringid(m,5) --"would you set?"
rshint.istf=aux.Stringid(m,6) --"would you place to field?"
rshint.isth=aux.Stringid(26118970,1) --"would you send to hand?"
rshint.isrh=aux.Stringid(31102447,2) --"would you return to hand"
rshint.isdr=aux.Stringid(3679218,1) --"would you draw?"
--]]
--Property Variable
--Property Variable
rsflag
.
flaglist
=
{
EFFECT_FLAG_CARD_TARGET
,
EFFECT_FLAG_PLAYER_TARGET
,
EFFECT_FLAG_DELAY
,
EFFECT_FLAG_DAMAGE_STEP
,
EFFECT_FLAG_DAMAGE_CAL
,
rsflag
.
flaglist
=
{
EFFECT_FLAG_CARD_TARGET
,
EFFECT_FLAG_PLAYER_TARGET
,
EFFECT_FLAG_DELAY
,
EFFECT_FLAG_DAMAGE_STEP
,
EFFECT_FLAG_DAMAGE_CAL
,
EFFECT_FLAG_IGNORE_IMMUNE
,
EFFECT_FLAG_SET_AVAILABLE
,
EFFECT_FLAG_IGNORE_RANGE
,
EFFECT_FLAG_SINGLE_RANGE
,
EFFECT_FLAG_BOTH_SIDE
,
EFFECT_FLAG_IGNORE_IMMUNE
,
EFFECT_FLAG_SET_AVAILABLE
,
EFFECT_FLAG_IGNORE_RANGE
,
EFFECT_FLAG_SINGLE_RANGE
,
EFFECT_FLAG_BOTH_SIDE
,
EFFECT_FLAG_UNCOPYABLE
,
EFFECT_FLAG_CANNOT_DISABLE
,
EFFECT_FLAG_CANNOT_NEGATE
,
EFFECT_FLAG_CLIENT_HINT
,
EFFECT_FLAG_LIMIT_ZONE
,
EFFECT_FLAG_UNCOPYABLE
,
EFFECT_FLAG_CANNOT_DISABLE
,
EFFECT_FLAG_CANNOT_NEGATE
,
EFFECT_FLAG_CLIENT_HINT
,
EFFECT_FLAG_LIMIT_ZONE
,
EFFECT_FLAG_ABSOLUTE_TARGET
,
EFFECT_FLAG_SPSUM_PARAM
}
EFFECT_FLAG_ABSOLUTE_TARGET
,
EFFECT_FLAG_SPSUM_PARAM
,
EFFECT_FLAG_EVENT_PLAYER
}
rsflag
.
tg_d
=
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
rsflag
.
tg_d
=
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
rsflag
.
dsp_d
=
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
rsflag
.
dsp_d
=
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
rsflag
.
dsp_tg
=
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
rsflag
.
dsp_tg
=
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
...
@@ -110,16 +134,22 @@ rscate.neg_des = CATEGORY_NEGATE+CATEGORY_DESTROY
...
@@ -110,16 +134,22 @@ rscate.neg_des = CATEGORY_NEGATE+CATEGORY_DESTROY
rscf
.
typelist
=
{
TYPE_MONSTER
,
TYPE_NORMAL
,
TYPE_EFFECT
,
TYPE_DUAL
,
TYPE_UNION
,
TYPE_TOON
,
TYPE_TUNER
,
TYPE_RITUAL
,
TYPE_FUSION
,
TYPE_SYNCHRO
,
TYPE_XYZ
,
TYPE_LINK
,
TYPE_TOKEN
,
TYPE_PENDULUM
,
TYPE_SPSUMMON
,
TYPE_FLIP
,
TYPE_SPIRIT
,
rscf
.
typelist
=
{
TYPE_MONSTER
,
TYPE_NORMAL
,
TYPE_EFFECT
,
TYPE_DUAL
,
TYPE_UNION
,
TYPE_TOON
,
TYPE_TUNER
,
TYPE_RITUAL
,
TYPE_FUSION
,
TYPE_SYNCHRO
,
TYPE_XYZ
,
TYPE_LINK
,
TYPE_TOKEN
,
TYPE_PENDULUM
,
TYPE_SPSUMMON
,
TYPE_FLIP
,
TYPE_SPIRIT
,
TYPE_SPELL
,
TYPE_EQUIP
,
TYPE_FIELD
,
TYPE_CONTINUOUS
,
TYPE_QUICKPLAY
,
TYPE_SPELL
,
TYPE_EQUIP
,
TYPE_FIELD
,
TYPE_CONTINUOUS
,
TYPE_QUICKPLAY
,
TYPE_TRAP
,
TYPE_COUNTER
,
TYPE_TRAPMONSTER
}
TYPE_TRAP
,
TYPE_COUNTER
,
TYPE_TRAPMONSTER
}
rscf
.
extype
=
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_
PENDULUM
+
TYPE_
LINK
rscf
.
extype
=
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
rscf
.
extype_r
=
rscf
.
extype
+
TYPE_RITUAL
rscf
.
extype_r
=
rscf
.
extype
+
TYPE_RITUAL
rscf
.
extype_np
=
rscf
.
extype
-
TYPE_PENDULUM
rscf
.
extype_p
=
rscf
.
extype
+
TYPE_PENDULUM
rscf
.
extype_rp
=
rscf
.
extype
+
TYPE_RITUAL
+
TYPE_PENDULUM
rscf
.
exlist
=
{
TYPE_FUSION
,
TYPE_SYNCHRO
,
TYPE_XYZ
,
TYPE_LINK
}
rscf
.
exlist
=
{
TYPE_FUSION
,
TYPE_SYNCHRO
,
TYPE_XYZ
,
TYPE_LINK
}
rscf
.
exlist_r
=
{
TYPE_FUSION
,
TYPE_SYNCHRO
,
TYPE_XYZ
,
TYPE_LINK
,
TYPE_RITUAL
}
rscf
.
exlist_p
=
{
TYPE_FUSION
,
TYPE_SYNCHRO
,
TYPE_XYZ
,
TYPE_LINK
,
TYPE_PENDULUM
}
rscf
.
exlist_rp
=
{
TYPE_FUSION
,
TYPE_SYNCHRO
,
TYPE_XYZ
,
TYPE_LINK
,
TYPE_PENDULUM
,
TYPE_RITUAL
}
--Location Variable
--Location Variable
rsloc
.
hd
=
LOCATION_HAND
+
LOCATION_DECK
rsloc
.
hd
=
LOCATION_HAND
+
LOCATION_DECK
rsloc
.
ho
=
LOCATION_HAND
+
LOCATION_ONFIELD
rsloc
.
hg
=
LOCATION_HAND
+
LOCATION_GRAVE
rsloc
.
hg
=
LOCATION_HAND
+
LOCATION_GRAVE
rsloc
.
dg
=
LOCATION_DECK
+
LOCATION_GRAVE
rsloc
.
dg
=
LOCATION_DECK
+
LOCATION_GRAVE
rsloc
.
gr
=
LOCATION_GRAVE
+
LOCATION_REMOVED
rsloc
.
gr
=
LOCATION_GRAVE
+
LOCATION_REMOVED
rsloc
.
dgr
=
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
rsloc
.
hdg
=
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
rsloc
.
hdg
=
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
rsloc
.
de
=
LOCATION_DECK
+
LOCATION_EXTRA
rsloc
.
de
=
LOCATION_DECK
+
LOCATION_EXTRA
rsloc
.
mg
=
LOCATION_MZONE
+
LOCATION_GRAVE
rsloc
.
mg
=
LOCATION_MZONE
+
LOCATION_GRAVE
...
@@ -131,6 +161,7 @@ rsloc.all=0xff
...
@@ -131,6 +161,7 @@ rsloc.all=0xff
--Escape Old Functions
--Escape Old Functions
function
rsof
.
Escape_Old_Functions
()
function
rsof
.
Escape_Old_Functions
()
rsof
.
DefineCard
=
rscf
.
DefineCard
rsof
.
DefineCard
=
rscf
.
DefineCard
rscf
.
FilterFaceUp
=
rscf
.
fufilter
rsof
.
SendtoHand
=
rsop
.
SendtoHand
rsof
.
SendtoHand
=
rsop
.
SendtoHand
rsof
.
SendtoDeck
=
rsop
.
SendtoDeck
rsof
.
SendtoDeck
=
rsop
.
SendtoDeck
rsof
.
SendtoGrave
=
rsop
.
SendtoGrave
rsof
.
SendtoGrave
=
rsop
.
SendtoGrave
...
@@ -141,7 +172,8 @@ function rsof.Escape_Old_Functions()
...
@@ -141,7 +172,8 @@ function rsof.Escape_Old_Functions()
rsof
.
SelectOption_Page
=
rsop
.
SelectOption_Page
rsof
.
SelectOption_Page
=
rsop
.
SelectOption_Page
rsof
.
SelectNumber
=
rsop
.
AnnounceNumber
rsof
.
SelectNumber
=
rsop
.
AnnounceNumber
rsof
.
SelectNumber_List
=
rsop
.
AnnounceNumber_List
rsof
.
SelectNumber_List
=
rsop
.
AnnounceNumber_List
rsof
.
IsSet
=
rscf
.
DefineSet
rsof
.
IsSet
=
rscf
.
DefineSet
rscf
.
GetRelationThisCard
=
rscf
.
GetFaceUpSelf
--some card use old SummonBuff's phase leave field parterment, must fix them in their luas
--some card use old SummonBuff's phase leave field parterment, must fix them in their luas
rssf
.
SummonBuff
=
function
(
attlist
,
isdis
,
isdistig
,
selfleave
,
phaseleave
)
rssf
.
SummonBuff
=
function
(
attlist
,
isdis
,
isdistig
,
selfleave
,
phaseleave
)
local
bufflist
=
{}
local
bufflist
=
{}
...
@@ -170,6 +202,7 @@ function rsof.Escape_Old_Functions()
...
@@ -170,6 +202,7 @@ function rsof.Escape_Old_Functions()
end
end
return
bufflist
return
bufflist
end
end
rsop
.
eqop
=
rsop
.
Equip
end
end
expansions/script/c16199992.lua
View file @
2fd9e2d3
--Record Author
--Record Author
local
am
=
16199992
local
am
=
16199992
local
Version_Number
=
20200
430
local
Version_Number
=
20200
807
--
Scl
#
Scl
local
rsdka
=
Dakyria
local
rsdka
=
Dakyria
local
rsdio
=
Diablo
local
rsdio
=
Diablo
local
rsnr
=
Night_Raven
local
rsnr
=
Night_Raven
...
@@ -10,12 +10,13 @@ local rsem = Eridiument
...
@@ -10,12 +10,13 @@ local rsem = Eridiument
local
rsxb
=
XB
local
rsxb
=
XB
local
rsos
=
Oracle_Smith
local
rsos
=
Oracle_Smith
local
rssp
=
Stellar_Pearl
local
rssp
=
Stellar_Pearl
--
local rsgd = Ghostdom_Dragon
//
local
rsgd
=
Ghostdom_Dragon
local
rsed
=
Epic_Dragon
local
rsed
=
Epic_Dragon
local
rsdh
=
Devil_Hunter
local
rsdh
=
Devil_Hunter
local
rsds
=
Dark_Souls
local
rsds
=
Dark_Souls
local
rsca
=
Corona
--
Scl - Special Mode
#
Scl
-
Special
Mode
local
rssm
=
Special_Mode
local
rssm
=
Special_Mode
local
rssmb
=
Special_Mode_Change_Base_Function
local
rssmb
=
Special_Mode_Change_Base_Function
local
rssmt
=
Special_Mode_Turbo_Duel
local
rssmt
=
Special_Mode_Turbo_Duel
...
@@ -26,18 +27,18 @@ local rssmf = Special_Mode_Fast_Duel
...
@@ -26,18 +27,18 @@ local rssmf = Special_Mode_Fast_Duel
local
rssmm
=
Special_Mode_Multiple_Duel
local
rssmm
=
Special_Mode_Multiple_Duel
local
rssmu
=
Special_Mode_Universal_Duel
local
rssmu
=
Special_Mode_Universal_Duel
--
Gale 1472676207
#
Gale
1472676207
local
rsve
=
Voison
local
rsve
=
Voison
local
rsneov
=
Neons
local
rsneov
=
Neons
local
tfrsv
=
T
.
Fairies
local
tfrsv
=
T
.
Fairies
local
rsss
=
Star_Spirit
local
rsss
=
Star_Spirit
--
ChiJiang 626386490
#
ChiJiang
626386490
local
rsnm
=
Nightmare
local
rsnm
=
Nightmare
local
rslf
=
Little_Fox
local
rslf
=
Little_Fox
local
rccv
=
Thermonuclear
local
rccv
=
Thermonuclear
--
XiaoMi 643865567
#
XiaoMi
643865567
local
rssg
=
Sex_Gun
local
rssg
=
Sex_Gun
local
rsps
=
Pseudo_Soul
local
rsps
=
Pseudo_Soul
local
rsdcc
=
Dragon_Chess_Corps
local
rsdcc
=
Dragon_Chess_Corps
...
@@ -50,48 +51,58 @@ local rsik = Infernal_Knight
...
@@ -50,48 +51,58 @@ local rsik = Infernal_Knight
local
rsvw
=
Virus_Wrom
local
rsvw
=
Virus_Wrom
local
rsia
=
Indolent_Angel
local
rsia
=
Indolent_Angel
local
rsso
=
Simulated_Organism
local
rsso
=
Simulated_Organism
local
rstr
=
True_Ritual
--
NianBao 583322404
#
NianBao
583322404
local
rslap
=
Lapin
local
rslap
=
Lapin
local
rskh
=
Karehana
local
rskh
=
Karehana
--
XiaoDaoHeng 1614895649
#
XiaoDaoHeng
1614895649
local
rslrd
=
Life_DeathRound_Dance
local
rslrd
=
Life_DeathRound_Dance
--
Huang 1184387005
#
Huang
1184387005
local
rsts
=
Trinity_Sword
local
rsts
=
Trinity_Sword
--
Luoxing 1151483512
#
Luoxing
1151483512
local
rsdt
=
Dark_Tale
local
rsdt
=
Dark_Tale
local
rsod
=
Order
local
rsod
=
Order
--
YunZeZhun 1587361112
#
YunZeZhun
1587361112
local
rsphh
=
Phantom_Thieves_Of_Hearts
local
rsphh
=
Phantom_Thieves_Of_Hearts
local
rsgc
=
Guard_City
local
rsgc
=
Guard_City
--
ZhenDong
#
ZhenDong
local
rsfv
=
Fgo
/
Assassin
local
rsfv
=
Fgo
/
Assassin
--
JingJing 1772438857
#
JingJing
1772438857
local
rsba
=
BlueAngel
local
rsba
=
BlueAngel
--
Akashic 3204027606
#
Akashic
3204027606
local
rszg
=
Zogu
local
rszg
=
Zogu
local
rsgs
=
Gran_Sphere
local
rsgs
=
Gran_Sphere
local
rsoc
=
Oligocene_Civilization
local
rsoc
=
Oligocene_Civilization
local
rsgol
=
Giant_of_Light
local
rssb
=
Space_Beasts
--
HeiBai 1172777968
#
HeiBai
1172777968
local
rstm
=
Toaru_Majutsu_no_Index
local
rstm
=
Toaru_Majutsu_no_Index
--
2558566212
#
2558566212
local
rsgod
=
God
local
rsgod
=
God
#
02
1164477469
local
rsva
=
VR_Aqua
#
REIKAI
2404873791
local
rsch
=
Churck
--Set Code
--Set Code
--
Scl
#
Scl
--local = 0x1330
--local = 0x1330
local
Alchement_Bio
=
0x3330
local
Alchement_Bio
=
0x3330
local
Chaos_Alchemy
=
0x5330
local
Chaos_Alchemy
=
0x5330
local
Azure
_
Wing_Mercenary
=
0x6330
local
Azure
-
Wing_Mercenary
=
0x6330
local
Oracleoath
=
0x9330
local
Oracleoath
=
0x9330
local
Zrouf_Mantra
=
0xa330
local
Zrouf_Mantra
=
0xa330
local
Autumntale
=
0xc330
local
Autumntale
=
0xc330
...
...
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