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
Soulgamer
ygopro-222DIY-cards
Commits
9d2b8915
Commit
9d2b8915
authored
May 31, 2024
by
聖園ミカ
🐟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vme50
parent
4d173a4e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
109 additions
and
90 deletions
+109
-90
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c81040000.lua
expansions/script/c81040000.lua
+13
-10
expansions/script/c81040003.lua
expansions/script/c81040003.lua
+31
-26
expansions/script/c81040004.lua
expansions/script/c81040004.lua
+1
-0
expansions/script/c81040014.lua
expansions/script/c81040014.lua
+17
-13
expansions/script/c81040035.lua
expansions/script/c81040035.lua
+32
-29
expansions/script/c81040038.lua
expansions/script/c81040038.lua
+15
-12
No files found.
expansions/222DIY.cdb
View file @
9d2b8915
No preview for this file type
expansions/script/c81040000.lua
View file @
9d2b8915
--周子·浪迹天涯
function
c81040000
.
initial_effect
(
c
)
aux
.
AddRitualProcGreater
(
c
,
c81040000
.
ritual_filter
)
local
m
=
81040000
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"c81000000.lua"
)
function
cm
.
initial_effect
(
c
)
aux
.
AddRitualProcGreater
(
c
,
cm
.
ritual_filter
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
...
...
@@ -8,23 +11,23 @@ function c81040000.initial_effect(c)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCondition
(
aux
.
exccon
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
c
81040000
.
thtg
)
e1
:
SetOperation
(
c
81040000
.
thop
)
e1
:
SetTarget
(
c
m
.
thtg
)
e1
:
SetOperation
(
c
m
.
thop
)
c
:
RegisterEffect
(
e1
)
end
function
c
81040000
.
ritual_filter
(
c
)
function
c
m
.
ritual_filter
(
c
)
return
c
:
IsSetCard
(
0x81c
)
and
c
:
IsType
(
TYPE_RITUAL
)
end
function
c
81040000
.
thfilter
(
c
)
function
c
m
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x81c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c
81040000
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
81040000
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
c
m
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c
81040000
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
81040000
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
...
...
expansions/script/c81040003.lua
View file @
9d2b8915
--周子·红叶秋风
function
c81040003
.
initial_effect
(
c
)
local
e1
=
aux
.
AddRitualProcGreater2
(
c
,
c81040003
.
filter
,
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
81040003
)
local
m
=
81040003
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"c81000000.lua"
)
function
cm
.
initial_effect
(
c
)
local
e1
=
aux
.
AddRitualProcGreater2
(
c
,
cm
.
ritual_filter
,
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
m
)
c
:
RegisterEffect
(
e1
)
--to deck
local
e
6
=
Effect
.
CreateEffect
(
c
)
e
6
:
SetCategory
(
CATEGORY_TODECK
)
e
6
:
SetType
(
EFFECT_TYPE_IGNITION
)
e
6
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e
6
:
SetRange
(
LOCATION_GRAVE
)
e
6
:
SetCountLimit
(
1
,
81040903
)
e
6
:
SetCondition
(
aux
.
exccon
)
e
6
:
SetCost
(
aux
.
bfgcost
)
e
6
:
SetTarget
(
c81040003
.
tdtg
)
e
6
:
SetOperation
(
c81040003
.
tdop
)
c
:
RegisterEffect
(
e
6
)
local
e
2
=
Effect
.
CreateEffect
(
c
)
e
2
:
SetCategory
(
CATEGORY_TODECK
)
e
2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e
2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e
2
:
SetRange
(
LOCATION_GRAVE
)
e
2
:
SetCountLimit
(
1
,
m
+
900
)
e
2
:
SetCondition
(
aux
.
exccon
)
e
2
:
SetCost
(
aux
.
bfgcost
)
e
2
:
SetTarget
(
cm
.
tdtg
)
e
2
:
SetOperation
(
cm
.
tdop
)
c
:
RegisterEffect
(
e
2
)
end
function
c
81040003
.
filter
(
c
)
function
c
m
.
ritual_
filter
(
c
)
return
c
:
IsSetCard
(
0x81c
)
end
function
c81040003
.
tdfilter
(
c
)
return
not
c
:
IsCode
(
81040003
)
and
c
:
IsSetCard
(
0x81c
)
and
c
:
IsAbleToDeck
()
and
(
not
e
or
c
:
IsCanBeEffectTarget
(
e
))
and
(
not
c
:
IsLocation
(
LOCATION_REMOVED
)
or
c
:
IsFaceup
())
function
cm
.
tdfilter
(
c
,
e
)
return
not
c
:
IsCode
(
m
)
and
c
:
IsSetCard
(
0x81c
)
and
c
:
IsAbleToDeck
()
and
(
not
e
or
c
:
IsCanBeEffectTarget
(
e
))
and
c
:
IsFaceupEx
()
end
function
c
81040003
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c
81040003
.
tdfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
81040003
.
tdfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
e
:
GetHandler
())
end
function
c
m
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c
m
.
tdfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
m
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
GetMatchingGroup
(
c81040003
.
tdfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
e
:
GetHandler
(),
e
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
1
,
#
g
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
tdfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
e
:
GetHandler
(),
e
)
aux
.
GCheckAdditional
=
aux
.
dncheck
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
TRUE
,
false
,
1
,
#
g
)
aux
.
GCheckAdditional
=
nil
Duel
.
SetTargetCard
(
sg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
sg
,
#
sg
,
0
,
0
)
end
function
c
81040003
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
g
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
end
end
expansions/script/c81040004.lua
View file @
9d2b8915
...
...
@@ -5,6 +5,7 @@ Duel.LoadScript("c81000000.lua")
function
cm
.
initial_effect
(
c
)
local
e1
=
aux
.
AddRitualProcEqual2
(
c
,
cm
.
afilter
,
nil
,
cm
.
bfilter
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
c
:
RegisterEffect
(
e1
)
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
...
...
expansions/script/c81040014.lua
View file @
9d2b8915
--周子·自在休憩
function
c81040014
.
initial_effect
(
c
)
local
m
=
81040014
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"c81000000.lua"
)
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
aux
.
AddRitualProcEqual2
(
c
,
c81040014
.
filter
,
LOCATION_HAND
+
LOCATION_REMOVED
)
e1
:
SetCountLimit
(
1
,
81040014
)
local
e1
=
aux
.
AddRitualProcEqual2
(
c
,
cm
.
filter
,
LOCATION_HAND
+
LOCATION_REMOVED
)
e1
:
SetCountLimit
(
1
,
m
)
c
:
RegisterEffect
(
e1
)
--tograve
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
81040914
)
e2
:
SetCountLimit
(
1
,
m
+
900
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c
81040014
.
tgtg
)
e2
:
SetOperation
(
c
81040014
.
tgop
)
e2
:
SetTarget
(
c
m
.
tgtg
)
e2
:
SetOperation
(
c
m
.
tgop
)
c
:
RegisterEffect
(
e2
)
end
function
c
81040014
.
filter
(
c
)
function
c
m
.
filter
(
c
)
return
c
:
IsSetCard
(
0x81c
)
end
function
c
81040014
.
tgfilter
(
c
)
function
c
m
.
tgfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x81c
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c
81040014
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c
81040014
.
tgfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
81040014
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
function
c
m
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c
m
.
tgfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
m
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
c
81040014
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
c
m
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
sg
,
1
,
0
,
0
)
end
function
c
81040014
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
+
REASON_RETURN
)
...
...
expansions/script/c81040035.lua
View file @
9d2b8915
--周子·不散之约
function
c81040035
.
initial_effect
(
c
)
local
m
=
81040035
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"c81000000.lua"
)
function
cm
.
initial_effect
(
c
)
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
...
...
@@ -10,10 +13,10 @@ function c81040035.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetCountLimit
(
1
,
81040035
)
e1
:
SetCost
(
c
81040035
.
cost
)
e1
:
SetTarget
(
c
81040035
.
drtg
)
e1
:
SetOperation
(
c
81040035
.
drop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
c
m
.
cost
)
e1
:
SetTarget
(
c
m
.
drtg
)
e1
:
SetOperation
(
c
m
.
drop
)
c
:
RegisterEffect
(
e1
)
--Untargetable
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -22,7 +25,7 @@ function c81040035.initial_effect(c)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
c
81040035
.
immtg
)
e2
:
SetTarget
(
c
m
.
immtg
)
e2
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e2
)
--Indes
...
...
@@ -35,63 +38,63 @@ function c81040035.initial_effect(c)
e4
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_GRAVE
)
e4
:
SetCountLimit
(
1
,
81040935
)
e4
:
SetCountLimit
(
1
,
m
+
900
)
e4
:
SetCondition
(
aux
.
exccon
)
e4
:
SetCost
(
c
81040035
.
qhcost
)
e4
:
SetTarget
(
c
81040035
.
qhtg
)
e4
:
SetOperation
(
c
81040035
.
qhop
)
e4
:
SetCost
(
c
m
.
qhcost
)
e4
:
SetTarget
(
c
m
.
qhtg
)
e4
:
SetOperation
(
c
m
.
qhop
)
c
:
RegisterEffect
(
e4
)
end
function
c
81040035
.
cfilter
(
c
)
function
c
m
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x81c
)
and
c
:
IsDiscardable
()
end
function
c
81040035
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
81040035
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c
81040035
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
function
c
m
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c
m
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c
81040035
.
filter
(
c
)
function
c
m
.
filter
(
c
)
return
c
:
IsSetCard
(
0x81c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
c
81040035
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c
81040035
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
and
Duel
.
IsExistingMatchingCard
(
c
m
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c
81040035
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
81040035
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
and
g
:
GetFirst
():
IsLocation
(
LOCATION_GRAVE
)
then
Duel
.
ShuffleDeck
(
tp
)
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
function
c
81040035
.
immtg
(
e
,
c
)
function
c
m
.
immtg
(
e
,
c
)
return
c
:
IsSummonType
(
SUMMON_TYPE_RITUAL
)
and
c
:
IsLevel
(
9
)
end
function
c
81040035
.
pfilter
(
c
)
function
c
m
.
pfilter
(
c
)
return
c
:
IsSetCard
(
0x81c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c
81040035
.
qhcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
qhcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
c
81040035
.
pfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
and
Duel
.
IsExistingMatchingCard
(
c
m
.
pfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
81040035
.
pfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
pfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c
81040035
.
qhfilter
(
c
)
function
c
m
.
qhfilter
(
c
)
return
c
:
IsSetCard
(
0x81c
)
and
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
end
function
c
81040035
.
qhtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
81040035
.
qhfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
c
m
.
qhtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
qhfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c
81040035
.
qhop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
qhop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
81040035
.
qhfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
qhfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
...
...
expansions/script/c81040038.lua
View file @
9d2b8915
--周子·久别重逢
function
c81040038
.
initial_effect
(
c
)
local
m
=
81040038
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"c81000000.lua"
)
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
c
81040038
.
condition
)
e1
:
SetCost
(
c
81040038
.
cost
)
e1
:
SetTarget
(
c
81040038
.
target
)
e1
:
SetOperation
(
c
81040038
.
activate
)
e1
:
SetCondition
(
c
m
.
condition
)
e1
:
SetCost
(
c
m
.
cost
)
e1
:
SetTarget
(
c
m
.
target
)
e1
:
SetOperation
(
c
m
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c
81040038
.
cfilter
(
c
)
function
c
m
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x81c
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c
81040038
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
re
:
IsActiveType
(
TYPE_MONSTER
)
or
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c
81040038
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
81040038
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
function
c
m
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
81040038
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c
81040038
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
aux
.
nbcon
(
tp
,
re
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
eg
,
1
,
0
,
0
)
end
end
function
c
81040038
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Remove
(
eg
,
POS_FACEUP
,
REASON_EFFECT
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment