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
49d6f8ef
Commit
49d6f8ef
authored
Aug 27, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
032deb32
Changes
75
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
4660 additions
and
3 deletions
+4660
-3
.gitignore
.gitignore
+0
-1
cards.cdb
cards.cdb
+0
-0
expansions/pre-release.cdb
expansions/pre-release.cdb
+0
-0
expansions/pre-update.cdb
expansions/pre-update.cdb
+0
-0
expansions/script/c100200134.lua
expansions/script/c100200134.lua
+52
-0
expansions/script/c100200135.lua
expansions/script/c100200135.lua
+70
-0
expansions/script/c100200137.lua
expansions/script/c100200137.lua
+85
-0
expansions/script/c100305000.lua
expansions/script/c100305000.lua
+45
-0
expansions/script/c100305001.lua
expansions/script/c100305001.lua
+121
-0
expansions/script/c100305002.lua
expansions/script/c100305002.lua
+40
-0
expansions/script/c100305003.lua
expansions/script/c100305003.lua
+59
-0
expansions/script/c100305025.lua
expansions/script/c100305025.lua
+76
-0
expansions/script/c100305031.lua
expansions/script/c100305031.lua
+83
-0
expansions/script/c100420001.lua
expansions/script/c100420001.lua
+98
-0
expansions/script/c100420018.lua
expansions/script/c100420018.lua
+59
-0
expansions/script/c101003005.lua
expansions/script/c101003005.lua
+37
-0
expansions/script/c101003006.lua
expansions/script/c101003006.lua
+100
-0
expansions/script/c101003022.lua
expansions/script/c101003022.lua
+97
-0
expansions/script/c101003027.lua
expansions/script/c101003027.lua
+116
-0
expansions/script/c101003038.lua
expansions/script/c101003038.lua
+58
-0
expansions/script/c101003044.lua
expansions/script/c101003044.lua
+94
-0
expansions/script/c101003052.lua
expansions/script/c101003052.lua
+101
-0
expansions/script/c101003058.lua
expansions/script/c101003058.lua
+75
-0
expansions/script/c101003061.lua
expansions/script/c101003061.lua
+34
-0
expansions/script/c101003066.lua
expansions/script/c101003066.lua
+102
-0
expansions/script/c101003073.lua
expansions/script/c101003073.lua
+67
-0
expansions/script/c12171659.lua
expansions/script/c12171659.lua
+46
-0
expansions/script/c12510878.lua
expansions/script/c12510878.lua
+68
-0
expansions/script/c16849715.lua
expansions/script/c16849715.lua
+65
-0
expansions/script/c18378582.lua
expansions/script/c18378582.lua
+61
-0
expansions/script/c20745268.lua
expansions/script/c20745268.lua
+36
-0
expansions/script/c27561302.lua
expansions/script/c27561302.lua
+65
-0
expansions/script/c27784944.lua
expansions/script/c27784944.lua
+91
-0
expansions/script/c28573958.lua
expansions/script/c28573958.lua
+89
-0
expansions/script/c28806532.lua
expansions/script/c28806532.lua
+89
-0
expansions/script/c29628180.lua
expansions/script/c29628180.lua
+34
-0
expansions/script/c30907810.lua
expansions/script/c30907810.lua
+105
-0
expansions/script/c31629407.lua
expansions/script/c31629407.lua
+56
-0
expansions/script/c32841045.lua
expansions/script/c32841045.lua
+58
-0
expansions/script/c33964637.lua
expansions/script/c33964637.lua
+125
-0
expansions/script/c44595286.lua
expansions/script/c44595286.lua
+51
-0
expansions/script/c44686185.lua
expansions/script/c44686185.lua
+83
-0
expansions/script/c48783998.lua
expansions/script/c48783998.lua
+51
-0
expansions/script/c49905576.lua
expansions/script/c49905576.lua
+22
-0
expansions/script/c5230799.lua
expansions/script/c5230799.lua
+59
-0
expansions/script/c52834429.lua
expansions/script/c52834429.lua
+73
-0
expansions/script/c53956001.lua
expansions/script/c53956001.lua
+73
-0
expansions/script/c54178659.lua
expansions/script/c54178659.lua
+134
-0
expansions/script/c54895237.lua
expansions/script/c54895237.lua
+91
-0
expansions/script/c55794644.lua
expansions/script/c55794644.lua
+76
-0
expansions/script/c6357341.lua
expansions/script/c6357341.lua
+32
-0
expansions/script/c65017789.lua
expansions/script/c65017789.lua
+71
-0
expansions/script/c6579928.lua
expansions/script/c6579928.lua
+58
-0
expansions/script/c66149377.lua
expansions/script/c66149377.lua
+34
-0
expansions/script/c67901914.lua
expansions/script/c67901914.lua
+63
-0
expansions/script/c68024506.lua
expansions/script/c68024506.lua
+58
-0
expansions/script/c68246154.lua
expansions/script/c68246154.lua
+58
-0
expansions/script/c70180284.lua
expansions/script/c70180284.lua
+63
-0
expansions/script/c71207871.lua
expansions/script/c71207871.lua
+59
-0
expansions/script/c7291576.lua
expansions/script/c7291576.lua
+55
-0
expansions/script/c79968632.lua
expansions/script/c79968632.lua
+40
-0
expansions/script/c80577258.lua
expansions/script/c80577258.lua
+69
-0
expansions/script/c84177693.lua
expansions/script/c84177693.lua
+30
-0
expansions/script/c89355716.lua
expansions/script/c89355716.lua
+75
-0
expansions/script/c91123920.lua
expansions/script/c91123920.lua
+34
-0
expansions/script/c91188343.lua
expansions/script/c91188343.lua
+40
-0
expansions/script/c91299846.lua
expansions/script/c91299846.lua
+82
-0
expansions/script/c91345518.lua
expansions/script/c91345518.lua
+41
-0
expansions/script/c92411493.lua
expansions/script/c92411493.lua
+72
-0
expansions/script/c92534075.lua
expansions/script/c92534075.lua
+49
-0
expansions/script/c93356623.lua
expansions/script/c93356623.lua
+67
-0
expansions/script/c94418111.lua
expansions/script/c94418111.lua
+64
-0
expansions/script/c97750534.lua
expansions/script/c97750534.lua
+51
-0
strings.conf
strings.conf
+17
-0
system.conf
system.conf
+8
-2
No files found.
.gitignore
View file @
49d6f8ef
/expansions
/specials
/specials
/obj
/obj
/bin
/bin
...
...
cards.cdb
View file @
49d6f8ef
No preview for this file type
expansions/pre-release.cdb
0 → 100644
View file @
49d6f8ef
File added
expansions/pre-update.cdb
0 → 100644
View file @
49d6f8ef
File added
expansions/script/c100200134.lua
0 → 100644
View file @
49d6f8ef
--白棘鱏
--White Stingray
--Scripted by Eerie Code
function
c100200134
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
100200134
)
e1
:
SetCondition
(
c100200134
.
spcon
)
e1
:
SetOperation
(
c100200134
.
spop
)
c
:
RegisterEffect
(
e1
)
--Tuner
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
100200134
+
100
)
e2
:
SetCondition
(
c100200134
.
tncon
)
e2
:
SetOperation
(
c100200134
.
tnop
)
c
:
RegisterEffect
(
e2
)
end
function
c100200134
.
cfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
end
function
c100200134
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c100200134
.
cfilter
,
c
:
GetControler
(),
LOCATION_HAND
,
0
,
1
,
c
)
end
function
c100200134
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100200134
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
c
)
Duel
.
SendtoGrave
(
g
,
REASON_DISCARD
+
REASON_COST
)
end
function
c100200134
.
tncon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_GRAVE
)
end
function
c100200134
.
tnop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_ADD_TYPE
)
e1
:
SetValue
(
TYPE_TUNER
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
expansions/script/c100200135.lua
0 → 100644
View file @
49d6f8ef
--DDD超視王ゼロ・マクスウェル
--D/D/D Supersight King Zero Maxwell
--Scripted by Eerie Code
function
c100200135
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--defdown
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
100200135
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
100200135
)
e1
:
SetTarget
(
c100200135
.
deftg
)
e1
:
SetOperation
(
c100200135
.
defop
)
c
:
RegisterEffect
(
e1
)
--defdown
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100200135
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLE_CONFIRM
)
e2
:
SetCondition
(
c100200135
.
defcon2
)
e2
:
SetOperation
(
c100200135
.
defop2
)
c
:
RegisterEffect
(
e2
)
--pierce
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_PIERCE
)
c
:
RegisterEffect
(
e3
)
--no damage
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
e4
:
SetValue
(
1
)
c
:
RegisterEffect
(
e4
)
end
function
c100200135
.
deftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
aux
.
nzdef
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
nzdef
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
aux
.
nzdef
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c100200135
.
defop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e1
:
SetValue
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c100200135
.
defcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttackTarget
()
e
:
SetLabelObject
(
tc
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
and
tc
and
tc
:
IsPosition
(
POS_FACEUP_DEFENSE
)
and
tc
:
GetDefense
()
>
0
end
function
c100200135
.
defop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToBattle
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e1
:
SetValue
(
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
tc
:
RegisterEffect
(
e1
)
end
end
expansions/script/c100200137.lua
0 → 100644
View file @
49d6f8ef
--六武衆の真影
--Legendary Shadow of the Six Samurai
--Script by nekrozar
function
c100200137
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
100200137
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
100200137
)
e1
:
SetCondition
(
c100200137
.
spcon
)
e1
:
SetTarget
(
c100200137
.
sptg
)
e1
:
SetOperation
(
c100200137
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
100200137
,
1
))
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetCountLimit
(
1
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c100200137
.
cost
)
e3
:
SetOperation
(
c100200137
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c100200137
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
GetSummonPlayer
()
==
tp
and
c
:
IsSetCard
(
0x103d
)
end
function
c100200137
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c100200137
.
cfilter
,
1
,
nil
,
tp
)
end
function
c100200137
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c100200137
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c100200137
.
filter
(
c
,
mc
)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsSetCard
(
0x3d
)
and
c
:
IsAbleToRemoveAsCost
()
and
not
(
c
:
GetLevel
()
==
mc
:
GetLevel
()
and
c
:
IsAttribute
(
mc
:
GetAttribute
())
and
c
:
GetAttack
()
==
mc
:
GetAttack
()
and
c
:
GetDefense
()
==
mc
:
GetDefense
())
end
function
c100200137
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c100200137
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100200137
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
e
:
SetLabelObject
(
g
:
GetFirst
())
end
function
c100200137
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
e
:
GetLabelObject
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
lv
=
tc
:
GetLevel
()
local
att
=
tc
:
GetAttribute
()
local
atk
=
tc
:
GetAttack
()
local
def
=
tc
:
GetDefense
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL_FINAL
)
e1
:
SetValue
(
lv
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CHANGE_ATTRIBUTE
)
e2
:
SetValue
(
att
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e3
:
SetValue
(
atk
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e1
:
Clone
()
e4
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e4
:
SetValue
(
def
)
c
:
RegisterEffect
(
e4
)
end
end
expansions/script/c100305000.lua
0 → 100644
View file @
49d6f8ef
--イーバ
--EBE
--Scripted by Eerie Code
function
c100305000
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
100305000
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
100305000
)
e1
:
SetTarget
(
c100305000
.
thtg
)
e1
:
SetOperation
(
c100305000
.
thop
)
c
:
RegisterEffect
(
e1
)
end
function
c100305000
.
cfilter
(
c
)
return
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_GRAVE
))
and
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c100305000
.
filter
(
c
)
return
c
:
IsLevelBelow
(
2
)
and
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
not
c
:
IsCode
(
100305000
)
and
c
:
IsAbleToHand
()
end
function
c100305000
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c100305000
.
cfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
IsExistingMatchingCard
(
c100305000
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
local
dg
=
Duel
.
GetMatchingGroup
(
c100305000
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
ct
=
math.min
(
2
,
dg
:
GetClassCount
(
Card
.
GetCode
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
rg
=
Duel
.
SelectMatchingCard
(
tp
,
c100305000
.
cfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
1
,
ct
,
e
:
GetHandler
())
local
rc
=
Duel
.
Remove
(
rg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
SetTargetParam
(
rc
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
rc
,
tp
,
LOCATION_DECK
)
end
function
c100305000
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
dg
=
Duel
.
GetMatchingGroup
(
c100305000
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
ct
=
math.min
(
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PARAM
),
dg
:
GetClassCount
(
Card
.
GetCode
))
if
ct
==
0
then
return
end
local
g
=
Group
.
CreateGroup
()
for
i
=
1
,
ct
do
local
tc
=
dg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
g
:
AddCard
(
tc
)
dg
:
Remove
(
Card
.
IsCode
,
nil
,
tc
:
GetCode
())
end
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
expansions/script/c100305001.lua
0 → 100644
View file @
49d6f8ef
--天空聖騎士アークパーシアス
--Angel Paladin Arch-Parshath
--Scripted by sahim
function
c100305001
.
initial_effect
(
c
)
--counter
local
e01
=
Effect
.
CreateEffect
(
c
)
e01
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e01
:
SetCode
(
EVENT_CHAINING
)
e01
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e01
:
SetOperation
(
c100305001
.
chop1
)
c
:
RegisterEffect
(
e01
)
local
e02
=
Effect
.
CreateEffect
(
c
)
e02
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e02
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e02
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e02
:
SetOperation
(
c100305001
.
chop2
)
c
:
RegisterEffect
(
e02
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
100305001
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetCode
(
EVENT_CHAIN_END
)
e1
:
SetCondition
(
c100305001
.
spcon1
)
e1
:
SetCost
(
c100305001
.
spcost
)
e1
:
SetTarget
(
c100305001
.
sptg
)
e1
:
SetOperation
(
c100305001
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_CHAIN_NEGATED
)
e2
:
SetCondition
(
c100305001
.
spcon2
)
c
:
RegisterEffect
(
e2
)
e01
:
SetLabelObject
(
e1
)
e02
:
SetLabelObject
(
e1
)
--pierce
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_PIERCE
)
c
:
RegisterEffect
(
e3
)
--search
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
100305001
,
1
))
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e4
:
SetCondition
(
c100305001
.
thcon
)
e4
:
SetTarget
(
c100305001
.
thtg
)
e4
:
SetOperation
(
c100305001
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
c100305001
.
chop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetLabelObject
():
SetLabel
(
0
)
end
function
c100305001
.
chop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
rp
~=
tp
or
not
re
:
IsActiveType
(
TYPE_COUNTER
)
then
return
end
e
:
GetLabelObject
():
SetLabel
(
1
)
end
function
c100305001
.
spcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
e
:
GetLabel
()
==
1
end
function
c100305001
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
de
,
dp
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_DISABLE_REASON
,
CHAININFO_DISABLE_PLAYER
)
return
dp
==
tp
end
function
c100305001
.
cfilter
(
c
)
return
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c100305001
.
mzfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
end
function
c100305001
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
rg
=
Duel
.
GetMatchingGroup
(
c100305001
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
c
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ct
=-
ft
+
1
if
chk
==
0
then
return
ft
>-
2
and
rg
:
GetCount
()
>
1
and
(
ft
>
0
or
rg
:
IsExists
(
c100305001
.
mzfilter
,
ct
,
nil
))
end
local
g
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
g
=
rg
:
Select
(
tp
,
2
,
2
,
nil
)
elseif
ft
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
g
=
rg
:
FilterSelect
(
tp
,
c100305001
.
mzfilter
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g2
=
rg
:
Select
(
tp
,
1
,
1
,
g
:
GetFirst
())
g
:
Merge
(
g2
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
g
=
rg
:
FilterSelect
(
tp
,
c100305001
.
mzfilter
,
2
,
2
,
nil
)
end
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c100305001
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c100305001
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c100305001
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
end
function
c100305001
.
thfilter
(
c
)
return
(
c
:
IsSetCard
(
0x208
)
or
c
:
IsCode
(
18036057
,
69514125
,
76925842
,
12510878
)
or
c
:
IsType
(
TYPE_COUNTER
))
and
c
:
IsAbleToHand
()
end
function
c100305001
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c100305001
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c100305001
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100305001
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c100305002.lua
0 → 100644
View file @
49d6f8ef
--天空賢者ミネルヴァ
--Angel Sage Minerva
--Scripted by Eerie Code
function
c100305002
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c100305002
.
atkcon
)
e1
:
SetOperation
(
c100305002
.
atkop
)
c
:
RegisterEffect
(
e1
)
end
function
c100305002
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsType
(
TYPE_COUNTER
)
end
function
c100305002
.
thfilter
(
c
,
cc
)
return
c
:
IsType
(
TYPE_COUNTER
)
and
not
c
:
IsCode
(
cc
)
and
c
:
IsAbleToHand
()
end
function
c100305002
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
500
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
local
rc
=
re
:
GetHandler
()
if
not
rc
then
return
end
local
cc
=
rc
:
GetCode
()
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
c100305002
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
cc
)
if
(
Duel
.
IsExistingMatchingCard
(
c100305002
.
envfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
and
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_CARD
,
0
,
100305002
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
end
end
function
c100305002
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
expansions/script/c100305003.lua
0 → 100644
View file @
49d6f8ef
--力天使ヴァルキリア
--Power Angel Valkyria
--Scripted by Eerie Code
function
c100305003
.
initial_effect
(
c
)
--counter
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetOperation
(
c100305003
.
chop1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_NEGATED
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
c100305003
.
chop2
)
c
:
RegisterEffect
(
e2
)
e1
:
SetLabelObject
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
100305003
,
0
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_CHAIN_END
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
100305003
)
e3
:
SetCondition
(
c100305003
.
thcon
)
e3
:
SetTarget
(
c100305003
.
thtg
)
e3
:
SetOperation
(
c100305003
.
thop
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
end
function
c100305003
.
chop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetLabelObject
():
SetLabel
(
0
)
end
function
c100305003
.
chop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
de
,
dp
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_DISABLE_REASON
,
CHAININFO_DISABLE_PLAYER
)
if
dp
==
tp
then
e
:
SetLabel
(
1
)
end
end
function
c100305003
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
~=
0
end
function
c100305003
.
thfilter
(
c
)
return
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsAbleToHand
()
end
function
c100305003
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c100305003
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100305003
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c100305025.lua
0 → 100644
View file @
49d6f8ef
--パーシアスの神域
--Sanctuary of Parshath
--Scripted by Eerie Code
function
c100305025
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--change
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetCode
(
EFFECT_CHANGE_CODE
)
e2
:
SetRange
(
LOCATION_SZONE
+
LOCATION_GRAVE
)
e2
:
SetValue
(
56433456
)
c
:
RegisterEffect
(
e2
)
--atk/def
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
RACE_FAIRY
))
e3
:
SetValue
(
300
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e4
)
--cannot be target/indestructable
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e5
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetTargetRange
(
LOCATION_SZONE
,
LOCATION_SZONE
)
e5
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsPosition
,
POS_FACEDOWN
))
e5
:
SetValue
(
1
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
e6
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
c
:
RegisterEffect
(
e6
)
--to deck
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetCategory
(
CATEGORY_TODECK
)
e7
:
SetType
(
EFFECT_TYPE_IGNITION
)
e7
:
SetRange
(
LOCATION_SZONE
)
e7
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e7
:
SetCountLimit
(
1
)
e7
:
SetTarget
(
c100305025
.
tdtg
)
e7
:
SetOperation
(
c100305025
.
tdop
)
c
:
RegisterEffect
(
e7
)
end
function
c100305025
.
tdfilter
(
c
,
e
)
return
(
c
:
IsRace
(
RACE_FAIRY
)
or
c
:
IsType
(
TYPE_COUNTER
))
and
c
:
IsAbleToDeck
()
and
(
not
e
or
c
:
IsCanBeEffectTarget
(
e
))
end
function
c100305025
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c100305025
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
)
if
chk
==
0
then
return
g
:
GetClassCount
(
Card
.
GetCode
)
>=
3
end
local
tg
=
Group
.
CreateGroup
()
repeat
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
tg
:
Merge
(
sg
)
g
:
Remove
(
Card
.
IsCode
,
nil
,
sg
:
GetFirst
():
GetCode
())
until
tg
:
GetCount
()
==
3
Duel
.
SetTargetCard
(
tg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
tg
,
tg
:
GetCount
(),
0
,
0
)
end
function
c100305025
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
tg
:
GetCount
()
==
0
then
return
end
local
ct
=
Duel
.
SendtoDeck
(
tg
,
nil
,
0
,
REASON_EFFECT
)
if
ct
>
0
then
Duel
.
SortDecktop
(
tp
,
tp
,
ct
)
end
end
expansions/script/c100305031.lua
0 → 100644
View file @
49d6f8ef
--輪廻のパーシアス
--Reincarnating Parshath
--Scripted by Eerie Code
function
c100305031
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_TODECK
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
c100305031
.
condition
)
e1
:
SetCost
(
c100305031
.
cost
)
e1
:
SetTarget
(
c100305031
.
target
)
e1
:
SetOperation
(
c100305031
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c100305031
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
re
:
IsActiveType
(
TYPE_MONSTER
)
or
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c100305031
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_COUNTER
)
and
not
c
:
IsPublic
()
end
function
c100305031
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c100305031
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
and
(
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
or
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_DISCARD_COST_CHANGE
))
and
Duel
.
CheckLPCost
(
tp
,
1000
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
cg
=
Duel
.
SelectMatchingCard
(
tp
,
c100305031
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
Duel
.
ConfirmCards
(
1
-
tp
,
cg
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_PUBLIC
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_CHAIN
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetOperation
(
c100305031
.
clearop
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_CHAIN
)
e2
:
SetLabel
(
Duel
.
GetCurrentChain
())
e2
:
SetLabelObject
(
e1
)
tc
:
RegisterEffect
(
e2
)
if
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_DISCARD_COST_CHANGE
)
then
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
Duel
.
PayLPCost
(
tp
,
1000
)
end
function
c100305031
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsAbleToDeck
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_EXTRA
)
end
end
function
c100305031
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x208
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c100305031
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
re
:
GetHandler
()
if
Duel
.
NegateActivation
(
ev
)
and
ec
:
IsRelateToEffect
(
re
)
then
ec
:
CancelToGrave
()
if
Duel
.
SendtoDeck
(
ec
,
nil
,
2
,
REASON_EFFECT
)
~=
0
and
ec
:
IsLocation
(
LOCATION_DECK
+
LOCATION_EXTRA
)
then
local
loc
=
0
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
loc
=
loc
+
LOCATION_DECK
end
if
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
then
loc
=
loc
+
LOCATION_EXTRA
end
local
g
=
Duel
.
GetMatchingGroup
(
c100305031
.
spfilter
,
tp
,
loc
,
0
,
nil
,
e
,
tp
)
if
loc
~=
0
and
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
100305031
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c100305031
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
ev
~=
e
:
GetLabel
()
then
return
end
e
:
GetLabelObject
():
Reset
()
e
:
Reset
()
end
expansions/script/c100420001.lua
0 → 100644
View file @
49d6f8ef
--サブテラーマリスの妖魔
--Subterror Behemoth Apparition
--Script by nekrozar
function
c100420001
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_FLIP
),
2
,
2
)
--atkup
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e1
:
SetValue
(
c100420001
.
matcheck
)
c
:
RegisterEffect
(
e1
)
--to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100420001
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
,
100420001
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c100420001
.
tgtg
)
e2
:
SetOperation
(
c100420001
.
tgop
)
c
:
RegisterEffect
(
e2
)
--search
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
100420001
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_FLIP
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c100420001
.
thcon
)
e3
:
SetTarget
(
c100420001
.
thtg
)
e3
:
SetOperation
(
c100420001
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c100420001
.
matfilter
(
c
)
return
c
:
IsSetCard
(
0xed
)
and
c
:
GetOriginalLevel
()
>=
0
end
function
c100420001
.
matcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
():
Filter
(
c100420001
.
matfilter
,
nil
)
local
atk
=
g
:
GetSum
(
Card
.
GetOriginalLevel
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
atk
*
100
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
e1
)
end
function
c100420001
.
tgfilter
(
c
)
return
c
:
IsType
(
TYPE_FLIP
)
and
c
:
IsAbleToGrave
()
end
function
c100420001
.
spfilter
(
c
,
e
,
tp
,
zone
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
,
tp
,
zone
)
end
function
c100420001
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c100420001
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c100420001
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c100420001
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100420001
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
and
g
:
GetFirst
():
IsLocation
(
LOCATION_GRAVE
)
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c100420001
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
if
zone
~=
0
and
sg
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
,
zone
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
end
function
c100420001
.
cfilter
(
c
,
g
)
return
g
:
IsContains
(
c
)
end
function
c100420001
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
return
lg
and
eg
:
IsExists
(
c100420001
.
cfilter
,
1
,
nil
,
lg
)
end
function
c100420001
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_FLIP
)
and
c
:
IsAbleToHand
()
end
function
c100420001
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c100420001
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c100420001
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c100420018.lua
0 → 100644
View file @
49d6f8ef
--SPYRAL-ザ・ダブルヘリックス
--SPYRAL - The Double Helix
--Script by nekrozar
function
c100420018
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xee
),
2
,
2
)
--change name
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
e1
:
SetValue
(
41091257
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100420018
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
100420018
)
e2
:
SetTarget
(
c100420018
.
sptg
)
e2
:
SetOperation
(
c100420018
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c100420018
.
spfilter
(
c
,
e
,
tp
,
zone
)
return
c
:
IsSetCard
(
0xee
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsAbleToHand
()
or
(
zone
~=
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)))
end
function
c100420018
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c100420018
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CARDTYPE
)
e
:
SetLabel
(
Duel
.
SelectOption
(
tp
,
70
,
71
,
72
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c100420018
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
==
0
then
return
end
Duel
.
ConfirmDecktop
(
1
-
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
1
)
local
tc
=
g
:
GetFirst
()
local
opt
=
e
:
GetLabel
()
if
(
opt
==
0
and
tc
:
IsType
(
TYPE_MONSTER
))
or
(
opt
==
1
and
tc
:
IsType
(
TYPE_SPELL
))
or
(
opt
==
2
and
tc
:
IsType
(
TYPE_TRAP
))
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c100420018
.
spfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
local
sc
=
sg
:
GetFirst
()
if
sc
then
if
zone
~=
0
and
sc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)
and
(
not
sc
:
IsAbleToHand
()
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
100420018
,
1
)))
then
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
else
Duel
.
SendtoHand
(
sc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sc
)
end
end
end
end
expansions/script/c101003005.lua
0 → 100644
View file @
49d6f8ef
--ビットルーパー
--Bitrooper
--Scripted by Eerie Code
function
c101003005
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
101003005
)
e1
:
SetCost
(
c101003005
.
spcost
)
e1
:
SetTarget
(
c101003005
.
sptg
)
e1
:
SetOperation
(
c101003005
.
spop
)
c
:
RegisterEffect
(
e1
)
end
function
c101003005
.
cfilter
(
c
)
return
c
:
IsLevelBelow
(
2
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c101003005
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101003005
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003005
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
c
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c101003005
.
sptg
(
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
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c101003005
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c101003006.lua
0 → 100644
View file @
49d6f8ef
--弾帯城壁龍
--Beltlink Wall Dragon
--Script by nekrozar
function
c101003006
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x44
)
c
:
EnableReviveLimit
()
--connot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
101003006
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCondition
(
c101003006
.
spcon
)
e2
:
SetTarget
(
c101003006
.
sptg
)
e2
:
SetOperation
(
c101003006
.
spop
)
c
:
RegisterEffect
(
e2
)
--cannot link summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
1
,
1
)
e3
:
SetTarget
(
c101003006
.
splimit
)
c
:
RegisterEffect
(
e3
)
--cannot attack
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e4
:
SetTarget
(
c101003006
.
atktg
)
c
:
RegisterEffect
(
e4
)
--counter
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
101003006
,
1
))
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e5
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCondition
(
c101003006
.
ctcon1
)
e5
:
SetOperation
(
c101003006
.
ctop1
)
c
:
RegisterEffect
(
e5
)
--counter
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
101003006
,
2
))
e6
:
SetCategory
(
CATEGORY_COUNTER
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e6
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e6
:
SetCountLimit
(
1
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetOperation
(
c101003006
.
ctop2
)
c
:
RegisterEffect
(
e6
)
end
function
c101003006
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
GetSummonPlayer
()
==
tp
and
c
:
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
c101003006
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c101003006
.
cfilter
,
1
,
nil
,
tp
)
end
function
c101003006
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
and
Duel
.
IsCanAddCounter
(
tp
,
0x44
,
1
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c101003006
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
~=
0
then
c
:
AddCounter
(
0x44
,
2
)
c
:
CompleteProcedure
()
end
end
function
c101003006
.
splimit
(
e
,
c
,
tp
,
sumtp
,
sumpos
)
return
c
:
GetLink
()
>
e
:
GetHandler
():
GetCounter
(
0x44
)
and
bit
.
band
(
sumtp
,
SUMMON_TYPE_LINK
)
==
SUMMON_TYPE_LINK
end
function
c101003006
.
atktg
(
e
,
c
)
return
not
c
:
IsType
(
TYPE_LINK
)
end
function
c101003006
.
ctcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_LINK
)
end
function
c101003006
.
ctop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
c
:
RemoveCounter
(
tp
,
0x44
,
2
,
REASON_EFFECT
)
end
end
function
c101003006
.
ctop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
c
:
AddCounter
(
0x44
,
1
)
end
end
expansions/script/c101003022.lua
0 → 100644
View file @
49d6f8ef
--魔導獣 ジャッカル
--Mythical Beast Jackal
--Scripted by Eerie Code
function
c101003022
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
c
:
EnableCounterPermit
(
0x1
)
--destroy & counter
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101003022
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_COUNTER
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
101003022
)
e1
:
SetCondition
(
c101003022
.
ctcon
)
e1
:
SetTarget
(
c101003022
.
cttg
)
e1
:
SetOperation
(
c101003022
.
ctop
)
c
:
RegisterEffect
(
e1
)
--add counter
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetOperation
(
c101003022
.
acop
)
c
:
RegisterEffect
(
e3
)
--special summon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
101003022
,
2
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCost
(
c101003022
.
spcost
)
e4
:
SetTarget
(
c101003022
.
sptg
)
e4
:
SetOperation
(
c101003022
.
spop
)
c
:
RegisterEffect
(
e4
)
end
c101003022
.
spell_counter_permit
=
99
function
c101003022
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
end
function
c101003022
.
ctfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanAddCounter
(
0x1
,
1
)
end
function
c101003022
.
cttg
(
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
~=
c
and
c101003022
.
ctfilter
(
chkc
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsDestructable
()
and
Duel
.
IsExistingTarget
(
c101003022
.
ctfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
101003022
,
1
))
Duel
.
SelectTarget
(
tp
,
c101003022
.
ctfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
0x1
)
end
function
c101003022
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
~=
0
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
tc
:
AddCounter
(
0x1
,
1
)
end
end
function
c101003022
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsActiveType
(
TYPE_SPELL
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
then
e
:
GetHandler
():
AddCounter
(
0x1
,
1
)
end
end
function
c101003022
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x1
,
3
,
REASON_COST
)
and
c
:
IsReleasable
()
end
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x1
,
3
,
REASON_COST
)
Duel
.
Release
(
c
,
REASON_COST
)
end
function
c101003022
.
spfilter
(
c
,
e
,
tp
)
return
(
c
:
IsSetCard
(
0x209
)
or
c
:
IsCode
(
55424270
))
and
not
c
:
IsCode
(
101003022
)
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c101003022
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c101003022
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003022
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003022
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c101003027.lua
0 → 100644
View file @
49d6f8ef
--魔導獣 マスターケルベロス
--Mythical Beast Master Cerberus
--Scripted by Eerie Code
function
c101003027
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
c
:
EnableCounterPermit
(
0x1
)
--destroy & search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101003027
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
101003027
)
e1
:
SetCondition
(
c101003027
.
thcon
)
e1
:
SetTarget
(
c101003027
.
thtg
)
e1
:
SetOperation
(
c101003027
.
thop
)
c
:
RegisterEffect
(
e1
)
--add counter
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetOperation
(
c101003027
.
acop
)
c
:
RegisterEffect
(
e3
)
--cannot be destroyed
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c101003027
.
incon
)
e4
:
SetValue
(
1
)
c
:
RegisterEffect
(
e4
)
--remove
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
101003027
,
1
))
e5
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_REMOVE
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCost
(
c101003027
.
rmcost
)
e5
:
SetTarget
(
c101003027
.
rmtg
)
e5
:
SetOperation
(
c101003027
.
rmop
)
c
:
RegisterEffect
(
e5
)
end
c101003027
.
spell_counter_permit
=
99
function
c101003027
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
end
function
c101003027
.
thfilter
(
c
)
return
(
c
:
IsSetCard
(
0x209
)
or
c
:
IsCode
(
55424270
))
and
c
:
IsLevelBelow
(
7
)
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsAbleToHand
()
end
function
c101003027
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsDestructable
()
and
Duel
.
IsExistingMatchingCard
(
c101003027
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003027
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003027
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
function
c101003027
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsActiveType
(
TYPE_SPELL
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
then
e
:
GetHandler
():
AddCounter
(
0x1
,
1
)
end
end
function
c101003027
.
incon
(
e
)
return
Duel
.
GetCounter
(
e
:
GetHandlerPlayer
(),
1
,
0
,
0x1
)
>=
4
end
function
c101003027
.
rmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x1
,
4
,
REASON_COST
)
end
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x1
,
4
,
REASON_COST
)
end
function
c101003027
.
rmfilter
(
c
)
return
c
:
IsAbleToRemove
()
end
function
c101003027
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
c101003027
.
rmfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003027
.
rmfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c101003027
.
rmfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
c101003027
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
and
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
atk
=
tc
:
GetBaseAttack
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
expansions/script/c101003038.lua
0 → 100644
View file @
49d6f8ef
--エクスコード・トーカー
--Excode Talker
--Scripted by Eerie Code
function
c101003038
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_CYBERSE
),
2
)
--lock zones
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101003038
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
101003038
)
e1
:
SetCondition
(
c101003038
.
lzcon
)
e1
:
SetTarget
(
c101003038
.
lztg
)
e1
:
SetOperation
(
c101003038
.
lzop
)
c
:
RegisterEffect
(
e1
)
--atk up/indestructable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
c101003038
.
tgtg
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetValue
(
500
)
c
:
RegisterEffect
(
e3
)
end
function
c101003038
.
lzcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
c101003038
.
lzfilter
(
c
)
return
c
:
GetSequence
()
>
4
end
function
c101003038
.
lztg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
c101003038
.
lzfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>=
ct
end
local
dis
=
Duel
.
SelectDisableField
(
tp
,
ct
,
LOCATION_MZONE
,
LOCATION_MZONE
,
0
)
e
:
SetLabel
(
dis
)
end
function
c101003038
.
lzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_DISABLE_FIELD
)
e1
:
SetOperation
(
c101003038
.
disop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
e1
:
SetLabel
(
e
:
GetLabel
())
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
function
c101003038
.
disop
(
e
,
tp
)
return
e
:
GetLabel
()
end
function
c101003038
.
tgtg
(
e
,
c
)
return
e
:
GetHandler
():
GetLinkedGroup
():
IsContains
(
c
)
end
expansions/script/c101003044.lua
0 → 100644
View file @
49d6f8ef
--スリーバーストショット・ドラゴン
--Three Burst Blast Dragon
--Scripted by Larry126
function
c101003044
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
NOT
(
aux
.
FilterBoolFunction
(
Card
.
IsType
,
TYPE_TOKEN
)),
2
)
c
:
EnableReviveLimit
()
--Negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101003044
,
0
))
e1
:
SetCategory
(
CATEGORY_NEGATE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c101003044
.
negcon
)
e1
:
SetTarget
(
c101003044
.
negtg
)
e1
:
SetOperation
(
c101003044
.
negop
)
c
:
RegisterEffect
(
e1
)
--pierce
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_PIERCE
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e0
:
SetOperation
(
c101003044
.
regop
)
c
:
RegisterEffect
(
e0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
101003044
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
101003044
)
e3
:
SetCondition
(
c101003044
.
spcon
)
e3
:
SetCost
(
c101003044
.
spcost
)
e3
:
SetTarget
(
c101003044
.
sptg
)
e3
:
SetOperation
(
c101003044
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c101003044
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
)
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
(
re
:
IsActiveType
(
TYPE_MONSTER
)
or
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c101003044
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
end
function
c101003044
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
end
function
c101003044
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
101003044
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c101003044
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
101003044
)
==
0
end
function
c101003044
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c101003044
.
spfilter1
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_LINK
)
and
c
:
GetLink
()
<=
2
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c101003044
.
spfilter2
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsLevelBelow
(
4
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c101003044
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c101003044
.
spfilter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
(
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
or
e
:
GetHandler
():
GetSequence
()
<
5
)
and
Duel
.
IsExistingTarget
(
c101003044
.
spfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c101003044
.
spfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c101003044
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c101003044
.
spfilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
101003044
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
expansions/script/c101003052.lua
0 → 100644
View file @
49d6f8ef
--天火の牢獄
--Fire Prison
--Script by nekrozar
function
c101003052
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--defup
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
RACE_DRAGON
))
e2
:
SetValue
(
500
)
c
:
RegisterEffect
(
e2
)
--cannot link summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetTargetRange
(
1
,
1
)
e3
:
SetTarget
(
c101003052
.
splimit
)
c
:
RegisterEffect
(
e3
)
--cannot attack
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e4
:
SetTarget
(
c101003052
.
atktg
)
c
:
RegisterEffect
(
e4
)
--disable
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e5
:
SetRange
(
LOCATION_FZONE
)
e5
:
SetCondition
(
c101003052
.
discon
)
e5
:
SetOperation
(
c101003052
.
disop
)
c
:
RegisterEffect
(
e5
)
--cannot attack
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
)
e6
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e6
:
SetRange
(
LOCATION_FZONE
)
e6
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e6
:
SetCondition
(
c101003052
.
limcon
)
e6
:
SetTarget
(
c101003052
.
atlimit
)
c
:
RegisterEffect
(
e6
)
--cannot be battle target
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_FIELD
)
e7
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e7
:
SetRange
(
LOCATION_FZONE
)
e7
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e7
:
SetCondition
(
c101003052
.
limcon
)
e7
:
SetValue
(
c101003052
.
atlimit
)
c
:
RegisterEffect
(
e7
)
--cannot be effect target
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_FIELD
)
e8
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e8
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e8
:
SetRange
(
LOCATION_FZONE
)
e8
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e8
:
SetCondition
(
c101003052
.
limcon
)
e8
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
RACE_CYBERSE
))
e8
:
SetValue
(
1
)
c
:
RegisterEffect
(
e8
)
end
function
c101003052
.
limfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_LINK
)
end
function
c101003052
.
splimit
(
e
,
c
,
tp
,
sumtp
,
sumpos
)
local
g
=
Duel
.
GetMatchingGroup
(
c101003052
.
limfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
<=
0
then
return
false
end
local
mg
,
lk
=
g
:
GetMinGroup
(
Card
.
GetLink
)
return
lk
>
c
:
GetLink
()
and
bit
.
band
(
sumtp
,
SUMMON_TYPE_LINK
)
==
SUMMON_TYPE_LINK
end
function
c101003052
.
atktg
(
e
,
c
)
return
not
c
:
IsType
(
TYPE_LINK
)
end
function
c101003052
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
RACE_CYBERSE
)
end
function
c101003052
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroupCount
(
c101003052
.
cfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
>
1
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetHandler
():
IsRace
(
RACE_CYBERSE
)
end
function
c101003052
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
end
function
c101003052
.
limcon
(
e
)
return
Duel
.
GetMatchingGroupCount
(
c101003052
.
cfilter
,
e
:
GetHandler
():
GetControler
(),
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
>
1
end
function
c101003052
.
atlimit
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
RACE_CYBERSE
)
end
expansions/script/c101003058.lua
0 → 100644
View file @
49d6f8ef
--魔導加速
--Magical Boost
--Scripted by Eerie Code
--Prototype, will require either a core update or a script overhaul
function
c101003058
.
initial_effect
(
c
)
--counter
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_COUNTER
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
101003058
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c101003058
.
cost
)
e1
:
SetTarget
(
c101003058
.
target
)
e1
:
SetOperation
(
c101003058
.
activate
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
c101003058
.
spcon
)
e2
:
SetTarget
(
c101003058
.
sptg
)
e2
:
SetOperation
(
c101003058
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c101003058
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
2
)
end
Duel
.
DiscardDeck
(
tp
,
2
,
REASON_COST
)
end
function
c101003058
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanAddCounter
(
0x1
,
1
)
end
function
c101003058
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c101003058
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003058
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c101003058
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
0x1
)
end
function
c101003058
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsCanAddCounter
(
0x1
,
2
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
101003058
,
0
))
then
tc
:
AddCounter
(
0x1
,
2
)
else
tc
:
AddCounter
(
0x1
,
1
)
end
end
end
function
c101003058
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
rp
~=
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetPreviousControler
()
==
tp
end
function
c101003058
.
spfilter
(
c
,
e
,
tp
)
return
(
c
:
IsCode
(
14553285
,
45462639
,
22923081
,
8034697
,
43930492
,
83269557
,
6061630
,
10239627
,
84055227
,
21051146
,
55424270
,
73752131
,
88901771
,
46363422
,
65338781
,
70791313
,
73665146
,
2525268
,
71413901
,
5640330
,
62154416
)
or
(
c
.
spell_counter_permit
and
c
.
spell_counter_permit
>=
2
))
and
Duel
.
IsCanAddCounter
(
tp
,
0x1
,
1
,
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c101003058
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c101003058
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003058
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c101003058
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
tc
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
tc
:
IsCanAddCounter
(
0x1
,
2
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
101003058
,
0
))
then
tc
:
AddCounter
(
0x1
,
2
)
else
tc
:
AddCounter
(
0x1
,
1
)
end
end
end
expansions/script/c101003061.lua
0 → 100644
View file @
49d6f8ef
--ペンデュラム・パラドックス
--Pendulum Paradox
--Scripted by Eerie Code
function
c101003061
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
101003061
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c101003061
.
target
)
e1
:
SetOperation
(
c101003061
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c101003061
.
filter1
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
and
Duel
.
IsExistingMatchingCard
(
c101003061
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
c
,
c
:
GetLeftScale
(),
c
:
GetCode
())
end
function
c101003061
.
filter2
(
c
,
sc
,
cd
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
and
c
:
GetLeftScale
()
==
sc
and
not
c
:
IsCode
(
cd
)
end
function
c101003061
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101003061
.
filter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
2
,
tp
,
LOCATION_EXTRA
)
end
function
c101003061
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tc1
=
Duel
.
SelectMatchingCard
(
tp
,
c101003061
.
filter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
not
tc1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tc2
=
Duel
.
SelectMatchingCard
(
tp
,
c101003061
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
tc1
,
tc1
:
GetLeftScale
(),
tc1
:
GetCode
()):
GetFirst
()
Duel
.
SendtoHand
(
Group
.
FromCards
(
tc1
,
tc2
),
nil
,
REASON_EFFECT
)
end
expansions/script/c101003066.lua
0 → 100644
View file @
49d6f8ef
--パラレルポート・アーマー
--Parallel Port Armor
--Scripted by Larry126
function
c101003066
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c101003066
.
target
)
e1
:
SetOperation
(
c101003066
.
activate
)
c
:
RegisterEffect
(
e1
)
--extra attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
101003066
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCondition
(
c101003066
.
atcon
)
e2
:
SetCost
(
c101003066
.
atkcost
)
e2
:
SetTarget
(
c101003066
.
atktg
)
e2
:
SetOperation
(
c101003066
.
atkop
)
c
:
RegisterEffect
(
e2
)
end
function
c101003066
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_LINK
)
end
function
c101003066
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c101003066
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003066
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c101003066
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c101003066
.
eqlimit
(
e
,
c
)
return
c
:
GetControler
()
==
e
:
GetHandlerPlayer
()
and
c
:
IsType
(
TYPE_LINK
)
end
function
c101003066
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsLocation
(
LOCATION_SZONE
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
Equip
(
tp
,
c
,
tc
)
c
:
CancelToGrave
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
1
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetValue
(
aux
.
tgoval
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
c101003066
.
eqlimit
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e3
)
end
end
function
c101003066
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsAbleToEnterBP
()
or
(
Duel
.
GetCurrentPhase
()
>=
PHASE_BATTLE_START
and
Duel
.
GetCurrentPhase
()
<=
PHASE_BATTLE
)
end
function
c101003066
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_LINK
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c101003066
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
c101003066
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003066
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
)
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c101003066
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_LINK
)
and
not
c
:
IsHasEffect
(
EFFECT_EXTRA_ATTACK
)
end
function
c101003066
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c101003066
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003066
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c101003066
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c101003066
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
end
expansions/script/c101003073.lua
0 → 100644
View file @
49d6f8ef
--魔導変換
--Magical Burst
--Scripted by Eerie Code
function
c101003073
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--add counter
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetOperation
(
c101003073
.
acop
)
c
:
RegisterEffect
(
e3
)
--search
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCountLimit
(
1
,
101003073
)
e4
:
SetCondition
(
c101003073
.
thcon
)
e4
:
SetCost
(
c101003073
.
thcost
)
e4
:
SetTarget
(
c101003073
.
thtg
)
e4
:
SetOperation
(
c101003073
.
thop
)
c
:
RegisterEffect
(
e4
)
end
c101003073
.
spell_counter_permit
=
99
function
c101003073
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_PLAYER
)
local
c
=
e
:
GetHandler
()
if
re
:
IsActiveType
(
TYPE_MONSTER
)
and
p
~=
tp
and
c
:
GetFlagEffect
(
1
)
>
0
then
c
:
AddCounter
(
0x1
,
1
)
end
end
function
c101003073
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetCounter
(
0x1
)
>=
6
end
function
c101003073
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c101003073
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
end
function
c101003073
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101003073
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003073
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003073
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c12171659.lua
0 → 100644
View file @
49d6f8ef
--天空の使者 ゼラディアス
function
c12171659
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12171659
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
c12171659
.
cost
)
e1
:
SetTarget
(
c12171659
.
target
)
e1
:
SetOperation
(
c12171659
.
operation
)
c
:
RegisterEffect
(
e1
)
--self destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_SELF_DESTROY
)
e2
:
SetCondition
(
c12171659
.
descon
)
c
:
RegisterEffect
(
e2
)
end
function
c12171659
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
c12171659
.
filter
(
c
)
return
c
:
IsCode
(
56433456
)
and
c
:
IsAbleToHand
()
end
function
c12171659
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12171659
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12171659
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tg
=
Duel
.
GetFirstMatchingCard
(
c12171659
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
tg
then
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
function
c12171659
.
descon
(
e
)
return
not
(
Duel
.
IsExistingMatchingCard
(
c12171659
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
end
function
c12171659
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
expansions/script/c12510878.lua
0 → 100644
View file @
49d6f8ef
--天空勇士ネオパーシアス
function
c12510878
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c12510878
.
spcon
)
e1
:
SetOperation
(
c12510878
.
spop
)
c
:
RegisterEffect
(
e1
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12510878
,
0
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2
:
SetCondition
(
c12510878
.
condition
)
e2
:
SetTarget
(
c12510878
.
target
)
e2
:
SetOperation
(
c12510878
.
operation
)
c
:
RegisterEffect
(
e2
)
--pierce
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_PIERCE
)
c
:
RegisterEffect
(
e3
)
--update atk,def
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetValue
(
c12510878
.
val
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e5
)
end
function
c12510878
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c12510878
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
CheckReleaseGroup
(
c
:
GetControler
(),
Card
.
IsCode
,
1
,
nil
,
18036057
)
end
function
c12510878
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
SelectReleaseGroup
(
c
:
GetControler
(),
Card
.
IsCode
,
1
,
1
,
nil
,
18036057
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c12510878
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
end
function
c12510878
.
target
(
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
c12510878
.
operation
(
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
function
c12510878
.
val
(
e
,
c
)
if
not
(
Duel
.
IsExistingMatchingCard
(
c12510878
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
return
0
end
local
v
=
Duel
.
GetLP
(
c
:
GetControler
())
-
Duel
.
GetLP
(
1
-
c
:
GetControler
())
if
v
>
0
then
return
v
else
return
0
end
end
expansions/script/c16849715.lua
0 → 100644
View file @
49d6f8ef
--雷の天気模様
--Thunder Weathery Pattern
--Scripted by Eerie Code
--Prototype, might require a core update for full functionality
function
c16849715
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
16849715
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--adjust
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_ADJUST
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetOperation
(
c16849715
.
effop
)
c
:
RegisterEffect
(
e2
)
end
function
c16849715
.
efffilter
(
c
,
g
,
ignore_flag
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsSetCard
(
0x109
)
and
c
:
GetSequence
()
<
5
and
g
:
IsContains
(
c
)
and
(
ignore_flag
or
c
:
GetFlagEffect
(
16849715
)
==
0
)
end
function
c16849715
.
effop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
cg
=
c
:
GetColumnGroup
(
1
,
1
)
local
g
=
Duel
.
GetMatchingGroup
(
c16849715
.
efffilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
cg
)
if
c
:
IsDisabled
()
then
return
end
for
tc
in
aux
.
Next
(
g
)
do
tc
:
RegisterFlagEffect
(
16849715
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
16849715
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_START
)
e1
:
SetLabelObject
(
c
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
c16849715
.
thtg
)
e1
:
SetOperation
(
c16849715
.
thop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c16849715
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c16849715
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
gc
=
e
:
GetLabelObject
()
if
chk
==
0
then
return
gc
and
gc
:
IsFaceup
()
and
gc
:
IsLocation
(
LOCATION_SZONE
)
and
not
gc
:
IsDisabled
()
and
c16849715
.
efffilter
(
c
,
gc
:
GetColumnGroup
(
1
,
1
),
true
)
and
(
Duel
.
GetAttackTarget
()
==
c
or
(
Duel
.
GetAttacker
()
==
c
and
Duel
.
GetAttackTarget
()
~=
nil
))
end
local
tc
=
Duel
.
GetAttacker
()
if
tc
==
c
then
tc
=
Duel
.
GetAttackTarget
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
tc
,
1
,
0
,
0
)
end
function
c16849715
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetAttacker
()
if
tc
==
c
then
tc
=
Duel
.
GetAttackTarget
()
end
if
tc
and
tc
:
IsRelateToBattle
()
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
expansions/script/c18378582.lua
0 → 100644
View file @
49d6f8ef
--大天使ゼラート
function
c18378582
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCondition
(
c18378582
.
spcon
)
e2
:
SetOperation
(
c18378582
.
spop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
18378582
,
0
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c18378582
.
descost
)
e3
:
SetTarget
(
c18378582
.
destg
)
e3
:
SetOperation
(
c18378582
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c18378582
.
rfilter
(
c
,
code
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
code
)
end
function
c18378582
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c18378582
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
Duel
.
IsExistingMatchingCard
(
c18378582
.
envfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
)
end
return
Duel
.
CheckReleaseGroup
(
c
:
GetControler
(),
c18378582
.
rfilter
,
1
,
nil
,
66073051
)
end
function
c18378582
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c18378582
.
rfilter
,
1
,
1
,
nil
,
66073051
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c18378582
.
cfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsDiscardable
()
and
c
:
IsAbleToGraveAsCost
()
end
function
c18378582
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c18378582
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c18378582
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c18378582
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c18378582
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsExistingMatchingCard
(
c18378582
.
envfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
)
then
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
expansions/script/c20745268.lua
0 → 100644
View file @
49d6f8ef
--魔弾-デスペラード
--Magibullet - Death-perado
--Scripted by Eerie Code
function
c20745268
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
20745268
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c20745268
.
condition
)
e1
:
SetTarget
(
c20745268
.
target
)
e1
:
SetOperation
(
c20745268
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c20745268
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x108
)
end
function
c20745268
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c20745268
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c20745268
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsFaceup
()
and
chkc
~=
c
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c20745268
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
expansions/script/c27561302.lua
0 → 100644
View file @
49d6f8ef
--雨の天気模様
--Rain Weathery Pattern
--Scripted by Eerie Code
--Prototype, might require a core update for full functionality
function
c27561302
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
27561302
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--adjust
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_ADJUST
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetOperation
(
c27561302
.
effop
)
c
:
RegisterEffect
(
e2
)
end
function
c27561302
.
efffilter
(
c
,
g
,
ignore_flag
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsSetCard
(
0x109
)
and
c
:
GetSequence
()
<
5
and
g
:
IsContains
(
c
)
and
(
ignore_flag
or
c
:
GetFlagEffect
(
27561302
)
==
0
)
end
function
c27561302
.
effop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
cg
=
c
:
GetColumnGroup
(
1
,
1
)
local
g
=
Duel
.
GetMatchingGroup
(
c27561302
.
efffilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
cg
)
if
c
:
IsDisabled
()
then
return
end
for
tc
in
aux
.
Next
(
g
)
do
tc
:
RegisterFlagEffect
(
27561302
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
27561302
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetLabelObject
(
c
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
c27561302
.
thtg
)
e1
:
SetOperation
(
c27561302
.
thop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c27561302
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c27561302
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
c27561302
.
thfilter
(
chkc
)
end
local
gc
=
e
:
GetLabelObject
()
if
chk
==
0
then
return
gc
and
gc
:
IsFaceup
()
and
gc
:
IsLocation
(
LOCATION_SZONE
)
and
not
gc
:
IsDisabled
()
and
c27561302
.
efffilter
(
e
:
GetHandler
(),
gc
:
GetColumnGroup
(
1
,
1
),
true
)
and
Duel
.
IsExistingTarget
(
c27561302
.
thfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c27561302
.
thfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c27561302
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
expansions/script/c27784944.lua
0 → 100644
View file @
49d6f8ef
--極天気ランブラ
--Polar Weathery Lampla
--Scripted by Eerie Code
function
c27784944
.
initial_effect
(
c
)
--place
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
27784944
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetTarget
(
c27784944
.
tftg
)
e1
:
SetOperation
(
c27784944
.
tfop
)
c
:
RegisterEffect
(
e1
)
--Untargetable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e2
:
SetTarget
(
c27784944
.
immtg
)
e2
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e2
)
--Indes
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e3
:
SetValue
(
c27784944
.
tgvalue
)
c
:
RegisterEffect
(
e3
)
--spsummon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetCode
(
EVENT_REMOVE
)
e4
:
SetOperation
(
c27784944
.
spreg
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
27784944
,
1
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetRange
(
LOCATION_REMOVED
)
e5
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e5
:
SetCondition
(
c27784944
.
spcon
)
e5
:
SetTarget
(
c27784944
.
sptg
)
e5
:
SetOperation
(
c27784944
.
spop
)
e5
:
SetLabelObject
(
e4
)
c
:
RegisterEffect
(
e5
)
end
function
c27784944
.
tffilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSetCard
(
0x109
)
and
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
tp
)
end
function
c27784944
.
tftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c27784944
.
tffilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
end
function
c27784944
.
tfop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c27784944
.
tffilter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
function
c27784944
.
immtg
(
e
,
c
)
return
c
:
IsSetCard
(
0x109
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c27784944
.
tgvalue
(
e
,
re
,
rp
)
return
rp
~=
e
:
GetHandlerPlayer
()
end
function
c27784944
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
and
rc
:
IsSetCard
(
0x109
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
()
+
1
)
c
:
RegisterFlagEffect
(
27784944
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c27784944
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
27784944
)
>
0
end
function
c27784944
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
27784944
)
end
function
c27784944
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c28573958.lua
0 → 100644
View file @
49d6f8ef
--奇跡の代行者 ジュピター
function
c28573958
.
initial_effect
(
c
)
--atkup
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
28573958
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c28573958
.
atcost
)
e1
:
SetTarget
(
c28573958
.
attg
)
e1
:
SetOperation
(
c28573958
.
atop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
28573958
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c28573958
.
spcon
)
e2
:
SetCost
(
c28573958
.
spcost
)
e2
:
SetTarget
(
c28573958
.
sptg
)
e2
:
SetOperation
(
c28573958
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c28573958
.
cfilter1
(
c
)
return
c
:
IsSetCard
(
0x44
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c28573958
.
atcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c28573958
.
cfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c28573958
.
cfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c28573958
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsRace
(
RACE_FAIRY
)
end
function
c28573958
.
attg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c28573958
.
filter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c28573958
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c28573958
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c28573958
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
800
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c28573958
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c28573958
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c28573958
.
envfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
)
end
function
c28573958
.
cfilter2
(
c
)
return
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsDiscardable
()
end
function
c28573958
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c28573958
.
cfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c28573958
.
cfilter2
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c28573958
.
filter2
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c28573958
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c28573958
.
filter2
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c28573958
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c28573958
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c28573958
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
(
Duel
.
IsExistingMatchingCard
(
c28573958
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c28806532.lua
0 → 100644
View file @
49d6f8ef
--曇天気スレット
--Cloudy Weathery Sleet
--Scripted by Eerie Code
function
c28806532
.
initial_effect
(
c
)
--place
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
28806532
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
28806532
)
e1
:
SetCondition
(
c28806532
.
tfcon
)
e1
:
SetTarget
(
c28806532
.
tftg
)
e1
:
SetOperation
(
c28806532
.
tfop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetOperation
(
c28806532
.
spreg
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
28806532
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetRange
(
LOCATION_REMOVED
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e3
:
SetCondition
(
c28806532
.
spcon
)
e3
:
SetTarget
(
c28806532
.
sptg
)
e3
:
SetOperation
(
c28806532
.
spop
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
end
function
c28806532
.
tfcfilter
(
c
,
tp
)
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsPreviousSetCard
(
0x109
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c28806532
.
tfcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c28806532
.
tfcfilter
,
1
,
e
:
GetHandler
(),
tp
)
end
function
c28806532
.
tffilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSetCard
(
0x109
)
and
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
tp
)
end
function
c28806532
.
tftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c28806532
.
tffilter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c28806532
.
tffilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
end
local
ct
=
math.min
(
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
),
2
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c28806532
.
tffilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
ct
,
nil
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c28806532
.
tfop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
<=
0
then
return
end
local
ct
=
math.min
(
2
,
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
))
if
ct
<
1
then
return
end
if
g
:
GetCount
()
>
ct
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
g
=
g
:
Select
(
tp
,
1
,
ct
,
nil
)
end
for
tc
in
aux
.
Next
(
g
)
do
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
function
c28806532
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
and
rc
:
IsSetCard
(
0x109
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
()
+
1
)
c
:
RegisterFlagEffect
(
28806532
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c28806532
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
28806532
)
>
0
end
function
c28806532
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
28806532
)
end
function
c28806532
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c29628180.lua
0 → 100644
View file @
49d6f8ef
--魔弾-デッドマンズ・バースト
--Magibullet - Deadman's Burst
--Scripted by Eerie Code
function
c29628180
.
initial_effect
(
c
)
--negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCountLimit
(
1
,
29628180
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c29628180
.
condition
)
e1
:
SetTarget
(
c29628180
.
target
)
e1
:
SetOperation
(
c29628180
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c29628180
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x108
)
end
function
c29628180
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
~=
tp
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
and
Duel
.
IsExistingMatchingCard
(
c29628180
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c29628180
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c29628180
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
expansions/script/c30907810.lua
0 → 100644
View file @
49d6f8ef
--魔弾の悪魔 ザミエル
--Magibullet Fiend Zamiel
--Scripted by Eerie Code
function
c30907810
.
initial_effect
(
c
)
--normal summon with 1 tribute
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
30907810
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SUMMON_PROC
)
e1
:
SetCondition
(
c30907810
.
otcon
)
e1
:
SetOperation
(
c30907810
.
otop
)
e1
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e2
)
--activate from hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x108
))
e3
:
SetTargetRange
(
LOCATION_HAND
,
0
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
c
:
RegisterEffect
(
e4
)
--draw
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_DRAW
)
e5
:
SetDescription
(
aux
.
Stringid
(
30907810
,
1
))
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e5
:
SetCountLimit
(
1
,
30907810
)
e5
:
SetCondition
(
c30907810
.
drcon
)
e5
:
SetTarget
(
c30907810
.
drtg
)
e5
:
SetOperation
(
c30907810
.
drop
)
c
:
RegisterEffect
(
e5
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_CHAINING
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetLabelObject
(
e5
)
e6
:
SetOperation
(
c30907810
.
regop
)
c
:
RegisterEffect
(
e6
)
local
e7
=
e6
:
Clone
()
e7
:
SetCode
(
EVENT_CHAIN_NEGATED
)
e7
:
SetOperation
(
c30907810
.
regop2
)
c
:
RegisterEffect
(
e7
)
local
e8
=
e6
:
Clone
()
e8
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
e8
:
SetOperation
(
c30907810
.
clearop
)
c
:
RegisterEffect
(
e8
)
end
function
c30907810
.
otfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x108
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
end
function
c30907810
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
c30907810
.
otfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
tp
)
return
c
:
GetLevel
()
>
6
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
end
function
c30907810
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c30907810
.
otfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
tp
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
1
,
1
,
mg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
c30907810
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
GetHandler
():
IsSetCard
(
0x108
)
and
rp
==
tp
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
local
val
=
e
:
GetLabelObject
():
GetLabel
()
e
:
GetLabelObject
():
SetLabel
(
val
+
1
)
end
end
function
c30907810
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
GetHandler
():
IsSetCard
(
0x108
)
and
rp
==
tp
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
local
val
=
e
:
GetLabelObject
():
GetLabel
()
if
val
==
0
then
val
=
1
end
e
:
GetLabelObject
():
SetLabel
(
val
-
1
)
end
end
function
c30907810
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetLabelObject
():
SetLabel
(
0
)
end
function
c30907810
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
end
function
c30907810
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
d
=
e
:
GetLabel
()
if
chk
==
0
then
return
d
>
0
and
Duel
.
IsPlayerCanDraw
(
tp
,
d
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
d
)
end
function
c30907810
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
d
=
e
:
GetLabel
()
if
d
>
0
then
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
end
expansions/script/c31629407.lua
0 → 100644
View file @
49d6f8ef
--魔弾の射手 スター
--Magibullet Shooter Star
--Scripted by Eerie Code
function
c31629407
.
initial_effect
(
c
)
--activate from hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x108
))
e1
:
SetTargetRange
(
LOCATION_HAND
,
0
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
c
:
RegisterEffect
(
e2
)
--search
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
31629407
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
31629407
)
e3
:
SetCondition
(
c31629407
.
spcon
)
e3
:
SetTarget
(
c31629407
.
sptg
)
e3
:
SetOperation
(
c31629407
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c31629407
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
c
:
GetFlagEffect
(
1
)
<=
0
then
return
false
end
return
c
:
GetColumnGroup
():
IsContains
(
re
:
GetHandler
())
end
function
c31629407
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsSetCard
(
0x108
)
and
not
c
:
IsCode
(
31629407
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c31629407
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c31629407
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c31629407
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c31629407
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
tg
then
Duel
.
SpecialSummon
(
tg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
expansions/script/c32841045.lua
0 → 100644
View file @
49d6f8ef
--魔弾の射手 カスパール
--Magibullet Shooter Caspar
--Scripted by Eerie Code
function
c32841045
.
initial_effect
(
c
)
--activate from hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x108
))
e1
:
SetTargetRange
(
LOCATION_HAND
,
0
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
c
:
RegisterEffect
(
e2
)
--search
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
32841045
,
0
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
32841045
)
e3
:
SetCondition
(
c32841045
.
thcon
)
e3
:
SetTarget
(
c32841045
.
thtg
)
e3
:
SetOperation
(
c32841045
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c32841045
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
c
:
GetFlagEffect
(
1
)
<=
0
then
return
false
end
return
c
:
GetColumnGroup
():
IsContains
(
re
:
GetHandler
())
end
function
c32841045
.
thfilter
(
c
,
rc
)
return
c
:
IsSetCard
(
0x108
)
and
not
c
:
IsCode
(
rc
:
GetCode
())
and
c
:
IsAbleToHand
()
end
function
c32841045
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
rc
=
re
:
GetHandler
()
if
chk
==
0
then
return
rc
and
Duel
.
IsExistingMatchingCard
(
c32841045
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
rc
)
end
e
:
SetLabelObject
(
rc
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c32841045
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c32841045
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
:
GetLabelObject
())
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c33964637.lua
0 → 100644
View file @
49d6f8ef
--影六武衆-リハン
--Shadow Six Samurai – Rihan
--Scripted by Eerie Code
--Fusion procedure by edo9300
function
c33964637
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
c33964637
.
ffilter
,
3
,
true
)
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetValue
(
c33964637
.
splimit
)
c
:
RegisterEffect
(
e1
)
--special summon rule
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetCondition
(
c33964637
.
sprcon
)
e2
:
SetOperation
(
c33964637
.
sprop
)
c
:
RegisterEffect
(
e2
)
--fusion limit
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
--remove
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
33964637
,
0
))
e4
:
SetCategory
(
CATEGORY_REMOVE
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCost
(
c33964637
.
rmcost
)
e4
:
SetTarget
(
c33964637
.
rmtg
)
e4
:
SetOperation
(
c33964637
.
rmop
)
c
:
RegisterEffect
(
e4
)
--destroy replace
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e5
:
SetRange
(
LOCATION_GRAVE
)
e5
:
SetTarget
(
c33964637
.
reptg
)
e5
:
SetValue
(
c33964637
.
repval
)
e5
:
SetOperation
(
c33964637
.
repop
)
c
:
RegisterEffect
(
e5
)
end
function
c33964637
.
splimit
(
e
,
se
,
sp
,
st
)
return
not
e
:
GetHandler
():
IsLocation
(
LOCATION_EXTRA
)
end
function
c33964637
.
ffilter
(
c
,
fc
,
sub
,
mg
,
sg
)
return
c
:
IsFusionSetCard
(
0x3d
)
and
(
not
sg
or
not
sg
:
IsExists
(
Card
.
IsFusionAttribute
,
1
,
c
,
c
:
GetFusionAttribute
()))
end
function
c33964637
.
sprcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
IsExistingMatchingCard
(
c33964637
.
sprfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
,
c
)
end
function
c33964637
.
sprfilter1
(
c
,
tp
,
fc
)
return
c
:
IsFusionSetCard
(
0x3d
)
and
c
:
IsAbleToGraveAsCost
()
and
c
:
IsCanBeFusionMaterial
(
fc
)
and
Duel
.
IsExistingMatchingCard
(
c33964637
.
sprfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
tp
,
fc
,
c
)
end
function
c33964637
.
sprfilter2
(
c
,
tp
,
fc
,
mc
)
return
c
:
IsFusionSetCard
(
0x3d
)
and
c
:
IsAbleToGraveAsCost
()
and
c
:
IsCanBeFusionMaterial
(
fc
)
and
not
c
:
IsFusionAttribute
(
mc
:
GetFusionAttribute
())
and
Duel
.
IsExistingMatchingCard
(
c33964637
.
sprfilter3
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
tp
,
fc
,
mc
,
c
)
end
function
c33964637
.
sprfilter3
(
c
,
tp
,
fc
,
mc1
,
mc2
)
local
g
=
Group
.
FromCards
(
c
,
mc1
,
mc2
)
return
c
:
IsFusionSetCard
(
0x3d
)
and
c
:
IsAbleToGraveAsCost
()
and
c
:
IsCanBeFusionMaterial
(
fc
)
and
not
c
:
IsFusionAttribute
(
mc1
:
GetFusionAttribute
())
and
not
c
:
IsFusionAttribute
(
mc2
:
GetFusionAttribute
())
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
)
>
0
end
function
c33964637
.
sprop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c33964637
.
sprfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c33964637
.
sprfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
g1
:
GetFirst
(),
tp
,
c
,
g1
:
GetFirst
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g3
=
Duel
.
SelectMatchingCard
(
tp
,
c33964637
.
sprfilter3
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
g1
:
GetFirst
(),
tp
,
c
,
g1
:
GetFirst
(),
g2
:
GetFirst
())
g1
:
Merge
(
g2
)
g1
:
Merge
(
g3
)
Duel
.
SendtoGrave
(
g1
,
REASON_COST
)
end
function
c33964637
.
costfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x3d
)
and
c
:
IsAbleToRemoveAsCost
()
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
and
Duel
.
IsExistingTarget
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
c
)
end
function
c33964637
.
rmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33964637
.
costfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33964637
.
costfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c33964637
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsAbleToRemove
()
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
c33964637
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
c33964637
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3d
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
end
function
c33964637
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
c33964637
.
repfilter
,
1
,
nil
,
tp
)
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
function
c33964637
.
repval
(
e
,
c
)
return
c33964637
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
c33964637
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
end
expansions/script/c44595286.lua
0 → 100644
View file @
49d6f8ef
--裁きの光
function
c44595286
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetHintTiming
(
0
,
TIMING_TOHAND
+
0x1e0
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c44595286
.
condition
)
e1
:
SetCost
(
c44595286
.
cost
)
e1
:
SetTarget
(
c44595286
.
target
)
e1
:
SetOperation
(
c44595286
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c44595286
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c44595286
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c44595286
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
)
end
function
c44595286
.
cfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsDiscardable
()
and
c
:
IsAbleToGraveAsCost
()
end
function
c44595286
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c44595286
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c44595286
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c44595286
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
)
>
0
end
end
function
c44595286
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_ONFIELD
)
local
g2
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
)
local
opt
=
0
if
g1
:
GetCount
()
>
0
and
g2
:
GetCount
()
>
0
then
opt
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
44595286
,
0
),
aux
.
Stringid
(
44595286
,
1
))
+
1
elseif
g1
:
GetCount
()
>
0
then
opt
=
1
elseif
g2
:
GetCount
()
>
0
then
opt
=
2
end
if
opt
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
elseif
opt
==
2
then
Duel
.
ConfirmCards
(
tp
,
g2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
Duel
.
ShuffleHand
(
1
-
tp
)
end
end
expansions/script/c44686185.lua
0 → 100644
View file @
49d6f8ef
--影六武衆-ハツメ
--Shadow Six Samurai – Hatsume
--Scripted by Eerie Code
function
c44686185
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
44686185
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
,
44686185
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c44686185
.
cost
)
e1
:
SetTarget
(
c44686185
.
target
)
e1
:
SetOperation
(
c44686185
.
operation
)
c
:
RegisterEffect
(
e1
)
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetTarget
(
c44686185
.
reptg
)
e2
:
SetValue
(
c44686185
.
repval
)
e2
:
SetOperation
(
c44686185
.
repop
)
c
:
RegisterEffect
(
e2
)
end
function
c44686185
.
filter0
(
c
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
end
function
c44686185
.
filter1
(
c
)
return
c
:
IsSetCard
(
0x3d
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
end
function
c44686185
.
filter3
(
c
,
e
,
tp
)
return
c44686185
.
filter1
(
c
)
and
Duel
.
IsExistingMatchingCard
(
c44686185
.
filter4
,
tp
,
LOCATION_GRAVE
+
LOCATION_ONFIELD
,
0
,
1
,
c
,
e
,
tp
,
c
)
end
function
c44686185
.
filter4
(
c
,
e
,
tp
,
rc
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
g
=
Group
.
FromCards
(
c
,
rc
)
local
ct
=
g
:
FilterCount
(
c44686185
.
filter0
,
nil
)
return
c44686185
.
filter1
(
c
)
and
ft
+
ct
>
0
and
Duel
.
IsExistingTarget
(
c44686185
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
g
,
e
,
tp
)
end
function
c44686185
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c44686185
.
filter3
,
tp
,
LOCATION_GRAVE
+
LOCATION_ONFIELD
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c44686185
.
filter3
,
tp
,
LOCATION_GRAVE
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c44686185
.
filter4
,
tp
,
LOCATION_GRAVE
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
g1
:
GetFirst
(),
e
,
tp
,
g1
:
GetFirst
())
g1
:
Merge
(
g2
)
Duel
.
Remove
(
g1
,
POS_FACEUP
,
REASON_COST
)
end
function
c44686185
.
filter2
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3d
)
and
not
c
:
IsCode
(
44686185
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c44686185
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c44686185
.
filter2
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c44686185
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c44686185
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c44686185
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3d
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
c44686185
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
c44686185
.
repfilter
,
1
,
nil
,
tp
)
and
eg
:
GetCount
()
==
1
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
function
c44686185
.
repval
(
e
,
c
)
return
c44686185
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
c44686185
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
end
expansions/script/c48783998.lua
0 → 100644
View file @
49d6f8ef
--コーリング・ノヴァ
function
c48783998
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
48783998
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e1
:
SetCondition
(
c48783998
.
condition
)
e1
:
SetTarget
(
c48783998
.
target
)
e1
:
SetOperation
(
c48783998
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c48783998
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
and
e
:
GetHandler
():
IsReason
(
REASON_BATTLE
)
end
function
c48783998
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsAttackBelow
(
1500
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c48783998
.
filter2
(
c
,
e
,
tp
)
return
(
c
:
IsCode
(
18036057
)
or
(
c
:
IsAttackBelow
(
1500
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsRace
(
RACE_FAIRY
)))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c48783998
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c48783998
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
false
end
if
not
(
Duel
.
IsExistingMatchingCard
(
c48783998
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
return
Duel
.
IsExistingMatchingCard
(
c48783998
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
else
return
Duel
.
IsExistingMatchingCard
(
c48783998
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c48783998
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
not
(
Duel
.
IsExistingMatchingCard
(
c91188343
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
g
=
Duel
.
SelectMatchingCard
(
tp
,
c48783998
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
else
g
=
Duel
.
SelectMatchingCard
(
tp
,
c48783998
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
end
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c49905576.lua
0 → 100644
View file @
49d6f8ef
--天空聖者メルティウス
function
c49905576
.
initial_effect
(
c
)
--recover&destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetOperation
(
c49905576
.
drop
)
c
:
RegisterEffect
(
e1
)
end
function
c49905576
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c49905576
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
re
:
GetHandler
():
IsType
(
TYPE_COUNTER
)
or
not
c
:
IsLocation
(
LOCATION_MZONE
)
or
not
c
:
IsFaceup
()
then
return
end
Duel
.
Recover
(
tp
,
1000
,
REASON_EFFECT
)
if
not
(
Duel
.
IsExistingMatchingCard
(
c49905576
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
expansions/script/c5230799.lua
0 → 100644
View file @
49d6f8ef
--魔弾の射手 ザ・キッド
--Magibullet Shooter The Kid
--Scripted by Eerie Code
function
c5230799
.
initial_effect
(
c
)
--activate from hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x108
))
e1
:
SetTargetRange
(
LOCATION_HAND
,
0
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
c
:
RegisterEffect
(
e2
)
--search
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
5230799
,
0
))
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
5230799
)
e3
:
SetCondition
(
c5230799
.
drcon
)
e3
:
SetCost
(
c5230799
.
drcost
)
e3
:
SetTarget
(
c5230799
.
drtg
)
e3
:
SetOperation
(
c5230799
.
drop
)
c
:
RegisterEffect
(
e3
)
end
function
c5230799
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
c
:
GetFlagEffect
(
1
)
<=
0
then
return
false
end
return
c
:
GetColumnGroup
():
IsContains
(
re
:
GetHandler
())
end
function
c5230799
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x108
)
and
c
:
IsDiscardable
()
end
function
c5230799
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c5230799
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c5230799
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c5230799
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
end
function
c5230799
.
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/c52834429.lua
0 → 100644
View file @
49d6f8ef
--オーロラの天気模様
--Aurora Weathery Pattern
--Scripted by Eerie Code
--Prototype, might require a core update for full functionality
function
c52834429
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
52834429
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--adjust
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_ADJUST
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetOperation
(
c52834429
.
effop
)
c
:
RegisterEffect
(
e2
)
end
function
c52834429
.
efffilter
(
c
,
g
,
ignore_flag
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsSetCard
(
0x109
)
and
c
:
GetSequence
()
<
5
and
g
:
IsContains
(
c
)
and
(
ignore_flag
or
c
:
GetFlagEffect
(
52834429
)
==
0
)
end
function
c52834429
.
effop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
cg
=
c
:
GetColumnGroup
(
1
,
1
)
local
g
=
Duel
.
GetMatchingGroup
(
c52834429
.
efffilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
cg
)
if
c
:
IsDisabled
()
then
return
end
for
tc
in
aux
.
Next
(
g
)
do
tc
:
RegisterFlagEffect
(
52834429
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
52834429
,
0
))
e1
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_TO_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetLabelObject
(
c
)
e1
:
SetCondition
(
c52834429
.
rmcon
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
c52834429
.
rmtg
)
e1
:
SetOperation
(
c52834429
.
rmop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c52834429
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetCount
()
==
1
end
function
c52834429
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
gc
=
e
:
GetLabelObject
()
local
ec
=
eg
:
GetFirst
()
if
chk
==
0
then
return
gc
and
gc
:
IsFaceup
()
and
gc
:
IsLocation
(
LOCATION_SZONE
)
and
not
gc
:
IsDisabled
()
and
c52834429
.
efffilter
(
c
,
gc
:
GetColumnGroup
(
1
,
1
),
true
)
and
ec
and
ec
:
IsAbleToRemove
()
and
Duel
.
IsPlayerCanDraw
(
ec
:
GetControler
(),
1
)
end
local
htp
=
ec
:
GetControler
()
Duel
.
SetTargetPlayer
(
htp
)
Duel
.
SetTargetParam
(
1
)
e
:
SetLabelObject
(
ec
)
ec
:
CreateEffectRelation
(
e
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
ec
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
htp
,
1
)
end
function
c52834429
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
if
not
tc
or
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
>
0
then
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
end
expansions/script/c53956001.lua
0 → 100644
View file @
49d6f8ef
--曇りの天気模様
--Cloudy Weathery Pattern
--Scripted by Eerie Code
--Prototype, might require a core update for full functionality
function
c53956001
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
53956001
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--adjust
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_ADJUST
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetOperation
(
c53956001
.
effop
)
c
:
RegisterEffect
(
e2
)
end
function
c53956001
.
efffilter
(
c
,
g
,
ignore_flag
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsSetCard
(
0x109
)
and
c
:
GetSequence
()
<
5
and
g
:
IsContains
(
c
)
and
(
ignore_flag
or
c
:
GetFlagEffect
(
53956001
)
==
0
)
end
function
c53956001
.
effop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
cg
=
c
:
GetColumnGroup
(
1
,
1
)
local
g
=
Duel
.
GetMatchingGroup
(
c53956001
.
efffilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
cg
)
if
c
:
IsDisabled
()
then
return
end
for
tc
in
aux
.
Next
(
g
)
do
tc
:
RegisterFlagEffect
(
53956001
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
53956001
,
0
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetLabelObject
(
c
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
c53956001
.
datg
)
e1
:
SetOperation
(
c53956001
.
daop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c53956001
.
datg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
and
chkc
~=
c
end
local
gc
=
e
:
GetLabelObject
()
if
chk
==
0
then
return
gc
and
gc
:
IsFaceup
()
and
gc
:
IsLocation
(
LOCATION_SZONE
)
and
not
gc
:
IsDisabled
()
and
c53956001
.
efffilter
(
c
,
gc
:
GetColumnGroup
(
1
,
1
),
true
)
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ATKCHANGE
,
g
,
1
,
0
,
0
)
end
function
c53956001
.
daop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
atk
=
math.floor
(
tc
:
GetAttack
()
/
2
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e2
:
SetValue
(
atk
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
end
end
expansions/script/c54178659.lua
0 → 100644
View file @
49d6f8ef
--虹天気アルシエル
--Rainbow Weathery Arciel
--Scripted by Eerie Code
--Prototype, might require a core update for full functionality
function
c54178659
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x109
),
3
,
3
)
--disable special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
54178659
,
0
))
e1
:
SetCategory
(
CATEGORY_DISABLE_SUMMON
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_SPSUMMON
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c54178659
.
discon
)
e1
:
SetCost
(
c54178659
.
discost
)
e1
:
SetTarget
(
c54178659
.
distg
)
e1
:
SetOperation
(
c54178659
.
disop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetOperation
(
c54178659
.
spreg
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
54178659
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetRange
(
LOCATION_REMOVED
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e3
:
SetCondition
(
c54178659
.
spcon
)
e3
:
SetTarget
(
c54178659
.
sptg
)
e3
:
SetOperation
(
c54178659
.
spop
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
--adjust
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_ADJUST
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetOperation
(
c54178659
.
effop
)
c
:
RegisterEffect
(
e4
)
end
function
c54178659
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
ep
and
Duel
.
GetCurrentChain
()
==
0
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
c54178659
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c54178659
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
eg
:
GetCount
(),
0
,
0
)
end
function
c54178659
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
function
c54178659
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
and
rc
:
IsSetCard
(
0x109
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
()
+
1
)
c
:
RegisterFlagEffect
(
54178659
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c54178659
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
54178659
)
>
0
end
function
c54178659
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
54178659
)
end
function
c54178659
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c54178659
.
efffilter
(
c
,
lg
,
ignore_flag
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsSetCard
(
0x109
)
and
c
:
GetSequence
()
<
5
and
lg
and
lg
:
IsContains
(
c
)
and
(
ignore_flag
or
c
:
GetFlagEffect
(
54178659
)
==
0
)
end
function
c54178659
.
effop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
lg
=
c
:
GetLinkedGroup
()
local
g
=
Duel
.
GetMatchingGroup
(
c54178659
.
efffilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
lg
)
if
c
:
IsDisabled
()
then
return
end
for
tc
in
aux
.
Next
(
g
)
do
tc
:
RegisterFlagEffect
(
54178659
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
54178659
,
0
))
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetLabelObject
(
c
)
e1
:
SetCondition
(
c54178659
.
discon2
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
c54178659
.
distg2
)
e1
:
SetOperation
(
c54178659
.
disop2
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c54178659
.
discon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
local
gc
=
e
:
GetLabelObject
()
return
Duel
.
IsChainNegatable
(
ev
)
and
gc
and
gc
:
IsFaceup
()
and
gc
:
IsLocation
(
LOCATION_MZONE
)
and
c54178659
.
efffilter
(
c
,
gc
:
GetLinkedGroup
(),
true
)
end
function
c54178659
.
distg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c54178659
.
disop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
expansions/script/c54895237.lua
0 → 100644
View file @
49d6f8ef
--晴天気ベンガーラ
--Sunny Weathery Bengala
--Scripted by Eerie Code
function
c54895237
.
initial_effect
(
c
)
--spsummon (grave)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
54895237
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
54895237
)
e1
:
SetCost
(
c54895237
.
gspcost
)
e1
:
SetTarget
(
c54895237
.
gsptg
)
e1
:
SetOperation
(
c54895237
.
gspop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetOperation
(
c54895237
.
spreg
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
54895237
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetRange
(
LOCATION_REMOVED
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e3
:
SetCondition
(
c54895237
.
spcon
)
e3
:
SetTarget
(
c54895237
.
sptg
)
e3
:
SetOperation
(
c54895237
.
spop
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
end
function
c54895237
.
gspcfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
c54895237
.
gspfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
c
,
tp
)
end
function
c54895237
.
gspfilter
(
c
,
cc
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSetCard
(
0x109
)
and
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
tp
,
LOCATION_ONFIELD
,
cc
)
end
function
c54895237
.
gspcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c54895237
.
gspcfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c54895237
.
gspcfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c54895237
.
gsptg
(
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
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>-
1
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c54895237
.
gspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c54895237
.
gspfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
nil
,
tp
):
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
end
function
c54895237
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
and
rc
:
IsSetCard
(
0x109
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
()
+
1
)
c
:
RegisterFlagEffect
(
54895237
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c54895237
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
54895237
)
>
0
end
function
c54895237
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
54895237
)
end
function
c54895237
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c55794644.lua
0 → 100644
View file @
49d6f8ef
--マスター・ヒュペリオン
function
c55794644
.
initial_effect
(
c
)
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c55794644
.
hspcon
)
e1
:
SetOperation
(
c55794644
.
hspop
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
55794644
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c55794644
.
condition
)
e2
:
SetCost
(
c55794644
.
cost
)
e2
:
SetTarget
(
c55794644
.
target
)
e2
:
SetOperation
(
c55794644
.
operation
)
c
:
RegisterEffect
(
e2
)
end
function
c55794644
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0x44
)
and
c
:
IsAbleToRemoveAsCost
()
and
(
not
c
:
IsLocation
(
LOCATION_MZONE
)
or
c
:
IsFaceup
())
end
function
c55794644
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=-
1
then
return
false
end
if
ft
<=
0
then
return
Duel
.
IsExistingMatchingCard
(
c55794644
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
else
return
Duel
.
IsExistingMatchingCard
(
c55794644
.
spfilter
,
tp
,
0x16
,
0
,
1
,
nil
)
end
end
function
c55794644
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c55794644
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
else
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c55794644
.
spfilter
,
tp
,
0x16
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c55794644
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c55794644
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
(
Duel
.
IsExistingMatchingCard
(
c55794644
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
return
e
:
GetHandler
():
GetFlagEffect
(
55794644
)
<
2
else
return
e
:
GetHandler
():
GetFlagEffect
(
55794644
)
<
1
end
end
function
c55794644
.
costfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c55794644
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c55794644
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c55794644
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c55794644
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
e
:
GetHandler
():
RegisterFlagEffect
(
55794644
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c55794644
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
expansions/script/c6357341.lua
0 → 100644
View file @
49d6f8ef
--忍の六武
--The Six Shinobi
--Scripted by Eerie Code
function
c6357341
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c6357341
.
condition
)
e1
:
SetTarget
(
c6357341
.
target
)
e1
:
SetOperation
(
c6357341
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c6357341
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3d
)
end
function
c6357341
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c6357341
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
g
:
GetClassCount
(
Card
.
GetAttribute
)
==
6
end
function
c6357341
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
Duel
.
IsPlayerAffectedByEffect
(
1
-
tp
,
EFFECT_SKIP_TURN
)
end
end
function
c6357341
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_SKIP_TURN
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
expansions/script/c65017789.lua
0 → 100644
View file @
49d6f8ef
--雪天気シエル
--Snow Weathery Ciel
--Scripted by Eerie Code
function
c65017789
.
initial_effect
(
c
)
--place
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
65017789
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
65017789
)
e1
:
SetTarget
(
c65017789
.
tftg
)
e1
:
SetOperation
(
c65017789
.
tfop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetOperation
(
c65017789
.
spreg
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
65017789
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetRange
(
LOCATION_REMOVED
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e3
:
SetCondition
(
c65017789
.
spcon
)
e3
:
SetTarget
(
c65017789
.
sptg
)
e3
:
SetOperation
(
c65017789
.
spop
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
end
function
c65017789
.
tffilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSetCard
(
0x109
)
and
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
tp
)
end
function
c65017789
.
tftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c65017789
.
tffilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
end
function
c65017789
.
tfop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c65017789
.
tffilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
function
c65017789
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
and
rc
:
IsSetCard
(
0x109
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
()
+
1
)
c
:
RegisterFlagEffect
(
65017789
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c65017789
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
65017789
)
>
0
end
function
c65017789
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
65017789
)
end
function
c65017789
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c6579928.lua
0 → 100644
View file @
49d6f8ef
--影六武衆-キザル
--Shadow Six Samurai – Kizaru
--Scripted by Eerie Code
function
c6579928
.
initial_effect
(
c
)
--draw
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
6579928
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetTarget
(
c6579928
.
thtg
)
e1
:
SetOperation
(
c6579928
.
thop
)
c
:
RegisterEffect
(
e1
)
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetTarget
(
c6579928
.
reptg
)
e2
:
SetValue
(
c6579928
.
repval
)
e2
:
SetOperation
(
c6579928
.
repop
)
c
:
RegisterEffect
(
e2
)
end
function
c6579928
.
filter
(
c
,
att
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
att
)
end
function
c6579928
.
thfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x3d
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
not
Duel
.
IsExistingMatchingCard
(
c6579928
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
c
:
GetAttribute
())
end
function
c6579928
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c6579928
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c6579928
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c6579928
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c6579928
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3d
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
c6579928
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
c6579928
.
repfilter
,
1
,
nil
,
tp
)
and
eg
:
GetCount
()
==
1
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
function
c6579928
.
repval
(
e
,
c
)
return
c6579928
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
c6579928
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
end
expansions/script/c66149377.lua
0 → 100644
View file @
49d6f8ef
--魔弾-ダンシング・ニードル
--Magibullet - Dancing Needle
--Scripted by Eerie Code
function
c66149377
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
66149377
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c66149377
.
condition
)
e1
:
SetTarget
(
c66149377
.
target
)
e1
:
SetOperation
(
c66149377
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c66149377
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x108
)
end
function
c66149377
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c66149377
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c66149377
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsAbleToRemove
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
3
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c66149377
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
end
expansions/script/c67901914.lua
0 → 100644
View file @
49d6f8ef
--魔弾-ネバー・エンドルフィン
--Magibullet - Never-Endorphin
--Scripted by Eerie Code
function
c67901914
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCountLimit
(
1
,
67901914
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
)
e1
:
SetCondition
(
c67901914
.
condition
)
e1
:
SetTarget
(
c67901914
.
target
)
e1
:
SetOperation
(
c67901914
.
activate
)
c
:
RegisterEffect
(
e1
)
if
not
c67901914
.
global_check
then
c67901914
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
ge1
:
SetOperation
(
c67901914
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c67901914
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
if
tc
:
GetFlagEffect
(
67901914
)
==
0
and
Duel
.
GetAttackTarget
()
==
nil
then
tc
:
RegisterFlagEffect
(
67901914
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c67901914
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
end
function
c67901914
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x108
)
and
c
:
GetFlagEffect
(
67901914
)
==
0
end
function
c67901914
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c67901914
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c67901914
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c67901914
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
g
:
GetFirst
():
RegisterEffect
(
e1
)
end
function
c67901914
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
tc
:
GetBaseAttack
()
*
2
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e2
:
SetValue
(
tc
:
GetBaseDefense
()
*
2
)
tc
:
RegisterEffect
(
e2
)
end
end
expansions/script/c68024506.lua
0 → 100644
View file @
49d6f8ef
--魔弾の射手 カラミティ
--Magibullet Shooter Calamity
--Scripted by Eerie Code
function
c68024506
.
initial_effect
(
c
)
--activate from hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x108
))
e1
:
SetTargetRange
(
LOCATION_HAND
,
0
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
c
:
RegisterEffect
(
e2
)
--search
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
68024506
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
68024506
)
e3
:
SetCondition
(
c68024506
.
spcon
)
e3
:
SetTarget
(
c68024506
.
sptg
)
e3
:
SetOperation
(
c68024506
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c68024506
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
c
:
GetFlagEffect
(
1
)
<=
0
then
return
false
end
return
c
:
GetColumnGroup
():
IsContains
(
re
:
GetHandler
())
end
function
c68024506
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x108
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c68024506
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c68024506
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c68024506
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c68024506
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c68024506
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
expansions/script/c68246154.lua
0 → 100644
View file @
49d6f8ef
--魔弾の射手 ドクトル
--Magibullet Shooter Doctor
--Scripted by Eerie Code
function
c68246154
.
initial_effect
(
c
)
--activate from hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x108
))
e1
:
SetTargetRange
(
LOCATION_HAND
,
0
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
c
:
RegisterEffect
(
e2
)
--to hand
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
68246154
,
0
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
68246154
)
e3
:
SetCondition
(
c68246154
.
thcon
)
e3
:
SetTarget
(
c68246154
.
thtg
)
e3
:
SetOperation
(
c68246154
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c68246154
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
c
:
GetFlagEffect
(
1
)
<=
0
then
return
false
end
return
c
:
GetColumnGroup
():
IsContains
(
re
:
GetHandler
())
end
function
c68246154
.
thfilter
(
c
,
rc
)
return
c
:
IsSetCard
(
0x108
)
and
not
c
:
IsCode
(
rc
:
GetCode
())
and
c
:
IsAbleToHand
()
end
function
c68246154
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
rc
=
re
:
GetHandler
()
if
chk
==
0
then
return
rc
and
Duel
.
IsExistingMatchingCard
(
c68246154
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
rc
)
end
e
:
SetLabelObject
(
rc
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c68246154
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c68246154
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
:
GetLabelObject
())
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c70180284.lua
0 → 100644
View file @
49d6f8ef
--影六武衆-ドウジ
--Shadow Six Samurai - Douji
--Scripted by Eerie Code
function
c70180284
.
initial_effect
(
c
)
--to grave
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
70180284
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c70180284
.
tgcon
)
e1
:
SetTarget
(
c70180284
.
tgtg
)
e1
:
SetOperation
(
c70180284
.
tgop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--destroy replace
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetTarget
(
c70180284
.
reptg
)
e3
:
SetValue
(
c70180284
.
repval
)
e3
:
SetOperation
(
c70180284
.
repop
)
c
:
RegisterEffect
(
e3
)
end
function
c70180284
.
tgcfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3d
)
and
c
:
IsControler
(
tp
)
end
function
c70180284
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
and
eg
:
IsExists
(
c70180284
.
tgcfilter
,
1
,
e
:
GetHandler
(),
tp
)
end
function
c70180284
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x3d
)
and
c
:
IsAbleToGrave
()
end
function
c70180284
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c70180284
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c70180284
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c70180284
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
c70180284
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3d
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
c70180284
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
c70180284
.
repfilter
,
1
,
nil
,
tp
)
and
eg
:
GetCount
()
==
1
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
function
c70180284
.
repval
(
e
,
c
)
return
c70180284
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
c70180284
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
end
expansions/script/c71207871.lua
0 → 100644
View file @
49d6f8ef
--影六武衆-フウマ
--Shadow Six Samurai - Fuhma
--Scripted by Eerie Code
function
c71207871
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
71207871
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_DESTROYED
)
e1
:
SetCondition
(
c71207871
.
spcon
)
e1
:
SetTarget
(
c71207871
.
sptg
)
e1
:
SetOperation
(
c71207871
.
spop
)
c
:
RegisterEffect
(
e1
)
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetTarget
(
c71207871
.
reptg
)
e2
:
SetValue
(
c71207871
.
repval
)
e2
:
SetOperation
(
c71207871
.
repop
)
c
:
RegisterEffect
(
e2
)
end
function
c71207871
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_EFFECT
+
REASON_BATTLE
)
~=
0
end
function
c71207871
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3d
)
and
not
c
:
IsCode
(
71207871
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c71207871
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c71207871
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c71207871
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c71207871
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
tg
then
Duel
.
SpecialSummon
(
tg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c71207871
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3d
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
c71207871
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
c71207871
.
repfilter
,
1
,
nil
,
tp
)
and
eg
:
GetCount
()
==
1
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
function
c71207871
.
repval
(
e
,
c
)
return
c71207871
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
c71207871
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
end
expansions/script/c7291576.lua
0 → 100644
View file @
49d6f8ef
--影六武衆-ゲンバ
--Shadow Six Samurai – Genba
--Scripted by Eerie Code
function
c7291576
.
initial_effect
(
c
)
--summon success
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
7291576
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c7291576
.
thtg
)
e1
:
SetOperation
(
c7291576
.
thop
)
c
:
RegisterEffect
(
e1
)
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetTarget
(
c7291576
.
reptg
)
e2
:
SetValue
(
c7291576
.
repval
)
e2
:
SetOperation
(
c7291576
.
repop
)
c
:
RegisterEffect
(
e2
)
end
function
c7291576
.
thfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3d
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c7291576
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
c7291576
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c7291576
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c7291576
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c7291576
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
function
c7291576
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3d
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
c7291576
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
c7291576
.
repfilter
,
1
,
nil
,
tp
)
and
eg
:
GetCount
()
==
1
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
function
c7291576
.
repval
(
e
,
c
)
return
c7291576
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
c7291576
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
end
expansions/script/c79968632.lua
0 → 100644
View file @
49d6f8ef
--六武衆の影忍術
--Shadow Art of the Six Samurai
--Scripted by Eerie Code
function
c79968632
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
79968632
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c79968632
.
cost
)
e1
:
SetTarget
(
c79968632
.
target
)
e1
:
SetOperation
(
c79968632
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c79968632
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c79968632
.
filter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3d
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c79968632
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
c79968632
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingTarget
(
c79968632
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c79968632
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c79968632
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c80577258.lua
0 → 100644
View file @
49d6f8ef
--雪の天気模様
--Snowy Weathery Pattern
--Scripted by Eerie Code
--Prototype, might require a core update for full functionality
function
c80577258
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
80577258
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--adjust
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_ADJUST
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetOperation
(
c80577258
.
effop
)
c
:
RegisterEffect
(
e2
)
end
function
c80577258
.
efffilter
(
c
,
g
,
ignore_flag
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsSetCard
(
0x109
)
and
c
:
GetSequence
()
<
5
and
g
:
IsContains
(
c
)
and
(
ignore_flag
or
c
:
GetFlagEffect
(
80577258
)
==
0
)
end
function
c80577258
.
effop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
cg
=
c
:
GetColumnGroup
(
1
,
1
)
local
g
=
Duel
.
GetMatchingGroup
(
c80577258
.
efffilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
cg
)
if
c
:
IsDisabled
()
then
return
end
for
tc
in
aux
.
Next
(
g
)
do
tc
:
RegisterFlagEffect
(
80577258
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
80577258
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetLabelObject
(
c
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
c80577258
.
thtg
)
e1
:
SetOperation
(
c80577258
.
thop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c80577258
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x109
)
and
c
:
IsAbleToHand
()
end
function
c80577258
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
gc
=
e
:
GetLabelObject
()
if
chk
==
0
then
return
gc
and
gc
:
IsFaceup
()
and
gc
:
IsLocation
(
LOCATION_SZONE
)
and
not
gc
:
IsDisabled
()
and
c80577258
.
efffilter
(
e
:
GetHandler
(),
gc
:
GetColumnGroup
(
1
,
1
),
true
)
and
Duel
.
IsExistingMatchingCard
(
c80577258
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
0
,
0
)
end
function
c80577258
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c80577258
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_TO_HAND
)
e1
:
SetTargetRange
(
LOCATION_DECK
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
expansions/script/c84177693.lua
0 → 100644
View file @
49d6f8ef
--ホーリー・ジェラル
function
c84177693
.
initial_effect
(
c
)
--recover
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
84177693
,
0
))
e1
:
SetCategory
(
CATEGORY_RECOVER
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCondition
(
c84177693
.
reccon
)
e1
:
SetTarget
(
c84177693
.
rectg
)
e1
:
SetOperation
(
c84177693
.
recop
)
c
:
RegisterEffect
(
e1
)
end
function
c84177693
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c84177693
.
reccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsReason
(
REASON_BATTLE
)
and
(
Duel
.
IsExistingMatchingCard
(
c84177693
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
end
function
c84177693
.
rectg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
1000
)
end
function
c84177693
.
recop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
end
expansions/script/c89355716.lua
0 → 100644
View file @
49d6f8ef
--晴れの天気模様
--Sunny Weathery Pattern
--Scripted by Eerie Code
--Prototype, might require a core update for full functionality
function
c89355716
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
89355716
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--adjust
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_ADJUST
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetOperation
(
c89355716
.
effop
)
c
:
RegisterEffect
(
e2
)
end
function
c89355716
.
efffilter
(
c
,
g
,
ignore_flag
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsSetCard
(
0x109
)
and
c
:
GetSequence
()
<
5
and
g
:
IsContains
(
c
)
and
(
ignore_flag
or
c
:
GetFlagEffect
(
89355716
)
==
0
)
end
function
c89355716
.
effop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
cg
=
c
:
GetColumnGroup
(
1
,
1
)
local
g
=
Duel
.
GetMatchingGroup
(
c89355716
.
efffilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
cg
)
if
c
:
IsDisabled
()
then
return
end
for
tc
in
aux
.
Next
(
g
)
do
tc
:
RegisterFlagEffect
(
89355716
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
89355716
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetLabelObject
(
c
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
c89355716
.
sptg
)
e1
:
SetOperation
(
c89355716
.
spop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c89355716
.
spcfilter
(
c
,
e
,
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
c
:
IsReleasableByEffect
()
and
(
ft
>
0
or
c
:
GetSequence
()
<
5
)
and
Duel
.
IsExistingMatchingCard
(
c89355716
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetCode
())
end
function
c89355716
.
spfilter
(
c
,
e
,
tp
,
code
)
return
c
:
IsSetCard
(
0x109
)
and
not
c
:
IsCode
(
code
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c89355716
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c89355716
.
spcfilter
(
chkc
,
e
,
tp
)
end
local
gc
=
e
:
GetLabelObject
()
if
chk
==
0
then
return
gc
and
gc
:
IsFaceup
()
and
gc
:
IsLocation
(
LOCATION_SZONE
)
and
not
gc
:
IsDisabled
()
and
c89355716
.
efffilter
(
e
:
GetHandler
(),
gc
:
GetColumnGroup
(
1
,
1
),
true
)
and
Duel
.
IsExistingTarget
(
c89355716
.
spcfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
SelectTarget
(
tp
,
c89355716
.
spcfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
(),
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
c89355716
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsControler
(
tp
)
and
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Release
(
tc
,
REASON_EFFECT
)
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c89355716
.
spfilter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
:
GetCode
())
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
expansions/script/c91123920.lua
0 → 100644
View file @
49d6f8ef
--力の代行者 マーズ
function
c91123920
.
initial_effect
(
c
)
--immune spell
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
c91123920
.
efilter
)
c
:
RegisterEffect
(
e1
)
--update atk,def
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
c91123920
.
val
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e3
)
end
function
c91123920
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_SPELL
)
end
function
c91123920
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c91123920
.
val
(
e
,
c
)
local
tp
=
c
:
GetControler
()
if
not
(
Duel
.
IsExistingMatchingCard
(
c91123920
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
,
tp
))
then
return
0
end
local
v
=
Duel
.
GetLP
(
tp
)
-
Duel
.
GetLP
(
1
-
tp
)
if
v
>
0
then
return
v
else
return
0
end
end
expansions/script/c91188343.lua
0 → 100644
View file @
49d6f8ef
--神秘の代行者 アース
function
c91188343
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
91188343
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetTarget
(
c91188343
.
tg
)
e1
:
SetOperation
(
c91188343
.
op
)
c
:
RegisterEffect
(
e1
)
end
function
c91188343
.
filter1
(
c
)
return
c
:
IsSetCard
(
0x44
)
and
c
:
GetCode
()
~=
91188343
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c91188343
.
filter2
(
c
)
return
((
c
:
IsSetCard
(
0x44
)
and
c
:
GetCode
()
~=
91188343
and
c
:
IsType
(
TYPE_MONSTER
))
or
c
:
IsCode
(
55794644
))
and
c
:
IsAbleToHand
()
end
function
c91188343
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c91188343
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
not
(
Duel
.
IsExistingMatchingCard
(
c91188343
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
return
Duel
.
IsExistingMatchingCard
(
c91188343
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
return
Duel
.
IsExistingMatchingCard
(
c91188343
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c91188343
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
if
not
(
Duel
.
IsExistingMatchingCard
(
c91188343
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
g
=
Duel
.
SelectMatchingCard
(
tp
,
c91188343
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
else
g
=
Duel
.
SelectMatchingCard
(
tp
,
c91188343
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
end
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c91299846.lua
0 → 100644
View file @
49d6f8ef
--雷天気ターメル
--Thunder Weathery Turmer
--Scripted by Eerie Code
function
c91299846
.
initial_effect
(
c
)
--place
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
91299846
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
91299846
)
e1
:
SetCost
(
c91299846
.
tfcost
)
e1
:
SetTarget
(
c91299846
.
tftg
)
e1
:
SetOperation
(
c91299846
.
tfop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetOperation
(
c91299846
.
spreg
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
91299846
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetRange
(
LOCATION_REMOVED
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e3
:
SetCondition
(
c91299846
.
spcon
)
e3
:
SetTarget
(
c91299846
.
sptg
)
e3
:
SetOperation
(
c91299846
.
spop
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
end
function
c91299846
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
c91299846
.
tffilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
,
tp
)
end
function
c91299846
.
tffilter
(
c
,
cc
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSetCard
(
0x109
)
and
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
tp
,
LOCATION_ONFIELD
,
cc
)
end
function
c91299846
.
tfcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c91299846
.
cfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c91299846
.
cfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c91299846
.
tftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>-
1
end
end
function
c91299846
.
tfop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c91299846
.
tffilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
nil
,
tp
):
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
function
c91299846
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
and
rc
:
IsSetCard
(
0x109
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
()
+
1
)
c
:
RegisterFlagEffect
(
91299846
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c91299846
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
91299846
)
>
0
end
function
c91299846
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
91299846
)
end
function
c91299846
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c91345518.lua
0 → 100644
View file @
49d6f8ef
--裁きの代行者 サターン
function
c91345518
.
initial_effect
(
c
)
--damage
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
91345518
,
0
))
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c91345518
.
damcost
)
e1
:
SetTarget
(
c91345518
.
damtg
)
e1
:
SetOperation
(
c91345518
.
damop
)
c
:
RegisterEffect
(
e1
)
end
function
c91345518
.
damcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCurrentPhase
()
~=
PHASE_MAIN2
and
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_BP
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c91345518
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLP
(
tp
)
>
Duel
.
GetLP
(
1
-
tp
)
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
0
)
end
function
c91345518
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c91345518
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
(
Duel
.
IsExistingMatchingCard
(
c91345518
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
,
tp
))
then
return
end
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
val
=
Duel
.
GetLP
(
1
-
p
)
-
Duel
.
GetLP
(
p
)
if
val
>
0
then
Duel
.
Damage
(
p
,
val
,
REASON_EFFECT
)
end
end
expansions/script/c92411493.lua
0 → 100644
View file @
49d6f8ef
--雨天気ラズラ
--Rainy Weathery Lazula
--Scripted by Eerie Code
function
c92411493
.
initial_effect
(
c
)
--place
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
92411493
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
92411493
)
e1
:
SetTarget
(
c92411493
.
tftg
)
e1
:
SetOperation
(
c92411493
.
tfop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetOperation
(
c92411493
.
spreg
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
92411493
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetRange
(
LOCATION_REMOVED
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e3
:
SetCondition
(
c92411493
.
spcon
)
e3
:
SetTarget
(
c92411493
.
sptg
)
e3
:
SetOperation
(
c92411493
.
spop
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
end
function
c92411493
.
tffilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSetCard
(
0x109
)
and
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
tp
)
end
function
c92411493
.
tftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c92411493
.
tffilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
end
end
function
c92411493
.
tfop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c92411493
.
tffilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
function
c92411493
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
and
rc
:
IsSetCard
(
0x109
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
()
+
1
)
c
:
RegisterFlagEffect
(
92411493
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c92411493
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
92411493
)
>
0
end
function
c92411493
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
92411493
)
end
function
c92411493
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c92534075.lua
0 → 100644
View file @
49d6f8ef
--魔弾-デビルズ・ディール
--Magibullet - Devil's Deal
--Scripted by Eerie Code
function
c92534075
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
92534075
+
EFFECT_COUNT_CODE_OATH
)
c
:
RegisterEffect
(
e1
)
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x108
))
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
--to hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
c92534075
.
thcon
)
e3
:
SetTarget
(
c92534075
.
thtg
)
e3
:
SetOperation
(
c92534075
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c92534075
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
rp
~=
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetPreviousControler
()
==
tp
end
function
c92534075
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x108
)
and
not
c
:
IsCode
(
92534075
)
and
c
:
IsAbleToHand
()
end
function
c92534075
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c92534075
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c92534075
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c92534075
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c93356623.lua
0 → 100644
View file @
49d6f8ef
--魔弾-クロス・ドミネーター
--Magibullet - Cross-Dominator
--Scripted by Eerie Code
function
c93356623
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
+
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCountLimit
(
1
,
93356623
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
,
TIMING_DAMAGE_STEP
+
0x1c0
)
e1
:
SetCondition
(
c93356623
.
condition
)
e1
:
SetTarget
(
c93356623
.
target
)
e1
:
SetOperation
(
c93356623
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c93356623
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x108
)
end
function
c93356623
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c93356623
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
(
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
())
end
function
c93356623
.
filter
(
c
)
return
c
:
IsFaceup
()
and
not
(
c
:
GetAttack
()
==
0
and
c
:
GetDefense
()
==
0
and
c
:
IsDisabled
())
end
function
c93356623
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c93356623
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c93356623
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c93356623
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c93356623
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e0
:
SetValue
(
0
)
e0
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e0
)
local
e1
=
e0
:
Clone
()
e1
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
tc
:
RegisterEffect
(
e1
)
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e3
:
SetValue
(
RESET_TURN_SET
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e4
)
end
end
end
expansions/script/c94418111.lua
0 → 100644
View file @
49d6f8ef
--魔弾の射手 ワイルド
--Magibullet Shooter Wild
--Scripted by Eerie Code
function
c94418111
.
initial_effect
(
c
)
--activate from hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x108
))
e1
:
SetTargetRange
(
LOCATION_HAND
,
0
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
c
:
RegisterEffect
(
e2
)
--search
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
94418111
)
e3
:
SetCondition
(
c94418111
.
tdcon
)
e3
:
SetTarget
(
c94418111
.
tdtg
)
e3
:
SetOperation
(
c94418111
.
tdop
)
c
:
RegisterEffect
(
e3
)
end
function
c94418111
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
c
:
GetFlagEffect
(
1
)
<=
0
then
return
false
end
return
c
:
GetColumnGroup
():
IsContains
(
re
:
GetHandler
())
end
function
c94418111
.
filter
(
c
)
return
c
:
IsSetCard
(
0x108
)
and
c
:
IsAbleToDeck
()
end
function
c94418111
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c94418111
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingTarget
(
c94418111
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c94418111
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
3
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c94418111
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
if
not
tg
or
tg
:
FilterCount
(
Card
.
IsRelateToEffect
,
nil
,
e
)
~=
3
then
return
end
Duel
.
SendtoDeck
(
tg
,
nil
,
0
,
REASON_EFFECT
)
local
g
=
Duel
.
GetOperatedGroup
()
if
g
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
ShuffleDeck
(
tp
)
end
local
ct
=
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
if
ct
==
3
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
expansions/script/c97750534.lua
0 → 100644
View file @
49d6f8ef
--死の代行者 ウラヌス
function
c97750534
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c97750534
.
spcon
)
c
:
RegisterEffect
(
e1
)
--tograve
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
97750534
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c97750534
.
tgtg
)
e2
:
SetOperation
(
c97750534
.
tgop
)
c
:
RegisterEffect
(
e2
)
end
function
c97750534
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c97750534
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
Duel
.
IsExistingMatchingCard
(
c97750534
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
)
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
end
function
c97750534
.
filter
(
c
)
return
c
:
IsSetCard
(
0x44
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
c97750534
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c97750534
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c97750534
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c97750534
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
and
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
~=
0
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
then
local
lv
=
tc
:
GetLevel
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e1
:
SetValue
(
lv
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
end
end
strings.conf
View file @
49d6f8ef
...
@@ -46,6 +46,9 @@
...
@@ -46,6 +46,9 @@
!
system
92
是否要解放对方怪兽进行上级召唤?
!
system
92
是否要解放对方怪兽进行上级召唤?
!
system
93
是否要继续选择素材?
!
system
93
是否要继续选择素材?
!
system
94
是否现在使用这张卡的效果?
!
system
94
是否现在使用这张卡的效果?
!
system
95
是否使用[%
ls
]的效果?
!
system
96
是否使用[%
ls
]的效果代替破坏?
!
system
97
是否把[%
ls
]在魔法与陷阱区域放置?
!
system
100
先攻
!
system
100
先攻
!
system
101
后攻
!
system
101
后攻
!
system
200
是否在[%
ls
]发动[%
ls
]的效果?
!
system
200
是否在[%
ls
]发动[%
ls
]的效果?
...
@@ -249,6 +252,8 @@
...
@@ -249,6 +252,8 @@
!
system
1215
开始
!
system
1215
开始
!
system
1216
消息
!
system
1216
消息
!
system
1217
刷新主机
!
system
1217
刷新主机
!
system
1218
准备
!
system
1219
取消准备
!
system
1220
昵称:
!
system
1220
昵称:
!
system
1221
主机信息:
!
system
1221
主机信息:
!
system
1222
主机密码:
!
system
1222
主机密码:
...
@@ -366,6 +371,9 @@
...
@@ -366,6 +371,9 @@
!
system
1372
守备↑
!
system
1372
守备↑
!
system
1373
名称↓
!
system
1373
名称↓
!
system
1374
连接标记
!
system
1374
连接标记
!
system
1380
开启音效
!
system
1381
开启音乐
!
system
1382
按场景切换音乐
!
system
1390
等待行动中...
!
system
1390
等待行动中...
!
system
1391
等待行动中....
!
system
1391
等待行动中....
!
system
1392
等待行动中.....
!
system
1392
等待行动中.....
...
@@ -496,6 +504,7 @@
...
@@ -496,6 +504,7 @@
!
counter
0
x40
指示物(
No
.
51
怪腕之必杀摔角手)
!
counter
0
x40
指示物(
No
.
51
怪腕之必杀摔角手)
!
counter
0
x1041
捕食指示物
!
counter
0
x1041
捕食指示物
!
counter
0
x42
指示物(爆竹鬼)
!
counter
0
x42
指示物(爆竹鬼)
!
counter
0
x43
缺陷指示物
#setnames, using tab for comment
#setnames, using tab for comment
!
setname
0
x1
正义盟军
A
・
O
・
J
!
setname
0
x1
正义盟军
A
・
O
・
J
!
setname
0
x2
次世代 ジェネクス
!
setname
0
x2
次世代 ジェネクス
...
@@ -833,3 +842,11 @@
...
@@ -833,3 +842,11 @@
!
setname
0
xff
幻透翼 クリアウィング
!
setname
0
xff
幻透翼 クリアウィング
!
setname
0
x100
化学结合 ボンディング
!
setname
0
x100
化学结合 ボンディング
!
setname
0
x101
码语者 コード・トーカー
!
setname
0
x101
码语者 コード・トーカー
!
setname
0
x102
弹丸 ヴァレット
!
setname
0
x103
幻变骚灵 オルターガイスト
!
setname
0
x104
机怪虫 クローラー
!
setname
0
x105
玄化 メタファイズ
!
setname
0
x106
复仇死灵
Vendread
!
!
setname
0
x107
F
.
A
.
F
.
A
.
!
setname
0
x108
魔弹
!
setname
0
x109
天气
\ No newline at end of file
system.conf
View file @
49d6f8ef
...
@@ -24,6 +24,12 @@ hide_hint_button = 1
...
@@ -24,6 +24,12 @@ hide_hint_button = 1
control_mode
=
0
control_mode
=
0
draw_field_spell
=
1
draw_field_spell
=
1
separate_clear_button
=
1
separate_clear_button
=
1
#auto_search_limit >= 0: Start search automatically when the user enters N chars
.
#auto_search_limit >= 0: Start search automatically when the user enters N chars
auto_search_limit
= -
1
auto_search_limit
= -
1
prompt_to_discard_deck_changes
=
1
ignore_deck_changes
=
0
enable_sound
=
1
enable_music
=
1
#Volume of sound and music, between 0 and 100
sound_volume
=
50
music_volume
=
50
music_mode
=
1
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