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
e314060f
Commit
e314060f
authored
Oct 24, 2023
by
songtongtong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
e7bab01e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
205 additions
and
212 deletions
+205
-212
expansions/script/c33401683.lua
expansions/script/c33401683.lua
+63
-70
expansions/script/c47344577.lua
expansions/script/c47344577.lua
+64
-64
expansions/script/c47350512.lua
expansions/script/c47350512.lua
+73
-73
expansions/script/c50218570.lua
expansions/script/c50218570.lua
+5
-5
No files found.
expansions/script/c33401683.lua
View file @
e314060f
--无法追回的过往
--无法追回的过往
local
m
=
33401683
local
m
=
33401683
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
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_REMOVE
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_REMOVE
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
cm
.
con
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
refilter
(
c
)
function
cm
.
cfilter
(
c
)
return
((
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsDisabled
())
or
c
:
IsType
(
TYPE_NORMAL
)
or
c
:
IsType
(
TYPE_TOKEN
))
and
c
:
IsReleasable
()
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x9344
)
end
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x34f
,
2
,
REASON_COST
)
or
Duel
.
IsExistingMatchingCard
(
cm
.
refilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
local
b1
=
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x34f
,
2
,
REASON_COST
)
end
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
refilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
function
cm
.
refilter
(
c
)
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
)))
then
return
((
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsDisabled
())
or
c
:
IsType
(
TYPE_NORMAL
)
or
c
:
IsType
(
TYPE_TOKEN
))
and
c
:
IsReleasable
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
refilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
Duel
.
Release
(
g
,
REASON_COST
)
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
1
)
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x34f
,
2
,
REASON_COST
)
or
Duel
.
IsExistingMatchingCard
(
cm
.
refilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
else
local
b1
=
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x34f
,
2
,
REASON_COST
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
refilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x34f
,
2
,
REASON_COST
)
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
)))
then
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
refilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
Duel
.
Release
(
g
,
REASON_COST
)
function
cm
.
refilter2
(
c
)
e
:
SetLabel
(
1
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x9344
,
0x3341
)
and
c
:
IsAbleToRemove
()
else
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
function
cm
.
spfilter
(
c
,
e
,
tp
)
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x34f
,
2
,
REASON_COST
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x9344
,
0x3341
)
end
end
end
function
cm
.
thfilter
(
c
)
function
cm
.
refilter2
(
c
)
return
c
:
IsSetCard
(
0x3340
,
0x6340
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x9344
,
0x3341
)
and
c
:
IsAbleToRemove
()
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
spfilter
(
c
,
e
,
tp
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_GRAVE
and
chkc
:
IsAbleToRemove
()
end
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x9344
,
0x3341
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
refilter2
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
function
cm
.
thfilter
(
c
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
refilter2
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
return
c
:
IsSetCard
(
0x3340
,
0x6340
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
LOCATION_GRAVE
)
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_GRAVE
and
chkc
:
IsAbleToRemove
()
end
local
tc
=
Duel
.
GetFirstTarget
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
refilter2
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
end
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
3
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
refilter2
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
LOCATION_GRAVE
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
local
tc
=
Duel
.
GetFirstTarget
()
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
4
))
then
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
3
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
Duel
.
RegisterFlagEffect
(
tp
,
33400101
,
RESET_EVENT
+
RESET_PHASE
+
PHASE_END
,
0
,
0
)
if
e
:
GetLabel
()
==
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
4
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
Duel
.
RegisterFlagEffect
(
tp
,
33400101
,
RESET_EVENT
+
RESET_PHASE
+
PHASE_END
,
0
,
0
)
end
expansions/script/c47344577.lua
View file @
e314060f
--妖精骑士 巴格斯特
--妖精骑士 巴格斯特
local
s
,
id
=
GetID
()
local
s
,
id
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x43f
)
c
:
EnableCounterPermit
(
0x43f
)
c
:
SetCounterLimit
(
0x43f
,
5
)
c
:
SetCounterLimit
(
0x43f
,
5
)
-- on special summon
-- on special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
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
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--bdmg
--bdmg
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
:
SetCountLimit
(
1
,
id
-
1000
)
e3
:
SetCountLimit
(
1
,
id
-
1000
)
e3
:
SetCondition
(
s
.
atkcon
)
e3
:
SetCondition
(
s
.
atkcon
)
e3
:
SetOperation
(
s
.
atkop
)
e3
:
SetOperation
(
s
.
atkop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
s
.
spfilter
(
c
,
e
,
tp
)
function
s
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x43f
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x43f
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sptg
(
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
(
s
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
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
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spop
(
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
,
s
.
spfilter
,
tp
,
LOCATION_
HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
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
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
s
.
splimit
)
e1
:
SetTarget
(
s
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
s
.
splimit
(
e
,
c
)
function
s
.
splimit
(
e
,
c
)
return
not
(
c
:
IsType
(
TYPE_SYNCHRO
)
or
c
:
IsType
(
TYPE_XYZ
))
and
c
:
IsLocation
(
LOCATION_EXTRA
)
return
not
(
c
:
IsType
(
TYPE_SYNCHRO
)
or
c
:
IsType
(
TYPE_XYZ
))
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
end
function
s
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
==
REASON_SYNCHRO
return
r
==
REASON_SYNCHRO
end
end
function
s
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
atkop
(
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
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_INVOLVING_BATTLE_DAMAGE
)
e1
:
SetCode
(
EFFECT_CHANGE_INVOLVING_BATTLE_DAMAGE
)
e1
:
SetValue
(
aux
.
ChangeBattleDamage
(
1
,
DOUBLE_DAMAGE
))
e1
:
SetValue
(
aux
.
ChangeBattleDamage
(
1
,
DOUBLE_DAMAGE
))
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
rc
:
RegisterEffect
(
e1
,
true
)
rc
:
RegisterEffect
(
e1
,
true
)
end
end
\ No newline at end of file
expansions/script/c47350512.lua
View file @
e314060f
--迷镜魇低语
--迷镜魇低语
Duel
.
LoadScript
(
"c47350500.lua"
)
Duel
.
LoadScript
(
"c47350500.lua"
)
local
s
,
id
=
GetID
()
local
s
,
id
=
GetID
()
function
s
.
set
(
c
)
function
s
.
set
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_POSITION
)
e1
:
SetCategory
(
CATEGORY_POSITION
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetHintTiming
(
TIMING_BATTLE_PHASE
,
TIMINGS_CHECK_MONSTER
+
TIMING_BATTLE_PHASE
)
e1
:
SetHintTiming
(
TIMING_BATTLE_PHASE
,
TIMINGS_CHECK_MONSTER
+
TIMING_BATTLE_PHASE
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetOperation
(
s
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
chainlm
(
re
,
rp
,
tp
)
function
s
.
chainlm
(
re
,
rp
,
tp
)
return
tp
==
rp
or
not
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
return
tp
==
rp
or
not
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
end
function
s
.
filter
(
c
)
function
s
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanTurnSet
()
return
c
:
IsFaceup
()
and
c
:
IsCanTurnSet
()
end
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
0
)
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
Duel
.
SetChainLimit
(
s
.
chainlm
)
Duel
.
SetChainLimit
(
s
.
chainlm
)
end
end
end
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
and
tc
:
IsFaceup
()
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
and
tc
:
IsFaceup
()
then
Duel
.
ChangePosition
(
tc
,
POS_FACEDOWN_DEFENSE
)
Duel
.
ChangePosition
(
tc
,
POS_FACEDOWN_DEFENSE
)
end
end
end
end
function
s
.
tograve
(
c
)
function
s
.
tograve
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DECKDES
+
CATEGORY_TOGRAVE
)
e1
:
SetCategory
(
CATEGORY_DECKDES
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
id
-
1000
)
e1
:
SetCountLimit
(
1
,
id
-
1000
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
s
.
tgtg
)
e1
:
SetTarget
(
s
.
tgtg
)
e1
:
SetOperation
(
s
.
tgop
)
e1
:
SetOperation
(
s
.
tgop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
tgfilter
(
c
,
tp
)
function
s
.
tgfilter
(
c
,
tp
)
if
not
(
c
:
Is
Code
(
0x43c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
())
then
if
not
(
c
:
Is
SetCard
(
0x43c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
())
then
return
false
return
false
end
end
local
code
=
c
:
GetCode
()
local
code
=
c
:
GetCode
()
return
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
code
)
return
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
code
)
end
end
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
then
return
end
if
not
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
if
#
g
>
0
then
if
#
g
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
end
end
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
LIM
.
acinset
(
c
)
LIM
.
acinset
(
c
)
s
.
set
(
c
)
s
.
set
(
c
)
s
.
tograve
(
c
)
s
.
tograve
(
c
)
end
end
expansions/script/c50218570.lua
View file @
e314060f
...
@@ -41,8 +41,7 @@ function c50218570.lcheck(g)
...
@@ -41,8 +41,7 @@ function c50218570.lcheck(g)
return
g
:
GetClassCount
(
Card
.
GetLevel
)
==
1
return
g
:
GetClassCount
(
Card
.
GetLevel
)
==
1
end
end
function
c50218570
.
filter
(
c
,
e
,
tp
)
function
c50218570
.
filter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
return
c
:
IsFaceup
()
and
Duel
.
IsExistingMatchingCard
(
c50218570
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
c
)
and
Duel
.
IsExistingMatchingCard
(
c50218570
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
c
)
end
end
function
c50218570
.
spfilter
(
c
,
e
,
tp
,
tc
)
function
c50218570
.
spfilter
(
c
,
e
,
tp
,
tc
)
return
c
:
IsSetCard
(
0xcb5
)
and
c
:
IsLevel
(
tc
:
GetLevel
())
return
c
:
IsSetCard
(
0xcb5
)
and
c
:
IsLevel
(
tc
:
GetLevel
())
...
@@ -50,9 +49,10 @@ function c50218570.spfilter(c,e,tp,tc)
...
@@ -50,9 +49,10 @@ function c50218570.spfilter(c,e,tp,tc)
end
end
function
c50218570
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c50218570
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c50218570
.
filter
(
chkc
,
e
,
tp
)
and
chkc
~=
c
end
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c50218570
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c50218570
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
and
Duel
.
IsExistingTarget
(
c50218570
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c50218570
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
c
,
e
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c50218570
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
c
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
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