Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nemo Ma
no81cards
Commits
c24521aa
Commit
c24521aa
authored
Dec 23, 2021
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
ba8315b1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
330 additions
and
98 deletions
+330
-98
expansions/script/c33310100.lua
expansions/script/c33310100.lua
+73
-19
expansions/script/c33310101.lua
expansions/script/c33310101.lua
+88
-21
expansions/script/c33310102.lua
expansions/script/c33310102.lua
+37
-12
expansions/script/c33310103.lua
expansions/script/c33310103.lua
+78
-25
expansions/script/c33310104.lua
expansions/script/c33310104.lua
+54
-21
No files found.
expansions/script/c33310100.lua
View file @
c24521aa
--可可莉柯特·布兰琪
--可可莉柯特·布兰琪
if
not
pcall
(
function
()
require
(
"expansions/script/c10199990"
)
end
)
then
require
(
"script/c10199990"
)
end
local
m
=
33310100
local
m
,
cm
=
rsof
.
DefineCard
(
33310100
,
"Cochrot"
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
rssetcode
=
"Cochrot"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
local
e1
=
rsef
.
SC
(
c
,
EVENT_SPSUMMON_SUCCESS
,
nil
,
nil
,
nil
,
rscon
.
sumtype
(
"rit"
),
cm
.
atkop
)
--bgm
local
e2
,
e3
=
rsef
.
SV_INDESTRUCTABLE
(
c
,
"battle,effect"
)
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e4
=
rsef
.
RegisterClone
(
c
,
e3
,
"code"
,
EFFECT_AVOID_BATTLE_DAMAGE
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e0
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e5
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e0
:
SetOperation
(
cm
.
bgmop
)
e5
:
SetCondition
(
cm
.
damcon
)
c
:
RegisterEffect
(
e0
)
e5
:
SetOperation
(
cm
.
damop
)
--announce
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e7
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e7
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e7
:
SetOperation
(
cm
.
anop
)
c
:
RegisterEffect
(
e7
)
--summon success
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetOperation
(
cm
.
atkop
)
c
:
RegisterEffect
(
e1
)
--deepen damage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CHANGE_BATTLE_DAMAGE
)
e2
:
SetValue
(
aux
.
ChangeBattleDamage
(
1
,
DOUBLE_DAMAGE
))
c
:
RegisterEffect
(
e2
)
--indes
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
c
:
RegisterEffect
(
e4
)
--damage val
local
e5
=
e3
:
Clone
()
e5
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
local
e6
=
rsef
.
STO
(
c
,
EVENT_REMOVE
,{
m
,
0
},
nil
,
nil
,
"de,dsp"
,
nil
,
nil
,
rsop
.
target
(
cm
.
actfilter
,
nil
,
LOCATION_GRAVE
+
LOCATION_DECK
),
cm
.
actop
)
--act
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetCode
(
EVENT_REMOVE
)
e6
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e6
:
SetTarget
(
cm
.
acttg
)
e6
:
SetOperation
(
cm
.
actop
)
c
:
RegisterEffect
(
e6
)
end
end
function
cm
.
atkop
(
e
,
tp
)
function
cm
.
bgmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_MUSIC
,
tp
,
aux
.
Stringid
(
m
,
0
))
end
function
cm
.
anop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
24
,
0
,
aux
.
Stringid
(
m
,
1
))
end
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
not
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
then
return
end
if
#
g
<=
0
then
return
end
if
#
g
<=
0
then
return
end
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
for
tc
in
aux
.
Next
(
g
)
do
for
tc
in
aux
.
Next
(
g
)
do
local
e1
=
rsef
.
SV_SET
({
e
:
GetHandler
(),
tc
},
"atkf"
,
0
,
nil
,
rsreset
.
est
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
function
cm
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
@@ -28,16 +80,18 @@ end
...
@@ -28,16 +80,18 @@ end
function
cm
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
*
2
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
*
2
)
end
end
function
cm
.
actfilter
(
c
,
e
,
tp
)
function
cm
.
actfilter
(
c
,
tp
)
return
c
:
IsCode
(
33310101
)
and
c
:
GetActivateEffect
()
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
return
c
:
IsCode
(
33310101
)
and
c
:
GetActivateEffect
()
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
)
end
function
cm
.
acttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
actfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
end
end
end
function
cm
.
actop
(
e
,
tp
)
function
cm
.
actop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
rsof
.
SelectHint
(
tp
,
HINTMSG_TOFIEL
D
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECAR
D
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
actfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
actfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
not
tc
then
return
end
if
not
tc
then
return
end
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
local
te
=
tc
:
GetActivateEffect
()
te
:
UseCountLimit
(
tp
,
1
,
true
)
local
tep
=
tc
:
GetControler
()
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
...
...
expansions/script/c33310101.lua
View file @
c24521aa
--恶魔的提线魔术
--恶魔的提线魔术
if
not
pcall
(
function
()
require
(
"expansions/script/c10199990"
)
end
)
then
require
(
"script/c10199990"
)
end
local
m
=
33310101
local
m
,
cm
=
rsof
.
DefineCard
(
33310101
)
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
local
e1
=
rsef
.
ACT
(
c
)
--Activate
local
e2
=
rsef
.
QO
(
c
,
nil
,{
m
,
0
},{
1
,
0x1
},
"tg"
,
nil
,
LOCATION_SZONE
,
nil
,
nil
,
rsop
.
target2
(
cm
.
fun
,
cm
.
copyfilter
,
"tg"
,
LOCATION_DECK
),
cm
.
copyop
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e3
=
rsef
.
QO
(
c
,
nil
,{
m
,
1
},{
1
,
0x1
},
"dis"
,
nil
,
LOCATION_SZONE
,
nil
,
nil
,
rsop
.
target
(
aux
.
disfilter1
,
"dis"
,
0
,
LOCATION_ONFIELD
),
cm
.
disop
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
local
e4
=
rsef
.
QO
(
c
,
nil
,{
m
,
2
},{
1
,
0x1
},
nil
,
nil
,
LOCATION_SZONE
,
cm
.
skipcon
,
nil
,
nil
,
cm
.
skipop
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--copy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_DECKDES
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e2
:
SetTarget
(
cm
.
copytg
)
e2
:
SetOperation
(
cm
.
copyop
)
c
:
RegisterEffect
(
e2
)
--disable
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_DISABLE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e3
:
SetCondition
(
cm
.
discon
)
e3
:
SetTarget
(
cm
.
distg
)
e3
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e3
)
--skip
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e4
:
SetCondition
(
cm
.
skipcon
)
e4
:
SetOperation
(
cm
.
skipop
)
c
:
RegisterEffect
(
e4
)
end
end
function
cm
.
copyfilter
(
c
,
e
,
tp
)
function
cm
.
copyfilter
(
c
,
e
,
tp
)
if
not
c
:
IsCode
(
33310102
)
or
not
c
:
IsAbleToGrave
()
then
return
false
end
if
not
c
:
IsCode
(
33310102
)
or
not
c
:
IsAbleToGrave
()
then
return
false
end
return
c
:
CheckActivateEffect
(
false
,
true
,
false
)
~=
nil
return
c
:
CheckActivateEffect
(
false
,
true
,
false
)
~=
nil
end
end
function
cm
.
copyop
(
e
,
tp
)
function
cm
.
copytg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
rsof
.
SelectHint
(
tp
,
"tg"
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
copyfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
copyfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
)
end
function
cm
.
copyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
copyfilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
not
tc
or
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
<=
0
or
not
tc
:
IsLocation
(
LOCATION_GRAVE
)
then
return
end
if
not
tc
or
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
<=
0
or
not
tc
:
IsLocation
(
LOCATION_GRAVE
)
then
return
end
local
te
=
tc
:
GetActivateEffect
()
local
te
=
tc
:
GetActivateEffect
()
local
op
=
te
:
GetOperation
()
local
op
=
te
:
GetOperation
()
if
op
then
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
op
then
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
function
cm
.
disop
(
e
,
tp
)
function
cm
.
filter0
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetType
()
&
0x81
==
0x81
end
function
cm
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter0
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
NegateAnyFilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
end
function
cm
.
disop
(
e
,
tp
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
rsof
.
SelectHint
(
tp
,
"dis"
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISABLE
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
disfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
):
GetFirst
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NegateAnyFilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
not
tc
then
return
end
if
#
g
==
0
then
return
end
Duel
.
HintSelection
(
rsgf
.
Mix2
(
tc
))
Duel
.
HintSelection
(
g
)
local
e1
,
e2
=
rsef
.
SV_LIMIT
({
c
,
tc
},
"dis,dise"
,
nil
,
nil
,
rsreset
.
est
)
local
tc
=
g
:
GetFirst
()
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
Duel
.
AdjustInstantly
(
c
)
Duel
.
AdjustInstantly
(
c
)
if
tc
:
IsDisabled
()
and
tc
:
IsType
(
TYPE_MONSTER
)
then
if
tc
:
IsType
(
TYPE_MONSTER
)
then
local
e3
=
rsef
.
SV_INDESTRUCTABLE
({
c
,
tc
},
"battle"
,
nil
,
nil
,
rsreset
.
est
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e3
:
SetValue
(
1
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetReset
(
rsreset
.
est
)
e4
:
SetCode
(
EFFECT_MUST_ATTACK
)
e4
:
SetCode
(
EFFECT_MUST_ATTACK
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e4
)
tc
:
RegisterEffect
(
e4
)
end
end
end
end
function
cm
.
skipcon
(
e
,
tp
)
function
cm
.
cfilter
(
c
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
and
rscon
.
excard2
(
rscf
.
CheckSetCard
,
LOCATION_MZONE
,
0
,
1
,
nil
,
"Cochrot"
)
return
c
:
IsFaceup
()
and
_G
[
"c"
..
c
:
GetCode
()].
rssetcode
and
_G
[
"c"
..
c
:
GetCode
()].
rssetcode
==
"Cochrot"
end
function
cm
.
skipcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
cm
.
skipop
(
e
,
tp
)
function
cm
.
skipop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetTurnPlayer
()
local
p
=
Duel
.
GetTurnPlayer
()
Duel
.
SkipPhase
(
p
,
PHASE_MAIN1
,
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
SkipPhase
(
p
,
PHASE_MAIN1
,
RESET_PHASE
+
PHASE_END
,
1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
expansions/script/c33310102.lua
View file @
c24521aa
--睡美人的小憇
--睡美人的小憇
if
not
pcall
(
function
()
require
(
"expansions/script/c10199990"
)
end
)
then
require
(
"script/c10199990"
)
end
local
m
=
33310102
local
m
,
cm
=
rsof
.
DefineCard
(
33310102
)
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
local
e1
=
rsef
.
ACT
(
c
,
nil
,
nil
,
nil
,
"sp,rm"
,
nil
,
nil
,
nil
,
cm
.
tg
,
cm
.
act
)
--Activate
local
e2
=
rsef
.
I
(
c
,{
m
,
0
},
nil
,
"td,th"
,
"tg"
,
LOCATION_GRAVE
,
nil
,
nil
,
rstg
.
target
({
cm
.
tdfilter
,
"td"
,
LOCATION_REMOVED
},
rsop
.
list
(
Card
.
IsAbleToHand
,
"th"
)),
cm
.
tdop
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
cm
.
tg
)
e1
:
SetOperation
(
cm
.
act
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetTarget
(
cm
.
tdtg
)
e2
:
SetOperation
(
cm
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
and
c
:
CheckSetCard
(
"Cochrot"
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
matfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
1
,
c
,
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
and
_G
[
"c"
..
c
:
GetCode
()].
rssetcode
and
_G
[
"c"
..
c
:
GetCode
()].
rssetcode
==
"Cochrot"
and
Duel
.
IsExistingMatchingCard
(
cm
.
matfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
1
,
c
,
c
,
e
,
tp
)
end
end
function
cm
.
matfilter
(
c
,
tc
,
e
,
tp
)
function
cm
.
matfilter
(
c
,
tc
,
e
,
tp
)
if
c
:
GetRitualLevel
(
tc
)
<
tc
:
GetLevel
()
then
return
false
end
if
c
:
GetRitualLevel
(
tc
)
<
tc
:
GetLevel
()
then
return
false
end
...
@@ -26,10 +42,10 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -26,10 +42,10 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
0
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
0
,
tp
,
LOCATION_GRAVE
)
end
end
function
cm
.
act
(
e
,
tp
)
function
cm
.
act
(
e
,
tp
)
rsof
.
SelectHint
(
tp
,
"sp"
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
not
tc
then
return
end
if
not
tc
then
return
end
rsof
.
SelectHint
(
tp
,
"res"
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
matc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
matfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
1
,
1
,
tc
,
tc
,
e
,
tp
):
GetFirst
()
local
matc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
matfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
1
,
1
,
tc
,
tc
,
e
,
tp
):
GetFirst
()
tc
:
SetMaterial
(
Group
.
FromCards
(
matc
))
tc
:
SetMaterial
(
Group
.
FromCards
(
matc
))
if
matc
:
IsLocation
(
LOCATION_GRAVE
)
then
if
matc
:
IsLocation
(
LOCATION_GRAVE
)
then
...
@@ -41,11 +57,20 @@ function cm.act(e,tp)
...
@@ -41,11 +57,20 @@ function cm.act(e,tp)
tc
:
CompleteProcedure
()
tc
:
CompleteProcedure
()
end
end
function
cm
.
tdfilter
(
c
)
function
cm
.
tdfilter
(
c
)
return
c
:
IsAbleToDeck
()
and
c
:
CheckSetCard
(
"Cochrot"
)
and
c
:
IsFaceup
(
)
return
c
:
IsAbleToDeck
()
and
_G
[
"c"
..
c
:
GetCode
()].
rssetcode
and
_G
[
"c"
..
c
:
GetCode
()].
rssetcode
==
"Cochrot"
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
end
function
cm
.
tdop
(
e
,
tp
)
function
cm
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
,
tc
=
aux
.
ExceptThisCard
(
e
),
rscf
.
GetTargetCard
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
tdfilter
(
chkc
)
end
if
tc
and
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
>
0
and
tc
:
IsLocation
(
LOCATION_DECK
)
and
c
then
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
and
Duel
.
IsExistingTarget
(
cm
.
tdfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
tdfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
function
cm
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
>
0
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c33310103.lua
View file @
c24521aa
--可可莉柯特·兽耳布偶
--可可莉柯特·兽耳布偶
if
not
pcall
(
function
()
require
(
"expansions/script/c10199990"
)
end
)
then
require
(
"script/c10199990"
)
end
local
m
=
33310103
local
m
,
cm
=
rsof
.
DefineCard
(
33310103
,
"Cochrot"
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
rssetcode
=
"Cochrot"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
local
e1
=
rsef
.
I
(
c
,{
m
,
0
},{
1
,
m
},
"se,th,sp,dish,ga"
,
nil
,
LOCATION_HAND
,
nil
,
nil
,
rsop
.
target
({
aux
.
FilterBoolFunction
(
Card
.
IsDiscardable
,
REASON_EFFECT
),
"dish"
,
LOCATION_HAND
},{
cm
.
thfilter
,
"th"
,
LOCATION_DECK
}),
cm
.
thop
)
--special summon
local
e2
=
rsef
.
FC
(
c
,
EVENT_SPSUMMON_SUCCESS
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_HANDES
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
--summon success
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetOperation
(
cm
.
limitop
)
e2
:
SetOperation
(
cm
.
limitop
)
local
e3
=
rsef
.
RegisterClone
(
c
,
e2
,
"code"
,
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
local
e4
=
rsef
.
RegisterClone
(
c
,
e2
,
"code"
,
EVENT_FLIP_SUMMON_SUCCESS
)
local
e3
=
e2
:
Clone
()
local
e5
=
rsef
.
RegisterClone
(
c
,
e2
,
"code"
,
EVENT_TO_GRAVE
,
"op"
,
cm
.
limitop2
)
e3
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
local
e6
=
rsef
.
STO
(
c
,
EVENT_REMOVE
,{
m
,
1
},{
1
,
m
+
100
},
"th"
,
"de,dsp"
,
nil
,
nil
,
rsop
.
target
(
cm
.
thfilter2
,
"th"
,
LOCATION_GRAVE
),
cm
.
thop2
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e2
:
Clone
()
e4
:
SetCode
(
EVENT_FLIP_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e2
:
Clone
()
e5
:
SetCode
(
EVENT_TO_GRAVE
)
e5
:
SetOperation
(
cm
.
limitop2
)
c
:
RegisterEffect
(
e5
)
--tohand
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e6
:
SetCategory
(
CATEGORY_TOHAND
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetCode
(
EVENT_REMOVE
)
e6
:
SetCountLimit
(
1
,
m
+
100
)
e6
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e6
:
SetTarget
(
cm
.
thtg
)
e6
:
SetOperation
(
cm
.
thop2
)
c
:
RegisterEffect
(
e6
)
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsPublic
()
end
end
end
function
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsCode
(
33310102
)
and
c
:
IsAbleToHand
()
return
c
:
IsCode
(
33310102
)
and
c
:
IsAbleToHand
()
end
end
function
cm
.
thop
(
e
,
tp
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_EFFECT
,
nil
,
REASON_EFFECT
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
ct
==
0
then
return
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
rsof
.
SelectHint
(
tp
,
"th"
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
#
g
<=
0
or
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
<=
0
then
return
end
if
Duel
.
DiscardHand
(
tp
,
nil
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
)
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
0
,
LOCATION_GRAVE
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
#
sg
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
if
#
g
<=
0
or
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
<=
0
then
return
end
Duel
.
BreakEffect
()
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
rsof
.
SelectHint
(
tp
,
"sp"
)
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
0
,
LOCATION_GRAVE
,
nil
,
e
,
tp
)
local
sc
=
sg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
if
#
sg
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
if
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
Duel
.
BreakEffect
()
local
e1
,
e2
=
rsef
.
SV_LIMIT
({
e
:
GetHandler
(),
sc
,
true
},
"dis,dise"
,
nil
,
nil
,
rsreset
.
est
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sc
=
sg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
if
Duel
.
SpecialSummonStep
(
sc
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
end
Duel
.
SpecialSummonComplete
()
end
end
end
end
end
end
...
@@ -43,7 +92,7 @@ function cm.limitop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -43,7 +92,7 @@ function cm.limitop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
function
cm
.
cfilter2
(
c
,
tp
)
function
cm
.
cfilter2
(
c
,
tp
)
return
c
:
GetOwner
()
~=
tp
return
c
:
GetOwner
()
~=
tp
and
c
:
IsType
(
TYPE_MONSTER
)
end
end
function
cm
.
limitop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
limitop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
eg
:
IsExists
(
cm
.
cfilter2
,
1
,
nil
,
tp
)
then
if
eg
:
IsExists
(
cm
.
cfilter2
,
1
,
nil
,
tp
)
then
...
@@ -56,8 +105,12 @@ end
...
@@ -56,8 +105,12 @@ end
function
cm
.
thfilter2
(
c
)
function
cm
.
thfilter2
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
GetType
()
&
0x82
==
0x82
return
c
:
IsAbleToHand
()
and
c
:
GetType
()
&
0x82
==
0x82
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
thop2
(
e
,
tp
)
function
cm
.
thop2
(
e
,
tp
)
rsof
.
SelectHint
(
tp
,
"th"
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter2
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter2
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
rsof
.
SendtoHand
(
g
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c33310104.lua
View file @
c24521aa
--可可莉柯特·地狱尖啸者
--可可莉柯特·地狱尖啸者
if
not
pcall
(
function
()
require
(
"expansions/script/c10199990"
)
end
)
then
require
(
"script/c10199990"
)
end
local
m
=
33310104
local
m
,
cm
=
rsof
.
DefineCard
(
33310104
,
"Cochrot"
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
rssetcode
=
"Cochrot"
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
local
e1
=
rsef
.
QO
(
c
,
nil
,{
m
,
0
},{
1
,
m
},
"se,th,rm,dish,ga"
,
nil
,
LOCATION_HAND
,
nil
,
nil
,
rsop
.
target
({
aux
.
FilterBoolFunction
(
Card
.
IsDiscardable
,
REASON_EFFECT
),
"dish"
,
LOCATION_HAND
},{
cm
.
thfilter
,
"th"
,
LOCATION_DECK
}),
cm
.
thop
)
--remove
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_HANDES
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
--act limit
--act limit
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e2
:
SetCondition
(
cm
.
con
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetCondition
(
cm
.
con
)
e2
:
SetValue
(
cm
.
aclimit
)
e2
:
SetValue
(
cm
.
aclimit
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e6
=
rsef
.
STO
(
c
,
EVENT_REMOVE
,{
m
,
1
},{
1
,
m
+
100
},
"td"
,
"de,dsp"
,
nil
,
nil
,
rsop
.
target
(
Card
.
IsAbleToDeck
,
"td"
,
LOCATION_GRAVE
+
LOCATION_REMOVED
),
cm
.
tdop
)
--todeck
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e6
:
SetCategory
(
CATEGORY_TOHAND
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetCode
(
EVENT_REMOVE
)
e6
:
SetCountLimit
(
1
,
m
+
100
)
e6
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e6
:
SetTarget
(
cm
.
tdtg
)
e6
:
SetOperation
(
cm
.
tdop
)
c
:
RegisterEffect
(
e6
)
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsPublic
()
end
end
end
function
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsCode
(
33310101
)
and
c
:
IsAbleToHand
()
return
c
:
IsCode
(
33310101
)
and
c
:
IsAbleToHand
()
end
end
function
cm
.
thop
(
e
,
tp
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_EFFECT
,
nil
,
REASON_EFFECT
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
ct
==
0
then
return
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
rsof
.
SelectHint
(
tp
,
"th"
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
#
g
<=
0
or
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
<=
0
then
return
end
if
Duel
.
DiscardHand
(
tp
,
nil
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
)
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
rg
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
Card
.
IsAbleToRemove
),
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
#
rg
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
if
#
g
<=
0
or
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
<=
0
then
return
end
Duel
.
BreakEffect
()
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
rsof
.
SelectHint
(
tp
,
"rm"
)
local
rg
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
Card
.
IsAbleToRemove
),
tp
,
LOCATION_GRAVE
,
0
,
nil
)
rg
=
rg
:
Select
(
tp
,
1
,
1
,
nil
)
if
#
rg
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
rsof
.
Remove
(
rg
)
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
rg
=
rg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Remove
(
rg
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
end
end
end
function
cm
.
con
(
e
)
function
cm
.
con
(
e
)
...
@@ -41,8 +70,12 @@ end
...
@@ -41,8 +70,12 @@ end
function
cm
.
aclimit
(
e
,
re
,
tp
)
function
cm
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetOwnerPlayer
()
~=
e
:
GetOwnerPlayer
()
return
not
re
:
GetOwnerPlayer
()
~=
e
:
GetOwnerPlayer
()
end
end
function
cm
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToDeck
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
end
function
cm
.
tdop
(
e
,
tp
)
function
cm
.
tdop
(
e
,
tp
)
rsof
.
SelectHint
(
tp
,
"td"
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
Card
.
IsAbleToDeck
),
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
Card
.
IsAbleToDeck
),
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
rsof
.
SendtoDeck
(
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment