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
REIKAI
ygopro-222DIY-cards
Commits
3018308e
Commit
3018308e
authored
Feb 07, 2025
by
花桃白音
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #116,132,172,187s,211,473,819
parent
6e256e33
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
144 additions
and
122 deletions
+144
-122
expansions/FiNALE.cdb
expansions/FiNALE.cdb
+0
-0
expansions/script/c11600415.lua
expansions/script/c11600415.lua
+1
-1
expansions/script/c13254072.lua
expansions/script/c13254072.lua
+1
-1
expansions/script/c17243046.lua
expansions/script/c17243046.lua
+1
-1
expansions/script/c18700165.lua
expansions/script/c18700165.lua
+19
-15
expansions/script/c18700290.lua
expansions/script/c18700290.lua
+45
-30
expansions/script/c18700376.lua
expansions/script/c18700376.lua
+64
-61
expansions/script/c18700548.lua
expansions/script/c18700548.lua
+8
-7
expansions/script/c21185825.lua
expansions/script/c21185825.lua
+2
-1
expansions/script/c47340501.lua
expansions/script/c47340501.lua
+2
-3
expansions/script/c81902600.lua
expansions/script/c81902600.lua
+1
-2
No files found.
expansions/FiNALE.cdb
View file @
3018308e
No preview for this file type
expansions/script/c11600415.lua
View file @
3018308e
...
...
@@ -29,7 +29,7 @@ function c11600415.initial_effect(c)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
11600415
,
3
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOHAND
+
CATEGORY_
SEARCH
+
CATEGORY_
REMOVE
+
CATEGORY_COUNTER
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOHAND
+
CATEGORY_REMOVE
+
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
...
...
expansions/script/c13254072.lua
View file @
3018308e
...
...
@@ -20,7 +20,7 @@ function cm.initial_effect(c)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_
FIELD
+
EFFECT_TYPE_
TRIGGER_O
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
...
...
expansions/script/c17243046.lua
View file @
3018308e
...
...
@@ -44,7 +44,7 @@ function s.initial_effect(c)
e5
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetRange
(
0xff
)
e5
:
SetCondition
(
s
.
con
)
e5
:
SetTarget
(
aux
.
TargetBoolFunction
(
aux
.
IsCodeListed
,
17243025
))
e5
:
SetTargetRange
(
LOCATION_HAND
,
0
)
...
...
expansions/script/c18700165.lua
View file @
3018308e
...
...
@@ -94,7 +94,7 @@ function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel
.
Release
(
g
,
REASON_SPSUMMON
)
end
function
cm
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
return
c
:
IsType
(
TYPE_SPELL
)
end
function
cm
.
sccon1
(
e
)
return
e
:
GetHandler
()
==
Duel
.
GetFieldCard
(
e
:
GetHandlerPlayer
(),
LOCATION_PZONE
,
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
3
,
nil
)
...
...
@@ -106,20 +106,22 @@ function cm.thfilter(c)
return
c
:
IsSetCard
(
0x824
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
local
g1
=
Duel
.
GetMatchingGroup
(
cm
.
cfilter1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
c
,
tp
,
Card
.
IsReleasable
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetMatchingGroup
(
cm
.
cfilter1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
c
,
tp
,
Card
.
IsReleasable
)
local
tc2
=
g1
:
SelectUnselect
(
nil
,
tp
,
false
,
true
,
1
,
1
)
Duel
.
Release
(
tc2
,
REASON_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
tc
and
tc
:
IsAbleToHand
()
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
if
tc2
then
Duel
.
Release
(
tc2
,
REASON_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
tc
and
tc
:
IsAbleToHand
()
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
end
...
...
@@ -167,14 +169,16 @@ function cm.pencon2(e,tp,eg,ep,ev,re,r,rp)
return
e
:
GetHandler
():
IsFaceup
()
end
function
cm
.
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
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
)
end
end
function
cm
.
penop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetMatchingGroup
(
cm
.
cfilter1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
c
,
tp
,
Card
.
IsReleasable
)
local
tc2
=
g1
:
SelectUnselect
(
nil
,
tp
,
false
,
true
,
1
,
1
)
Duel
.
Release
(
tc2
,
REASON_RELEASE
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
if
tc2
then
Duel
.
Release
(
tc2
,
REASON_RELEASE
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
end
end
end
expansions/script/c18700290.lua
View file @
3018308e
...
...
@@ -26,48 +26,56 @@ function cm.initial_effect(c)
e3
:
SetCategory
(
CATEGORY_POSITION
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetProperty
(
EFFECT_FLAG_
DAMAGE_STEP
+
EFFECT_FLAG_
CARD_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
m
+
1
)
e3
:
SetHintTiming
(
TIMING_DAMAGE_STEP
+
TIMING_END_PHASE
)
e3
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e3
:
SetTarget
(
cm
.
eqtg2
)
e3
:
SetOperation
(
cm
.
eqop2
)
c
:
RegisterEffect
(
e3
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_
INDESTRUCTABLE_BATTL
E
)
e4
:
SetCode
(
EFFECT_
UPDATE_DEFENS
E
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e4
:
SetTarget
(
cm
.
indtg
)
e4
:
SetValue
(
1
)
e4
:
SetCondition
(
cm
.
con
)
e4
:
SetTarget
(
cm
.
deftg
)
e4
:
SetValue
(
cm
.
defval
)
c
:
RegisterEffect
(
e4
)
--
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e5
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e5
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e5
:
SetTarget
(
cm
.
attg
)
e5
:
SetCondition
(
cm
.
con
)
e5
:
SetTarget
(
cm
.
bttg
)
e5
:
SetValue
(
1
)
c
:
RegisterEffect
(
e5
)
--
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
)
e6
:
SetCode
(
EFFECT_
IMMUNE_EFFEC
T
)
e6
:
SetCode
(
EFFECT_
CANNOT_BE_EFFECT_TARGE
T
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e6
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e6
:
SetTarget
(
cm
.
attg
)
e6
:
SetValue
(
cm
.
efilter
)
e6
:
SetCondition
(
cm
.
con
)
e6
:
SetTarget
(
cm
.
ettg
)
e6
:
SetValue
(
1
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_FIELD
)
e7
:
SetRange
(
LOCATION_SZONE
)
e7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e7
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e7
:
SetCo
de
(
EFFECT_UPDATE_ATTACK
)
e7
:
SetTarget
(
cm
.
indtg
)
e7
:
SetValue
(
cm
.
val
)
e7
:
SetCo
ndition
(
cm
.
con
)
e7
:
SetTarget
(
cm
.
etfilter
)
e7
:
SetValue
(
cm
.
efilter
)
c
:
RegisterEffect
(
e7
)
end
function
cm
.
filter6
(
c
)
return
c
:
IsFacedown
()
end
...
...
@@ -82,23 +90,22 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
0
)
end
function
cm
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
b1
=
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
0
,
LOCATION_HAND
,
1
,
nil
)
local
zt
=
tc
:
GetControler
()
if
not
tc
or
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
local
op
=
aux
.
SelectFromOptions
(
zt
,
{
true
,
aux
.
Stringid
(
m
,
2
)},
{
b1
,
aux
.
Stringid
(
m
,
3
)})
if
op
==
1
then
local
zt
=
tc
:
GetControler
()
if
Duel
.
MoveToField
(
tc
,
zt
,
zt
,
LOCATION_SZONE
,
POS_FACEDOWN
,
true
)
then
if
Duel
.
IsPlayerCanSSet
(
tc
)
and
Duel
.
GetLocationCount
(
zt
,
LOCATION_SZONE
)
>
0
and
Duel
.
MoveToField
(
tc
,
tp
,
zt
,
LOCATION_SZONE
,
POS_FACEDOWN
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -114,6 +121,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetOperation
(
cm
.
operation2
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
Duel
.
RaiseEvent
(
tc
,
EVENT_SSET
,
e
,
REASON_EFFECT
,
tp
,
tp
,
0
)
else
Duel
.
SendtoDeck
(
tc
,
nil
,
nil
,
REASON_EFFECT
)
end
...
...
@@ -204,28 +212,35 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetValue
(
1
)
e
3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e
1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
tc
:
RegisterEffect
(
e2
)
Duel
.
BreakEffect
()
c
:
CancelToGrave
()
Duel
.
Sendto
Hand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
Sendto
Deck
(
c
,
nil
,
nil
,
REASON_EFFECT
)
end
end
function
cm
.
indtg
(
e
,
c
)
function
cm
.
con
(
e
)
return
e
:
GetHandler
():
IsFaceup
()
end
function
cm
.
bttg
(
e
,
c
)
return
c
:
IsFaceup
()
end
function
cm
.
attg
(
e
,
c
)
return
c
:
IsFacedown
()
function
cm
.
deftg
(
e
,
c
)
return
c
:
IsFaceup
()
end
function
cm
.
defval
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
Card
.
IsFacedown
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
nil
)
*
100
end
function
cm
.
e
filter
(
e
,
re
)
return
not
re
:
GetOwner
():
IsAttribute
(
ATTRIBUTE_WATER
)
function
cm
.
e
ttg
(
e
,
c
)
return
c
:
IsFacedown
()
end
function
cm
.
filter2
(
c
)
return
c
:
IsFace
up
()
and
c
:
IsRace
(
RACE_WARRIOR
+
RACE_SPELLCASTER
)
function
cm
.
etfilter
(
e
,
c
)
return
c
:
IsFace
down
()
end
function
cm
.
val
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
cm
.
filter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
*
100
function
cm
.
efilter
(
e
,
te
)
return
te
:
GetHandler
():
GetAttribute
()
~=
ATTRIBUTE_WATER
end
\ No newline at end of file
expansions/script/c18700376.lua
View file @
3018308e
...
...
@@ -41,19 +41,79 @@ function cm.initial_effect(c)
e3
:
SetOperation
(
cm
.
repop
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
c
:
GetMaterial
()
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
and
g
:
IsExists
(
Card
.
IsLinkSetCard
,
2
,
nil
,
0x822
)
end
function
cm
.
filter3
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
filter3
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
cm
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
filter3
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sc
=
mg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
cm
.
filter4
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanSummon
(
tp
)
and
Duel
.
IsPlayerCanAdditionalSummon
(
tp
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter4
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
end
function
cm
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
filter4
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
)
local
sc
=
mg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
ConfirmCards
(
1
-
tp
,
sc
)
local
ra
=
sc
:
GetRace
()
local
e0
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e0
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e0
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e0
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
ra
))
e0
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e0
,
tp
)
end
function
cm
.
repfilter
(
c
,
tp
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
end
function
cm
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsReleasable
()
and
not
c
:
IsStatus
(
STATUS_DESTROY_CONFIRMED
)
and
eg
:
IsExists
(
cm
.
repfilter
,
1
,
nil
,
tp
)
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
function
cm
.
repval
(
e
,
c
)
return
cm
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
cm
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLP
(
tp
)
>=
Duel
.
GetLP
(
1
-
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
3
))
then
Duel
.
SetLP
(
tp
,
math.ceil
(
Duel
.
GetLP
(
tp
)
/
2
))
else
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Release
(
tc
,
REASON_EFFECT
)
end
end
function
cm
.
matfilter
(
c
)
return
(
c
:
IsType
(
TYPE_
MONSTER
)
and
c
:
IsType
(
TYPE_EFFECT
))
or
(
c
:
IsSetCard
(
0x822
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
)
))
return
(
c
:
IsType
(
TYPE_
EFFECT
)
and
c
:
IsLocation
(
LOCATION_MZONE
))
or
(
c
:
IsSetCard
(
0x822
)
and
c
:
IsLocation
(
LOCATION_SZONE
))
end
function
cm
.
lcheck
(
g
,
lc
)
return
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_SZONE
)
<=
1
end
function
cm
.
LConditionFilter
(
c
,
f
,
lc
)
return
(
c
:
IsFaceup
()
or
not
c
:
IsLocation
(
LOCATION_MZONE
))
and
(
c
:
IsCanBeLinkMaterial
(
lc
)
or
c
:
IsSetCard
(
0x822
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
)
and
(
not
f
or
f
(
c
))
return
(
c
:
IsFaceup
()
or
not
c
:
IsLocation
(
LOCATION_MZONE
))
and
(
c
:
IsCanBeLinkMaterial
(
lc
)
or
c
:
IsSetCard
(
0x822
))
and
(
not
f
or
f
(
c
))
end
function
cm
.
LExtraFilter
(
c
,
f
,
lc
,
tp
)
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
not
c
:
IsFaceup
()
then
return
false
end
return
c
:
IsHasEffect
(
EFFECT_EXTRA_LINK_MATERIAL
,
tp
)
and
(
c
:
IsCanBeLinkMaterial
(
lc
)
or
c
:
IsSetCard
(
0x822
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
)
and
(
not
f
or
f
(
c
))
return
c
:
IsHasEffect
(
EFFECT_EXTRA_LINK_MATERIAL
,
tp
)
and
(
c
:
IsCanBeLinkMaterial
(
lc
)
or
c
:
IsSetCard
(
0x822
))
and
(
not
f
or
f
(
c
))
end
function
cm
.
GetLinkCount
(
c
)
if
c
:
IsType
(
TYPE_LINK
)
and
c
:
GetLink
()
>
1
then
...
...
@@ -62,7 +122,7 @@ function cm.GetLinkCount(c)
end
function
cm
.
GetLinkMaterials
(
tp
,
f
,
lc
)
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
LConditionFilter
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
,
f
,
lc
)
local
mg2
=
Duel
.
GetMatchingGroup
(
cm
.
LExtraFilter
,
tp
,
LOCATION_
HAND
+
LOCATION_SZONE
,
LOCATION_ONFIELD
,
nil
,
f
,
lc
,
tp
)
local
mg2
=
Duel
.
GetMatchingGroup
(
cm
.
LExtraFilter
,
tp
,
LOCATION_
SZONE
,
0
,
nil
,
f
,
lc
,
tp
)
if
mg2
:
GetCount
()
>
0
then
mg
:
Merge
(
mg2
)
end
return
mg
end
...
...
@@ -165,61 +225,4 @@ function cm.LinkOperation(f,minc,maxc,gf)
Duel
.
SendtoGrave
(
g
,
REASON_MATERIAL
+
REASON_LINK
)
g
:
DeleteGroup
()
end
end
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
c
:
GetMaterial
()
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
and
g
:
IsExists
(
Card
.
IsLinkSetCard
,
2
,
nil
,
0x822
)
end
function
cm
.
filter3
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
filter3
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
cm
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
filter3
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sc
=
mg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
cm
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanSummon
(
tp
)
and
Duel
.
IsPlayerCanAdditionalSummon
(
tp
)
end
end
function
cm
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
nil
)
local
sc
=
mg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
ConfirmCards
(
1
-
tp
,
sc
)
local
ra
=
sc
:
GetRace
()
local
e0
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e0
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e0
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e0
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
ra
))
e0
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e0
,
tp
)
end
function
cm
.
repfilter
(
c
,
tp
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
end
function
cm
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsReleasable
()
and
not
c
:
IsStatus
(
STATUS_DESTROY_CONFIRMED
)
and
eg
:
IsExists
(
cm
.
repfilter
,
1
,
nil
,
tp
)
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
function
cm
.
repval
(
e
,
c
)
return
cm
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
cm
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLP
(
tp
)
>=
Duel
.
GetLP
(
1
-
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
3
))
then
Duel
.
SetLP
(
tp
,
math.ceil
(
Duel
.
GetLP
(
tp
)
/
2
))
else
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Release
(
tc
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c18700548.lua
View file @
3018308e
...
...
@@ -17,10 +17,9 @@ function cm.initial_effect(c)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
TIMING_
DAMAGE_STEP
+
TIMING_
END_PHASE
)
e2
:
SetHintTiming
(
TIMING_END_PHASE
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetCondition
(
cm
.
spcon
)
e2
:
SetTarget
(
cm
.
target2
)
...
...
@@ -30,7 +29,7 @@ function cm.initial_effect(c)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetCategory
(
EFFECT_CHANGE_RACE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
m
+
2
)
...
...
@@ -59,20 +58,21 @@ function cm.initial_effect(c)
e6
:
SetTarget
(
cm
.
hsptg
)
e6
:
SetOperation
(
cm
.
hspop
)
c
:
RegisterEffect
(
e6
)
end
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
return
not
e
:
GetHandler
():
IsLocation
(
LOCATION_EXTRA
)
or
aux
.
fuslimit
(
e
,
se
,
sp
,
st
)
end
function
cm
.
hspfilter
(
c
,
tp
,
sc
)
function
cm
.
hspfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x820
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsControler
(
tp
)
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
IsExistingMatchingCard
(
cm
.
hspfilter
,
tp
,
LOCATION_REMOVED
,
0
,
2
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
hspfilter
,
tp
,
LOCATION_REMOVED
,
0
,
2
,
nil
,
tp
)
end
function
cm
.
hsptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
hspfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
hspfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
g
:
CancelableSelect
(
tp
,
2
,
2
,
nil
)
if
sg
then
...
...
@@ -136,7 +136,7 @@ function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_
HAND
+
LOCATION_MZON
E
+
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_
ONFIELD
+
LOCATION_GRAV
E
+
LOCATION_REMOVED
)
end
function
cm
.
activate2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
...
...
@@ -188,6 +188,7 @@ function cm.filter4(c)
end
function
cm
.
sptg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter4
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
1
,
nil
)
end
local
rc
=
re
:
GetHandler
()
end
function
cm
.
spop3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c21185825.lua
View file @
3018308e
...
...
@@ -234,13 +234,14 @@ function c21185825.op4(e,tp,eg,ep,ev,re,r,rp)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetTargetRange
(
12
,
0
)
e1
:
SetLabel
(
tp
)
e1
:
SetCondition
(
c21185825
.
con4_1
)
e1
:
SetValue
(
c21185825
.
val4_1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterFlagEffect
(
tp
,
21185825
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_END
)
...
...
expansions/script/c47340501.lua
View file @
3018308e
...
...
@@ -13,15 +13,14 @@ function s.spfilter(c,e,tp)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToGrave
()
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
c
:
IsAbleToGrave
()
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
-
1
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
...
...
expansions/script/c81902600.lua
View file @
3018308e
...
...
@@ -43,7 +43,7 @@ function cm.filter1(c,e,tp)
and
aux
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
end
function
cm
.
filter2
(
c
,
e
,
tp
,
mc
,
rk
,
rac
)
return
c
:
IsRank
(
rk
+
1
,
rk
-
1
)
and
c
:
IsRace
(
rac
)
and
mc
:
IsCanBeXyzMaterial
(
c
)
and
c
:
IsType
(
TYPE_XYZ
)
return
c
:
IsRank
(
rk
+
1
,
rk
-
1
)
and
c
:
IsRace
(
rac
)
and
mc
:
IsCanBeXyzMaterial
(
c
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -90,7 +90,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Overlay
(
sc
,
mg
)
end
sc
:
SetMaterial
(
Group
.
FromCards
(
tc
))
sc
:
SetMaterial
(
Group
.
FromCards
(
tc
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
tc
))
Duel
.
SpecialSummon
(
sc
,
SUMMON_TYPE_XYZ
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
sc
:
CompleteProcedure
()
...
...
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