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
acb1c040
Commit
acb1c040
authored
Nov 26, 2019
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua fix
parent
c669afb2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
98 deletions
+98
-98
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c33700424.lua
expansions/script/c33700424.lua
+98
-98
No files found.
expansions/222DIY.cdb
View file @
acb1c040
No preview for this file type
expansions/script/c33700424.lua
View file @
acb1c040
...
@@ -4,127 +4,127 @@
...
@@ -4,127 +4,127 @@
local
s
=
c33700424
local
s
=
c33700424
local
id
=
33700424
local
id
=
33700424
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--Activate
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
--Draw in hand
--Draw in hand
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_DRAW
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
drcon
)
e1
:
SetCondition
(
s
.
drcon
)
e1
:
SetCost
(
s
.
drcost
)
e1
:
SetCost
(
s
.
drcost
)
e1
:
SetTarget
(
s
.
drtg
)
e1
:
SetTarget
(
s
.
drtg
)
e1
:
SetOperation
(
s
.
drop
)
e1
:
SetOperation
(
s
.
drop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Count activations/summons while face-up
--Count activations/summons while face-up
local
ea
=
Effect
.
CreateEffect
(
c
)
local
ea
=
Effect
.
CreateEffect
(
c
)
ea
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ea
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ea
:
SetRange
(
LOCATION_SZONE
)
ea
:
SetRange
(
LOCATION_SZONE
)
ea
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
ea
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
ea
:
SetOperation
(
s
.
countop
)
ea
:
SetOperation
(
s
.
countop
)
c
:
RegisterEffect
(
ea
)
c
:
RegisterEffect
(
ea
)
local
eb
=
ea
:
Clone
()
local
eb
=
ea
:
Clone
()
eb
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
eb
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
eb
)
c
:
RegisterEffect
(
eb
)
local
ec
=
ea
:
Clone
()
local
ec
=
ea
:
Clone
()
ec
:
SetCode
(
EVENT_CHAINING
)
ec
:
SetCode
(
EVENT_CHAINING
)
c
:
RegisterEffect
(
ec
)
c
:
RegisterEffect
(
ec
)
--Draw on field
--Draw on field
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_TRIGGER_F
+
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_TRIGGER_F
+
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetLabelObject
(
ea
)
e2
:
SetLabelObject
(
ea
)
e2
:
SetCondition
(
s
.
drcon2
)
e2
:
SetCondition
(
s
.
drcon2
)
e2
:
SetTarget
(
s
.
drtg2
)
e2
:
SetTarget
(
s
.
drtg2
)
e2
:
SetOperation
(
s
.
drop2
)
e2
:
SetOperation
(
s
.
drop2
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
s
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
eff
,
ns
,
ss
=
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_CHAIN
,
ACTIVITY_SUMMON
,
ACTIVITY_SPECIALSUMMON
)
local
eff
,
ns
,
ss
=
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_CHAIN
,
ACTIVITY_SUMMON
,
ACTIVITY_SPECIALSUMMON
)
return
(
eff
+
ns
+
ss
==
0
)
and
(
tp
==
Duel
.
GetTurnPlayer
())
return
(
eff
+
ns
+
ss
==
0
)
and
(
tp
==
Duel
.
GetTurnPlayer
())
end
end
function
s
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
if
chk
==
0
then
return
not
c
:
IsPublic
()
return
not
c
:
IsPublic
()
end
end
--reveals as part of activation innately
--reveals as part of activation innately
end
end
function
s
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
s
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
drop
(
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
.
Draw
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
end
function
s
.
countop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
countop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
rp
==
tp
and
(
not
re
or
re
:
GetHandler
()
~=
c
)
then
if
rp
==
tp
and
(
not
re
or
re
:
GetHandler
()
~=
c
)
then
c
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
0
)
c
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
0
)
end
end
end
end
function
s
.
drcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
drcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
id
)
==
0
return
e
:
GetHandler
():
GetFlagEffect
(
id
)
==
0
and
(
tp
==
Duel
.
GetTurnPlayer
())
end
end
function
s
.
drtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
drtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
3
)
return
Duel
.
IsPlayerCanDraw
(
tp
,
3
)
end
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
3
)
Duel
.
SetTargetParam
(
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
3
)
end
end
function
s
.
setfilter
(
c
,
tp
)
function
s
.
setfilter
(
c
,
e
,
tp
)
if
c
:
IsType
(
TYPE_MONSTER
)
then
if
c
:
IsType
(
TYPE_MONSTER
)
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
else
else
return
(
c
:
IsType
(
TYPE_FIELD
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
)
and
c
:
IsSSetable
()
return
(
c
:
IsType
(
TYPE_FIELD
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
)
and
c
:
IsSSetable
()
end
end
end
end
function
s
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
drop2
(
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
.
Draw
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
local
og
=
Duel
.
GetOperatedGroup
():
Filter
(
s
.
setfilter
,
nil
,
tp
)
local
og
=
Duel
.
GetOperatedGroup
():
Filter
(
s
.
setfilter
,
nil
,
e
,
tp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
c
)
and
og
then
if
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
c
)
and
og
then
local
cg
=
Group
.
CreateGroup
()
local
cg
=
Group
.
CreateGroup
()
while
#
og
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
do
while
#
og
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
tc
=
og
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
tc
=
og
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
if
tc
:
IsType
(
TYPE_MONSTER
)
then
if
tc
:
IsType
(
TYPE_MONSTER
)
then
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
else
else
Duel
.
SSet
(
tp
,
tc
)
Duel
.
SSet
(
tp
,
tc
)
end
end
cg
:
AddCard
(
tc
)
cg
:
AddCard
(
tc
)
og
:
RemoveCard
(
tc
)
og
:
RemoveCard
(
tc
)
og
=
og
:
Filter
(
s
.
setfilter
,
nil
,
tp
)
og
=
og
:
Filter
(
s
.
setfilter
,
nil
,
e
,
tp
)
end
end
Duel
.
SpecialSummonComplete
()
Duel
.
SpecialSummonComplete
()
Duel
.
ConfirmCards
(
1
-
tp
,
cg
)
Duel
.
ConfirmCards
(
1
-
tp
,
cg
)
end
end
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