Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Huangnan
no81cards
Commits
4870d517
Commit
4870d517
authored
Jun 22, 2023
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a61b1779
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
431 additions
and
413 deletions
+431
-413
expansions/script/c11451884.lua
expansions/script/c11451884.lua
+3
-0
expansions/script/c14001557.lua
expansions/script/c14001557.lua
+1
-0
expansions/script/c40010662.lua
expansions/script/c40010662.lua
+29
-28
expansions/script/c40010663.lua
expansions/script/c40010663.lua
+4
-4
expansions/script/c40010664.lua
expansions/script/c40010664.lua
+18
-17
expansions/script/c40010666.lua
expansions/script/c40010666.lua
+32
-31
expansions/script/c40010668.lua
expansions/script/c40010668.lua
+30
-29
expansions/script/c40010670.lua
expansions/script/c40010670.lua
+28
-27
expansions/script/c40010672.lua
expansions/script/c40010672.lua
+28
-27
expansions/script/c40010674.lua
expansions/script/c40010674.lua
+27
-26
expansions/script/c40010676.lua
expansions/script/c40010676.lua
+36
-35
expansions/script/c40010678.lua
expansions/script/c40010678.lua
+22
-21
expansions/script/c40010682.lua
expansions/script/c40010682.lua
+25
-24
expansions/script/c40010684.lua
expansions/script/c40010684.lua
+21
-20
expansions/script/c40010686.lua
expansions/script/c40010686.lua
+15
-14
expansions/script/c40010690.lua
expansions/script/c40010690.lua
+14
-13
expansions/script/c53759004.lua
expansions/script/c53759004.lua
+1
-1
expansions/script/c53759006.lua
expansions/script/c53759006.lua
+1
-1
expansions/script/c55157075.lua
expansions/script/c55157075.lua
+2
-2
expansions/script/c60000004.lua
expansions/script/c60000004.lua
+1
-2
expansions/script/c65130303.lua
expansions/script/c65130303.lua
+1
-1
expansions/script/c91000402.lua
expansions/script/c91000402.lua
+89
-89
expansions/script/c91000403.lua
expansions/script/c91000403.lua
+1
-0
expansions/script/c98920427.lua
expansions/script/c98920427.lua
+1
-0
expansions/script/c9910451.lua
expansions/script/c9910451.lua
+1
-1
No files found.
expansions/script/c11451884.lua
View file @
4870d517
...
...
@@ -85,6 +85,9 @@ end
function
cm
.
extfilter
(
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
not
c
:
IsPublic
()
end
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x9976
)
and
c
:
IsAbleToHand
()
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
...
...
expansions/script/c14001557.lua
View file @
4870d517
...
...
@@ -74,6 +74,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
HintSelection
(
mat1
)
Duel
.
ConfirmCards
(
1
-
tp
,
mat1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
ShuffleHand
()
else
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
end
...
...
expansions/script/c40010662.lua
View file @
4870d517
--哀恸魔女-变貌之辛克莱尔
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010662
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsRace
,
RACE_SPELLCASTER
),
1
)
c
:
EnableReviveLimit
()
--remove
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetTarget
(
s
.
rmtg
)
e1
:
SetOperation
(
s
.
rmop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
rmtg
)
e1
:
SetOperation
(
cm
.
rmop
)
c
:
RegisterEffect
(
e1
)
--change effect
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCondition
(
s
.
chcon
)
e2
:
SetTarget
(
s
.
chtg
)
e2
:
SetOperation
(
s
.
chop
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCondition
(
cm
.
chcon
)
e2
:
SetTarget
(
cm
.
chtg
)
e2
:
SetOperation
(
cm
.
chop
)
c
:
RegisterEffect
(
e2
)
--atk/def up
local
e3
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -40,21 +41,21 @@ function s.initial_effect(c)
e4
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e4
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
--e1
function
s
.
rmfilter
(
c
)
function
cm
.
rmfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToRemove
()
and
Duel
.
GetMZoneCount
(
c
:
GetControler
(),
c
)
>
0
end
function
s
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
rmfilter
(
chkc
)
and
c
:
IsControler
(
1
-
tp
)
and
chkc
~=
c
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
rmfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
c
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
rmfilter
(
chkc
)
and
c
:
IsControler
(
1
-
tp
)
and
chkc
~=
c
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
rmfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
s
.
rmfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
c
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
rmfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
s
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
GetMZoneCount
(
1
-
tp
,
tc
)
>
0
and
Duel
.
Remove
(
tc
,
0
,
REASON_EFFECT
+
REASON_TEMPORARY
)
~=
0
and
tc
:
IsLocation
(
LOCATION_REMOVED
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
@@ -62,8 +63,8 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
s
.
retcon
)
e1
:
SetOperation
(
s
.
retop
)
e1
:
SetCondition
(
cm
.
retcon
)
e1
:
SetOperation
(
cm
.
retop
)
if
Duel
.
GetTurnPlayer
()
==
tp
then
e1
:
SetReset
(
RESET_PHASE
+
PHASE_STANDBY
+
RESET_SELF_TURN
,
2
)
e1
:
SetValue
(
Duel
.
GetTurnCount
())
...
...
@@ -76,27 +77,27 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
if
WW_TK
.
ck
(
tp
)
then
WW_TK
.
op
(
e
:
GetHandler
(),
tp
)
end
end
end
function
s
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetTurnPlayer
()
~=
tp
or
Duel
.
GetTurnCount
()
==
e
:
GetValue
()
then
return
false
end
return
e
:
GetLabelObject
():
IsRelateToEffect
(
e
)
end
function
s
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
Duel
.
ReturnToField
(
tc
)
end
--e2
function
s
.
chcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
chcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
TYPE_TOKEN
)
and
(
re
:
GetActiveType
()
==
TYPE_SPELL
or
re
:
GetActiveType
()
==
TYPE_TRAP
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
function
s
.
chtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
chtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
WW_TK
.
ck
(
1
-
tp
)
end
end
function
s
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Group
.
CreateGroup
()
Duel
.
ChangeTargetCard
(
ev
,
g
)
Duel
.
ChangeChainOperation
(
ev
,
s
.
regop
)
Duel
.
ChangeChainOperation
(
ev
,
cm
.
regop
)
end
function
s
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
WW_TK
.
op
(
e
:
GetHandler
(),
1
-
tp
)
end
\ No newline at end of file
expansions/script/c40010663.lua
View file @
4870d517
...
...
@@ -22,14 +22,14 @@ end
----------------------------------------------------------
function
WW_TK
.
filter
(
tc
,
c
,
tp
)
if
tc
:
IsFacedown
()
or
not
tc
:
IsCanBeSynchroMaterial
()
then
return
false
end
c
:
RegisterFlagEffect
(
id
,
0
,
0
,
1
)
c
:
RegisterFlagEffect
(
40010663
,
0
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SYNCHRO_MATERIAL
)
tc
:
RegisterEffect
(
e1
,
true
)
local
mg
=
Group
.
FromCards
(
c
,
tc
)
local
res
=
Duel
.
IsExistingMatchingCard
(
WW_TK
.
synfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
mg
)
c
:
ResetFlagEffect
(
id
)
c
:
ResetFlagEffect
(
40010663
)
e1
:
Reset
()
return
res
end
...
...
@@ -51,7 +51,7 @@ function WW_TK.synop(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
c
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
c
:
RegisterFlagEffect
(
40010663
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SYNCHRO_MATERIAL
)
...
...
@@ -64,7 +64,7 @@ function WW_TK.synop(e,tp,eg,ep,ev,re,r,rp)
if
sc
then
Duel
.
SynchroSummon
(
tp
,
sc
,
nil
,
mg
)
else
c
:
ResetFlagEffect
(
id
)
c
:
ResetFlagEffect
(
40010663
)
e1
:
Reset
()
end
end
...
...
expansions/script/c40010664.lua
View file @
4870d517
--哀恸魔女-骷髅之内文
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010664
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--spsm
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCost
(
s
.
drcost
)
e1
:
SetTarget
(
s
.
drtg
)
e1
:
SetOperation
(
s
.
drop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
drcost
)
e1
:
SetTarget
(
cm
.
drtg
)
e1
:
SetOperation
(
cm
.
drop
)
c
:
RegisterEffect
(
e1
)
--synchro summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
+
1
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetTarget
(
WW_TK
.
syntg
)
e2
:
SetOperation
(
WW_TK
.
synop
)
c
:
RegisterEffect
(
e2
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
function
s
.
cfilter
(
c
)
function
cm
.
cfilter
(
c
)
return
WW_N
.
ck
(
c
)
and
c
:
IsDiscardable
()
end
function
s
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
SendtoGrave
(
g
,
REASON_DISCARD
+
REASON_COST
)
end
function
s
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
end
function
s
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c40010666.lua
View file @
4870d517
--哀恸魔女-幻惑之菲欧娜
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010666
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsRace
,
RACE_SPELLCASTER
),
1
)
c
:
EnableReviveLimit
()
--spsm
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
s
.
reptg
)
e2
:
SetValue
(
s
.
repval
)
e2
:
SetOperation
(
s
.
repop
)
e2
:
SetTarget
(
cm
.
reptg
)
e2
:
SetValue
(
cm
.
repval
)
e2
:
SetOperation
(
cm
.
repop
)
c
:
RegisterEffect
(
e2
)
local
g
=
Group
.
CreateGroup
()
g
:
KeepAlive
()
e2
:
SetLabelObject
(
g
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
--e1
function
s
.
cfilter
(
c
,
tp
)
function
cm
.
cfilter
(
c
,
tp
)
return
(
c
:
IsControler
(
tp
)
or
(
c
:
IsControler
(
1
-
tp
)
and
c
:
IsType
(
TYPE_TOKEN
)))
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsReleasable
()
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
e
:
GetHandler
(),
tp
)
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
e
:
GetHandler
(),
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
2
,
e
:
GetHandler
(),
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
2
,
e
:
GetHandler
(),
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
s
.
filter
(
c
,
e
,
tp
)
function
cm
.
filter
(
c
,
e
,
tp
)
return
WW_N
.
ck
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
tc
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
and
tc
:
IsCode
(
40010668
)
and
WW_TK
.
ck
(
tp
)
then
WW_TK
.
op
(
e
:
GetHandler
(),
tp
)
end
end
--e2
function
s
.
repfilter
(
c
,
tp
)
function
cm
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
WW_N
.
ck
(
c
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
and
c
:
GetFlagEffect
(
id
)
==
0
end
function
s
.
desfilter
(
c
,
e
)
function
cm
.
desfilter
(
c
,
e
)
return
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsDestructable
(
e
)
and
not
c
:
IsStatus
(
STATUS_DESTROY_CONFIRMED
+
STATUS_BATTLE_DESTROYED
)
end
function
s
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
eg
:
FilterCount
(
s
.
repfilter
,
nil
,
tp
)
function
cm
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
eg
:
FilterCount
(
cm
.
repfilter
,
nil
,
tp
)
if
chk
==
0
then
return
ct
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
ct
,
nil
,
e
)
end
and
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
ct
,
nil
,
e
)
end
if
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESREPLACE
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
ct
,
ct
,
nil
,
e
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
ct
,
ct
,
nil
,
e
)
local
g
=
e
:
GetLabelObject
()
g
:
Clear
()
local
tc
=
tg
:
GetFirst
()
...
...
@@ -86,11 +87,11 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
return
true
else
return
false
end
end
function
s
.
repval
(
e
,
c
)
return
s
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
function
cm
.
repval
(
e
,
c
)
return
cm
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
s
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
id
)
function
cm
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
local
tg
=
e
:
GetLabelObject
()
local
tc
=
tg
:
GetFirst
()
while
tc
do
...
...
expansions/script/c40010668.lua
View file @
4870d517
--哀恸魔女-现实之珐姆
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010668
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
negcon
)
e1
:
SetCost
(
s
.
negcost
)
e1
:
SetTarget
(
s
.
negtg
)
e1
:
SetOperation
(
s
.
negop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
cm
.
negcon
)
e1
:
SetCost
(
cm
.
negcost
)
e1
:
SetTarget
(
cm
.
negtg
)
e1
:
SetOperation
(
cm
.
negop
)
c
:
RegisterEffect
(
e1
)
--Special Summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
+
1
)
e2
:
SetCost
(
s
.
spcost
)
e2
:
SetTarget
(
s
.
sptg
)
e2
:
SetOperation
(
s
.
spop
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetCost
(
cm
.
spcost
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
--e1
function
s
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsExistingMatchingCard
(
function
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsLevelAbove
(
9
)
end
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
s
.
cfilter
(
c
)
function
cm
.
cfilter
(
c
)
return
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsReleasable
()
end
function
s
.
negcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
cfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
function
cm
.
negcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
s
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
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
)
if
Duel
.
IsExistingMatchingCard
(
function
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
40010666
)
end
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
and
WW_TK
.
ck
(
tp
)
then
...
...
@@ -50,32 +51,32 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
end
function
s
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
Duel
.
IsExistingMatchingCard
(
function
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
40010666
)
end
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
and
WW_TK
.
ck
(
tp
)
then
Duel
.
BreakEffect
()
WW_TK
.
op
(
e
:
GetHandler
(),
tp
)
if
WW_TK
.
ck
(
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
then
if
WW_TK
.
ck
(
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
WW_TK
.
op
(
e
:
GetHandler
(),
tp
)
end
end
end
--e2
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_ONFIELD
,
1
,
nil
)
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
s
.
spfilter
(
c
)
function
cm
.
spfilter
(
c
)
return
c
:
IsCode
(
40010663
)
and
c
:
IsReleasable
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
if
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
expansions/script/c40010670.lua
View file @
4870d517
--哀恸魔女-罪业之耶里德
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010670
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsRace
,
RACE_SPELLCASTER
),
1
)
c
:
EnableReviveLimit
()
--replace
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetTarget
(
s
.
cbtg
)
e1
:
SetOperation
(
s
.
cbop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
cbtg
)
e1
:
SetOperation
(
cm
.
cbop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCondition
(
s
.
cecon
)
e2
:
SetTarget
(
s
.
cetg
)
e2
:
SetOperation
(
s
.
ceop
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCondition
(
cm
.
cecon
)
e2
:
SetTarget
(
cm
.
cetg
)
e2
:
SetOperation
(
cm
.
ceop
)
c
:
RegisterEffect
(
e2
)
--can not be battle target
local
e31
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -76,37 +77,37 @@ function s.initial_effect(c)
e7
:
SetLabelObject
(
e71
)
c
:
RegisterEffect
(
e7
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
--mat
function
s
.
sumlimit
(
e
,
c
)
function
cm
.
sumlimit
(
e
,
c
)
if
not
c
then
return
false
end
return
not
c
:
IsControler
(
e
:
GetHandlerPlayer
())
end
--e1
function
s
.
cbfilter
(
c
,
e
)
function
cm
.
cbfilter
(
c
,
e
)
return
c
:
IsCanBeEffectTarget
(
e
)
end
function
s
.
cbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
s
.
cbfilter
(
chkc
,
e
)
end
function
cm
.
cbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
cbfilter
(
chkc
,
e
)
end
local
ag
=
Duel
.
GetAttacker
():
GetAttackableTarget
()
local
at
=
Duel
.
GetAttackTarget
()
ag
:
RemoveCard
(
at
)
if
chk
==
0
then
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
and
at
:
IsControler
(
tp
)
and
WW_N
.
ck
(
at
)
and
ag
:
IsExists
(
s
.
cbfilter
,
1
,
e
:
GetHandler
(),
e
)
end
and
ag
:
IsExists
(
cm
.
cbfilter
,
1
,
e
:
GetHandler
(),
e
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
ag
:
FilterSelect
(
tp
,
s
.
cbfilter
,
1
,
1
,
e
:
GetHandler
(),
e
)
local
g
=
ag
:
FilterSelect
(
tp
,
cm
.
cbfilter
,
1
,
1
,
e
:
GetHandler
(),
e
)
Duel
.
SetTargetCard
(
g
)
end
function
s
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
not
Duel
.
GetAttacker
():
IsImmuneToEffect
(
e
)
then
Duel
.
ChangeAttackTarget
(
tc
)
end
end
function
s
.
cecon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
cecon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
==
re
or
rp
~=
1
-
tp
or
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
if
not
g
or
g
:
GetCount
()
~=
1
then
return
false
end
...
...
@@ -114,16 +115,16 @@ function s.cecon(e,tp,eg,ep,ev,re,r,rp)
e
:
SetLabelObject
(
tc
)
return
tc
:
IsLocation
(
LOCATION_MZONE
)
and
WW_N
.
ck
(
tc
)
end
function
s
.
cefilter
(
c
,
ct
,
oc
)
function
cm
.
cefilter
(
c
,
ct
,
oc
)
return
oc
~=
c
and
Duel
.
CheckChainTarget
(
ct
,
c
)
end
function
s
.
cetg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
s
.
cefilter
(
chkc
,
ev
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
cefilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetLabelObject
(),
ev
,
e
:
GetHandler
())
end
function
cm
.
cetg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
cefilter
(
chkc
,
ev
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
cefilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetLabelObject
(),
ev
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
s
.
cefilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetLabelObject
(),
ev
,
e
:
GetHandler
())
Duel
.
SelectTarget
(
tp
,
cm
.
cefilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetLabelObject
(),
ev
,
e
:
GetHandler
())
end
function
s
.
ceop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
ceop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
ChangeTargetCard
(
ev
,
Group
.
FromCards
(
tc
))
...
...
expansions/script/c40010672.lua
View file @
4870d517
--哀恸魔女-结冰之本德
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010672
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
function
(
c
)
return
c
.
setname
==
"WailWitch"
and
not
c
:
IsType
(
TYPE_TUNER
)
end
,
1
)
c
:
EnableReviveLimit
()
--tohand/token
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
ttcon
)
e1
:
SetTarget
(
s
.
tttg
)
e1
:
SetOperation
(
s
.
ttop
)
e1
:
SetCountLimit
(
1
,
n
)
e1
:
SetCondition
(
cm
.
ttcon
)
e1
:
SetTarget
(
cm
.
tttg
)
e1
:
SetOperation
(
cm
.
ttop
)
c
:
RegisterEffect
(
e1
)
--Special Summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
+
1
)
e2
:
SetCost
(
s
.
spcost
)
e2
:
SetTarget
(
s
.
sptg
)
e2
:
SetOperation
(
s
.
spop
)
e2
:
SetCountLimit
(
1
,
n
+
1
)
e2
:
SetCost
(
cm
.
spcost
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
--e1
function
s
.
ttcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
ttcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
s
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
WW_N
.
ck
(
c
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
s
.
tttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
cm
.
tttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
ttop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
ttop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
if
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
,
TYPE_TOKEN
)
and
WW_TK
.
ck
(
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
then
if
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
,
TYPE_TOKEN
)
and
WW_TK
.
ck
(
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
BreakEffect
()
WW_TK
.
op
(
e
:
GetHandler
(),
tp
)
end
end
--e2
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
s
.
spfilter
(
c
,
tp
)
function
cm
.
spfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsReleasable
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
if
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
expansions/script/c40010674.lua
View file @
4870d517
--哀恸魔女-灭却之贝拉
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010674
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
function
(
c
)
return
c
.
setname
==
"WailWitch"
and
not
c
:
IsType
(
TYPE_TUNER
)
end
,
1
)
c
:
EnableReviveLimit
()
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
id
+
1
)
e2
:
SetTarget
(
s
.
target
)
e2
:
SetOperation
(
s
.
activate
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e2
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
--e1
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
WW_TK
.
ck
(
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
WW_TK
.
ck
(
tp
)
then
WW_TK
.
op
(
e
:
GetHandler
(),
tp
)
end
end
--e2
function
s
.
ctfilter
(
c
)
function
cm
.
ctfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
40010663
)
end
function
s
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
WW_N
.
ck
(
c
)
and
c
:
IsAbleToHand
()
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
ctfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
ctfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetMatchingGroup
(
s
.
ctfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetMatchingGroup
(
cm
.
ctfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g1
:
GetCount
()
==
0
or
g2
:
GetCount
()
==
0
then
return
end
local
ct
=
g1
:
GetCount
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
...
...
@@ -73,10 +74,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
s
.
splimit
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
s
.
splimit
(
e
,
c
)
function
cm
.
splimit
(
e
,
c
)
return
not
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
\ No newline at end of file
expansions/script/c40010676.lua
View file @
4870d517
--哀恸魔女-贵石之达南
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010676
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
--to hand/token
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
id
+
1
)
e2
:
SetCondition
(
s
.
con1
)
e2
:
SetTarget
(
s
.
thtg
)
e2
:
SetOperation
(
s
.
thop
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetCondition
(
cm
.
con1
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
id
+
1
)
e3
:
SetCondition
(
s
.
con2
)
e3
:
SetTarget
(
s
.
tktg
)
e3
:
SetOperation
(
s
.
tkop
)
e3
:
SetCountLimit
(
1
,
m
+
1
)
e3
:
SetCondition
(
cm
.
con2
)
e3
:
SetTarget
(
cm
.
tktg
)
e3
:
SetOperation
(
cm
.
tkop
)
c
:
RegisterEffect
(
e3
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
--e1
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
,
40010663
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
function
(
c
)
return
WW_N
.
ck
(
c
)
and
not
c
:
IsCode
(
id
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
end
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
then
and
Duel
.
IsExistingMatchingCard
(
function
(
c
)
return
WW_N
.
ck
(
c
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
end
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
function
(
c
)
return
WW_N
.
ck
(
c
)
and
not
c
:
IsCode
(
id
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
end
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
function
(
c
)
return
WW_N
.
ck
(
c
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
end
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
...
...
@@ -66,20 +67,20 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
--e2
function
s
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
TYPE_TOKEN
)
end
function
s
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
WW_N
.
ck
(
c
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
then
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
...
...
@@ -87,15 +88,15 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
s
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
TYPE_TOKEN
)
end
function
s
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
WW_TK
.
ck
(
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
s
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
WW_TK
.
ck
(
tp
)
then
WW_TK
.
op
(
e
:
GetHandler
(),
tp
)
end
...
...
expansions/script/c40010678.lua
View file @
4870d517
--哀恸魔女-异端之耶里德
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010678
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--spsm
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
--synchro summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
+
1
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetTarget
(
WW_TK
.
syntg
)
e2
:
SetOperation
(
WW_TK
.
synop
)
c
:
RegisterEffect
(
e2
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
--e1
function
s
.
cfilter
(
c
)
function
cm
.
cfilter
(
c
)
return
WW_N
.
ck
(
c
)
and
c
:
IsDiscardable
()
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
SendtoGrave
(
g
,
REASON_DISCARD
+
REASON_COST
)
end
function
s
.
filter
(
c
,
e
,
tp
)
return
WW_N
.
ck
(
c
)
and
not
c
:
IsCode
(
id
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
function
cm
.
filter
(
c
,
e
,
tp
)
return
WW_N
.
ck
(
c
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
...
...
expansions/script/c40010682.lua
View file @
4870d517
--哀恸魔女-冷血之鲁柏
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010682
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--token
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCost
(
s
.
cost
)
e1
:
SetTarget
(
s
.
tktg
)
e1
:
SetOperation
(
s
.
tkop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
tktg
)
e1
:
SetOperation
(
cm
.
tkop
)
c
:
RegisterEffect
(
e1
)
--Special Summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e2
:
SetCountLimit
(
1
,
id
+
1
)
e2
:
SetCost
(
s
.
spcost
)
e2
:
SetTarget
(
s
.
sptg
)
e2
:
SetOperation
(
s
.
spop
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetCost
(
cm
.
spcost
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
--e1
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
s
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
WW_TK
.
ck
(
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
s
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
WW_TK
.
ck
(
tp
)
then
WW_TK
.
op
(
e
:
GetHandler
(),
tp
)
end
end
--e2
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
s
.
spfilter
(
c
)
function
cm
.
spfilter
(
c
)
return
WW_N
.
ck
(
c
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
local
mg
=
Duel
.
GetMatchingGroup
(
function
(
c
)
return
c
:
IsFaceup
()
and
WW_N
.
ck
(
c
)
end
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
nil
,
mg
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
then
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
nil
,
mg
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
nil
,
mg
):
GetFirst
()
...
...
expansions/script/c40010684.lua
View file @
4870d517
--哀恸魔女的群像
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010684
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
--token
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
+
1
)
e2
:
SetCost
(
s
.
cost
)
e2
:
SetTarget
(
s
.
tktg
)
e2
:
SetOperation
(
s
.
tkop
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetCost
(
cm
.
cost
)
e2
:
SetTarget
(
cm
.
tktg
)
e2
:
SetOperation
(
cm
.
tkop
)
c
:
RegisterEffect
(
e2
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
--e1
function
s
.
filter
(
c
)
function
cm
.
filter
(
c
)
return
WW_N
.
ck
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
...
...
@@ -43,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
--e2
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
function
(
c
)
return
c
:
IsDiscardable
()
and
c
.
setname
==
"WailWitch"
end
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
c
:
IsAbleToRemoveAsCost
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
...
...
@@ -51,12 +52,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
Remove
(
c
,
POS_FACEUP
,
REASON_COST
)
end
function
s
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
WW_TK
.
ck
(
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
s
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
WW_TK
.
ck
(
tp
)
then
WW_TK
.
op
(
e
:
GetHandler
(),
tp
)
end
...
...
expansions/script/c40010686.lua
View file @
4870d517
--哀恸魔女的凶变
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010686
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
...
...
@@ -9,31 +10,31 @@ function s.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
s
.
cost
)
e1
:
SetTarget
(
s
.
destg
)
e1
:
SetOperation
(
s
.
desop
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
function
s
.
cfilter
(
c
)
function
cm
.
cfilter
(
c
)
return
WW_N
.
ck
(
c
)
and
c
:
IsDiscardable
()
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SendtoGrave
(
g
,
REASON_DISCARD
+
REASON_COST
)
end
function
s
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsOnField
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
dg
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
2
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
dg
,
dg
:
GetCount
(),
0
,
0
)
end
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
dg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
local
dg1
=
dg
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
)
local
dg2
=
dg
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
...
...
expansions/script/c40010690.lua
View file @
4870d517
--哀恸魔女的选择
local
s
,
id
,
o
=
GetID
()
Duel
.
LoadScript
(
"c40010663.lua"
)
function
s
.
initial_effect
(
c
)
local
m
=
40010690
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c40010663"
)
end
,
function
()
require
(
"script/c40010663"
)
end
)
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DISABLE_SUMMON
+
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_SUMMON
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
s
.
condition
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_FLIP_SUMMON
)
...
...
@@ -19,20 +20,20 @@ function s.initial_effect(c)
e3
:
SetCode
(
EVENT_SPSUMMON
)
c
:
RegisterEffect
(
e3
)
end
s
.
setname
=
"WailWitch"
cm
.
setname
=
"WailWitch"
function
s
.
filter
(
c
)
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
.
setname
==
"WailWitch"
and
c
:
IsType
(
TYPE_SYNCHRO
)
end
function
s
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetCurrentChain
()
==
0
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetCurrentChain
()
==
0
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
eg
:
GetCount
(),
0
,
0
)
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
)
local
dec
=
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
if
dec
then
...
...
expansions/script/c53759004.lua
View file @
4870d517
local
m
=
53759004
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"心术魔导 LV10"
cm
.
Card_Prophecy_LV
8
=
true
cm
.
Card_Prophecy_LV
10
=
true
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
...
...
expansions/script/c53759006.lua
View file @
4870d517
...
...
@@ -62,7 +62,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
if
Duel
.
SelectEffectYesNo
(
tp
,
rc
,
aux
.
Stringid
(
m
,
0
))
then
if
not
rc
:
IsLocation
(
LOCATION_HAND
)
and
Duel
.
SelectEffectYesNo
(
tp
,
rc
,
aux
.
Stringid
(
m
,
0
))
then
rc
:
CancelToGrave
()
Duel
.
SendtoHand
(
rc
,
nil
,
REASON_EFFECT
)
e
:
GetHandler
():
RegisterFlagEffect
(
m
,
RESET_PHASE
+
PHASE_END
,
0
,
0
)
...
...
expansions/script/c55157075.lua
View file @
4870d517
...
...
@@ -40,8 +40,8 @@ function s.initial_effect(c)
end
end
function
s
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
and
Duel
.
GetChainInfo
(
ev
-
1
,
CHAININFO_TRIGGERING_EFFECT
):
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
return
false
end
if
not
re
or
(
re
:
IsHasCategory
(
CATEGORY_NEGATE
)
and
Duel
.
GetChainInfo
(
ev
-
1
,
CHAININFO_TRIGGERING_EFFECT
):
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
)
then
return
false
end
local
ex
,
tg
,
tc
=
Duel
.
GetOperationInfo
(
ev
,
CATEGORY_DESTROY
)
if
ex
and
tg
~=
nil
and
tc
+
tg
:
FilterCount
(
Card
.
IsOnField
,
nil
)
-
tg
:
GetCount
()
>
0
then
Icejade_global_effect
[
re
]
=
true
...
...
expansions/script/c60000004.lua
View file @
4870d517
...
...
@@ -14,8 +14,7 @@ function c60000004.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c60000004
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
return
ep
~=
tp
and
loc
==
LOCATION_GRAVE
return
rp
==
1
-
tp
and
re
:
GetActivateLocation
()
==
LOCATION_GRAVE
end
function
c60000004
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
...
...
expansions/script/c65130303.lua
View file @
4870d517
...
...
@@ -68,7 +68,7 @@ function c65130303.copyop(e,tp,eg,ep,ev,re,r,rp)
tg
=
Group
.
__add
(
tg
,
g
)
if
tg
then
for
tc
in
aux
.
Next
(
tg
)
do
local
cid
=
tc
:
GetOriginalCode
Rule
()
local
cid
=
tc
:
GetOriginalCode
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
...
...
expansions/script/c91000402.lua
View file @
4870d517
...
...
@@ -2,122 +2,122 @@
local
m
=
91000402
local
cm
=
c91000402
function
c91000402
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
tg1
)
e1
:
SetOperation
(
cm
.
op1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_SELF_DESTROY
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetCountLimit
(
1
,
m
*
3
)
e3
:
SetCondition
(
cm
.
con3
)
e3
:
SetTarget
(
cm
.
tg3
)
e3
:
SetOperation
(
cm
.
op3
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_EQUIP
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
,
m
*
4
)
e4
:
SetTarget
(
cm
.
tg4
)
e4
:
SetOperation
(
cm
.
op4
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e5
)
Duel
.
AddCustomActivityCounter
(
91000402
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
tg1
)
e1
:
SetOperation
(
cm
.
op1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_SELF_DESTROY
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetCountLimit
(
1
,
m
*
3
)
e3
:
SetCondition
(
cm
.
con3
)
e3
:
SetTarget
(
cm
.
tg3
)
e3
:
SetOperation
(
cm
.
op3
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_EQUIP
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
,
m
*
4
)
e4
:
SetTarget
(
cm
.
tg4
)
e4
:
SetOperation
(
cm
.
op4
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e5
)
Duel
.
AddCustomActivityCounter
(
91000402
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter
)
end
function
cm
.
counterfilter
(
c
)
return
c
:
IsLevel
(
10
)
return
c
:
IsLevel
(
10
)
end
function
cm
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
cm
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
if
not
Duel
.
Equip
(
tp
,
c
,
tc
)
then
return
end
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
end
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
if
not
Duel
.
Equip
(
tp
,
c
,
tc
)
then
return
end
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
end
end
function
cm
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
and
Duel
.
GetCustomActivityCount
(
91000402
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
and
Duel
.
GetCustomActivityCount
(
91000402
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
function
cm
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
tag
(
e
,
c
)
return
not
c
:
IsLevel
(
10
)
end
function
cm
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
tag
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
c
=
e
:
GetHandler
()
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
tag
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
c
=
e
:
GetHandler
()
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
cm
.
thfilter2
(
c
)
return
c
:
IsSetCard
(
0x9d2
)
and
not
c
:
IsForbidden
()
return
c
:
IsSetCard
(
0x9d2
)
and
not
c
:
IsForbidden
()
end
function
cm
.
thfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x9d2
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x9d2
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
tg4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
op4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
thfilter2
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
):
GetFirst
()
local
sc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Equip
(
tp
,
sc
,
tc
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
cm
.
eqlimit
)
e1
:
SetLabelObject
(
tc
)
sc
:
RegisterEffect
(
e1
)
end
end
if
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
thfilter2
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
):
GetFirst
()
local
sc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Equip
(
tp
,
sc
,
tc
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
cm
.
eqlimit
)
e1
:
SetLabelObject
(
tc
)
sc
:
RegisterEffect
(
e1
)
end
end
end
function
cm
.
eqlimit
(
e
,
c
)
return
e
:
GetLabelObject
()
==
c
return
e
:
GetLabelObject
()
==
c
end
expansions/script/c91000403.lua
View file @
4870d517
...
...
@@ -108,6 +108,7 @@ function cm.thfilter(c)
end
function
cm
.
tg4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
op4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
...
...
expansions/script/c98920427.lua
View file @
4870d517
...
...
@@ -38,6 +38,7 @@ function c98920427.cfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x155
)
end
function
c98920427
.
ntcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
or
Duel
.
IsExistingMatchingCard
(
c98920427
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c98920427
.
tgfilter
(
c
)
...
...
expansions/script/c9910451.lua
View file @
4870d517
...
...
@@ -7,7 +7,7 @@ function c9910451.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_HANDES
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_COUNTER
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
9910451
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c9910451
.
sptg
)
e1
:
SetOperation
(
c9910451
.
spop
)
c
:
RegisterEffect
(
e1
)
...
...
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