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
alstroemeria-silentlove
ygopro-222DIY-cards
Commits
a547650d
Commit
a547650d
authored
May 25, 2023
by
songtongtong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
203a96fb
Pipeline
#21988
passed with stage
in 23 minutes and 26 seconds
Changes
5
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
410 additions
and
409 deletions
+410
-409
expansions/script/c33331904.lua
expansions/script/c33331904.lua
+66
-66
expansions/script/c33405004.lua
expansions/script/c33405004.lua
+100
-100
expansions/script/c60151708.lua
expansions/script/c60151708.lua
+84
-84
expansions/script/c64832013.lua
expansions/script/c64832013.lua
+107
-107
expansions/script/c81004206.lua
expansions/script/c81004206.lua
+53
-52
No files found.
expansions/script/c33331904.lua
View file @
a547650d
--堇霆之兽 棘伤虫
--堇霆之兽 棘伤虫
local
m
=
33331904
local
m
=
33331904
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--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
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetOperation
(
cm
.
spop
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--SearchCard
--SearchCard
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_HANDES
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_HANDES
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
m
+
50
)
e2
:
SetCountLimit
(
1
,
m
+
50
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
cm
.
tgtg
)
e2
:
SetTarget
(
cm
.
tgtg
)
e2
:
SetOperation
(
cm
.
tgop
)
e2
:
SetOperation
(
cm
.
tgop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
--spsummon
--spsummon
function
cm
.
filter
(
c
)
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsSetCard
(
0x3567
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsSetCard
(
0x3567
)
and
c
:
IsAbleToRemoveAsCost
()
end
end
function
cm
.
spcon
(
e
,
c
)
function
cm
.
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
()
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
end
--send to grave
--send to grave
function
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x3567
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x3567
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
m
)
end
end
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
cm
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
tgop
(
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
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
>
0
then
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
--Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT)
--Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT)
if
Duel
.
IsExistingMatchingCard
(
cm
.
tgfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
if
Duel
.
IsExistingMatchingCard
(
cm
.
tgfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
end
end
end
end
function
cm
.
tgfilter2
(
c
)
function
cm
.
tgfilter2
(
c
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsRace
(
RACE_REPTILE
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsRace
(
RACE_REPTILE
)
end
end
expansions/script/c33405004.lua
View file @
a547650d
--『星光歌剧』台本-渴望Revue
--『星光歌剧』台本-渴望Revue
local
m
=
33405004
local
m
=
33405004
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetOperation
(
cm
.
activate
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--to hand
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCondition
(
cm
.
thcon2
)
e2
:
SetCondition
(
cm
.
thcon2
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
cm
.
thtg2
)
e2
:
SetTarget
(
cm
.
thtg2
)
e2
:
SetOperation
(
cm
.
thop2
)
e2
:
SetOperation
(
cm
.
thop2
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCondition
(
cm
.
thcon
)
e1
:
SetCondition
(
cm
.
thcon
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
e1
:
SetOperation
(
cm
.
thop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
cm
.
cfilter
(
c
,
r
e
)
function
cm
.
cfilter
(
c
,
r
,
re
)
return
(
c
:
IsReason
(
REASON_BATTLE
)
and
c
:
GetReasonCard
():
IsSetCard
(
0x6410
))
or
(
c
:
IsReason
(
REASON_EFFECT
)
and
re
and
re
:
GetOwner
():
IsSetCard
(
0x6410
))
return
(
r
&
REASON_BATTLE
~=
0
and
c
:
GetReasonCard
():
IsSetCard
(
0x6410
))
or
(
c
:
IsReason
(
REASON_EFFECT
)
and
re
and
re
:
GetOwner
():
IsSetCard
(
0x6410
))
end
end
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
m
)
>
Duel
.
GetFlagEffect
(
tp
,
m
+
1
)
and
eg
:
IsExists
(
cm
.
cfilter
,
1
,
nil
,
r
e
)
return
Duel
.
GetFlagEffect
(
tp
,
m
)
>
Duel
.
GetFlagEffect
(
tp
,
m
+
1
)
and
eg
:
IsExists
(
cm
.
cfilter
,
1
,
nil
,
r
,
re
)
end
end
function
cm
.
filter
(
c
)
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0x6410
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x6410
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetControler
()
==
tp
and
chkc
:
GetLocation
()
==
LOCATION_GRAVE
+
LOCATION_DECK
and
cm
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
GetControler
()
==
tp
and
chkc
:
GetLocation
()
==
LOCATION_GRAVE
+
LOCATION_DECK
and
cm
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
end
function
cm
.
filter2
(
c
)
function
cm
.
filter2
(
c
)
return
c
:
IsSummonable
(
true
,
nil
,
1
)
or
c
:
IsMSetable
(
true
,
nil
,
1
)
return
c
:
IsSummonable
(
true
,
nil
,
1
)
or
c
:
IsMSetable
(
true
,
nil
,
1
)
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
then
return
end
if
not
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
then
return
end
if
not
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
return
end
if
not
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g1
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g1
,
nil
,
REASON_EFFECT
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
filter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
if
Duel
.
IsExistingMatchingCard
(
cm
.
filter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
then
if
tc
then
local
s1
=
tc
:
IsSummonable
(
true
,
nil
,
1
)
local
s1
=
tc
:
IsSummonable
(
true
,
nil
,
1
)
local
s2
=
tc
:
IsMSetable
(
true
,
nil
,
1
)
local
s2
=
tc
:
IsMSetable
(
true
,
nil
,
1
)
if
(
s1
and
s2
and
Duel
.
SelectPosition
(
tp
,
tc
,
POS_FACEUP_ATTACK
+
POS_FACEDOWN_DEFENSE
)
==
POS_FACEUP_ATTACK
)
or
not
s2
then
if
(
s1
and
s2
and
Duel
.
SelectPosition
(
tp
,
tc
,
POS_FACEUP_ATTACK
+
POS_FACEDOWN_DEFENSE
)
==
POS_FACEUP_ATTACK
)
or
not
s2
then
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
,
1
)
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
,
1
)
else
else
Duel
.
MSet
(
tp
,
tc
,
true
,
nil
,
1
)
Duel
.
MSet
(
tp
,
tc
,
true
,
nil
,
1
)
end
end
end
end
end
end
Duel
.
RegisterFlagEffect
(
tp
,
m
+
1
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
+
1
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
cm
.
cfilter2
(
c
,
tp
)
function
cm
.
cfilter2
(
c
,
tp
)
return
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
GetPreviousControler
()
==
1
-
tp
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
return
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
GetPreviousControler
()
==
1
-
tp
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
cm
.
thcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
cfilter2
,
1
,
nil
,
tp
)
return
eg
:
IsExists
(
cm
.
cfilter2
,
1
,
nil
,
tp
)
end
end
function
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x6410
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x6410
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsAbleToHand
()
end
end
function
cm
.
thtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
thtg2
(
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
cm
.
thfilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_REMOVED
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_REMOVED
+
LOCATION_GRAVE
)
end
end
function
cm
.
thop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thop2
(
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
,
cm
.
thfilter
,
tp
,
LOCATION_REMOVED
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_REMOVED
+
LOCATION_GRAVE
,
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
\ No newline at end of file
expansions/script/c60151708.lua
View file @
a547650d
--*天晶部队 见习工人
--*天晶部队 见习工人
local
m
=
60151708
local
m
=
60151708
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--Destroy
--Destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetOperation
(
cm
.
operation
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e3
=
e1
:
Clone
()
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--special summon
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151701
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
60151701
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetCountLimit
(
1
,
m
+
100
)
e3
:
SetCountLimit
(
1
,
6011708
)
e3
:
SetCondition
(
cm
.
spcon2
)
e3
:
SetCondition
(
c60151708
.
spcon2
)
e3
:
SetTarget
(
cm
.
sptg2
)
e3
:
SetTarget
(
c60151708
.
sptg2
)
e3
:
SetOperation
(
cm
.
spop2
)
e3
:
SetOperation
(
c60151708
.
spop2
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
--immune effect
--immune effect
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
cm
.
ffilter
)
e1
:
SetTarget
(
cm
.
ffilter
)
e1
:
SetValue
(
500
)
e1
:
SetValue
(
500
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
cm
.
ffilter
)
e3
:
SetTarget
(
cm
.
ffilter
)
e3
:
SetValue
(
500
)
e3
:
SetValue
(
500
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e3
,
tp
)
Duel
.
RegisterEffect
(
e3
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
cm
.
ffilter
)
e2
:
SetTarget
(
cm
.
ffilter
)
e2
:
SetValue
(
1
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
function
cm
.
ffilter
(
c
,
e
,
tp
)
function
cm
.
ffilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3b26
)
and
c
:
IsFaceup
()
return
c
:
IsSetCard
(
0x3b26
)
and
c
:
IsFaceup
()
end
end
function
cm
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60151708
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
end
function
cm
.
thfilter
(
c
,
e
,
tp
)
function
c60151708
.
thfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3b26
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x3b26
)
and
not
c
:
IsCode
(
60151708
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
cm
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c60151708
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
thfilter
(
chkc
,
e
,
tp
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c60151708
.
thfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingTarget
(
c60151708
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
end
local
g
=
Duel
.
SelectTarget
(
tp
,
c60151708
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
function
cm
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
function
c60151708
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
g
:
GetFirst
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
\ No newline at end of file
expansions/script/c64832013.lua
View file @
a547650d
--星光歌剧 露崎真昼Revue
--星光歌剧 露崎真昼Revue
function
c64832013
.
initial_effect
(
c
)
function
c64832013
.
initial_effect
(
c
)
--summon with 1 tribute
--summon with 1 tribute
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
64832013
,
0
))
e0
:
SetDescription
(
aux
.
Stringid
(
64832013
,
0
))
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetCode
(
EFFECT_SUMMON_PROC
)
e0
:
SetCode
(
EFFECT_SUMMON_PROC
)
e0
:
SetCondition
(
c64832013
.
otcon
)
e0
:
SetCondition
(
c64832013
.
otcon
)
e0
:
SetOperation
(
c64832013
.
otop
)
e0
:
SetOperation
(
c64832013
.
otop
)
e0
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
e0
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
local
e1
=
e0
:
Clone
()
local
e1
=
e0
:
Clone
()
e1
:
SetCode
(
EFFECT_SET_PROC
)
e1
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--indes
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetCondition
(
c64832013
.
con
)
e2
:
SetCondition
(
c64832013
.
con
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSummonType
,
SUMMON_TYPE_ADVANCE
))
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSummonType
,
SUMMON_TYPE_ADVANCE
))
e2
:
SetValue
(
1
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--cannot be target
--cannot be target
local
e3
=
e2
:
Clone
()
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetValue
(
aux
.
tgoval
)
e3
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--tohand
--tohand
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
64832013
,
1
))
e4
:
SetDescription
(
aux
.
Stringid
(
64832013
,
1
))
e4
:
SetCategory
(
CATEGORY_TOHAND
)
e4
:
SetCategory
(
CATEGORY_TOHAND
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetCountLimit
(
1
+
EFFECT_COUNT_CODE_SINGLE
)
e4
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e4
:
SetCondition
(
c64832013
.
thcon
)
e4
:
SetCondition
(
c64832013
.
thcon
)
e4
:
SetTarget
(
c64832013
.
thtg
)
e4
:
SetTarget
(
c64832013
.
thtg
)
e4
:
SetOperation
(
c64832013
.
thop
)
e4
:
SetOperation
(
c64832013
.
thop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e5
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
--damage
--damage
local
e6
=
Effect
.
CreateEffect
(
c
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
64832013
,
2
))
e6
:
SetDescription
(
aux
.
Stringid
(
64832013
,
2
))
e6
:
SetCategory
(
CATEGORY_DAMAGE
)
e6
:
SetCategory
(
CATEGORY_DAMAGE
)
e6
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_DELAY
)
e6
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_DELAY
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetCode
(
EVENT_TO_HAND
)
e6
:
SetCode
(
EVENT_TO_HAND
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCountLimit
(
1
)
e6
:
SetCountLimit
(
1
)
e6
:
SetCondition
(
c64832013
.
damcon
)
e6
:
SetCondition
(
c64832013
.
damcon
)
e6
:
SetTarget
(
c64832013
.
damtg
)
e6
:
SetTarget
(
c64832013
.
damtg
)
e6
:
SetOperation
(
c64832013
.
damop
)
e6
:
SetOperation
(
c64832013
.
damop
)
c
:
RegisterEffect
(
e6
)
c
:
RegisterEffect
(
e6
)
end
end
function
c64832013
.
otfilter
(
c
)
function
c64832013
.
otfilter
(
c
)
return
c
:
IsSetCard
(
0x6410
)
return
c
:
IsSetCard
(
0x6410
)
end
end
function
c64832013
.
otcon
(
e
,
c
,
minc
)
function
c64832013
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
mg
=
Duel
.
GetMatchingGroup
(
c64832013
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
mg
=
Duel
.
GetMatchingGroup
(
c64832013
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
end
end
function
c64832013
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c64832013
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c64832013
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
mg
=
Duel
.
GetMatchingGroup
(
c64832013
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
1
,
1
,
mg
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
1
,
1
,
mg
)
c
:
SetMaterial
(
sg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
end
function
c64832013
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c64832013
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
end
function
c64832013
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c64832013
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
and
not
eg
:
IsContains
(
e
:
GetHandler
())
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
and
not
eg
:
IsContains
(
e
:
GetHandler
())
end
end
function
c64832013
.
thfil
(
c
)
function
c64832013
.
thfil
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x6410
)
and
c
:
IsAbleToHand
()
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x6410
)
and
c
:
IsAbleToHand
()
end
end
function
c64832013
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c64832013
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c64832013
.
thfil
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c64832013
.
thfil
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
end
function
c64832013
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c64832013
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c64832013
.
thfil
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c64832013
.
thfil
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
HintSelection
(
g
)
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
end
end
end
end
function
c64832013
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c64832013
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
~=
tp
and
Duel
.
GetCurrentPhase
()
~=
PHASE_DRAW
return
rp
~=
tp
and
Duel
.
GetCurrentPhase
()
~=
PHASE_DRAW
end
end
function
c64832013
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c64832013
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
1500
)
Duel
.
SetTargetParam
(
1500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
1500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
1500
)
end
end
function
c64832013
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c64832013
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c81004206.lua
View file @
a547650d
--独属于圣诞夜的奇迹
--独属于圣诞夜的奇迹
local
m
=
81004206
local
m
=
81004206
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"c81000000.lua"
)
Duel
.
LoadScript
(
"c81000000.lua"
)
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
cm
.
actcon
)
e1
:
SetCondition
(
cm
.
actcon
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
cm
.
Attack_Defense_Listed
=
1
cm
.
Attack_Defense_Listed
=
1
function
cm
.
cfilter
(
c
)
end
return
c
:
IsFaceup
()
and
c
:
IsAttack
(
1550
)
and
c
:
IsDefense
(
1050
)
function
cm
.
cfilter
(
c
)
end
return
c
:
IsFaceup
()
and
c
:
IsAttack
(
1550
)
and
c
:
IsDefense
(
1050
)
function
cm
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
2
,
nil
)
function
cm
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
2
,
nil
)
function
cm
.
filter
(
c
)
end
return
c
:
IsCode
(
81004100
)
or
c
:
IsCode
(
81004203
)
or
c
:
IsCode
(
81004205
)
function
cm
.
filter
(
c
)
end
return
c
:
IsCode
(
81004100
)
or
c
:
IsCode
(
81004203
)
or
c
:
IsCode
(
81004205
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
local
tc
=
g
:
GetFirst
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
tc
then
local
tc
=
g
:
GetFirst
()
if
tc
:
IsAbleToHand
()
and
(
not
tc
:
IsAbleToGrave
()
or
Duel
.
SelectOption
(
tp
,
1190
,
aux
.
Stringid
(
m
,
1
))
==
0
)
then
if
tc
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
if
tc
:
IsAbleToHand
()
and
(
not
tc
:
IsAbleToGrave
()
or
Duel
.
SelectOption
(
tp
,
1190
,
aux
.
Stringid
(
m
,
1
))
==
0
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
else
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
else
end
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
end
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetTarget
(
cm
.
sslimit
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTarget
(
cm
.
sslimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
end
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
cm
.
sslimit
(
e
,
c
)
end
return
not
((
c
:
IsAttack
(
1550
)
and
c
:
IsDefense
(
1050
))
or
(
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsType
(
TYPE_PENDULUM
)))
function
cm
.
sslimit
(
e
,
c
)
return
not
((
c
:
IsAttack
(
1550
)
and
c
:
IsDefense
(
1050
))
or
(
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsType
(
TYPE_PENDULUM
)))
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