Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
01097f83
Commit
01097f83
authored
Nov 01, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prescripts
parent
ff419325
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
296 additions
and
19 deletions
+296
-19
expansions/script/c100223001.lua
expansions/script/c100223001.lua
+103
-0
expansions/script/c100223076.lua
expansions/script/c100223076.lua
+7
-8
expansions/script/c100223086.lua
expansions/script/c100223086.lua
+99
-0
expansions/script/c100407008.lua
expansions/script/c100407008.lua
+2
-2
expansions/script/c100407010.lua
expansions/script/c100407010.lua
+34
-9
expansions/script/c100407039.lua
expansions/script/c100407039.lua
+50
-0
expansions/script/c100407040.lua
expansions/script/c100407040.lua
+1
-0
No files found.
expansions/script/c100223001.lua
0 → 100644
View file @
01097f83
--パーペチュアルキングデーモン
--Perpetual King Archfiend
--Script by nekrozar
function
c100223001
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_FIEND
),
2
,
2
)
--maintain
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c100223001
.
mtcon
)
e1
:
SetOperation
(
c100223001
.
mtop
)
c
:
RegisterEffect
(
e1
)
--tograve
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100223001
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_PAY_LPCOST
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c100223001
.
tgcon
)
e2
:
SetCost
(
c100223001
.
cost
)
e2
:
SetTarget
(
c100223001
.
tgtg
)
e2
:
SetOperation
(
c100223001
.
tgop
)
c
:
RegisterEffect
(
e2
)
--dice
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
100223001
,
1
))
e3
:
SetCategory
(
CATEGORY_DICE
+
CATEGORY_TOHAND
+
CATEGORY_TODECK
+
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c100223001
.
cost
)
e3
:
SetTarget
(
c100223001
.
dctg
)
e3
:
SetOperation
(
c100223001
.
dcop
)
c
:
RegisterEffect
(
e3
)
end
function
c100223001
.
mtcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c100223001
.
mtop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
CheckLPCost
(
tp
,
500
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
100223001
,
2
))
then
Duel
.
PayLPCost
(
tp
,
500
)
else
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_COST
)
end
end
function
c100223001
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
==
tp
end
function
c100223001
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
GetFlagEffect
(
100223001
)
==
0
end
c
:
RegisterFlagEffect
(
100223001
,
RESET_CHAIN
,
0
,
1
)
end
function
c100223001
.
tgfilter
(
c
,
val
)
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
GetAttack
()
==
val
or
c
:
GetDefense
()
==
val
)
and
c
:
IsAbleToGrave
()
end
function
c100223001
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c100223001
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
ev
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c100223001
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100223001
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
ev
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
c100223001
.
cfilter
(
c
,
e
,
tp
)
return
bit
.
band
(
c
:
GetPreviousRaceOnField
(),
RACE_FIEND
)
~=
0
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsControler
(
tp
)
and
(
c
:
IsAbleToHand
()
or
c
:
IsAbleToDeck
()
or
(
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)))
end
function
c100223001
.
dctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
eg
:
IsExists
(
c100223001
.
cfilter
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
tp
,
1
)
end
function
c100223001
.
dcop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
d
=
Duel
.
TossDice
(
tp
,
1
)
local
g
=
eg
:
Filter
(
aux
.
NecroValleyFilter
(
c100223001
.
cfilter
),
nil
,
e
,
tp
)
if
g
:
GetCount
()
==
0
then
return
end
local
tc
=
nil
if
g
:
GetCount
()
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
else
tc
=
g
:
GetFirst
()
end
if
d
==
1
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
elseif
d
==
6
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
end
expansions/script/c100223076.lua
View file @
01097f83
...
...
@@ -2,6 +2,7 @@
--Aromaseraphy Jasmine
--Scripted by Eerie Code
function
c100223076
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_PLANT
),
2
,
2
)
--indes
...
...
@@ -16,10 +17,9 @@ function c100223076.initial_effect(c)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
4709881
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
100223076
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
100223076
)
e2
:
SetCost
(
c100223076
.
spcost
)
...
...
@@ -28,11 +28,11 @@ function c100223076.initial_effect(c)
c
:
RegisterEffect
(
e2
)
--search
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
100223076
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_RECOVER
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c100223076
.
thcon
)
e3
:
SetTarget
(
c100223076
.
thtg
)
...
...
@@ -59,7 +59,7 @@ function c100223076.spfilter(c,e,tp)
return
c
:
IsRace
(
RACE_PLANT
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c100223076
.
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
)
>
-
1
and
Duel
.
IsExistingMatchingCard
(
c100223076
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
...
...
@@ -67,9 +67,8 @@ function c100223076.spop(e,tp,eg,ep,ev,re,r,rp)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100223076
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
function
c100223076
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
@@ -79,7 +78,7 @@ function c100223076.thfilter(c)
return
c
:
IsRace
(
RACE_PLANT
)
and
c
:
IsAbleToHand
()
end
function
c100223076
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c100223076
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c100223076
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c100223086.lua
0 → 100644
View file @
01097f83
--ヘビーメタルフォーゼ・エレクトラム
--Heavymetalfoes Electrum
--Scripted by Eerie Code
function
c100223086
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_PENDULUM
),
2
,
2
)
--to extra
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
100223086
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCondition
(
c100223086
.
tecon
)
e1
:
SetTarget
(
c100223086
.
tetg
)
e1
:
SetOperation
(
c100223086
.
teop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100223086
,
1
))
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c100223086
.
destg
)
e2
:
SetOperation
(
c100223086
.
desop
)
c
:
RegisterEffect
(
e2
)
--draw
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
100223086
,
2
))
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
100223086
)
e3
:
SetCondition
(
c100223086
.
drcon
)
e3
:
SetTarget
(
c100223086
.
drtg
)
e3
:
SetOperation
(
c100223086
.
drop
)
c
:
RegisterEffect
(
e3
)
end
function
c100223086
.
tecon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
c100223086
.
tefilter
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
end
function
c100223086
.
tetg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c100223086
.
tefilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
function
c100223086
.
teop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
100223086
,
3
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100223086
.
tefilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoExtraP
(
g
,
tp
,
REASON_EFFECT
)
end
end
function
c100223086
.
thfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
end
function
c100223086
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
tp
)
and
chkc
:
IsFaceup
()
and
chkc
~=
c
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
c
)
and
Duel
.
IsExistingMatchingCard
(
c100223086
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c100223086
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100223086
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
function
c100223086
.
drcfilter
(
c
,
tp
)
return
c
:
IsPreviousLocation
(
LOCATION_PZONE
)
and
c
:
GetPreviousControler
()
==
tp
end
function
c100223086
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c100223086
.
drcfilter
,
1
,
nil
,
tp
)
end
function
c100223086
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c100223086
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
expansions/script/c100407008.lua
View file @
01097f83
...
...
@@ -58,8 +58,8 @@ end
function
c100407008
.
indfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_INSECT
)
end
function
c100407008
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c100407008
.
indfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
function
c100407008
.
indcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c100407008
.
indfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
e
:
GetHandler
())
end
function
c100407008
.
indval
(
e
,
re
,
rp
)
return
rp
~=
e
:
GetHandlerPlayer
()
...
...
expansions/script/c100407010.lua
View file @
01097f83
...
...
@@ -8,16 +8,41 @@ function c100407010.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCost
(
c100407010
.
cost
)
e1
:
SetTarget
(
c100407010
.
target
)
e1
:
SetOperation
(
c100407010
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c100407010
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
c
=
e
:
GetHandler
()
local
cid
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_REMAIN_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_OATH
)
e1
:
SetReset
(
RESET_CHAIN
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_DISABLED
)
e2
:
SetOperation
(
c100407010
.
tgop
)
e2
:
SetLabel
(
cid
)
e2
:
SetReset
(
RESET_CHAIN
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c100407010
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
cid
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_CHAIN_ID
)
if
cid
~=
e
:
GetLabel
()
then
return
end
e
:
GetOwner
():
CancelToGrave
(
false
)
end
function
c100407010
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_INSECT
)
end
function
c100407010
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c100407010
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c100407010
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsExistingTarget
(
c100407010
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c100407010
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
...
...
@@ -25,8 +50,9 @@ end
function
c100407010
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsLocation
(
LOCATION_SZONE
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsStatus
(
STATUS_LEAVE_CONFIRMED
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
Equip
(
tp
,
c
,
tc
)
c
:
CancelToGrave
()
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -57,10 +83,10 @@ function c100407010.activate(e,tp,eg,ep,ev,re,r,rp)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e5
:
SetCode
(
EVENT_CHAINING
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e5
:
SetOperation
(
c100407010
.
regop
)
e5
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e5
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
...
...
@@ -80,10 +106,12 @@ function c100407010.activate(e,tp,eg,ep,ev,re,r,rp)
local
e8
=
e7
:
Clone
()
e8
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e8
)
else
c
:
CancelToGrave
(
false
)
end
end
function
c100407010
.
eqlimit
(
e
,
c
)
return
c
:
GetControler
()
==
e
:
GetHandlerPlayer
(
)
or
e
:
GetHandler
():
GetEquipTarget
()
==
c
return
c
:
IsRace
(
RACE_INSECT
)
or
e
:
GetHandler
():
GetEquipTarget
()
==
c
end
function
c100407010
.
atkcon1
(
e
)
local
ec
=
e
:
GetHandler
():
GetEquipTarget
()
...
...
@@ -107,11 +135,8 @@ function c100407010.ctop(e,tp,eg,ep,ev,re,r,rp)
tc
=
g
:
GetNext
()
end
end
function
c100407010
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
100407010
,
RESET_EVENT
+
0x1fc0000
+
RESET_CHAIN
,
0
,
1
)
end
function
c100407010
.
ctcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetEquipTarget
()
and
ep
~=
tp
and
c
:
GetFlagEffect
(
100407010
)
~=
0
return
e
:
GetHandler
():
GetEquipTarget
()
and
ep
~=
tp
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
end
function
c100407010
.
atkcon2
(
e
)
return
e
:
GetHandler
():
GetEquipTarget
()
...
...
expansions/script/c100407039.lua
0 → 100644
View file @
01097f83
--宝玉の絆
--Crystal Bonds
--Script by nekrozar
function
c100407039
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
100407039
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c100407039
.
target
)
e1
:
SetOperation
(
c100407039
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c100407039
.
thfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x1034
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
Duel
.
IsExistingMatchingCard
(
c100407039
.
plfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
:
GetCode
())
end
function
c100407039
.
plfilter
(
c
,
code
)
return
c
:
IsSetCard
(
0x1034
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
code
)
and
not
c
:
IsForbidden
()
end
function
c100407039
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
0
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
then
ft
=
1
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
ft
and
Duel
.
IsExistingMatchingCard
(
c100407039
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c100407039
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c100407039
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
if
g1
:
GetCount
()
>
0
Duel
.
SendtoHand
(
g1
,
nil
,
REASON_EFFECT
)
~=
0
and
g1
:
GetFirst
():
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
g1
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c100407039
.
plfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
g1
:
GetFirst
():
GetCode
())
local
tc
=
g2
:
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
tc
:
RegisterEffect
(
e1
)
Duel
.
RaiseEvent
(
tc
,
EVENT_CUSTOM
+
47408488
,
e
,
0
,
tp
,
0
,
0
)
end
end
end
expansions/script/c100407040.lua
View file @
01097f83
...
...
@@ -71,6 +71,7 @@ function c100407040.activate(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100407040
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
g
:
GetFirst
():
CompleteProcedure
()
end
end
function
c100407040
.
plcfilter
(
c
,
tp
)
...
...
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