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
Ai
ygopro-222DIY-cards
Commits
b96ef452
Commit
b96ef452
authored
Aug 03, 2020
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
70aa656a
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
350 additions
and
85 deletions
+350
-85
expansions/script/c16104200.lua
expansions/script/c16104200.lua
+24
-7
expansions/script/c16104202.lua
expansions/script/c16104202.lua
+76
-8
expansions/script/c16104204.lua
expansions/script/c16104204.lua
+56
-10
expansions/script/c16104206.lua
expansions/script/c16104206.lua
+13
-19
expansions/script/c16104208.lua
expansions/script/c16104208.lua
+54
-8
expansions/script/c16104210.lua
expansions/script/c16104210.lua
+62
-7
expansions/script/c16104212.lua
expansions/script/c16104212.lua
+22
-6
expansions/script/c16104214.lua
expansions/script/c16104214.lua
+20
-9
expansions/script/c16104216.lua
expansions/script/c16104216.lua
+21
-10
expansions/script/c65010512.lua
expansions/script/c65010512.lua
+2
-1
No files found.
expansions/script/c16104200.lua
View file @
b96ef452
--教团的普通骑士
if
not
pcall
(
function
()
require
(
"expansions/script/c16199990"
)
end
)
then
require
(
"script/c16199990"
)
end
local
m
,
cm
=
rscf
.
DefineCard
(
16104200
,
"CHURCH_KNIGHT"
)
local
m
=
16104200
local
cm
=
_G
[
"c"
..
m
]
c16104200
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
--double tribute
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -9,13 +10,29 @@ function cm.initial_effect(c)
e1
:
SetValue
(
cm
.
condition
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
rsef
.
STO
(
c
,
EVENT_SUMMON_SUCCESS
,{
m
,
1
},
nil
,
"sp"
,
"de,tg"
,
nil
,
nil
,
rsop
.
target
(
rscf
.
spfilter2
(
cm
.
spfilter
),
"sp"
,
LOCATION_DECK
),
cm
.
thop
)
local
e3
=
rsef
.
RegisterClone
(
c
,
e2
,
"code"
,
EVENT_SPSUMMON_SUCCESS
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
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
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
)
end
function
cm
.
thop
(
e
,
tp
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
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
function
cm
.
spop
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
...
...
@@ -42,8 +59,8 @@ function cm.thop(e,tp)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
cm
.
condition
(
e
,
c
)
return
c
:
CheckSetCard
(
"CHURCH"
)
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
:
CheckSetCard
(
"CHURCH"
)
or
c
:
IsSetCard
(
0xccb
)
or
c
:
IsCode
(
16104222
))
return
c
:
IsLocation
(
LOCATION_EXTRA
)
or
not
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
or
c
:
IsSetCard
(
0xccb
)
or
c
:
IsCode
(
16104222
))
end
\ No newline at end of file
expansions/script/c16104202.lua
View file @
b96ef452
--教团的灰骑士 格雷
if
not
pcall
(
function
()
require
(
"expansions/script/c16199990"
)
end
)
then
require
(
"script/c16199990"
)
end
local
m
,
cm
=
rscf
.
DefineCard
(
16104202
,
"CHURCH_KNIGHT"
)
local
m
=
16104202
local
cm
=
_G
[
"c"
..
m
]
c16104202
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
--summon success
...
...
@@ -9,9 +10,23 @@ function cm.initial_effect(c)
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
=
REIKAI
.
CHRUCH_KNIGHT_DES
(
c
,
cm
.
gacon
,
cm
.
gatg
,{
1
,
m
},
cm
.
gaop
)
local
e3
=
REIKAI
.
CHRUCH_KNIGHT_ADV
(
c
,
cm
.
gacon
,
cm
.
gatg
,{
1
,
m
},
cm
.
gaop
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
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
))
...
...
@@ -51,8 +66,7 @@ function cm.otcon(e,c,minc)
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
mg
=
Duel
.
GetMatchingGroup
(
cm
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
sg
=
(
mg
+
mg
):
SelectSubGroup
(
tp
,
aux
.
TRUE
,
false
,
1
,
1
,
tp
)
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
...
...
@@ -76,9 +90,60 @@ function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
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_EQUIP
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
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
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetTarget
(
cm
.
desreptg
)
e2
:
SetOperation
(
cm
.
desrepop
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e2
)
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_EQUIP
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
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
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetTarget
(
cm
.
desreptg
)
e2
:
SetOperation
(
cm
.
desrepop
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
cm
.
adfilter
(
c
)
return
c
:
IsRace
(
RACE_WARRIOR
)
or
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsRace
(
RACE_WARRIOR
)
or
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
)
end
function
cm
.
aclimit
(
e
,
re
,
tp
)
return
re
:
GetHandler
():
IsOnField
()
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
...
...
@@ -89,7 +154,10 @@ 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
()
return
((
not
des
:
IsRace
(
RACE_WARRIOR
))
and
rc
:
IsRelateToBattle
()
and
rc
==
e
:
GetHandler
())
or
re
:
GetHandler
():
GetFlagEffect
(
tp
,
16104206
)
==
1
end
function
cm
.
gacon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
16104206
)
~=
0
end
function
cm
.
gatg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
expansions/script/c16104204.lua
View file @
b96ef452
--教团的银骑士 莱特哈尔
if
not
pcall
(
function
()
require
(
"expansions/script/c16199990"
)
end
)
then
require
(
"script/c16199990"
)
end
local
m
,
cm
=
rscf
.
DefineCard
(
16104204
,
"CHURCH_KNIGHT"
)
local
m
=
16104204
local
cm
=
_G
[
"c"
..
m
]
c16104204
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
--summon success
...
...
@@ -9,9 +10,23 @@ function cm.initial_effect(c)
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
=
REIKAI
.
CHRUCH_KNIGHT_DES
(
c
,
cm
.
gacon
,
cm
.
gatg
,{
1
},
cm
.
gaop
)
local
e3
=
REIKAI
.
CHRUCH_KNIGHT_ADV
(
c
,
cm
.
gacon
,
cm
.
gatg
,{
1
},
cm
.
gaop
)
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
))
...
...
@@ -51,18 +66,49 @@ function cm.otcon(e,c,minc)
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
mg
=
Duel
.
GetMatchingGroup
(
cm
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
sg
=
(
mg
+
mg
):
SelectSubGroup
(
tp
,
aux
.
TRUE
,
false
,
1
,
1
,
tp
)
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
()
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
.
SV_IMMUNE_EFFECT
(
c
,
cm
.
val
,
nil
,{
RESET_PHASE
+
PHASE_END
},
nil
,
nil
)
end
if
c
:
GetMaterial
():
IsExists
(
cm
.
adfilter
,
1
,
nil
)
or
not
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
then
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
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
+
TYPE_TRAP
)
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
)
...
...
@@ -70,7 +116,7 @@ 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
()
and
rc
:
GetEffectCount
(
16104206
)
==
0
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
...
...
expansions/script/c16104206.lua
View file @
b96ef452
--不灭的圣光教团国
if
not
pcall
(
function
()
require
(
"expansions/script/c16199990"
)
end
)
then
require
(
"script/c16199990"
)
end
local
m
,
cm
=
rscf
.
DefineCard
(
16104206
,
"CHURCH"
)
local
m
=
16104206
local
cm
=
_G
[
"c"
..
m
]
c16104206
.
rksetcode
=
"CHURCH"
function
cm
.
initial_effect
(
c
)
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -13,21 +14,21 @@ function cm.initial_effect(c)
e3
:
SetCode
(
EFFECT_CANNOT_DISABLE_SUMMON
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_RANGE
+
EFFECT_FLAG_SET_AVAILABLE
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
rscf
.
CheckSetCard
,
"CHURCH"
))
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
ischurch
))
c
:
RegisterEffect
(
e3
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_DISABLE_SPSUMMON
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_RANGE
+
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
rscf
.
CheckSetCard
,
"CHURCH"
))
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
ischurch
))
c
:
RegisterEffect
(
e2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_DISABLE_FLIP_SUMMON
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_RANGE
+
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
rscf
.
CheckSetCard
,
"CHURCH"
))
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
ischurch
))
c
:
RegisterEffect
(
e1
)
--Summon
local
e4
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -43,7 +44,10 @@ function cm.initial_effect(c)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
0
)
end
function
cm
.
filter
(
c
)
return
c
:
CheckSetCard
(
"CHURCH"
)
and
c
:
IsSummonable
(
true
,
nil
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
c
:
IsSummonable
(
true
,
nil
)
end
function
Card
.
ischurch
(
c
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
end
function
cm
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
...
...
@@ -54,17 +58,8 @@ function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
<=
0
then
return
end
local
sc
=
g
:
GetFirst
()
if
sc
:
CheckSetCard
(
"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
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetOperation
(
op
)
sc
:
RegisterEffect
(
e1
)
if
sc
.
rksetcode
==
"CHURCH_KNIGHT"
and
sc
:
GetOriginalLevel
()
>=
6
then
sc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
...
...
@@ -72,7 +67,6 @@ function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
)
sc
:
RegisterEffect
(
e3
,
true
)
end
end
Duel
.
Summon
(
tp
,
sc
,
true
,
nil
)
Duel
.
Summon
(
tp
,
sc
,
true
,
nil
)
end
\ No newline at end of file
expansions/script/c16104208.lua
View file @
b96ef452
--教团的苍骑士 IO
if
not
pcall
(
function
()
require
(
"expansions/script/c16199990"
)
end
)
then
require
(
"script/c16199990"
)
end
local
m
,
cm
=
rscf
.
DefineCard
(
16104208
,
"CHURCH_KNIGHT"
)
local
m
=
16104208
local
cm
=
_G
[
"c"
..
m
]
c16104208
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
--summon success
...
...
@@ -11,9 +12,24 @@ function cm.initial_effect(c)
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
=
REIKAI
.
CHRUCH_KNIGHT_DES
(
c
,
cm
.
gacon
,
cm
.
gatg
,{
1
,
m
},
cm
.
gaop
)
local
e3
=
REIKAI
.
CHRUCH_KNIGHT_ADV
(
c
,
cm
.
gacon
,
cm
.
gatg
,{
1
,
m
},
cm
.
gaop
)
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
))
...
...
@@ -53,8 +69,7 @@ function cm.otcon(e,c,minc)
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
mg
=
Duel
.
GetMatchingGroup
(
cm
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
sg
=
(
mg
+
mg
):
SelectSubGroup
(
tp
,
aux
.
TRUE
,
false
,
1
,
1
,
tp
)
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
...
...
@@ -62,15 +77,46 @@ 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
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
and
e
:
GetHandler
():
GetMaterial
():
IsExists
(
cm
.
adfilter
,
1
,
nil
)
or
not
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
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
+
TYPE_TRAP
)
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
()
...
...
expansions/script/c16104210.lua
View file @
b96ef452
--教团的翼骑士 韦因
if
not
pcall
(
function
()
require
(
"expansions/script/c16199990"
)
end
)
then
require
(
"script/c16199990"
)
end
local
m
,
cm
=
rscf
.
DefineCard
(
16104210
,
"CHURCH_KNIGHT"
)
local
m
=
16104210
local
cm
=
_G
[
"c"
..
m
]
c16104210
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
--hand
...
...
@@ -25,8 +26,28 @@ function cm.initial_effect(c)
e4
:
SetOperation
(
cm
.
sprop1
)
c
:
RegisterEffect
(
e4
)
--a d A
local
e2
=
REIKAI
.
CHRUCH_KNIGHT_DES
(
c
,
cm
.
gacon
,
cm
.
gatg
,{
1
,
m
},
cm
.
gaop
)
local
e3
=
REIKAI
.
CHRUCH_KNIGHT_ADV
(
c
,
cm
.
gacon
,
cm
.
gatg
,{
1
,
m
},
cm
.
gaop
)
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
...
...
@@ -36,8 +57,42 @@ 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
:
CheckSetCard
(
"CHURCH"
)
and
c
:
GetLevel
()
>=
5
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
and
c
:
GetLevel
()
>=
5
end
function
cm
.
filter1
(
c
)
return
c
:
IsAbleToGrave
()
...
...
@@ -93,10 +148,10 @@ function cm.sprtg1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
end
function
cm
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
and
c
:
CheckSetCard
(
"CHURCH"
)
return
c
:
IsAbleToGrave
()
and
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
end
function
cm
.
filter3
(
c
)
return
c
:
CheckSetCard
(
"CHURCH"
)
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
)
...
...
expansions/script/c16104212.lua
View file @
b96ef452
--教团的圣旗手 迪萨贝尔
if
not
pcall
(
function
()
require
(
"expansions/script/c16199990"
)
end
)
then
require
(
"script/c16199990"
)
end
local
m
,
cm
=
rscf
.
DefineCard
(
16104212
,
"CHURCH"
)
local
m
=
16104212
local
cm
=
_G
[
"c"
..
m
]
c16104212
.
rksetcode
=
"CHURCH"
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
--summon success
local
e1
=
rsef
.
STO
(
c
,
EVENT_SUMMON_SUCCESS
,{
m
,
1
},
nil
,
"se,th"
,
"de,dsp"
,
nil
,
cm
.
cost
,
rsop
.
target
(
cm
.
thfilter
,
"th"
,
LOCATION_DECK
),
cm
.
thop
)
local
e3
=
rsef
.
RegisterClone
(
c
,
e1
,
"code"
,
EVENT_SPSUMMON_SUCCESS
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
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
)
...
...
@@ -39,7 +51,11 @@ function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
or
not
c
:
IsRace
(
RACE_WARRIOR
)
end
function
cm
.
thfilter
(
c
)
return
c
:
CheckSetCard
(
"CHURCH"
)
and
c
:
IsAbleToHand
()
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
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
)
...
...
@@ -50,5 +66,5 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
cm
.
condition
(
e
,
c
)
return
c
:
CheckSetCard
(
"CHURCH"
)
return
(
c
.
rksetcode
==
"CHURCH_KNIGHT"
or
c
.
rksetcode
==
"CHURCH"
)
end
\ No newline at end of file
expansions/script/c16104214.lua
View file @
b96ef452
--叛教的掠夺骑士 IO
if
not
pcall
(
function
()
require
(
"expansions/script/c16199990"
)
end
)
then
require
(
"script/c16199990"
)
end
local
m
,
cm
=
rscf
.
DefineCard
(
16104214
,
"CHURCH_KNIGHT"
)
local
m
=
16104214
local
cm
=
_G
[
"c"
..
m
]
c16104214
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
16104208
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
...
...
@@ -11,7 +12,14 @@ function cm.initial_effect(c)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetValue
(
cm
.
splimit
)
c
:
RegisterEffect
(
e0
)
local
e4
=
rscf
.
SetSpecialSummonProduce
(
c
,
LOCATION_HAND
,
cm
.
sprcon
,
cm
.
sprop
)
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)
...
...
@@ -45,16 +53,19 @@ function cm.splimit(e,se,sp,st)
return
se
:
GetHandler
():
IsCode
(
16104226
)
end
function
cm
.
spzfilter
(
c
,
tp
)
return
Duel
.
GetMZoneCount
(
tp
,
c
,
tp
)
>
0
return
c
:
IsFaceup
()
and
c
:
IsCode
(
16104208
)
and
c
:
IsReleasable
()
and
(
ft
>
0
or
c
:
GetSequence
()
<
5
)
end
function
cm
.
sprcon
(
e
,
c
,
tp
)
local
g1
=
Duel
.
GetReleaseGroup
(
tp
,
false
):
Filter
(
Card
.
IsCode
,
nil
,
16104208
)
return
(
g1
+
g1
):
IsExists
(
cm
.
spzfilter
,
1
,
nil
,
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
g1
=
Duel
.
GetReleaseGroup
(
tp
,
false
):
Filter
(
Card
.
IsCode
,
nil
,
16104208
)
local
sg
=
(
g1
+
g1
):
SelectSubGroup
(
tp
,
cm
.
spzfilter
,
false
,
1
,
1
,
tp
)
Duel
.
Release
(
sg
,
REASON_COST
)
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
)
...
...
expansions/script/c16104216.lua
View file @
b96ef452
--叛教的异骑士 迪萨贝尔
if
not
pcall
(
function
()
require
(
"expansions/script/c16199990"
)
end
)
then
require
(
"script/c16199990"
)
end
local
m
,
cm
=
rscf
.
DefineCard
(
16104216
,
"CHURCH_KNIGHT"
)
local
m
=
16104216
local
cm
=
_G
[
"c"
..
m
]
c16104216
.
rksetcode
=
"CHURCH_KNIGHT"
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
16104212
)
c
:
SetUniqueOnField
(
1
,
1
,
m
)
...
...
@@ -11,7 +12,14 @@ function cm.initial_effect(c)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetValue
(
cm
.
splimit
)
c
:
RegisterEffect
(
e0
)
local
e4
=
rscf
.
SetSpecialSummonProduce
(
c
,
LOCATION_HAND
,
cm
.
sprcon
,
cm
.
sprop
)
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
)
...
...
@@ -45,17 +53,20 @@ end
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
return
se
:
GetHandler
():
IsCode
(
16104226
)
end
function
cm
.
spzfilter
(
c
,
tp
)
return
Duel
.
GetMZoneCount
(
tp
,
c
,
tp
)
>
0
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
)
local
g1
=
Duel
.
GetReleaseGroup
(
tp
,
false
):
Filter
(
Card
.
IsCode
,
nil
,
16104212
)
return
(
g1
+
g1
):
IsExists
(
cm
.
spzfilter
,
1
,
nil
,
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
g1
=
Duel
.
GetReleaseGroup
(
tp
,
false
):
Filter
(
Card
.
IsCode
,
nil
,
16104212
)
local
sg
=
(
g1
+
g1
):
SelectSubGroup
(
tp
,
cm
.
spzfilter
,
false
,
1
,
1
,
tp
)
Duel
.
Release
(
sg
,
REASON_COST
)
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
()
...
...
expansions/script/c65010512.lua
View file @
b96ef452
...
...
@@ -48,8 +48,8 @@ function c65010512.op(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Duel
.
GetMatchingGroup
(
c65010512
.
spfilter1
,
1
-
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
zone
)
local
sg
=
g
:
RandomSelect
(
1
-
tp
,
1
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
1
-
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
local
tc
=
sg
:
GetFirst
()
Duel
.
SpecialSummonStep
(
tc
,
0
,
1
-
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
...
...
@@ -60,6 +60,7 @@ function c65010512.op(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
Duel
.
SpecialSummonComplete
()
end
end
...
...
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