Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
REIKAI
ygopro
Commits
16a07fe1
Commit
16a07fe1
authored
Mar 25, 2015
by
fluorohydride
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"Ritual Foregone" cannot special summon ritual monsters with spsummon condition
parent
3a7260be
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1054 additions
and
1018 deletions
+1054
-1018
ocgcore/card.cpp
ocgcore/card.cpp
+1
-1
script/c14735698.lua
script/c14735698.lua
+2
-2
script/c21105106.lua
script/c21105106.lua
+4
-0
script/c25857246.lua
script/c25857246.lua
+77
-73
script/c26674724.lua
script/c26674724.lua
+74
-70
script/c27383110.lua
script/c27383110.lua
+84
-84
script/c46052429.lua
script/c46052429.lua
+49
-49
script/c51124303.lua
script/c51124303.lua
+139
-139
script/c52068432.lua
script/c52068432.lua
+87
-83
script/c52846880.lua
script/c52846880.lua
+82
-78
script/c64437633.lua
script/c64437633.lua
+45
-45
script/c65450690.lua
script/c65450690.lua
+63
-63
script/c74122412.lua
script/c74122412.lua
+87
-83
script/c88240999.lua
script/c88240999.lua
+91
-87
script/c89463537.lua
script/c89463537.lua
+58
-54
script/c97211663.lua
script/c97211663.lua
+3
-3
script/c99185129.lua
script/c99185129.lua
+102
-98
script/utility.lua
script/utility.lua
+6
-6
No files found.
ocgcore/card.cpp
View file @
16a07fe1
...
...
@@ -1924,7 +1924,7 @@ int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, u
if
(
current
.
location
==
LOCATION_REMOVED
&&
(
current
.
position
&
POS_FACEDOWN
))
return
FALSE
;
if
(
is_status
(
STATUS_REVIVE_LIMIT
)
&&
!
is_status
(
STATUS_PROC_COMPLETE
))
{
if
((
!
nolimit
&&
(
current
.
location
&
0x38
))
||
(
!
nocheck
&&
(
current
.
location
&
0x3
)))
if
((
!
nolimit
&&
(
current
.
location
&
0x38
))
||
(
!
nocheck
&&
!
nolimit
&&
(
current
.
location
&
0x3
)))
return
FALSE
;
}
if
(((
sumpos
&
POS_FACEDOWN
)
==
0
)
&&
pduel
->
game_field
->
check_unique_onfield
(
this
,
toplayer
))
...
...
script/c14735698.lua
View file @
16a07fe1
...
...
@@ -22,7 +22,7 @@ function c14735698.initial_effect(c)
end
function
c14735698
.
filter
(
c
,
e
,
tp
,
m
)
if
not
c
:
IsSetCard
(
0xb4
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
fals
e
)
then
return
false
end
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
tru
e
)
then
return
false
end
if
c
:
IsCode
(
21105106
)
then
return
c
:
ritual_custom_condition
(
m
)
end
local
mg
=
nil
if
c
.
mat_filter
then
...
...
@@ -68,7 +68,7 @@ function c14735698.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ReleaseRitualMaterial
(
mat
)
end
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
true
,
fals
e
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
tru
e
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
...
...
script/c21105106.lua
View file @
16a07fe1
...
...
@@ -6,6 +6,7 @@ function c21105106.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c21105106
.
splimit
)
c
:
RegisterEffect
(
e1
)
--cannot spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -27,6 +28,9 @@ function c21105106.initial_effect(c)
e3
:
SetOperation
(
c21105106
.
rmop
)
c
:
RegisterEffect
(
e3
)
end
function
c21105106
.
splimit
(
e
,
se
,
sp
,
st
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
and
bit
.
band
(
st
,
SUMMON_TYPE_RITUAL
)
==
SUMMON_TYPE_RITUAL
end
function
c21105106
.
mat_filter
(
c
)
return
false
end
...
...
script/c25857246.lua
View file @
16a07fe1
--ヴァルキュルスの影霊衣
function
c25857246
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
25857246
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
25857246
)
e2
:
SetCondition
(
c25857246
.
atkcon
)
e2
:
SetCost
(
c25857246
.
atkcost
)
e2
:
SetOperation
(
c25857246
.
atkop
)
c
:
RegisterEffect
(
e2
)
--draw
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
25857246
,
1
))
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
25857247
)
e3
:
SetTarget
(
c25857246
.
target
)
e3
:
SetOperation
(
c25857246
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c25857246
.
mat_filter
(
c
)
return
c
:
GetLevel
()
~=
8
end
function
c25857246
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
end
function
c25857246
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xb4
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c25857246
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
c25857246
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c25857246
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c25857246
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateAttack
()
then
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
end
end
function
c25857246
.
filter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsReleasableByEffect
()
end
function
c25857246
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
CheckReleaseGroupEx
(
tp
,
c25857246
.
filter
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c25857246
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDraw
(
tp
)
then
return
end
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
if
ct
==
0
then
ct
=
1
end
if
ct
>
2
then
ct
=
2
end
local
g
=
Duel
.
SelectReleaseGroupEx
(
tp
,
c25857246
.
filter
,
1
,
ct
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
rct
=
Duel
.
Release
(
g
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
rct
,
REASON_EFFECT
)
end
end
--ヴァルキュルスの影霊衣
function
c25857246
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c25857246
.
splimit
)
c
:
RegisterEffect
(
e1
)
--atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
25857246
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
25857246
)
e2
:
SetCondition
(
c25857246
.
atkcon
)
e2
:
SetCost
(
c25857246
.
atkcost
)
e2
:
SetOperation
(
c25857246
.
atkop
)
c
:
RegisterEffect
(
e2
)
--draw
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
25857246
,
1
))
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
25857247
)
e3
:
SetTarget
(
c25857246
.
target
)
e3
:
SetOperation
(
c25857246
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c25857246
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_RITUAL
)
==
SUMMON_TYPE_RITUAL
end
function
c25857246
.
mat_filter
(
c
)
return
c
:
GetLevel
()
~=
8
end
function
c25857246
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
end
function
c25857246
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xb4
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c25857246
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
c25857246
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c25857246
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c25857246
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateAttack
()
then
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
end
end
function
c25857246
.
filter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsReleasableByEffect
()
end
function
c25857246
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
CheckReleaseGroupEx
(
tp
,
c25857246
.
filter
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c25857246
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDraw
(
tp
)
then
return
end
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
if
ct
==
0
then
ct
=
1
end
if
ct
>
2
then
ct
=
2
end
local
g
=
Duel
.
SelectReleaseGroupEx
(
tp
,
c25857246
.
filter
,
1
,
ct
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
rct
=
Duel
.
Release
(
g
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
rct
,
REASON_EFFECT
)
end
end
script/c26674724.lua
View file @
16a07fe1
--ブリューナクの影霊衣
function
c26674724
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
26674724
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
26674724
)
e2
:
SetCost
(
c26674724
.
thcost
)
e2
:
SetTarget
(
c26674724
.
thtg
)
e2
:
SetOperation
(
c26674724
.
thop
)
c
:
RegisterEffect
(
e2
)
--todeck
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
26674724
,
1
))
e3
:
SetCategory
(
CATEGORY_TODECK
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
26674725
)
e3
:
SetTarget
(
c26674724
.
tdtg
)
e3
:
SetOperation
(
c26674724
.
tdop
)
c
:
RegisterEffect
(
e3
)
end
function
c26674724
.
mat_filter
(
c
)
return
not
c
:
IsCode
(
26674724
)
end
function
c26674724
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c26674724
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xb4
)
and
not
c
:
IsCode
(
26674724
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c26674724
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c26674724
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c26674724
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c26674724
.
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
function
c26674724
.
tdfilter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsAbleToDeck
()
end
function
c26674724
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c26674724
.
tdfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c26674724
.
tdfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c26674724
.
tdfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
2
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c26674724
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
--ブリューナクの影霊衣
function
c26674724
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c26674724
.
splimit
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
26674724
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
26674724
)
e2
:
SetCost
(
c26674724
.
thcost
)
e2
:
SetTarget
(
c26674724
.
thtg
)
e2
:
SetOperation
(
c26674724
.
thop
)
c
:
RegisterEffect
(
e2
)
--todeck
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
26674724
,
1
))
e3
:
SetCategory
(
CATEGORY_TODECK
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
26674725
)
e3
:
SetTarget
(
c26674724
.
tdtg
)
e3
:
SetOperation
(
c26674724
.
tdop
)
c
:
RegisterEffect
(
e3
)
end
function
c26674724
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_RITUAL
)
==
SUMMON_TYPE_RITUAL
end
function
c26674724
.
mat_filter
(
c
)
return
not
c
:
IsCode
(
26674724
)
end
function
c26674724
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c26674724
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xb4
)
and
not
c
:
IsCode
(
26674724
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c26674724
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c26674724
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c26674724
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c26674724
.
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
function
c26674724
.
tdfilter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsAbleToDeck
()
end
function
c26674724
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c26674724
.
tdfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c26674724
.
tdfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c26674724
.
tdfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
2
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c26674724
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
script/c27383110.lua
View file @
16a07fe1
--宣告者の預言
function
c27383110
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c27383110
.
target
)
e1
:
SetOperation
(
c27383110
.
activate
)
c
:
RegisterEffect
(
e1
)
--salvage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetDescription
(
aux
.
Stringid
(
27383110
,
0
))
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
27383110
)
e2
:
SetCost
(
c27383110
.
thcost
)
e2
:
SetTarget
(
c27383110
.
thtg
)
e2
:
SetOperation
(
c27383110
.
thop
)
e2
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e2
)
end
function
c27383110
.
filter
(
c
,
e
,
tp
,
m
)
local
cd
=
c
:
GetCode
()
if
cd
~=
44665365
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
false
)
then
return
false
end
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
result
=
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
6
,
1
,
99
,
c
)
m
:
AddCard
(
c
)
else
result
=
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
6
,
1
,
99
,
c
)
end
return
result
end
function
c27383110
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
return
Duel
.
IsExistingMatchingCard
(
c27383110
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c27383110
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c27383110
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
mg
:
RemoveCard
(
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
6
,
1
,
99
,
tc
)
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
e
:
SetLabelObject
(
tc
)
Duel
.
RaiseSingleEvent
(
e
:
GetHandler
(),
27383110
,
e
,
0
,
tp
,
tp
,
0
)
end
end
function
c27383110
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
and
e
:
GetHandler
():
IsAbleToRemove
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
function
c27383110
.
thfilter
(
c
,
e
,
tp
)
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsAbleToHand
()
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c27383110
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tc
=
e
:
GetLabelObject
():
GetLabelObject
()
local
mat
=
tc
:
GetMaterial
()
if
chkc
then
return
mat
:
IsContains
(
chkc
)
and
c27383110
.
thfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
mat
:
IsExists
(
c27383110
.
thfilter
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
mat
:
FilterSelect
(
tp
,
c27383110
.
thfilter
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c27383110
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
--宣告者の預言
function
c27383110
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c27383110
.
target
)
e1
:
SetOperation
(
c27383110
.
activate
)
c
:
RegisterEffect
(
e1
)
--salvage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetDescription
(
aux
.
Stringid
(
27383110
,
0
))
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
27383110
)
e2
:
SetCost
(
c27383110
.
thcost
)
e2
:
SetTarget
(
c27383110
.
thtg
)
e2
:
SetOperation
(
c27383110
.
thop
)
e2
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e2
)
end
function
c27383110
.
filter
(
c
,
e
,
tp
,
m
)
local
cd
=
c
:
GetCode
()
if
cd
~=
44665365
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
result
=
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
6
,
1
,
99
,
c
)
m
:
AddCard
(
c
)
else
result
=
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
6
,
1
,
99
,
c
)
end
return
result
end
function
c27383110
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
return
Duel
.
IsExistingMatchingCard
(
c27383110
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c27383110
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c27383110
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
mg
:
RemoveCard
(
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
6
,
1
,
99
,
tc
)
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
e
:
SetLabelObject
(
tc
)
Duel
.
RaiseSingleEvent
(
e
:
GetHandler
(),
27383110
,
e
,
0
,
tp
,
tp
,
0
)
end
end
function
c27383110
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
and
e
:
GetHandler
():
IsAbleToRemove
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
function
c27383110
.
thfilter
(
c
,
e
,
tp
)
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsAbleToHand
()
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c27383110
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tc
=
e
:
GetLabelObject
():
GetLabelObject
()
local
mat
=
tc
:
GetMaterial
()
if
chkc
then
return
mat
:
IsContains
(
chkc
)
and
c27383110
.
thfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
mat
:
IsExists
(
c27383110
.
thfilter
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
mat
:
FilterSelect
(
tp
,
c27383110
.
thfilter
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c27383110
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
script/c46052429.lua
View file @
16a07fe1
--高等儀式術
function
c46052429
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c46052429
.
target
)
e1
:
SetOperation
(
c46052429
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c46052429
.
filter
(
c
,
e
,
tp
,
m
)
if
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
false
)
then
return
false
end
if
c
.
mat_filter
then
m
=
m
:
Filter
(
c
.
mat_filter
,
nil
)
end
return
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
end
function
c46052429
.
matfilter
(
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsAbleToGrave
()
end
function
c46052429
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
false
end
local
mg
=
Duel
.
GetMatchingGroup
(
c46052429
.
matfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c46052429
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c46052429
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
mg
=
Duel
.
GetMatchingGroup
(
c46052429
.
matfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c46052429
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
if
tc
.
mat_filter
then
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
tc
:
SetMaterial
(
mat
)
Duel
.
SendtoGrave
(
mat
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_RITUAL
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
--高等儀式術
function
c46052429
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c46052429
.
target
)
e1
:
SetOperation
(
c46052429
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c46052429
.
filter
(
c
,
e
,
tp
,
m
)
if
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
if
c
.
mat_filter
then
m
=
m
:
Filter
(
c
.
mat_filter
,
nil
)
end
return
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
end
function
c46052429
.
matfilter
(
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsAbleToGrave
()
end
function
c46052429
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
false
end
local
mg
=
Duel
.
GetMatchingGroup
(
c46052429
.
matfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c46052429
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c46052429
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
mg
=
Duel
.
GetMatchingGroup
(
c46052429
.
matfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c46052429
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
if
tc
.
mat_filter
then
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
tc
:
SetMaterial
(
mat
)
Duel
.
SendtoGrave
(
mat
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_RITUAL
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
script/c51124303.lua
View file @
16a07fe1
This diff is collapsed.
Click to expand it.
script/c52068432.lua
View file @
16a07fe1
--トリシューラの影霊衣
function
c52068432
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
52068432
,
0
))
e2
:
SetCategory
(
CATEGORY_NEGATE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
52068432
)
e2
:
SetCondition
(
c52068432
.
negcon
)
e2
:
SetCost
(
c52068432
.
negcost
)
e2
:
SetTarget
(
c52068432
.
negtg
)
e2
:
SetOperation
(
c52068432
.
negop
)
c
:
RegisterEffect
(
e2
)
--remove
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
52068432
,
1
))
e3
:
SetCategory
(
CATEGORY_REMOVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCountLimit
(
1
,
52068433
)
e3
:
SetCondition
(
c52068432
.
remcon
)
e3
:
SetTarget
(
c52068432
.
remtg
)
e3
:
SetOperation
(
c52068432
.
remop
)
c
:
RegisterEffect
(
e3
)
end
function
c52068432
.
mat_filter
(
c
)
return
c
:
GetLevel
()
~=
9
end
function
c52068432
.
tfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb4
)
and
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
end
function
c52068432
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsExists
(
c52068432
.
tfilter
,
1
,
nil
,
tp
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c52068432
.
negcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c52068432
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
end
function
c52068432
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
end
function
c52068432
.
remcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_RITUAL
end
function
c52068432
.
remtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_HAND
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
+
LOCATION_HAND
)
end
function
c52068432
.
remop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_HAND
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
g3
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
,
nil
)
if
g1
:
GetCount
()
>
0
and
g2
:
GetCount
()
>
0
and
g3
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg1
=
g1
:
RandomSelect
(
tp
,
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg2
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg3
=
g3
:
Select
(
tp
,
1
,
1
,
nil
)
sg1
:
Merge
(
sg2
)
sg1
:
Merge
(
sg3
)
Duel
.
HintSelection
(
sg1
)
Duel
.
Remove
(
sg1
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
--トリシューラの影霊衣
function
c52068432
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c52068432
.
splimit
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
52068432
,
0
))
e2
:
SetCategory
(
CATEGORY_NEGATE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
52068432
)
e2
:
SetCondition
(
c52068432
.
negcon
)
e2
:
SetCost
(
c52068432
.
negcost
)
e2
:
SetTarget
(
c52068432
.
negtg
)
e2
:
SetOperation
(
c52068432
.
negop
)
c
:
RegisterEffect
(
e2
)
--remove
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
52068432
,
1
))
e3
:
SetCategory
(
CATEGORY_REMOVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCountLimit
(
1
,
52068433
)
e3
:
SetCondition
(
c52068432
.
remcon
)
e3
:
SetTarget
(
c52068432
.
remtg
)
e3
:
SetOperation
(
c52068432
.
remop
)
c
:
RegisterEffect
(
e3
)
end
function
c52068432
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_RITUAL
)
==
SUMMON_TYPE_RITUAL
end
function
c52068432
.
mat_filter
(
c
)
return
c
:
GetLevel
()
~=
9
end
function
c52068432
.
tfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb4
)
and
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
end
function
c52068432
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsExists
(
c52068432
.
tfilter
,
1
,
nil
,
tp
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c52068432
.
negcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c52068432
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
end
function
c52068432
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
end
function
c52068432
.
remcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_RITUAL
end
function
c52068432
.
remtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_HAND
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
+
LOCATION_HAND
)
end
function
c52068432
.
remop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_HAND
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
g3
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
,
nil
)
if
g1
:
GetCount
()
>
0
and
g2
:
GetCount
()
>
0
and
g3
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg1
=
g1
:
RandomSelect
(
tp
,
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg2
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg3
=
g3
:
Select
(
tp
,
1
,
1
,
nil
)
sg1
:
Merge
(
sg2
)
sg1
:
Merge
(
sg3
)
Duel
.
HintSelection
(
sg1
)
Duel
.
Remove
(
sg1
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
script/c52846880.lua
View file @
16a07fe1
--カタストルの影霊衣
function
c52846880
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
52846880
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
52846880
)
e2
:
SetCost
(
c52846880
.
spcost
)
e2
:
SetTarget
(
c52846880
.
sptg
)
e2
:
SetOperation
(
c52846880
.
spop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
52846880
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_BATTLE_START
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c52846880
.
condition
)
e3
:
SetTarget
(
c52846880
.
target
)
e3
:
SetOperation
(
c52846880
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c52846880
.
mat_filter
(
c
)
return
not
c
:
IsCode
(
52846880
)
end
function
c52846880
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c52846880
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xb4
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c52846880
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c52846880
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c52846880
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c52846880
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c52846880
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c52846880
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
local
bc
=
Duel
.
GetAttackTarget
()
if
not
bc
then
return
false
end
if
tc
:
IsControler
(
1
-
tp
)
then
tc
,
bc
=
bc
,
tc
end
if
tc
:
IsSetCard
(
0xb4
)
and
bc
:
GetSummonLocation
()
==
LOCATION_EXTRA
then
e
:
SetLabelObject
(
bc
)
return
true
else
return
false
end
end
function
c52846880
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
bc
=
e
:
GetLabelObject
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
bc
,
1
,
0
,
0
)
end
function
c52846880
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bc
=
e
:
GetLabelObject
()
if
bc
:
IsRelateToBattle
()
then
Duel
.
Destroy
(
bc
,
REASON_EFFECT
)
end
end
--カタストルの影霊衣
function
c52846880
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c52846880
.
splimit
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
52846880
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
52846880
)
e2
:
SetCost
(
c52846880
.
spcost
)
e2
:
SetTarget
(
c52846880
.
sptg
)
e2
:
SetOperation
(
c52846880
.
spop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
52846880
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_BATTLE_START
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c52846880
.
condition
)
e3
:
SetTarget
(
c52846880
.
target
)
e3
:
SetOperation
(
c52846880
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c52846880
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_RITUAL
)
==
SUMMON_TYPE_RITUAL
end
function
c52846880
.
mat_filter
(
c
)
return
not
c
:
IsCode
(
52846880
)
end
function
c52846880
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c52846880
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xb4
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c52846880
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c52846880
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c52846880
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c52846880
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c52846880
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c52846880
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
local
bc
=
Duel
.
GetAttackTarget
()
if
not
bc
then
return
false
end
if
tc
:
IsControler
(
1
-
tp
)
then
tc
,
bc
=
bc
,
tc
end
if
tc
:
IsSetCard
(
0xb4
)
and
bc
:
GetSummonLocation
()
==
LOCATION_EXTRA
then
e
:
SetLabelObject
(
bc
)
return
true
else
return
false
end
end
function
c52846880
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
bc
=
e
:
GetLabelObject
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
bc
,
1
,
0
,
0
)
end
function
c52846880
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bc
=
e
:
GetLabelObject
()
if
bc
:
IsRelateToBattle
()
then
Duel
.
Destroy
(
bc
,
REASON_EFFECT
)
end
end
script/c64437633.lua
View file @
16a07fe1
--儀水鏡の幻影術
function
c64437633
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c64437633
.
target
)
e1
:
SetOperation
(
c64437633
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c64437633
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3a
)
and
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
function
c64437633
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c64437633
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_HAND
)
end
function
c64437633
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c64437633
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetOperation
(
c64437633
.
retop
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetCountLimit
(
1
)
tc
:
RegisterEffect
(
e2
,
true
)
end
end
function
c64437633
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
end
--儀水鏡の幻影術
function
c64437633
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c64437633
.
target
)
e1
:
SetOperation
(
c64437633
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c64437633
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3a
)
and
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
true
)
end
function
c64437633
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c64437633
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_HAND
)
end
function
c64437633
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c64437633
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetOperation
(
c64437633
.
retop
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetCountLimit
(
1
)
tc
:
RegisterEffect
(
e2
,
true
)
end
end
function
c64437633
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
end
script/c65450690.lua
View file @
16a07fe1
--限定解除
function
c65450690
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
65450690
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c65450690
.
cost
)
e1
:
SetTarget
(
c65450690
.
target
)
e1
:
SetOperation
(
c65450690
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c65450690
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
Duel
.
PayLPCost
(
tp
,
1000
)
end
function
c65450690
.
filter
(
c
,
e
,
tp
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
function
c65450690
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c65450690
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_HAND
)
end
function
c65450690
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65450690
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
,
true
)
tc
:
RegisterFlagEffect
(
65450690
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCountLimit
(
1
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetLabelObject
(
tc
)
e2
:
SetCondition
(
c65450690
.
descon
)
e2
:
SetOperation
(
c65450690
.
desop
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
function
c65450690
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
if
tc
:
GetFlagEffect
(
65450690
)
~=
0
then
return
true
else
e
:
Reset
()
return
false
end
end
function
c65450690
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
--限定解除
function
c65450690
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
65450690
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c65450690
.
cost
)
e1
:
SetTarget
(
c65450690
.
target
)
e1
:
SetOperation
(
c65450690
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c65450690
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
Duel
.
PayLPCost
(
tp
,
1000
)
end
function
c65450690
.
filter
(
c
,
e
,
tp
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
true
)
end
function
c65450690
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c65450690
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_HAND
)
end
function
c65450690
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65450690
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
,
true
)
tc
:
RegisterFlagEffect
(
65450690
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCountLimit
(
1
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetLabelObject
(
tc
)
e2
:
SetCondition
(
c65450690
.
descon
)
e2
:
SetOperation
(
c65450690
.
desop
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
function
c65450690
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
if
tc
:
GetFlagEffect
(
65450690
)
~=
0
then
return
true
else
e
:
Reset
()
return
false
end
end
function
c65450690
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
script/c74122412.lua
View file @
16a07fe1
--グングニールの影霊衣
function
c74122412
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
74122412
)
e2
:
SetCost
(
c74122412
.
indcost
)
e2
:
SetTarget
(
c74122412
.
indtg
)
e2
:
SetOperation
(
c74122412
.
indop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
74122413
)
e3
:
SetCost
(
c74122412
.
descost
)
e3
:
SetTarget
(
c74122412
.
destg
)
e3
:
SetOperation
(
c74122412
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c74122412
.
mat_filter
(
c
)
return
c
:
GetLevel
()
~=
7
end
function
c74122412
.
indcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c74122412
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb4
)
end
function
c74122412
.
indtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c74122412
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c74122412
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c74122412
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c74122412
.
indop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
e1
:
SetValue
(
1
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c74122412
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xb4
)
and
c
:
IsDiscardable
()
end
function
c74122412
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c74122412
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c74122412
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c74122412
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsDestructable
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c74122412
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
--グングニールの影霊衣
function
c74122412
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c74122412
.
splimit
)
c
:
RegisterEffect
(
e1
)
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
74122412
)
e2
:
SetCost
(
c74122412
.
indcost
)
e2
:
SetTarget
(
c74122412
.
indtg
)
e2
:
SetOperation
(
c74122412
.
indop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
74122413
)
e3
:
SetCost
(
c74122412
.
descost
)
e3
:
SetTarget
(
c74122412
.
destg
)
e3
:
SetOperation
(
c74122412
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c74122412
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_RITUAL
)
==
SUMMON_TYPE_RITUAL
end
function
c74122412
.
mat_filter
(
c
)
return
c
:
GetLevel
()
~=
7
end
function
c74122412
.
indcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c74122412
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb4
)
end
function
c74122412
.
indtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c74122412
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c74122412
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c74122412
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c74122412
.
indop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
e1
:
SetValue
(
1
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c74122412
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xb4
)
and
c
:
IsDiscardable
()
end
function
c74122412
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c74122412
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c74122412
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c74122412
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsDestructable
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c74122412
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
script/c88240999.lua
View file @
16a07fe1
--ディサイシブの影霊衣
function
c88240999
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--boost
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
88240999
,
0
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetHintTiming
(
TIMING_DAMAGE_STEP
,
TIMING_DAMAGE_STEP
+
0x1c0
)
e2
:
SetCountLimit
(
1
,
88240999
)
e2
:
SetCondition
(
c88240999
.
adcon
)
e2
:
SetCost
(
c88240999
.
adcost
)
e2
:
SetTarget
(
c88240999
.
adtg
)
e2
:
SetOperation
(
c88240999
.
adop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
88240999
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_REMOVE
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCountLimit
(
1
,
88241000
)
e3
:
SetTarget
(
c88240999
.
destg
)
e3
:
SetOperation
(
c88240999
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c88240999
.
mat_filter
(
c
)
return
c
:
GetLevel
()
~=
10
end
function
c88240999
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
end
function
c88240999
.
adcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c88240999
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb4
)
end
function
c88240999
.
adtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c88240999
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c88240999
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c88240999
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c88240999
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
1000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENCE
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c88240999
.
desfilter
(
c
)
return
c
:
IsFacedown
()
and
c
:
IsDestructable
()
and
c
:
IsAbleToRemove
()
end
function
c88240999
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
c88240999
.
desfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c88240999
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c88240999
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
c88240999
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
,
LOCATION_REMOVED
)
end
end
--ディサイシブの影霊衣
function
c88240999
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c88240999
.
splimit
)
c
:
RegisterEffect
(
e1
)
--boost
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
88240999
,
0
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetHintTiming
(
TIMING_DAMAGE_STEP
,
TIMING_DAMAGE_STEP
+
0x1c0
)
e2
:
SetCountLimit
(
1
,
88240999
)
e2
:
SetCondition
(
c88240999
.
adcon
)
e2
:
SetCost
(
c88240999
.
adcost
)
e2
:
SetTarget
(
c88240999
.
adtg
)
e2
:
SetOperation
(
c88240999
.
adop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
88240999
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_REMOVE
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCountLimit
(
1
,
88241000
)
e3
:
SetTarget
(
c88240999
.
destg
)
e3
:
SetOperation
(
c88240999
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c88240999
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_RITUAL
)
==
SUMMON_TYPE_RITUAL
end
function
c88240999
.
mat_filter
(
c
)
return
c
:
GetLevel
()
~=
10
end
function
c88240999
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
end
function
c88240999
.
adcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c88240999
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb4
)
end
function
c88240999
.
adtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c88240999
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c88240999
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c88240999
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c88240999
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
1000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENCE
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c88240999
.
desfilter
(
c
)
return
c
:
IsFacedown
()
and
c
:
IsDestructable
()
and
c
:
IsAbleToRemove
()
end
function
c88240999
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
c88240999
.
desfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c88240999
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c88240999
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
c88240999
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
,
LOCATION_REMOVED
)
end
end
script/c89463537.lua
View file @
16a07fe1
--ユニコールの影霊衣
function
c89463537
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
89463537
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
89463537
)
e2
:
SetCost
(
c89463537
.
cost
)
e2
:
SetTarget
(
c89463537
.
target
)
e2
:
SetOperation
(
c89463537
.
operation
)
c
:
RegisterEffect
(
e2
)
--disable
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_DISABLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e3
:
SetTarget
(
c89463537
.
distg
)
c
:
RegisterEffect
(
e3
)
end
function
c89463537
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c89463537
.
filter
(
c
)
return
c
:
IsSetCard
(
0xb4
)
and
not
c
:
IsCode
(
89463537
)
and
c
:
IsAbleToHand
()
end
function
c89463537
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c89463537
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c89463537
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c89463537
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c89463537
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
function
c89463537
.
distg
(
e
,
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
end
--ユニコールの影霊衣
function
c89463537
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c89463537
.
splimit
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
89463537
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
89463537
)
e2
:
SetCost
(
c89463537
.
cost
)
e2
:
SetTarget
(
c89463537
.
target
)
e2
:
SetOperation
(
c89463537
.
operation
)
c
:
RegisterEffect
(
e2
)
--disable
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_DISABLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e3
:
SetTarget
(
c89463537
.
distg
)
c
:
RegisterEffect
(
e3
)
end
function
c89463537
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_RITUAL
)
==
SUMMON_TYPE_RITUAL
end
function
c89463537
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c89463537
.
filter
(
c
)
return
c
:
IsSetCard
(
0xb4
)
and
not
c
:
IsCode
(
89463537
)
and
c
:
IsAbleToHand
()
end
function
c89463537
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c89463537
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c89463537
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c89463537
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c89463537
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
function
c89463537
.
distg
(
e
,
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
end
script/c97211663.lua
View file @
16a07fe1
...
...
@@ -22,8 +22,8 @@ function c97211663.initial_effect(c)
end
function
c97211663
.
filter
(
c
,
e
,
tp
,
m
)
if
not
c
:
IsSetCard
(
0xb4
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
tru
e
,
true
)
or
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
then
return
false
end
if
c
:
IsCode
(
21105106
)
then
return
c
:
IsLocation
(
LOCATION_HAND
)
and
c
:
ritual_custom_condition
(
m
)
end
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
fals
e
,
true
)
or
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
then
return
false
end
if
c
:
IsCode
(
21105106
)
then
return
c
:
ritual_custom_condition
(
m
)
end
local
mg
=
nil
if
c
.
mat_filter
then
mg
=
m
:
Filter
(
c
.
mat_filter
,
c
)
...
...
@@ -61,7 +61,7 @@ function c97211663.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ReleaseRitualMaterial
(
mat
)
end
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
tru
e
,
true
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
fals
e
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
...
...
script/c99185129.lua
View file @
16a07fe1
--クラウソラスの影霊衣
function
c99185129
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99185129
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetCountLimit
(
1
,
99185129
)
e2
:
SetCost
(
c99185129
.
thcost
)
e2
:
SetTarget
(
c99185129
.
thtg
)
e2
:
SetOperation
(
c99185129
.
thop
)
c
:
RegisterEffect
(
e2
)
--atk
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
99185129
,
1
))
e3
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DISABLE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetHintTiming
(
TIMING_DAMAGE_STEP
,
TIMING_DAMAGE_STEP
+
0x1c0
)
e3
:
SetCountLimit
(
1
,
99185130
)
e3
:
SetCondition
(
c99185129
.
condition
)
e3
:
SetTarget
(
c99185129
.
target
)
e3
:
SetOperation
(
c99185129
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c99185129
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c99185129
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xb4
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c99185129
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c99185129
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c99185129
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c99185129
.
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
function
c99185129
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
end
function
c99185129
.
filter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
not
(
c
:
GetAttack
()
==
0
and
c
:
IsDisabled
())
end
function
c99185129
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c99185129
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c99185129
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c99185129
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c99185129
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e1
)
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e3
:
SetValue
(
RESET_TURN_SET
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e3
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e4
)
end
end
end
--クラウソラスの影霊衣
function
c99185129
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c99185129
.
splimit
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99185129
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetCountLimit
(
1
,
99185129
)
e2
:
SetCost
(
c99185129
.
thcost
)
e2
:
SetTarget
(
c99185129
.
thtg
)
e2
:
SetOperation
(
c99185129
.
thop
)
c
:
RegisterEffect
(
e2
)
--atk
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
99185129
,
1
))
e3
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DISABLE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetHintTiming
(
TIMING_DAMAGE_STEP
,
TIMING_DAMAGE_STEP
+
0x1c0
)
e3
:
SetCountLimit
(
1
,
99185130
)
e3
:
SetCondition
(
c99185129
.
condition
)
e3
:
SetTarget
(
c99185129
.
target
)
e3
:
SetOperation
(
c99185129
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c99185129
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_RITUAL
)
==
SUMMON_TYPE_RITUAL
end
function
c99185129
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c99185129
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xb4
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c99185129
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c99185129
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c99185129
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c99185129
.
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
function
c99185129
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
end
function
c99185129
.
filter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
not
(
c
:
GetAttack
()
==
0
and
c
:
IsDisabled
())
end
function
c99185129
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c99185129
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c99185129
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c99185129
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c99185129
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e1
)
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e3
:
SetValue
(
RESET_TURN_SET
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e3
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e4
)
end
end
end
script/utility.lua
View file @
16a07fe1
...
...
@@ -921,7 +921,7 @@ function Auxiliary.AddRitualProcGreater(c,filter)
c
:
RegisterEffect
(
e1
)
end
function
Auxiliary
.
RPGFilter
(
c
,
filter
,
e
,
tp
,
m
)
if
(
filter
and
not
filter
(
c
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
fals
e
)
then
return
false
end
if
(
filter
and
not
filter
(
c
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
tru
e
)
then
return
false
end
local
result
=
false
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
...
...
@@ -954,7 +954,7 @@ function Auxiliary.RPGOperation(filter)
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
true
,
fals
e
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
tru
e
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
...
...
@@ -970,7 +970,7 @@ function Auxiliary.AddRitualProcEqual(c,filter)
c
:
RegisterEffect
(
e1
)
end
function
Auxiliary
.
RPEFilter
(
c
,
filter
,
e
,
tp
,
m
)
if
(
filter
and
not
filter
(
c
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
fals
e
)
then
return
false
end
if
(
filter
and
not
filter
(
c
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
tru
e
)
then
return
false
end
local
result
=
false
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
...
...
@@ -1003,7 +1003,7 @@ function Auxiliary.RPEOperation(filter)
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
true
,
fals
e
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
tru
e
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
...
...
@@ -1019,7 +1019,7 @@ function Auxiliary.AddRitualProcEqual2(c,filter)
c
:
RegisterEffect
(
e1
)
end
function
Auxiliary
.
RPEFilter2
(
c
,
filter
,
e
,
tp
,
m
)
if
(
filter
and
not
filter
(
c
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
fals
e
)
then
return
false
end
if
(
filter
and
not
filter
(
c
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
tru
e
)
then
return
false
end
local
result
=
false
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
...
...
@@ -1052,7 +1052,7 @@ function Auxiliary.RPEOperation2(filter)
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
true
,
fals
e
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
tru
e
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
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