Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wyykak
ygopro
Commits
6169ac18
Commit
6169ac18
authored
Nov 07, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
7c3b7fb2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
563 additions
and
573 deletions
+563
-573
script/c35884610.lua
script/c35884610.lua
+98
-98
script/c36006208.lua
script/c36006208.lua
+59
-60
script/c47728740.lua
script/c47728740.lua
+64
-64
script/c48940337.lua
script/c48940337.lua
+16
-16
script/c601193.lua
script/c601193.lua
+49
-50
script/c72491806.lua
script/c72491806.lua
+50
-56
script/c73213494.lua
script/c73213494.lua
+54
-54
script/c734741.lua
script/c734741.lua
+39
-39
script/c74335036.lua
script/c74335036.lua
+84
-84
script/c9485511.lua
script/c9485511.lua
+50
-52
No files found.
script/c35884610.lua
View file @
6169ac18
--U.A. Powered Jersey
function
c35884610
.
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
(
c35884610
.
target
)
e1
:
SetOperation
(
c35884610
.
operation
)
c
:
RegisterEffect
(
e1
)
--Equip limit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetValue
(
c35884610
.
equip
limit
)
c
:
RegisterEffect
(
e2
)
--Atk Def up
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetValue
(
1000
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
Clone
(
e3
)
e4
:
SetCode
(
EFFECT_UPDATE_DEFENCE
)
c
:
RegisterEffect
(
e4
)
--damage double
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e5
:
SetCondition
(
c35884610
.
damcon
)
e5
:
SetOperation
(
c35884610
.
damop
)
c
:
RegisterEffect
(
e5
)
--chain atk
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
35884610
,
0
))
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetRange
(
LOCATION_SZONE
)
e6
:
SetCode
(
EVENT_BATTLED
)
e6
:
SetCondition
(
c35884610
.
atcon
)
e6
:
SetOperation
(
c35884610
.
atop
)
c
:
RegisterEffect
(
e6
)
--remove
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetCategory
(
CATEGORY_REMOVE
)
e7
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e7
:
SetRange
(
LOCATION_SZONE
)
e7
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e7
:
SetCountLimit
(
1
)
e7
:
SetCondition
(
c35884610
.
rmcon
)
e7
:
SetTarget
(
c35884610
.
rmtg
)
e7
:
SetOperation
(
c35884610
.
rmop
)
c
:
RegisterEffect
(
e7
)
--to hand
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetDescription
(
aux
.
Stringid
(
35884610
,
1
))
e8
:
SetCategory
(
CATEGORY_TOHAND
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e8
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e8
:
SetCode
(
EVENT_TO_GRAVE
)
e8
:
SetCondition
(
c35884610
.
thcon
)
e8
:
SetTarget
(
c35884610
.
thtg
)
e8
:
SetOperation
(
c35884610
.
thop
)
c
:
RegisterEffect
(
e8
)
--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
(
c35884610
.
target
)
e1
:
SetOperation
(
c35884610
.
operation
)
c
:
RegisterEffect
(
e1
)
--Equip limit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetValue
(
c35884610
.
eq
limit
)
c
:
RegisterEffect
(
e2
)
--Atk Def up
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetValue
(
1000
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
Clone
(
e3
)
e4
:
SetCode
(
EFFECT_UPDATE_DEFENCE
)
c
:
RegisterEffect
(
e4
)
--damage double
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e5
:
SetCondition
(
c35884610
.
damcon
)
e5
:
SetOperation
(
c35884610
.
damop
)
c
:
RegisterEffect
(
e5
)
--chain atk
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
35884610
,
0
))
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetRange
(
LOCATION_SZONE
)
e6
:
SetCode
(
EVENT_BATTLED
)
e6
:
SetCondition
(
c35884610
.
atcon
)
e6
:
SetOperation
(
c35884610
.
atop
)
c
:
RegisterEffect
(
e6
)
--remove
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetCategory
(
CATEGORY_REMOVE
)
e7
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e7
:
SetRange
(
LOCATION_SZONE
)
e7
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e7
:
SetCountLimit
(
1
)
e7
:
SetCondition
(
c35884610
.
rmcon
)
e7
:
SetTarget
(
c35884610
.
rmtg
)
e7
:
SetOperation
(
c35884610
.
rmop
)
c
:
RegisterEffect
(
e7
)
--to hand
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetDescription
(
aux
.
Stringid
(
35884610
,
1
))
e8
:
SetCategory
(
CATEGORY_TOHAND
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e8
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e8
:
SetCode
(
EVENT_TO_GRAVE
)
e8
:
SetCondition
(
c35884610
.
thcon
)
e8
:
SetTarget
(
c35884610
.
thtg
)
e8
:
SetOperation
(
c35884610
.
thop
)
c
:
RegisterEffect
(
e8
)
end
function
c35884610
.
eq
uip
limit
(
e
,
c
)
return
c
:
IsSetCard
(
0xb2
)
function
c35884610
.
eqlimit
(
e
,
c
)
return
c
:
IsSetCard
(
0xb2
)
end
function
c35884610
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb2
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb2
)
end
function
c35884610
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c35884610
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c35884610
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c35884610
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c35884610
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c35884610
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c35884610
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c35884610
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
end
local
tc
=
Duel
.
GetFirstTarget
()
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
end
end
function
c35884610
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
()
==
e
:
GetHandler
():
GetEquipTarget
()
and
ep
~=
tp
and
eg
:
GetFirst
():
GetBattleTarget
()
~=
nil
return
eg
:
GetFirst
()
==
e
:
GetHandler
():
GetEquipTarget
()
and
ep
~=
tp
and
eg
:
GetFirst
():
GetBattleTarget
()
~=
nil
end
function
c35884610
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
*
2
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
*
2
)
end
function
c35884610
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
():
GetEquipTarget
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
local
c
=
e
:
GetHandler
():
GetEquipTarget
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
end
function
c35884610
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChainAttack
()
Duel
.
ChainAttack
()
end
function
c35884610
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c35884610
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetEquipTarget
():
IsAbleToRemove
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
0
,
0
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
():
GetEquipTarget
()
,
1
,
0
,
0
)
end
function
c35884610
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
():
GetEquipTarget
()
if
c
then
Duel
.
Remove
(
c
,
POS_FACEUP
,
REASON_EFFECT
)
end
local
e
c
=
e
:
GetHandler
():
GetEquipTarget
()
if
ec
then
Duel
.
Remove
(
e
c
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
c35884610
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_LOST_TARGET
)
and
c
:
GetPreviousEquipTarget
():
IsLocation
(
LOCATION_HAND
)
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_LOST_TARGET
)
and
c
:
GetPreviousEquipTarget
():
IsLocation
(
LOCATION_HAND
)
end
function
c35884610
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
0
,
LOCATION_GRAVE
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c35884610
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
\ No newline at end of file
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
script/c36006208.lua
View file @
6169ac18
--Fire Lake of the Burning Abyss
function
c36006208
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1e0
)
e1
:
SetCost
(
c36006208
.
cost
)
e1
:
SetTarget
(
c36006208
.
target
)
e1
:
SetOperation
(
c36006208
.
activate
)
c
:
RegisterEffect
(
e1
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1e0
)
e1
:
SetCost
(
c36006208
.
cost
)
e1
:
SetTarget
(
c36006208
.
target
)
e1
:
SetOperation
(
c36006208
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c36006208
.
filter
(
c
)
return
c
:
IsSetCard
(
0xb1
)
and
c
:
IsFaceup
()
and
c
:
IsAbleToGrave
()
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb1
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c36006208
.
costfilter
(
c
,
rg
,
dg
)
if
not
rg
:
IsContains
(
c
)
then
return
false
end
local
a
=
0
if
dg
:
IsContains
(
c
)
then
a
=
1
end
if
c
:
GetEquipCount
()
==
0
then
return
rg
:
IsExists
(
c36006208
.
costfilter2
,
1
,
c
,
a
,
dg
)
end
local
eg
=
c
:
GetEquipGroup
()
local
tc
=
eg
:
GetFirst
()
while
tc
do
if
dg
:
IsContains
(
tc
)
then
a
=
a
+
1
end
tc
=
eg
:
GetNext
()
end
return
rg
:
IsExists
(
c36006208
.
costfilter2
,
1
,
c
,
a
,
dg
)
local
a
=
0
if
dg
:
IsContains
(
c
)
then
a
=
1
end
if
c
:
GetEquipCount
()
==
0
then
return
rg
:
IsExists
(
c36006208
.
costfilter2
,
1
,
c
,
a
,
dg
)
end
local
eg
=
c
:
GetEquipGroup
()
local
tc
=
eg
:
GetFirst
()
while
tc
do
if
dg
:
IsContains
(
tc
)
then
a
=
a
+
1
end
tc
=
eg
:
GetNext
()
end
return
rg
:
IsExists
(
c36006208
.
costfilter2
,
1
,
c
,
a
,
dg
)
end
function
c36006208
.
costfilter2
(
c
,
a
,
dg
)
if
dg
:
IsContains
(
c
)
then
a
=
a
+
1
end
if
c
:
GetEquipCount
()
==
0
then
return
dg
:
GetCount
()
-
a
>=
1
end
local
eg
=
c
:
GetEquipGroup
()
local
tc
=
eg
:
GetFirst
()
while
tc
do
if
dg
:
IsContains
(
tc
)
then
a
=
a
+
1
end
tc
=
eg
:
GetNext
()
end
return
dg
:
GetCount
()
-
a
>=
1
if
dg
:
IsContains
(
c
)
then
a
=
a
+
1
end
if
c
:
GetEquipCount
()
==
0
then
return
dg
:
GetCount
()
-
a
>=
1
end
local
eg
=
c
:
GetEquipGroup
()
local
tc
=
eg
:
GetFirst
()
while
tc
do
if
dg
:
IsContains
(
tc
)
then
a
=
a
+
1
end
tc
=
eg
:
GetNext
()
end
return
dg
:
GetCount
()
-
a
>=
1
end
function
c36006208
.
tgfilter
(
c
,
e
)
return
c
:
IsDestructable
()
and
c
:
IsCanBeEffectTarget
(
e
)
return
c
:
IsDestructable
()
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c36006208
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
1
)
return
true
e
:
SetLabel
(
1
)
return
true
end
function
c36006208
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsDestructable
()
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
local
rg
=
Duel
.
GetMatchingGroup
(
c36006208
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
dg
=
Duel
.
GetMatchingGroup
(
c36006208
.
tgfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
(),
e
)
return
Duel
.
IsExistingMatchingCard
(
c36006208
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
2
,
nil
,
rg
,
dg
)
else
return
Duel
.
IsExistingTarget
(
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
local
rg
=
Duel
.
GetMatchingGroup
(
c36006208
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
dg
=
Duel
.
GetMatchingGroup
(
c36006208
.
tgfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
(),
e
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c36006208
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
2
,
2
,
nil
,
rg
,
dg
)
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
3
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsDestructable
()
end
if
chk
==
0
then
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
local
rg
=
Duel
.
GetMatchingGroup
(
c36006208
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
dg
=
Duel
.
GetMatchingGroup
(
c36006208
.
tgfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
(),
e
)
return
rg
:
IsExists
(
c36006208
.
costfilter
,
2
,
nil
,
rg
,
dg
)
else
return
Duel
.
IsExistingTarget
(
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
local
rg
=
Duel
.
GetMatchingGroup
(
c36006208
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
dg
=
Duel
.
GetMatchingGroup
(
c36006208
.
tgfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
(),
e
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
rg
:
FilterSelect
(
tp
,
c36006208
.
costfilter
,
2
,
2
,
nil
,
rg
,
dg
)
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
3
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c36006208
.
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
.
Destroy
(
sg
,
REASON_EFFECT
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
end
script/c47728740.lua
View file @
6169ac18
--Alich, Malebranche of the Burning Abyss
function
c47728740
.
initial_effect
(
c
)
--self destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SELF_DESTROY
)
e1
:
SetCondition
(
c47728740
.
sdcon
)
c
:
RegisterEffect
(
e1
)
--Special Summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
47728740
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
47728740
)
e2
:
SetCondition
(
c47728740
.
sscon
)
e2
:
SetTarget
(
c47728740
.
sstg
)
e2
:
SetOperation
(
c47728740
.
ssop
)
c
:
RegisterEffect
(
e2
)
--disable
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
47728740
,
1
))
e3
:
SetCategory
(
CATEGORY_DISABLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
47728740
)
e3
:
SetCondition
(
c47728740
.
discon
)
e3
:
SetTarget
(
c47728740
.
distg
)
e3
:
SetOperation
(
c47728740
.
disop
)
c
:
RegisterEffect
(
e3
)
--self destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SELF_DESTROY
)
e1
:
SetCondition
(
c47728740
.
sdcon
)
c
:
RegisterEffect
(
e1
)
--Special Summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
47728740
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
47728740
)
e2
:
SetCondition
(
c47728740
.
sscon
)
e2
:
SetTarget
(
c47728740
.
sstg
)
e2
:
SetOperation
(
c47728740
.
ssop
)
c
:
RegisterEffect
(
e2
)
--disable
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
47728740
,
1
))
e3
:
SetCategory
(
CATEGORY_DISABLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
47728740
)
e3
:
SetCondition
(
c47728740
.
discon
)
e3
:
SetTarget
(
c47728740
.
distg
)
e3
:
SetOperation
(
c47728740
.
disop
)
c
:
RegisterEffect
(
e3
)
end
function
c47728740
.
sdfilter
(
c
)
return
not
c
:
IsFaceup
()
or
not
c
:
IsSetCard
(
0xb1
)
return
not
c
:
IsFaceup
()
or
not
c
:
IsSetCard
(
0xb1
)
end
function
c47728740
.
sdcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c47728740
.
sdfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c47728740
.
sdfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c47728740
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c47728740
.
sscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
c47728740
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
return
not
Duel
.
IsExistingMatchingCard
(
c47728740
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
c47728740
.
sstg
(
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
)
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
c47728740
.
ssop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsExistingMatchingCard
(
c47728740
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
then
return
end
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
if
Duel
.
IsExistingMatchingCard
(
c47728740
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
then
return
end
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c47728740
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsReason
(
REASON_RETURN
)
return
not
e
:
GetHandler
():
IsReason
(
REASON_RETURN
)
end
function
c47728740
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsFaceup
()
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
chkc
then
return
chkc
:
IsFaceup
()
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c47728740
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
()
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e2
)
end
end
\ No newline at end of file
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
()
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
tc
:
RegisterEffect
(
e2
)
end
end
script/c48940337.lua
View file @
6169ac18
--Lancephorhynchus
function
c48940337
.
initial_effect
(
c
)
--pendulum summon
aux
.
AddPendulumProcedure
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--pierce
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_PIERCE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
c48940337
.
target
)
c
:
RegisterEffect
(
e2
)
--pendulum summon
aux
.
AddPendulumProcedure
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--pierce
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_PIERCE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
c48940337
.
target
)
c
:
RegisterEffect
(
e2
)
end
function
c48940337
.
target
(
e
,
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
return
c
:
IsType
(
TYPE_NORMAL
)
end
script/c601193.lua
View file @
6169ac18
--Virgil, Rockstar of the Burning Abyss
function
c601193
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
(
)
c
:
SetUniqueOnField
(
1
,
0
,
601193
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
601193
,
0
))
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c601193
.
tdcos
)
e1
:
SetTarget
(
c601193
.
tdtg
)
e1
:
SetOperation
(
c601193
.
tdop
)
c
:
RegisterEffect
(
e1
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
601193
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
601193
)
e2
:
SetCondition
(
c601193
.
drcon
)
e2
:
SetTarget
(
c601193
.
drtg
)
e2
:
SetOperation
(
c601193
.
drop
)
c
:
RegisterEffect
(
e2
)
c
:
SetUniqueOnField
(
1
,
0
,
601193
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
(
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
601193
,
0
))
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c601193
.
tdcost
)
e1
:
SetTarget
(
c601193
.
tdtg
)
e1
:
SetOperation
(
c601193
.
tdop
)
c
:
RegisterEffect
(
e1
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
601193
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
601193
)
e2
:
SetCondition
(
c601193
.
drcon
)
e2
:
SetTarget
(
c601193
.
drtg
)
e2
:
SetOperation
(
c601193
.
drop
)
c
:
RegisterEffect
(
e2
)
end
function
c601193
.
filter
(
c
)
return
c
:
IsSetCard
(
0xb1
)
and
c
:
IsDiscardable
()
return
c
:
IsSetCard
(
0xb1
)
and
c
:
IsDiscardable
()
end
function
c601193
.
tdcos
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c601193
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c601193
.
filter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
function
c601193
.
tdcos
t
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c601193
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c601193
.
filter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c601193
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToDeck
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToDeck
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
function
c601193
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tc
:
GetControler
())
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
c601193
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
end
function
c601193
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c601193
.
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
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
script/c72491806.lua
View file @
6169ac18
--U.A. Midfielder
function
c72491806
.
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
:
SetCountLimit
(
1
,
72491806
)
e1
:
SetCondition
(
c72491806
.
spcon
)
e1
:
SetOperation
(
c72491806
.
spop
)
c
:
RegisterEffect
(
e1
)
--to hand and spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
72491806
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
72491807
)
e2
:
SetTarget
(
c72491806
.
tstg
)
e2
:
SetOperation
(
c72491806
.
tsop
)
c
:
RegisterEffect
(
e2
)
--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
:
SetCountLimit
(
1
,
72491806
)
e1
:
SetCondition
(
c72491806
.
spcon
)
e1
:
SetOperation
(
c72491806
.
spop
)
c
:
RegisterEffect
(
e1
)
--to hand and spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
72491806
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
72491807
)
e2
:
SetTarget
(
c72491806
.
tstg
)
e2
:
SetOperation
(
c72491806
.
tsop
)
c
:
RegisterEffect
(
e2
)
end
function
c72491806
.
spfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb2
)
and
not
c
:
IsCode
(
72491806
)
and
c
:
IsAbleToHandAsCost
()
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb2
)
and
not
c
:
IsCode
(
72491806
)
and
c
:
IsAbleToHandAsCost
()
end
function
c72491806
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c72491806
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c72491806
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c72491806
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c72491806
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c72491806
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
end
function
c72491806
.
thfilter
(
c
,
e
)
return
c
:
IsSetCard
(
0xb2
)
and
c
:
IsAbleToHand
()
and
c
:
IsCanBeEffectTarget
(
e
)
function
c72491806
.
thfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb2
)
and
c
:
IsAbleToHand
()
and
Duel
.
IsExistingMatchingCard
(
c72491806
.
spfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetCode
())
end
function
c72491806
.
thfilter2
(
c
,
code
)
return
not
c
:
IsCode
(
code
)
end
function
c72491806
.
spfilter2
(
c
,
e
,
tp
,
g
)
return
c
:
IsSetCard
(
0xb2
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
g
:
IsExists
(
c72491806
.
thfilter2
,
1
,
e
:
GetHandler
(),
c
:
GetCode
())
function
c72491806
.
spfilter2
(
c
,
e
,
tp
,
code
)
return
c
:
IsSetCard
(
0xb2
)
and
not
c
:
IsCode
(
code
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c72491806
.
tstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
g
=
Duel
.
GetMatchingGroup
(
c72491806
.
thfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
if
chkc
then
return
chkc
:
IsFaceup
()
and
chkc
:
IsAbleToHand
()
end
if
chk
==
0
then
return
g
:
GetCount
()
>
0
and
Duel
.
IsExistingMatchingCard
(
c72491806
.
spfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
g
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
tg
=
Duel
.
SelectTarget
(
tp
,
c72491806
.
thfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
(),
e
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
tg
,
tg
:
GetCount
()
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c72491806
.
thfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingTarget
(
c72491806
.
thfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c72491806
.
thfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
(),
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c72491806
.
tsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
local
og
=
Duel
.
GetOperatedGroup
()
if
og
:
GetCount
()
>
0
and
Duel
.
IsExistingMatchingCard
(
c72491806
.
spfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
og
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c72491806
.
spfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
og
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c72491806
.
spfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
:
GetCode
())
if
sg
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
script/c73213494.lua
View file @
6169ac18
--Calcab, Malebranche of the Burning Abyss
function
c73213494
.
initial_effect
(
c
)
--self destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SELF_DESTROY
)
e1
:
SetCondition
(
c73213494
.
sdcon
)
c
:
RegisterEffect
(
e1
)
--Special Summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
73213494
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
73213494
)
e2
:
SetCondition
(
c73213494
.
sscon
)
e2
:
SetTarget
(
c73213494
.
sstg
)
e2
:
SetOperation
(
c73213494
.
ssop
)
c
:
RegisterEffect
(
e2
)
--to hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
73213494
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
73213494
)
e3
:
SetCondition
(
c73213494
.
thcon
)
e3
:
SetTarget
(
c73213494
.
thtg
)
e3
:
SetOperation
(
c73213494
.
thop
)
c
:
RegisterEffect
(
e3
)
--self destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SELF_DESTROY
)
e1
:
SetCondition
(
c73213494
.
sdcon
)
c
:
RegisterEffect
(
e1
)
--Special Summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
73213494
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
73213494
)
e2
:
SetCondition
(
c73213494
.
sscon
)
e2
:
SetTarget
(
c73213494
.
sstg
)
e2
:
SetOperation
(
c73213494
.
ssop
)
c
:
RegisterEffect
(
e2
)
--to hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
73213494
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
73213494
)
e3
:
SetCondition
(
c73213494
.
thcon
)
e3
:
SetTarget
(
c73213494
.
thtg
)
e3
:
SetOperation
(
c73213494
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c73213494
.
sdfilter
(
c
)
return
not
c
:
IsFaceup
()
or
not
c
:
IsSetCard
(
0xb1
)
return
not
c
:
IsFaceup
()
or
not
c
:
IsSetCard
(
0xb1
)
end
function
c73213494
.
sdcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c73213494
.
sdfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c73213494
.
sdfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c73213494
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c73213494
.
sscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
c73213494
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
return
not
Duel
.
IsExistingMatchingCard
(
c73213494
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
c73213494
.
sstg
(
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
)
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
c73213494
.
ssop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsExistingMatchingCard
(
c73213494
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
then
return
end
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
if
Duel
.
IsExistingMatchingCard
(
c73213494
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
then
return
end
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c73213494
.
thfilter
(
c
)
return
c
:
IsFacedown
()
and
c
:
IsAbleToHand
()
return
c
:
IsFacedown
()
and
c
:
IsAbleToHand
()
end
function
c73213494
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsReason
(
REASON_RETURN
)
return
not
e
:
GetHandler
():
IsReason
(
REASON_RETURN
)
end
function
c73213494
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_SZONE
)
and
c73213494
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c73213494
.
thfilter
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c73213494
.
thfilter
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_SZONE
)
and
c73213494
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c73213494
.
thfilter
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c73213494
.
thfilter
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c73213494
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFacedown
()
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
\ No newline at end of file
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFacedown
()
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
script/c734741.lua
View file @
6169ac18
--Rubic, Malebranche of the Burning Abyss
function
c734741
.
initial_effect
(
c
)
--self destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SELF_DESTROY
)
e1
:
SetCondition
(
c734741
.
sdcon
)
c
:
RegisterEffect
(
e1
)
--Special Summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
734741
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
734741
)
e2
:
SetCondition
(
c734741
.
sscon
)
e2
:
SetTarget
(
c734741
.
sstg
)
e2
:
SetOperation
(
c734741
.
ssop
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetValue
(
c734741
.
synlimit
)
c
:
RegisterEffect
(
e3
)
--self destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SELF_DESTROY
)
e1
:
SetCondition
(
c734741
.
sdcon
)
c
:
RegisterEffect
(
e1
)
--Special Summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
734741
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
734741
)
e2
:
SetCondition
(
c734741
.
sscon
)
e2
:
SetTarget
(
c734741
.
sstg
)
e2
:
SetOperation
(
c734741
.
ssop
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetValue
(
c734741
.
synlimit
)
c
:
RegisterEffect
(
e3
)
end
function
c734741
.
synlimit
(
e
,
c
)
if
not
c
then
return
false
end
return
not
c
:
IsSetCard
(
0xb1
)
if
not
c
then
return
false
end
return
not
c
:
IsSetCard
(
0xb1
)
end
function
c734741
.
sdfilter
(
c
)
return
not
c
:
IsFaceup
()
or
not
c
:
IsSetCard
(
0xb1
)
return
not
c
:
IsFaceup
()
or
not
c
:
IsSetCard
(
0xb1
)
end
function
c734741
.
sdcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c734741
.
sdfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c734741
.
sdfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c734741
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c734741
.
sscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
c734741
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
return
not
Duel
.
IsExistingMatchingCard
(
c734741
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
c734741
.
sstg
(
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
)
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
c734741
.
ssop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsExistingMatchingCard
(
c734741
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
then
return
end
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
if
Duel
.
IsExistingMatchingCard
(
c734741
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
then
return
end
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
script/c74335036.lua
View file @
6169ac18
--Fusion Substitute
function
c74335036
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c74335036
.
target
)
e1
:
SetOperation
(
c74335036
.
activate
)
c
:
RegisterEffect
(
e1
)
--to deck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetDescription
(
aux
.
Stringid
(
74335036
,
0
)
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c74335036
.
tdcost
)
e2
:
SetTarget
(
c74335036
.
tdtg
)
e2
:
SetOperation
(
c74335036
.
tdop
)
c
:
RegisterEffect
(
e2
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c74335036
.
target
)
e1
:
SetOperation
(
c74335036
.
activate
)
c
:
RegisterEffect
(
e1
)
--to deck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
74335036
,
0
)
)
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c74335036
.
tdcost
)
e2
:
SetTarget
(
c74335036
.
tdtg
)
e2
:
SetOperation
(
c74335036
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
c74335036
.
filter1
(
c
,
e
)
return
c
:
IsCanBeFusionMaterial
()
and
not
c
:
IsImmuneToEffect
(
e
)
return
c
:
IsCanBeFusionMaterial
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c74335036
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c74335036
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
PLAYER_NONE
or
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c74335036
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c74335036
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c74335036
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
if
chk
==
0
then
local
chkf
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
PLAYER_NONE
or
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c74335036
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c74335036
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c74335036
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c74335036
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
PLAYER_NONE
or
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c74335036
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c74335036
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c74335036
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
local
chkf
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
PLAYER_NONE
or
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c74335036
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c74335036
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c74335036
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
function
c74335036
.
tdfilter
(
c
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsAbleToDeck
()
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsAbleToExtra
()
end
function
c74335036
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
function
c74335036
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c74335036
.
tdfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c74335036
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c74335036
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
()
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c74335036
.
tdfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c74335036
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c74335036
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c74335036
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
tc
,
nil
,
0
,
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
\ No newline at end of file
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
tc
,
nil
,
0
,
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
script/c9485511.lua
View file @
6169ac18
--U.A. Goalkeeper
function
c9485511
.
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
:
SetCountLimit
(
1
,
9485511
)
e1
:
SetCondition
(
c9485511
.
spcon
)
e1
:
SetOperation
(
c9485511
.
spop
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9485511
,
0
))
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCondition
(
c9485511
.
con
)
e2
:
SetTarget
(
c9485511
.
tg
)
e2
:
SetOperation
(
c9485511
.
op
)
c
:
RegisterEffect
(
e2
)
--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
:
SetCountLimit
(
1
,
9485511
)
e1
:
SetCondition
(
c9485511
.
spcon
)
e1
:
SetOperation
(
c9485511
.
spop
)
c
:
RegisterEffect
(
e1
)
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9485511
,
0
))
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCondition
(
c9485511
.
ind
con
)
e2
:
SetTarget
(
c9485511
.
ind
tg
)
e2
:
SetOperation
(
c9485511
.
ind
op
)
c
:
RegisterEffect
(
e2
)
end
function
c9485511
.
spfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb2
)
and
not
c
:
IsCode
(
9485511
)
and
c
:
IsAbleToHandAsCost
()
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb2
)
and
not
c
:
IsCode
(
9485511
)
and
c
:
IsAbleToHandAsCost
()
end
function
c9485511
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c9485511
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c9485511
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c9485511
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c9485511
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c9485511
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
end
function
c9485511
.
filter
(
c
)
return
c
:
IsSetCard
(
0xb2
)
and
c
:
IsFaceup
(
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb2
)
end
function
c9485511
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
return
Duel
.
GetTurnPlayer
()
~=
tp
function
c9485511
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
end
function
c9485511
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsOnField
(
)
and
c9485511
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c9485511
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c9485511
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
function
c9485511
.
ind
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c9485511
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c9485511
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c9485511
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c9485511
.
op
(
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_INDESTRUCTABLE_COUNT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetValue
(
c9485511
.
valcon
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
function
c9485511
.
ind
op
(
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_INDESTRUCTABLE_COUNT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetValue
(
c9485511
.
valcon
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c9485511
.
valcon
(
e
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_BATTLE
+
REASON_EFFECT
)
~=
0
return
bit
.
band
(
r
,
REASON_BATTLE
+
REASON_EFFECT
)
~=
0
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment