Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ai
ygopro-222DIY-cards
Commits
e4b182ad
Commit
e4b182ad
authored
Feb 17, 2020
by
gg123gg
Committed by
GitHub
Feb 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
8fa49486
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
999 additions
and
1003 deletions
+999
-1003
expansions/script/c12006001.lua
expansions/script/c12006001.lua
+72
-73
expansions/script/c12006004.lua
expansions/script/c12006004.lua
+95
-96
expansions/script/c12006006.lua
expansions/script/c12006006.lua
+64
-65
expansions/script/c12006008.lua
expansions/script/c12006008.lua
+56
-57
expansions/script/c12006009.lua
expansions/script/c12006009.lua
+107
-108
expansions/script/c12006020.lua
expansions/script/c12006020.lua
+105
-106
expansions/script/c12006021.lua
expansions/script/c12006021.lua
+63
-64
expansions/script/c12006022.lua
expansions/script/c12006022.lua
+82
-83
expansions/script/c12008030.lua
expansions/script/c12008030.lua
+113
-112
expansions/script/c12010026.lua
expansions/script/c12010026.lua
+125
-122
expansions/script/c12011000.lua
expansions/script/c12011000.lua
+117
-117
No files found.
expansions/script/c12006001.lua
View file @
e4b182ad
--失落王国 理解的亚夫结
--失落王国 理解的亚夫结
function
c12006001
.
initial_effect
(
c
)
function
c12006001
.
initial_effect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12006001
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
12006001
,
1
))
e2
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
12006001
)
e2
:
SetCountLimit
(
1
,
12006001
)
e2
:
SetTarget
(
c12006001
.
thtg
)
e2
:
SetTarget
(
c12006001
.
thtg
)
e2
:
SetOperation
(
c12006001
.
thop
)
e2
:
SetOperation
(
c12006001
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006001
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006001
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCountLimit
(
1
,
12006101
)
e1
:
SetCountLimit
(
1
,
12006101
)
e1
:
SetCondition
(
c12006001
.
condition
)
e1
:
SetCondition
(
c12006001
.
condition
)
e1
:
SetTarget
(
c12006001
.
target
)
e1
:
SetTarget
(
c12006001
.
target
)
e1
:
SetOperation
(
c12006001
.
operation
)
e1
:
SetOperation
(
c12006001
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c12006001
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12006001
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToChangeControler
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToChangeControler
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToChangeControler
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToChangeControler
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_CONTROL
,
nil
,
0
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_CONTROL
,
nil
,
0
,
0
,
0
)
end
end
function
c12006001
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006001
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToChangeControler
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
if
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToChangeControler
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
or
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToChangeControler
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
or
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToChangeControler
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
then
return
end
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_CONTROL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_CONTROL
)
local
g2
=
Duel
.
SelectMatchingCard
(
1
-
tp
,
Card
.
IsAbleToChangeControler
,
1
-
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g2
=
Duel
.
SelectMatchingCard
(
1
-
tp
,
Card
.
IsAbleToChangeControler
,
1
-
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g2
)
Duel
.
HintSelection
(
g2
)
local
c1
=
c
local
c1
=
c
local
c2
=
g2
:
GetFirst
()
local
c2
=
g2
:
GetFirst
()
if
Duel
.
SwapControl
(
c1
,
c2
,
0
,
0
)
then
if
Duel
.
SwapControl
(
c1
,
c2
,
0
,
0
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
e1
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
c1
:
RegisterEffect
(
e1
)
c1
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
c2
:
RegisterEffect
(
e2
)
c2
:
RegisterEffect
(
e2
)
end
end
end
end
function
c12006001
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006001
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c12006001
.
filter
(
c
,
e
,
tp
)
function
c12006001
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006001
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006001
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c12006001
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12006001
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12006001
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c12006001
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c12006001
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006001
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006001
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006001
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
\ No newline at end of file
expansions/script/c12006004.lua
View file @
e4b182ad
--失落王国 美丽的丘依儿
--失落王国 美丽的丘依儿
function
c12006004
.
initial_effect
(
c
)
function
c12006004
.
initial_effect
(
c
)
--spsummon
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006004
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006004
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_RECOVER
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_RECOVER
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_BATTLE_STEP_END
)
e1
:
SetHintTiming
(
0
,
TIMING_BATTLE_STEP_END
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
12006004
)
e1
:
SetCountLimit
(
1
,
12006004
)
e1
:
SetCondition
(
c12006004
.
spcon
)
e1
:
SetCondition
(
c12006004
.
spcon
)
e1
:
SetTarget
(
c12006004
.
sptg
)
e1
:
SetTarget
(
c12006004
.
sptg
)
e1
:
SetOperation
(
c12006004
.
spop
)
e1
:
SetOperation
(
c12006004
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e3
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
12006104
)
e3
:
SetCountLimit
(
1
,
12006104
)
e3
:
SetCondition
(
c12006004
.
discon
)
e3
:
SetCondition
(
c12006004
.
discon
)
e3
:
SetTarget
(
c12006004
.
distg
)
e3
:
SetTarget
(
c12006004
.
distg
)
e3
:
SetOperation
(
c12006004
.
disop
)
e3
:
SetOperation
(
c12006004
.
disop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006004
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006004
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCountLimit
(
1
,
12006204
)
e1
:
SetCountLimit
(
1
,
12006204
)
e1
:
SetCondition
(
c12006004
.
condition
)
e1
:
SetCondition
(
c12006004
.
condition
)
e1
:
SetTarget
(
c12006004
.
target
)
e1
:
SetTarget
(
c12006004
.
target
)
e1
:
SetOperation
(
c12006004
.
operation
)
e1
:
SetOperation
(
c12006004
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c12006004
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006004
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsChainNegatable
(
ev
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsChainNegatable
(
ev
)
end
end
function
c12006004
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12006004
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
end
end
function
c12006004
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006004
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
GetControl
(
e
:
GetHandler
(),
1
-
tp
)
Duel
.
GetControl
(
e
:
GetHandler
(),
1
-
tp
)
end
end
end
end
function
c12006004
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006004
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c12006004
.
filter
(
c
,
e
,
tp
)
function
c12006004
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006004
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006004
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c12006004
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12006004
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12006004
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c12006004
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c12006004
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006004
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006004
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006004
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c12006004
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006004
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_BATTLE_STEP
return
Duel
.
GetCurrentPhase
()
==
PHASE_BATTLE_STEP
end
end
function
c12006004
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12006004
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
1000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
1000
)
end
end
function
c12006004
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006004
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
Duel
.
Recover
(
tp
,
1000
,
REASON_EFFECT
)
Duel
.
Recover
(
tp
,
1000
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c12006006.lua
View file @
e4b182ad
--失落王国 智慧的拉结尔
--失落王国 智慧的拉结尔
function
c12006006
.
initial_effect
(
c
)
function
c12006006
.
initial_effect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_TRIGGER_F
+
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_TRIGGER_F
+
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetOperation
(
c12006006
.
thop
)
e2
:
SetOperation
(
c12006006
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
1
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
1
)
e1
:
SetCondition
(
c12006006
.
spcon
)
e1
:
SetCondition
(
c12006006
.
spcon
)
e1
:
SetValue
(
c12006006
.
hspval
)
e1
:
SetValue
(
c12006006
.
hspval
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
76066541
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
76066541
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCountLimit
(
1
,
12006006
)
e1
:
SetCountLimit
(
1
,
12006006
)
e1
:
SetCondition
(
c12006006
.
condition
)
e1
:
SetCondition
(
c12006006
.
condition
)
e1
:
SetTarget
(
c12006006
.
target
)
e1
:
SetTarget
(
c12006006
.
target
)
e1
:
SetOperation
(
c12006006
.
operation
)
e1
:
SetOperation
(
c12006006
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c12006006
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006006
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
Duel
.
Draw
(
1
-
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
1
-
tp
,
1
,
REASON_EFFECT
)
end
end
function
c12006006
.
spcon
(
e
,
c
)
function
c12006006
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
zone
=
Duel
.
GetLinkedZone
(
1
-
tp
)
local
zone
=
Duel
.
GetLinkedZone
(
1
-
tp
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
>
0
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
>
0
end
end
function
c12006006
.
hspval
(
e
,
c
)
function
c12006006
.
hspval
(
e
,
c
)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
zone
=
Duel
.
GetLinkedZone
(
1
-
tp
)
local
zone
=
Duel
.
GetLinkedZone
(
1
-
tp
)
return
0
,
zone
return
0
,
zone
end
end
function
c12006006
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006006
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c12006006
.
filter
(
c
,
e
,
tp
)
function
c12006006
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006006
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006006
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c12006006
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12006006
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12006006
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c12006006
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c12006006
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006006
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006006
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006006
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
\ No newline at end of file
expansions/script/c12006008.lua
View file @
e4b182ad
--失落王国 胜利的亚娜儿
--失落王国 胜利的亚娜儿
function
c12006008
.
initial_effect
(
c
)
function
c12006008
.
initial_effect
(
c
)
--fusion material
--fusion material
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunFun
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x8fbd
),
aux
.
FilterBoolFunction
(
Card
.
IsAttackBelow
,
3000
),
1
,
true
)
aux
.
AddFusionProcFunFun
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x8fbd
),
aux
.
FilterBoolFunction
(
Card
.
IsAttackBelow
,
3000
),
1
,
true
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006008
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006008
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCondition
(
c12006008
.
condition
)
e1
:
SetCondition
(
c12006008
.
condition
)
e1
:
SetTarget
(
c12006008
.
target
)
e1
:
SetTarget
(
c12006008
.
target
)
e1
:
SetOperation
(
c12006008
.
operation
)
e1
:
SetOperation
(
c12006008
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006008
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006008
,
1
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetOperation
(
c12006008
.
atkop
)
e1
:
SetOperation
(
c12006008
.
atkop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c12006008
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006008
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c12006008
.
filter
(
c
,
e
,
tp
)
function
c12006008
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006008
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006008
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c12006008
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12006008
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
1
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
1
and
Duel
.
IsExistingMatchingCard
(
c12006008
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c12006008
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
tp
,
LOCATION_GRAVE
)
end
end
function
c12006008
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006008
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
1
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006008
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006008
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c12006008
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006008
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
e
:
GetHandler
())
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
e
:
GetHandler
())
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
while
tc
do
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
1800
)
e1
:
SetValue
(
1800
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
tc
=
g
:
GetNext
()
tc
=
g
:
GetNext
()
end
end
end
end
\ No newline at end of file
expansions/script/c12006009.lua
View file @
e4b182ad
--失落王国 王国的尚达凤
--失落王国 王国的尚达凤
function
c12006009
.
initial_effect
(
c
)
function
c12006009
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006009
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006009
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCountLimit
(
1
,
12006009
)
e1
:
SetCountLimit
(
1
,
12006009
)
e1
:
SetCondition
(
c12006009
.
condition
)
e1
:
SetCondition
(
c12006009
.
condition
)
e1
:
SetTarget
(
c12006009
.
target
)
e1
:
SetTarget
(
c12006009
.
target
)
e1
:
SetOperation
(
c12006009
.
operation
)
e1
:
SetOperation
(
c12006009
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006009
,
3
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006009
,
3
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
12006109
)
e1
:
SetCountLimit
(
1
,
12006109
)
e1
:
SetOperation
(
c12006009
.
ttop
)
e1
:
SetOperation
(
c12006009
.
ttop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--special summon rule
--special summon rule
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006009
,
5
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006009
,
5
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
1
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
1
)
e1
:
SetCountLimit
(
1
,
12006109
)
e1
:
SetCountLimit
(
1
,
12006109
)
e1
:
SetCondition
(
c12006009
.
spcon
)
e1
:
SetCondition
(
c12006009
.
spcon
)
e1
:
SetOperation
(
c12006009
.
spop
)
e1
:
SetOperation
(
c12006009
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
if
not
c12006009
.
global_check
then
if
not
c12006009
.
global_check
then
c12006009
.
global_check
=
true
c12006009
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAINING
)
ge1
:
SetCode
(
EVENT_CHAINING
)
ge1
:
SetOperation
(
c12006009
.
checkop
)
ge1
:
SetOperation
(
c12006009
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
end
end
function
c12006009
.
cfilter
(
c
,
tp
)
function
c12006009
.
cfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
end
function
c12006009
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006009
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
eg
then
return
end
if
not
eg
then
return
end
local
sg
=
eg
:
Filter
(
c12006009
.
cfilter
,
nil
,
tp
)
local
sg
=
eg
:
Filter
(
c12006009
.
cfilter
,
nil
,
tp
)
local
tc
=
sg
:
GetFirst
()
local
tc
=
sg
:
GetFirst
()
while
tc
do
while
tc
do
tc
:
RegisterFlagEffect
(
12006009
,
RESET_EVENT
+
0x1fe0000
-
RESET_TOGRAVE
,
0
,
1
)
tc
:
RegisterFlagEffect
(
12006009
,
RESET_EVENT
+
0x1fe0000
-
RESET_TOGRAVE
,
0
,
1
)
tc
=
sg
:
GetNext
()
tc
=
sg
:
GetNext
()
end
end
end
end
function
c12006009
.
spfilter
(
c
,
ft
)
function
c12006009
.
spfilter
(
c
,
ft
)
return
c
:
GetFlagEffect
(
12006009
)
~=
0
and
c
:
IsReleasable
()
and
(
ft
>
0
or
c
:
GetSequence
()
<
5
)
return
c
:
GetFlagEffect
(
12006009
)
~=
0
and
c
:
IsReleasable
()
and
(
ft
>
0
or
c
:
GetSequence
()
<
5
)
end
end
function
c12006009
.
spcon
(
e
,
c
)
function
c12006009
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
local
ft
=
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c12006009
.
spfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
ft
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c12006009
.
spfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
ft
)
end
end
function
c12006009
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c12006009
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
ft
=
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
local
ft
=
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006009
.
spfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
ft
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006009
.
spfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
ft
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
Release
(
g
,
REASON_COST
)
end
end
function
c12006009
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006009
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c12006009
.
filter3
(
c
,
e
,
tp
)
function
c12006009
.
filter3
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006009
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006009
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c12006009
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12006009
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12006009
.
filter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c12006009
.
filter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c12006009
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006009
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006009
.
filter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006009
.
filter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c12006009
.
filter
(
c
,
e
,
tp
)
function
c12006009
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c12006009
.
ttop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006009
.
ttop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
==
0
then
return
end
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
==
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
return
end
then
return
end
local
g2
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
g2
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
Duel
.
ConfirmCards
(
1
-
tp
,
g2
)
Duel
.
ConfirmCards
(
1
-
tp
,
g2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_SPSUMMON
)
sg
=
Duel
.
SelectTarget
(
1
-
tp
,
c12006009
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
sg
=
Duel
.
SelectTarget
(
1
-
tp
,
c12006009
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
sg
:
GetCount
()
>
0
then
if
sg
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
end
Duel
.
SpecialSummonComplete
()
Duel
.
SpecialSummonComplete
()
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
end
end
\ No newline at end of file
expansions/script/c12006020.lua
View file @
e4b182ad
--失落王国 荣耀的拉斐尔
--失落王国 荣耀的拉斐尔
function
c12006020
.
initial_effect
(
c
)
function
c12006020
.
initial_effect
(
c
)
--special Summon
--special Summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006020
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006020
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
12006020
)
e1
:
SetCountLimit
(
1
,
12006020
)
e1
:
SetTarget
(
c12006020
.
thtg
)
e1
:
SetTarget
(
c12006020
.
thtg
)
e1
:
SetOperation
(
c12006020
.
thop
)
e1
:
SetOperation
(
c12006020
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006020
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006020
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
12006120
)
e1
:
SetCountLimit
(
1
,
12006120
)
e1
:
SetTarget
(
c12006020
.
thtg1
)
e1
:
SetTarget
(
c12006020
.
thtg1
)
e1
:
SetOperation
(
c12006020
.
thop1
)
e1
:
SetOperation
(
c12006020
.
thop1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006020
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006020
,
2
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCountLimit
(
1
,
12006220
)
e1
:
SetCountLimit
(
1
,
12006220
)
e1
:
SetCondition
(
c12006020
.
condition
)
e1
:
SetCondition
(
c12006020
.
condition
)
e1
:
SetTarget
(
c12006020
.
target
)
e1
:
SetTarget
(
c12006020
.
target
)
e1
:
SetOperation
(
c12006020
.
operation
)
e1
:
SetOperation
(
c12006020
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c12006020
.
filter
(
c
,
ft
)
function
c12006020
.
filter
(
c
,
ft
)
return
c
:
IsFaceup
()
return
c
:
IsFaceup
()
end
end
function
c12006020
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c12006020
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
c12006020
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
c12006020
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingTarget
(
c12006020
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
and
Duel
.
IsExistingTarget
(
c12006020
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c12006020
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c12006020
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
end
function
c12006020
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006020
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
local
Att
=
tc
:
GetAttack
()
local
Att
=
tc
:
GetAttack
()
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
tc
:
IsFaceup
()
then
if
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
Att
)
e1
:
SetValue
(
Att
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
end
end
end
end
end
end
function
c12006020
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c12006020
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c12006020
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c12006020
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingTarget
(
c12006020
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
and
Duel
.
IsExistingTarget
(
c12006020
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c12006020
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c12006020
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
end
function
c12006020
.
thop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006020
.
thop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
Duel
.
SpecialSummonComplete
()
Duel
.
SpecialSummonComplete
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
end
end
function
c12006020
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006020
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c12006020
.
filter1
(
c
,
e
,
tp
)
function
c12006020
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006020
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006020
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c12006020
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12006020
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12006020
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c12006020
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c12006020
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006020
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006020
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006020
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
\ No newline at end of file
expansions/script/c12006021.lua
View file @
e4b182ad
--失落王国 刻薄的卡麦尔
--失落王国 刻薄的卡麦尔
function
c12006021
.
initial_effect
(
c
)
function
c12006021
.
initial_effect
(
c
)
--search
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006021
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006021
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
12006021
)
e1
:
SetCountLimit
(
1
,
12006021
)
e1
:
SetTarget
(
c12006021
.
thtg
)
e1
:
SetTarget
(
c12006021
.
thtg
)
e1
:
SetOperation
(
c12006021
.
thop
)
e1
:
SetOperation
(
c12006021
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006021
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006021
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCountLimit
(
1
,
12006121
)
e1
:
SetCountLimit
(
1
,
12006121
)
e1
:
SetCondition
(
c12006021
.
condition
)
e1
:
SetCondition
(
c12006021
.
condition
)
e1
:
SetTarget
(
c12006021
.
target
)
e1
:
SetTarget
(
c12006021
.
target
)
e1
:
SetOperation
(
c12006021
.
operation
)
e1
:
SetOperation
(
c12006021
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c12006021
.
thfilter
(
c
)
function
c12006021
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x8fbd
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x8fbd
)
and
c
:
IsAbleToHand
()
end
end
function
c12006021
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12006021
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12006021
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12006021
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c12006021
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006021
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006021
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006021
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
function
c12006021
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006021
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c12006021
.
filter
(
c
,
e
,
tp
)
function
c12006021
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006021
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006021
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c12006021
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12006021
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12006021
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c12006021
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c12006021
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006021
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006021
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006021
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
\ No newline at end of file
expansions/script/c12006022.lua
View file @
e4b182ad
--失落王国 慈悲的然基尔
--失落王国 慈悲的然基尔
function
c12006022
.
initial_effect
(
c
)
function
c12006022
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006022
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006022
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
12006122
)
e1
:
SetCountLimit
(
1
,
12006122
)
e1
:
SetTarget
(
c12006022
.
thtg1
)
e1
:
SetTarget
(
c12006022
.
thtg1
)
e1
:
SetOperation
(
c12006022
.
thop1
)
e1
:
SetOperation
(
c12006022
.
thop1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006022
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
12006022
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCountLimit
(
1
,
12006222
)
e1
:
SetCountLimit
(
1
,
12006222
)
e1
:
SetCondition
(
c12006022
.
condition
)
e1
:
SetCondition
(
c12006022
.
condition
)
e1
:
SetTarget
(
c12006022
.
target
)
e1
:
SetTarget
(
c12006022
.
target
)
e1
:
SetOperation
(
c12006022
.
operation
)
e1
:
SetOperation
(
c12006022
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_SELF_DESTROY
)
e2
:
SetCode
(
EFFECT_SELF_DESTROY
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
c12006022
.
dtg
)
e2
:
SetTarget
(
c12006022
.
dtg
)
e2
:
SetValue
(
aux
.
TRUE
)
e2
:
SetValue
(
aux
.
TRUE
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c12006022
.
filter
(
c
,
ft
)
function
c12006022
.
filter
(
c
,
ft
)
return
c
:
IsFaceup
()
return
c
:
IsFaceup
()
end
end
function
c12006022
.
dtg
(
e
,
c
)
function
c12006022
.
dtg
(
e
,
c
)
return
c
:
GetAttack
()
==
1800
and
c
:
IsFaceup
()
and
not
c
:
IsImmuneToEffect
(
e
)
return
c
:
GetAttack
()
==
1800
and
c
:
IsFaceup
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
end
function
c12006022
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c12006022
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c12006022
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c12006022
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingTarget
(
c12006022
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
and
Duel
.
IsExistingTarget
(
c12006022
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c12006022
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c12006022
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
end
function
c12006022
.
thop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006022
.
thop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
local
e1
=
Effect
.
CreateEffect
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
tc
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
3000
)
e1
:
SetValue
(
3000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
end
end
end
function
c12006022
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006022
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c12006022
.
filter1
(
c
,
e
,
tp
)
function
c12006022
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006022
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006022
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c12006022
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12006022
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12006022
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c12006022
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c12006022
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12006022
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006022
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006022
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
expansions/script/c12008030.lua
View file @
e4b182ad
--双色的连心
--双色的连心
function
c12008030
.
initial_effect
(
c
)
function
c12008030
.
initial_effect
(
c
)
--Activate
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetCode
(
EVENT_TO_HAND
)
e0
:
SetCode
(
EVENT_TO_HAND
)
e0
:
SetCondition
(
c12008030
.
regcon
)
e0
:
SetCondition
(
c12008030
.
regcon
)
e0
:
SetOperation
(
c12008030
.
regop
)
e0
:
SetOperation
(
c12008030
.
regop
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCondition
(
c12008030
.
tdcon2
)
e1
:
SetCondition
(
c12008030
.
tdcon2
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetOperation
(
c12008030
.
value
)
e1
:
SetOperation
(
c12008030
.
value
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--spsummon
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12008030
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
12008030
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetTarget
(
c12008030
.
sptg1
)
e2
:
SetTarget
(
c12008030
.
sptg1
)
e2
:
SetOperation
(
c12008030
.
spop1
)
e2
:
SetOperation
(
c12008030
.
spop1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12008030
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
12008030
,
1
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_O
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_O
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e1
:
SetCondition
(
aux
.
exccon
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCondition
(
c12008030
.
condition
)
e1
:
SetCost
(
aux
.
exccon
)
e1
:
SetTarget
(
c12008030
.
target
)
e1
:
SetCondition
(
c12008030
.
condition
)
e1
:
SetOperation
(
c12008030
.
operation
)
e1
:
SetTarget
(
c12008030
.
target
)
c
:
RegisterEffect
(
e1
)
e1
:
SetOperation
(
c12008030
.
operation
)
end
c
:
RegisterEffect
(
e1
)
function
c12008030
.
tdcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
Duel
.
GetFlagEffect
(
tp
,
12008030
)
>
0
function
c12008030
.
tdcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
Duel
.
GetFlagEffect
(
tp
,
12008030
)
>
0
function
c12008030
.
value
(
e
)
end
return
e
:
GetHandler
():
GetType
()
+
TYPE_QUICKPLAY
function
c12008030
.
value
(
e
)
end
return
e
:
GetHandler
():
GetType
()
+
TYPE_QUICKPLAY
function
c12008030
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
re
and
re
:
GetHandler
():
IsSetCard
(
0x1fb3
)
function
c12008030
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
re
and
re
:
GetHandler
():
IsSetCard
(
0x1fb3
)
function
c12008030
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
function
c12008030
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
c
=
e
:
GetHandler
()
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_PUBLIC
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
2
)
e1
:
SetCode
(
EFFECT_PUBLIC
)
c
:
RegisterEffect
(
e1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
2
)
Duel
.
RegisterFlagEffect
(
tp
,
12008030
,
RESET_PHASE
+
PHASE_END
,
0
,
2
)
c
:
RegisterEffect
(
e1
)
end
Duel
.
RegisterFlagEffect
(
tp
,
12008030
,
RESET_PHASE
+
PHASE_END
,
0
,
2
)
function
c12008030
.
spfilter1
(
c
,
e
,
tp
)
end
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x1fb3
)
and
c
:
IsLevelAbove
(
1
)
function
c12008030
.
spfilter1
(
c
,
e
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
c12008030
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
,
c
:
GetLevel
())
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x1fb3
)
and
c
:
IsLevelAbove
(
1
)
and
aux
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
TYPE_XYZ
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12008030
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
,
c
:
GetLevel
())
end
and
aux
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
TYPE_XYZ
)
>
0
function
c12008030
.
spfilter2
(
c
,
e
,
tp
,
mc
,
level
)
end
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetRank
()
==
level
--and mc:IsCanBeXyzMaterial(c)
function
c12008030
.
spfilter2
(
c
,
e
,
tp
,
mc
,
level
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetRank
()
==
level
--and mc:IsCanBeXyzMaterial(c)
end
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
function
c12008030
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12008030
.
spfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
function
c12008030
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12008030
.
spfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SelectTarget
(
tp
,
c12008030
.
spfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SelectTarget
(
tp
,
c12008030
.
spfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
function
c12008030
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
function
c12008030
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12008030
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
,
tc
:
GetLevel
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sc
=
g
:
GetFirst
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12008030
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
,
tc
:
GetAttribute
())
if
sc
then
local
sc
=
g
:
GetFirst
()
local
mg
=
tc
:
GetOverlayGroup
()
if
sc
then
if
mg
:
GetCount
()
~=
0
then
local
mg
=
tc
:
GetOverlayGroup
()
Duel
.
Overlay
(
sc
,
mg
)
if
mg
:
GetCount
()
~=
0
then
end
Duel
.
Overlay
(
sc
,
mg
)
sc
:
SetMaterial
(
Group
.
FromCards
(
tc
))
end
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
tc
))
sc
:
SetMaterial
(
Group
.
FromCards
(
tc
))
Duel
.
SpecialSummon
(
sc
,
SUMMON_TYPE_XYZ
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
tc
))
sc
:
CompleteProcedure
()
Duel
.
SpecialSummon
(
sc
,
SUMMON_TYPE_XYZ
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
sc
:
CompleteProcedure
()
end
end
function
c12008030
.
cfilter
(
c
,
tp
)
end
return
c
:
IsReason
(
REASON_BATTLE
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
GetPreviousControler
()
==
tp
function
c12008030
.
cfilter
(
c
,
tp
)
end
return
c
:
IsReason
(
REASON_BATTLE
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
GetPreviousControler
()
==
tp
function
c12008030
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
eg
:
IsExists
(
c12008030
.
cfilter
,
1
,
nil
,
tp
)
function
c12008030
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
eg
:
IsExists
(
c12008030
.
cfilter
,
1
,
nil
,
tp
)
function
c12008030
.
spfilter
(
c
,
e
,
tp
)
end
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsSetCard
(
0x8fbd
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
function
c12008030
.
spfilter
(
c
,
e
,
tp
)
end
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsSetCard
(
0x8fbd
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
function
c12008030
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
function
c12008030
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
and
Duel
.
IsExistingMatchingCard
(
c12008030
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
)
and
Duel
.
IsExistingMatchingCard
(
c12008030
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
)
function
c12008030
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
function
c12008030
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12008030
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
g
:
GetCount
()
~=
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12008030
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
g
:
GetCount
()
~=
0
then
end
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
\ No newline at end of file
expansions/script/c12010026.lua
View file @
e4b182ad
--LA SY 赤口的斯卡雷特
--LA SY 赤口的斯卡雷特
function
c12010026
.
initial_effect
(
c
)
function
c12010026
.
initial_effect
(
c
)
--pendulum summon
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--destroy
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12010026
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
12010026
,
0
))
e2
:
SetCategory
(
CATEGORY_RELEASE
)
e2
:
SetCategory
(
CATEGORY_RELEASE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_NO_TURN_RESET
)
e2
:
SetProperty
(
EFFECT_FLAG_NO_TURN_RESET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c12010026
.
sctg
)
e2
:
SetTarget
(
c12010026
.
sctg
)
e2
:
SetOperation
(
c12010026
.
scop
)
e2
:
SetOperation
(
c12010026
.
scop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--indes
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetValue
(
c12010026
.
efilter
)
e2
:
SetValue
(
c12010026
.
efilter
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--synlimit
--synlimit
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
e0
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetValue
(
c12010026
.
synlimit
)
e0
:
SetValue
(
c12010026
.
synlimit
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12010026
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
12010026
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetCondition
(
c12010026
.
condition
)
e1
:
SetCondition
(
c12010026
.
condition
)
e1
:
SetTarget
(
c12010026
.
target
)
e1
:
SetTarget
(
c12010026
.
target
)
e1
:
SetOperation
(
c12010026
.
operation
)
e1
:
SetOperation
(
c12010026
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--pendulum
--pendulum
local
e6
=
Effect
.
CreateEffect
(
c
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
12010026
,
3
))
e6
:
SetDescription
(
aux
.
Stringid
(
12010026
,
3
))
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetCode
(
EVENT_DESTROYED
)
e6
:
SetCode
(
EVENT_DESTROYED
)
e6
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e6
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e6
:
SetCondition
(
c12010026
.
pencon
)
e6
:
SetCondition
(
c12010026
.
pencon
)
e6
:
SetTarget
(
c12010026
.
pentg
)
e6
:
SetTarget
(
c12010026
.
pentg
)
e6
:
SetOperation
(
c12010026
.
penop
)
e6
:
SetOperation
(
c12010026
.
penop
)
c
:
RegisterEffect
(
e6
)
c
:
RegisterEffect
(
e6
)
end
end
function
c12010026
.
efilter
(
e
,
te
)
function
c12010026
.
efilter
(
e
,
te
)
return
te
:
GetHandlerPlayer
()
~=
e
:
GetHandlerPlayer
()
and
te
:
IsActiveType
(
TYPE_MONSTER
)
return
te
:
GetHandlerPlayer
()
~=
e
:
GetHandlerPlayer
()
and
te
:
IsActiveType
(
TYPE_MONSTER
)
end
end
function
c12010026
.
synlimit
(
e
,
c
)
function
c12010026
.
synlimit
(
e
,
c
)
if
not
c
then
return
false
end
if
not
c
then
return
false
end
return
not
c
:
IsSetCard
(
0xfba
)
return
not
c
:
IsSetCard
(
0xfba
)
end
end
function
c12010026
.
tgfilter
(
c
)
function
c12010026
.
tgfilter
(
c
)
return
c
:
IsReleasable
()
and
c
:
IsSetCard
(
0xfba
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsReleasable
()
and
c
:
IsSetCard
(
0xfba
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
end
function
c12010026
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c12010026
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12010026
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12010026
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
end
function
c12010026
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12010026
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12010026
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12010026
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
then
if
tc
then
if
Duel
.
SendtoGrave
(
tc
,
REASON_RELEASE
+
REASON_EFFECT
)
>
0
then
if
Duel
.
SendtoGrave
(
tc
,
REASON_RELEASE
+
REASON_EFFECT
)
>
0
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LSCALE
)
e1
:
SetCode
(
EFFECT_UPDATE_LSCALE
)
e1
:
SetValue
(
tc
:
GetLevel
())
e1
:
SetValue
(
tc
:
GetLevel
())
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_RSCALE
)
e2
:
SetCode
(
EFFECT_UPDATE_RSCALE
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
end
end
end
end
function
c12010026
.
filter
(
c
)
function
c12010026
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsDisabled
()
return
c
:
IsFaceup
()
and
c
:
IsDisabled
()
end
end
function
c12010026
.
pencon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12010026
.
pencon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
end
end
function
c12010026
.
pentg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12010026
.
pentg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
end
if
chk
==
0
then
return
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
end
end
end
function
c12010026
.
penop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12010026
.
penop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
and
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
return
end
if
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
and
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
return
end
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
end
end
function
c12010026
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12010026
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
at
=
Duel
.
GetAttacker
()
local
at
=
Duel
.
GetAttacker
()
return
at
:
GetControler
()
==
1
-
tp
and
Duel
.
GetAttackTarget
()
==
nil
return
at
:
GetControler
()
==
1
-
tp
and
Duel
.
GetAttackTarget
()
==
nil
end
end
function
c12010026
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12010026
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
end
function
c12010026
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12010026
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
c
=
e
:
GetHandler
()
end
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c12011000.lua
View file @
e4b182ad
--原数黑姬 1
--原数黑姬 1
function
c12011000
.
initial_effect
(
c
)
function
c12011000
.
initial_effect
(
c
)
--pendulum summon
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--search
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12011000
,
2
))
e2
:
SetDescription
(
aux
.
Stringid
(
12011000
,
2
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCountLimit
(
1
,
12011000
)
e2
:
SetCountLimit
(
1
,
12011000
)
e2
:
SetCondition
(
c12011000
.
thcon
)
e2
:
SetCondition
(
c12011000
.
thcon
)
e2
:
SetTarget
(
c12011000
.
thtg
)
e2
:
SetTarget
(
c12011000
.
thtg
)
e2
:
SetOperation
(
c12011000
.
thop
)
e2
:
SetOperation
(
c12011000
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--spsummon self
--spsummon self
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12011000
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
12011000
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
12011100
)
e1
:
SetCountLimit
(
1
,
12011100
)
e1
:
SetTarget
(
c12011000
.
spstg
)
e1
:
SetTarget
(
c12011000
.
spstg
)
e1
:
SetOperation
(
c12011000
.
spsop
)
e1
:
SetOperation
(
c12011000
.
spsop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--be material
--be material
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetCondition
(
c12011000
.
efcon
)
e3
:
SetCondition
(
c12011000
.
efcon
)
e3
:
SetOperation
(
c12011000
.
efop
)
e3
:
SetOperation
(
c12011000
.
efop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c12011000
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12011000
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
r
==
REASON_LINK
or
r
==
REASON_SYNCHRO
or
r
==
REASON_XYZ
)
return
(
r
==
REASON_LINK
or
r
==
REASON_SYNCHRO
or
r
==
REASON_XYZ
)
end
end
function
c12011000
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12011000
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
rc
=
c
:
GetReasonCard
()
local
rc
=
c
:
GetReasonCard
()
local
e3
=
Effect
.
CreateEffect
(
rc
)
local
e3
=
Effect
.
CreateEffect
(
rc
)
e3
:
SetDescription
(
aux
.
Stringid
(
12011000
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
12011000
,
1
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTarget
(
c12011000
.
target
)
e3
:
SetTarget
(
c12011000
.
target
)
e3
:
SetValue
(
c12011000
.
efilter
)
e3
:
SetValue
(
c12011000
.
efilter
)
rc
:
RegisterEffect
(
e3
,
true
)
rc
:
RegisterEffect
(
e3
,
true
)
--indes
--indes
local
e3
=
Effect
.
CreateEffect
(
rc
)
local
e3
=
Effect
.
CreateEffect
(
rc
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e3
:
SetValue
(
1
)
e3
:
SetValue
(
1
)
rc
:
RegisterEffect
(
e3
,
true
)
rc
:
RegisterEffect
(
e3
,
true
)
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_ADD_TYPE
)
e2
:
SetCode
(
EFFECT_ADD_TYPE
)
e2
:
SetValue
(
TYPE_EFFECT
)
e2
:
SetValue
(
TYPE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
rc
:
RegisterEffect
(
e2
,
true
)
rc
:
RegisterEffect
(
e2
,
true
)
end
end
end
end
function
c12011000
.
target
(
e
,
c
)
function
c12011000
.
target
(
e
,
rc
)
local
g
,
te
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
,
CHAININFO_TRIGGERING_EFFECT
)
local
g
,
te
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
,
CHAININFO_TRIGGERING_EFFECT
)
return
not
(
te
and
te
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
))
return
not
(
te
and
te
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
))
or
not
(
g
and
g
:
IsContains
(
c
))
or
not
(
g
and
g
:
IsContains
(
rc
))
end
end
function
c12011000
.
efilter
(
e
,
te
)
function
c12011000
.
efilter
(
e
,
te
)
return
te
:
GetOwnerPlayer
()
~=
e
:
GetHandlerPlayer
()
return
te
:
GetOwnerPlayer
()
~=
e
:
GetHandlerPlayer
()
end
end
function
c12011000
.
spfilter
(
c
)
function
c12011000
.
spfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
end
end
function
c12011000
.
spstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12011000
.
spstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12011000
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12011000
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
e
:
GetHandler
())
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
end
function
c12011000
.
spsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12011000
.
spsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12011000
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
aux
.
ExceptThisCard
(
e
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12011000
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
aux
.
ExceptThisCard
(
e
))
if
g
:
GetCount
()
>
0
and
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
and
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c12011000
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12011000
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSetCard
,
e
:
GetHandlerPlayer
(),
LOCATION_PZONE
,
0
,
1
,
e
:
GetHandler
(),
0x3fbe
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSetCard
,
e
:
GetHandlerPlayer
(),
LOCATION_PZONE
,
0
,
1
,
e
:
GetHandler
(),
0x3fbe
)
end
end
function
c12011000
.
thfilter
(
c
)
function
c12011000
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
end
end
function
c12011000
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12011000
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12011000
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12011000
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_PZONE
,
0
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_PZONE
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
c12011000
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12011000
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_PZONE
,
0
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_PZONE
,
0
)
if
g
:
GetCount
()
<
2
then
return
end
if
g
:
GetCount
()
<
2
then
return
end
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
==
2
then
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
==
2
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c12011000
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c12011000
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
then
if
sg
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
end
end
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