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
3712784a
Commit
3712784a
authored
Nov 27, 2020
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
ea01f5a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
19 deletions
+93
-19
expansions/script/c69696918.lua
expansions/script/c69696918.lua
+93
-19
No files found.
expansions/script/c69696918.lua
View file @
3712784a
...
...
@@ -2,18 +2,18 @@
local
m
=
69696918
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
aux
.
AddLinkProcedure
(
c
,
nil
,
2
,
99
,
cm
.
lcheck
)
c
:
EnableReviveLimit
()
--extra link
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e0
:
SetRange
(
LOCATION_EXTRA
)
e0
:
SetTarget
(
cm
.
mattg
)
e0
:
SetCode
(
EFFECT_EXTRA_LINK_MATERIAL
)
e0
:
SetTargetRange
(
LOCATION_EXTRA
,
0
)
e0
:
SetValue
(
cm
.
matval
)
c
:
RegisterEffect
(
e0
)
local
e01
=
Effect
.
CreateEffect
(
c
)
e01
:
SetDescription
(
1166
)
e01
:
SetType
(
EFFECT_TYPE_FIELD
)
e01
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e01
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e01
:
SetRange
(
LOCATION_EXTRA
)
e01
:
SetCondition
(
cm
.
LinkCondition
(
aux
.
TRUE
,
2
,
3
,
cm
.
gf
))
e01
:
SetTarget
(
cm
.
LinkTarget
(
aux
.
TRUE
,
2
,
3
,
cm
.
gf
))
e01
:
SetOperation
(
aux
.
LinkOperation
(
aux
.
TRUE
,
2
,
3
,
cm
.
gf
))
e01
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e01
)
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
...
...
@@ -38,15 +38,86 @@ function cm.initial_effect(c)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
mattg
(
e
,
c
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsFaceup
(
)
function
cm
.
gf
(
g
,
l
c
)
return
g
:
IsExists
(
Card
.
IsRace
,
1
,
nil
,
RACE_SPELLCASTER
)
end
function
cm
.
matval
(
e
,
c
,
mg
)
return
c
:
IsCode
(
69696918
)
function
cm
.
LConditionFilter
(
c
,
f
,
lc
)
if
c
:
IsLocation
(
LOCATION_EXTRA
)
then
return
c
:
IsCanBeLinkMaterial
(
lc
)
and
(
not
f
or
f
(
c
))
and
c
:
IsFaceup
()
end
return
c
:
IsCanBeLinkMaterial
(
lc
)
and
(
not
f
or
f
(
c
))
end
function
cm
.
lcheck
(
g
,
lc
)
return
g
:
IsExists
(
Card
.
IsRace
,
1
,
nil
,
RACE_SPELLCASTER
)
function
cm
.
GetLinkMaterials
(
tp
,
f
,
lc
)
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
LConditionFilter
,
tp
,
LOCATION_MZONE
+
LOCATION_EXTRA
,
0
,
nil
,
f
,
lc
)
local
mg2
=
Duel
.
GetMatchingGroup
(
aux
.
LExtraFilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
LOCATION_ONFIELD
,
nil
,
f
,
lc
)
if
mg2
:
GetCount
()
>
0
then
mg
:
Merge
(
mg2
)
end
return
mg
end
function
cm
.
LinkCondition
(
f
,
minc
,
maxc
,
gf
)
return
function
(
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
=
cm
.
GetLinkMaterials
(
tp
,
f
,
c
)
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)
if
sg
:
IsExists
(
aux
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
local
ct
=
sg
:
GetCount
()
if
ct
>
maxc
then
return
false
end
return
cm
.
LCheckGoal
(
tp
,
sg
,
c
,
minc
,
ct
,
gf
)
or
mg
:
IsExists
(
cm
.
LCheckRecursive
,
1
,
sg
,
tp
,
sg
,
mg
,
c
,
ct
,
minc
,
maxc
,
gf
)
end
end
--
function
cm
.
LCheckGoal
(
tp
,
sg
,
lc
,
minc
,
ct
,
gf
)
return
ct
>=
minc
and
sg
:
CheckWithSumEqual
(
aux
.
GetLinkCount
,
lc
:
GetLink
(),
ct
,
ct
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
lc
)
>
0
and
(
not
gf
or
gf
(
sg
))
end
function
cm
.
LCheckRecursive
(
c
,
tp
,
sg
,
mg
,
lc
,
ct
,
minc
,
maxc
,
gf
)
sg
:
AddCard
(
c
)
ct
=
ct
+
1
local
res
=
cm
.
LCheckGoal
(
tp
,
sg
,
lc
,
minc
,
ct
,
gf
)
or
(
ct
<
maxc
and
mg
:
IsExists
(
cm
.
LCheckRecursive
,
1
,
sg
,
tp
,
sg
,
mg
,
lc
,
ct
,
minc
,
maxc
,
gf
))
sg
:
RemoveCard
(
c
)
ct
=
ct
-
1
return
res
end
function
cm
.
LinkTarget
(
f
,
minc
,
maxc
,
gf
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
)
local
mg
=
cm
.
GetLinkMaterials
(
tp
,
f
,
c
)
local
bg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)
if
#
bg
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LMATERIAL
)
bg
:
Select
(
tp
,
#
bg
,
#
bg
,
nil
)
end
local
sg
=
Group
.
CreateGroup
()
sg
:
Merge
(
bg
)
local
finish
=
false
while
#
sg
<
maxc
do
finish
=
cm
.
LCheckGoal
(
tp
,
sg
,
c
,
minc
,
#
sg
,
gf
)
local
cg
=
mg
:
Filter
(
cm
.
LCheckRecursive
,
sg
,
tp
,
sg
,
mg
,
c
,
#
sg
,
minc
,
maxc
,
gf
)
if
#
cg
==
0
then
break
end
local
cancel
=
not
finish
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LMATERIAL
)
local
tc
=
cg
:
SelectUnselect
(
sg
,
tp
,
finish
,
cancel
,
minc
,
maxc
)
if
not
tc
then
break
end
if
not
bg
:
IsContains
(
tc
)
then
if
not
sg
:
IsContains
(
tc
)
then
sg
:
AddCard
(
tc
)
if
#
sg
==
maxc
then
finish
=
true
end
else
sg
:
RemoveCard
(
tc
)
end
elseif
#
bg
>
0
and
#
sg
<=#
bg
then
return
false
end
end
if
finish
then
sg
:
KeepAlive
()
e
:
SetLabelObject
(
sg
)
return
true
else
return
false
end
end
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
...
...
@@ -65,10 +136,13 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
end
end
function
cm
.
filter22
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
eg
:
Filter
(
Card
.
IsControler
,
e
:
GetHandler
(),
tp
)
local
sg
=
eg
:
Filter
(
cm
.
filter22
,
e
:
GetHandler
(),
tp
)
local
tc
=
sg
:
GetFirst
()
if
sg
:
GetCount
()
==
1
and
tc
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
tc
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
tc
:
GetControler
()
==
tp
then
if
sg
:
GetCount
()
==
1
then
e
:
SetLabel
(
tc
:
GetPreviousRaceOnField
())
return
true
else
return
false
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