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
28d665d8
Commit
28d665d8
authored
Apr 01, 2020
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
bb269da3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
25 deletions
+83
-25
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c33700785.lua
expansions/script/c33700785.lua
+83
-25
No files found.
expansions/222DIY.cdb
View file @
28d665d8
No preview for this file type
expansions/script/c33700785.lua
View file @
28d665d8
...
@@ -4,17 +4,18 @@ local m=33700785
...
@@ -4,17 +4,18 @@ local m=33700785
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--link summon
--link summon
aux
.
AddLinkProcedure
(
c
,
cm
.
lfilter
(
c
:
GetControler
()
),
2
,
2
)
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkRace
,
RACE_CYBERSE
+
RACE_MACHINE
),
2
,
2
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--extra link
--extra link
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
12035010
,
0
))
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e0
:
SetRange
(
LOCATION_EXTRA
)
e0
:
SetRange
(
LOCATION_EXTRA
)
e0
:
SetTarget
(
cm
.
mattg
)
e0
:
SetCondition
(
cm
.
lkcon
)
e0
:
SetCode
(
EFFECT_EXTRA_LINK_MATERIAL
)
e0
:
SetOperation
(
cm
.
lkop
)
e0
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e0
:
SetValue
(
SUMMON_TYPE_LINK
)
e0
:
SetValue
(
cm
.
matval
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
--
--
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -28,6 +29,80 @@ function cm.initial_effect(c)
...
@@ -28,6 +29,80 @@ function cm.initial_effect(c)
e1
:
SetOperation
(
cm
.
thop
)
e1
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
cknfilter
(
c
)
return
c
:
GetOriginalCode
()
==
77765004
and
not
c
:
IsDisabled
()
end
function
cm
.
lkfilter
(
c
,
lc
,
tp
)
local
flag
=
c
:
IsFaceup
()
and
c
:
IsCanBeLinkMaterial
(
lc
)
if
c
:
IsType
(
TYPE_MONSTER
)
then
return
flag
and
c
:
IsLinkRace
(
RACE_CYBERSE
+
RACE_MACHINE
)
else
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SPELL
)
and
not
Duel
.
IsExistingMatchingCard
(
cm
.
cknfilter
,
tp
,
0
,
LOCATION_SZONE
,
1
,
nil
)
end
end
function
cm
.
lvfilter
(
c
)
if
c
:
IsType
(
TYPE_LINK
)
and
c
:
GetLink
()
>
1
then
return
1
+
0x10000
*
c
:
GetLink
()
else
return
1
end
end
--
function
cm
.
lcheck
(
tp
,
sg
,
lc
,
minc
,
ct
)
return
ct
>=
minc
and
sg
:
CheckWithSumEqual
(
cm
.
lvfilter
,
lc
:
GetLink
(),
ct
,
ct
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
lc
)
>
0
end
function
cm
.
lkchenk
(
c
,
tp
,
sg
,
mg
,
lc
,
ct
,
minc
,
maxc
)
sg
:
AddCard
(
c
)
ct
=
ct
+
1
local
res
=
cm
.
lcheck
(
tp
,
sg
,
lc
,
minc
,
ct
)
or
(
ct
<
maxc
and
mg
:
IsExists
(
cm
.
lkchenk
,
1
,
sg
,
tp
,
sg
,
mg
,
lc
,
ct
,
minc
,
maxc
))
sg
:
RemoveCard
(
c
)
ct
=
ct
-
1
return
res
end
function
cm
.
lkcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
lkfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
,
c
,
tp
)
local
sg
=
Group
.
CreateGroup
()
for
i
,
pe
in
ipairs
({
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)})
do
local
pc
=
pe
:
GetHandler
()
if
not
mg
:
IsContains
(
pc
)
then
return
false
end
sg
:
AddCard
(
pc
)
end
local
ct
=
sg
:
GetCount
()
local
minc
=
2
local
maxc
=
2
if
ct
>
maxc
then
return
false
end
return
cm
.
lcheck
(
tp
,
sg
,
c
,
minc
,
ct
)
or
mg
:
IsExists
(
cm
.
lkchenk
,
1
,
nil
,
tp
,
sg
,
mg
,
c
,
ct
,
minc
,
maxc
)
end
function
cm
.
lkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
lkfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
,
c
,
tp
)
local
sg
=
Group
.
CreateGroup
()
for
i
,
pe
in
ipairs
({
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)})
do
sg
:
AddCard
(
pe
:
GetHandler
())
end
local
ct
=
sg
:
GetCount
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LMATERIAL
)
sg
:
Select
(
tp
,
ct
,
ct
,
nil
)
local
minc
=
2
local
maxc
=
2
for
i
=
ct
,
maxc
-
1
do
local
cg
=
mg
:
Filter
(
cm
.
lkchenk
,
sg
,
tp
,
sg
,
mg
,
c
,
i
,
minc
,
maxc
)
if
cg
:
GetCount
()
==
0
then
break
end
local
minct
=
1
if
cm
.
lcheck
(
tp
,
sg
,
c
,
minc
,
i
)
then
if
not
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12035010
,
0
))
then
break
end
minct
=
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LMATERIAL
)
local
g
=
cg
:
Select
(
tp
,
minct
,
1
,
nil
)
if
g
:
GetCount
()
==
0
then
break
end
sg
:
Merge
(
g
)
end
c
:
SetMaterial
(
sg
)
Duel
.
SendtoGrave
(
sg
,
REASON_MATERIAL
+
REASON_LINK
)
end
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
c
:
IsSummonType
(
SUMMON_TYPE_LINK
)
return
c
:
IsSummonType
(
SUMMON_TYPE_LINK
)
...
@@ -58,20 +133,3 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -58,20 +133,3 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SSet
(
tp
,
tc
)
Duel
.
SSet
(
tp
,
tc
)
end
end
end
end
\ No newline at end of file
function
cm
.
lfilter
(
tp
)
return
function
(
c
)
return
c
:
IsLinkRace
(
RACE_CYBERSE
+
RACE_MACHINE
)
or
(
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsControler
(
tp
))
end
end
function
cm
.
matval
(
e
,
c
,
mg
,
mc
)
if
c
~=
e
:
GetHandler
()
then
return
false
end
local
counter_effects
=
{
mc
:
IsHasEffect
(
77765004
)}
for
_
,
te
in
pairs
(
counter_effects
)
do
local
vf
=
te
:
GetValue
()
if
not
vf
or
vf
(
te
,
c
)
then
return
false
end
end
return
true
end
function
cm
.
mattg
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SPELL
)
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