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
f156fc62
Commit
f156fc62
authored
Dec 24, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push by Appveyor
parent
7a7554ed
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
441 additions
and
4 deletions
+441
-4
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c13257230.lua
expansions/script/c13257230.lua
+138
-0
expansions/script/c13257231.lua
expansions/script/c13257231.lua
+97
-0
expansions/script/c13257317.lua
expansions/script/c13257317.lua
+4
-4
expansions/script/c13257334.lua
expansions/script/c13257334.lua
+202
-0
No files found.
expansions/222DIY.cdb
View file @
f156fc62
No preview for this file type
expansions/script/c13257230.lua
0 → 100644
View file @
f156fc62
--B.E.S 巨核Mk-2改
function
c13257230
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1f
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetDescription
(
aux
.
Stringid
(
13257230
,
1
))
e11
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_SUMMON_PROC
)
e11
:
SetCondition
(
c13257230
.
otcon
)
e11
:
SetOperation
(
c13257230
.
otop
)
e11
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e11
)
--Destroy replace
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
c13257230
.
desreptg
)
e1
:
SetOperation
(
c13257230
.
desrepop
)
c
:
RegisterEffect
(
e1
)
--counter
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetOperation
(
c13257230
.
ctop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
13257330
,
3
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
aux
.
bdogcon
)
e4
:
SetTarget
(
c13257230
.
catg
)
e4
:
SetOperation
(
c13257230
.
caop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
13257330
,
3
))
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCategory
(
CATEGORY_DESTROY
)
e5
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCondition
(
c13257230
.
descon
)
e5
:
SetTarget
(
c13257230
.
destg
)
e5
:
SetOperation
(
c13257230
.
desop
)
c
:
RegisterEffect
(
e5
)
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e12
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e12
:
SetOperation
(
c13257230
.
bgmop
)
c
:
RegisterEffect
(
e12
)
local
e13
=
e12
:
Clone
()
e13
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e13
)
end
function
c13257230
.
otfilter
(
c
)
return
c
:
IsSetCard
(
0x353
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsReleasable
()
end
function
c13257230
.
otfilter1
(
c
)
return
c
:
IsSetCard
(
0x353
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c13257230
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
c13257230
.
otfilter
,
tp
,
LOCATION_HAND
,
0
,
c
)
local
mg1
=
Duel
.
GetMatchingGroup
(
c13257230
.
otfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
GetLevel
()
>
6
and
minc
<=
2
and
(
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
mg
:
GetCount
()
>=
1
or
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg1
))
or
c
:
GetLevel
()
>
4
and
c
:
GetLevel
()
<=
6
and
minc
<=
1
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
mg
:
GetCount
()
>=
1
end
function
c13257230
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c13257230
.
otfilter
,
tp
,
LOCATION_HAND
,
0
,
c
)
local
mg1
=
Duel
.
GetMatchingGroup
(
c13257230
.
otfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
sg
=
Group
.
CreateGroup
()
if
c
:
GetLevel
()
>
6
then
if
mg
:
GetCount
()
>
0
and
mg1
:
GetCount
()
==
0
or
(
mg
:
GetCount
()
>
0
and
mg1
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
13257230
,
2
)))
then
sg
=
mg
:
Select
(
tp
,
1
,
1
,
nil
)
else
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
1
,
1
,
mg1
)
end
else
sg
=
mg
:
Select
(
tp
,
1
,
1
,
nil
)
end
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
c13257230
.
desreptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
and
e
:
GetHandler
():
GetCounter
(
0x1f
)
>
0
end
return
true
end
function
c13257230
.
desrepop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RemoveCounter
(
ep
,
0x1f
,
1
,
REASON_EFFECT
)
end
function
c13257230
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
AddCounter
(
0x1f
,
2
)
end
function
c13257230
.
catg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsChainAttackable
(
0
,
true
)
end
end
function
c13257230
.
caop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToBattle
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
ChainAttack
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
+
PHASE_DAMAGE_CAL
)
c
:
RegisterEffect
(
e1
)
end
function
c13257230
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
eg
:
GetFirst
()
==
e
:
GetHandler
()
end
function
c13257230
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
0
,
0
)
end
function
c13257230
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
function
c13257230
.
bgmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
13257230
,
4
))
end
expansions/script/c13257231.lua
0 → 100644
View file @
f156fc62
--B.E.S 水核
function
c13257231
.
initial_effect
(
c
)
--pos
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SET_POSITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e1
:
SetCondition
(
c13257231
.
poscon
)
e1
:
SetTarget
(
c13257231
.
postg
)
e1
:
SetValue
(
POS_FACEUP_DEFENSE
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
13257231
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c13257231
.
target
)
e2
:
SetOperation
(
c13257231
.
operation
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
13257231
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
c13257231
.
tgcon
)
e3
:
SetTarget
(
c13257231
.
tgtg
)
e3
:
SetOperation
(
c13257231
.
tgop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e4
)
--indes
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e5
:
SetValue
(
c13257231
.
indct
)
c
:
RegisterEffect
(
e5
)
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e12
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e12
:
SetOperation
(
c13257231
.
bgmop
)
c
:
RegisterEffect
(
e12
)
local
e13
=
e12
:
Clone
()
e13
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e13
)
end
function
c13257231
.
poscon
(
e
)
return
e
:
GetHandler
():
IsDefensePos
()
end
function
c13257231
.
postg
(
e
,
c
)
return
c
:
IsFaceup
()
end
function
c13257231
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsDefensePos
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsDefensePos
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDefensePos
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
HINTMSG_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c13257231
.
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
function
c13257231
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
rp
~=
tp
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
c13257231
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDefensePos
(),
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
0
,
LOCATION_MZONE
)
end
function
c13257231
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsDefensePos
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_DESTROY
)
local
sg
=
g
:
Select
(
1
-
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg
)
Duel
.
Destroy
(
sg
,
REASON_RULE
)
end
end
function
c13257231
.
bgmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
13257231
,
4
))
end
function
c13257231
.
indct
(
e
,
re
,
r
,
rp
)
if
bit
.
band
(
r
,
REASON_BATTLE
+
REASON_EFFECT
)
~=
0
then
return
1
else
return
0
end
end
expansions/script/c13257317.lua
View file @
f156fc62
--超时空战斗机-Twin
B
ee
--超时空战斗机-Twin
b
ee
function
c13257317
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -40,7 +40,7 @@ end
function
c13257317
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
if
Duel
.
Get
MZoneCount
(
tp
)
<=
0
then
return
false
end
if
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
return
g
:
GetCount
()
==
1
and
tc
:
IsSetCard
(
0x351
)
...
...
@@ -54,7 +54,7 @@ end
function
c13257317
.
pctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
t1
=
Duel
.
IsExistingMatchingCard
(
c13257317
.
eqfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
local
t2
=
Duel
.
Get
MZoneCount
(
tp
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
93130022
,
0
,
0x4011
,
c
:
GetAttack
(),
0
,
c
:
GetLevel
(),
c
:
GetRace
(),
c
:
GetAttribute
())
local
t2
=
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
93130022
,
0
,
0x4011
,
c
:
GetAttack
(),
0
,
c
:
GetLevel
(),
c
:
GetRace
(),
c
:
GetAttribute
())
if
chk
==
0
then
return
t1
or
t2
end
local
op
=
0
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
13257317
,
1
))
...
...
@@ -90,7 +90,7 @@ function c13257317.pcop(e,tp,eg,ep,ev,re,r,rp)
local
lv
=
c
:
GetLevel
()
local
race
=
c
:
GetRace
()
local
att
=
c
:
GetAttribute
()
if
Duel
.
Get
MZoneCount
(
tp
)
<=
0
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
if
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
or
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
93130022
,
0
,
0x4011
,
atk
,
0
,
lv
,
race
,
att
)
then
return
end
local
token
=
Duel
.
CreateToken
(
tp
,
93130022
)
c
:
CreateRelation
(
token
,
RESET_EVENT
+
0x1fe0000
)
...
...
expansions/script/c13257334.lua
0 → 100644
View file @
f156fc62
--超时空战斗机-Winbee
function
c13257334
.
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
(
c13257334
.
spcon
)
c
:
RegisterEffect
(
e1
)
--Power Capsule
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
13257334
,
0
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLED
)
e2
:
SetTarget
(
c13257334
.
pctg
)
e2
:
SetOperation
(
c13257334
.
pcop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
13257334
,
4
))
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c13257334
.
upcon
)
e3
:
SetTarget
(
c13257334
.
uptg
)
e3
:
SetOperation
(
c13257334
.
upop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetLabelObject
(
e1
)
e4
:
SetOperation
(
c13257334
.
smop
)
c
:
RegisterEffect
(
e4
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e11
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e11
:
SetOperation
(
c13257334
.
bgmop
)
c
:
RegisterEffect
(
e11
)
end
function
c13257334
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetFieldGroupCount
(
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
nil
)
==
0
and
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
end
function
c13257334
.
eqfilter
(
c
,
ec
)
return
c
:
IsSetCard
(
0x352
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
CheckEquipTarget
(
ec
)
end
function
c13257334
.
pctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
t1
=
Duel
.
IsExistingMatchingCard
(
c13257334
.
eqfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
local
t2
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
93130022
,
0
,
0x4011
,
c
:
GetAttack
(),
0
,
c
:
GetLevel
(),
c
:
GetRace
(),
c
:
GetAttribute
())
if
chk
==
0
then
return
t1
or
t2
end
local
op
=
0
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
13257334
,
1
))
if
t1
and
t2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
13257334
,
2
),
aux
.
Stringid
(
13257334
,
3
))
elseif
t1
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
13257334
,
2
))
elseif
t2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
13257334
,
3
))
+
1
end
e
:
SetLabel
(
op
)
if
op
==
0
then
e
:
SetCategory
(
CATEGORY_EQUIP
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
elseif
op
==
1
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
end
end
function
c13257334
.
pcop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetLabel
()
==
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c13257334
.
eqfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
c
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
Equip
(
tp
,
tc
,
c
)
end
elseif
e
:
GetLabel
()
==
1
then
local
atk
=
c
:
GetAttack
()
local
lv
=
c
:
GetLevel
()
local
race
=
c
:
GetRace
()
local
att
=
c
:
GetAttribute
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
or
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
93130022
,
0
,
0x4011
,
atk
,
0
,
lv
,
race
,
att
)
then
return
end
local
token
=
Duel
.
CreateToken
(
tp
,
93130022
)
c
:
CreateRelation
(
token
,
RESET_EVENT
+
0x1fe0000
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
c13257334
.
tokenatk
)
e1
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
token
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
token
:
RegisterEffect
(
e2
,
true
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e3
:
SetValue
(
c13257334
.
tokenlv
)
e3
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
token
:
RegisterEffect
(
e3
,
true
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_CHANGE_RACE
)
e4
:
SetValue
(
c13257334
.
tokenrace
)
e4
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
token
:
RegisterEffect
(
e4
,
true
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_CHANGE_ATTRIBUTE
)
e5
:
SetValue
(
c13257334
.
tokenatt
)
e5
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
token
:
RegisterEffect
(
e5
,
true
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetCode
(
EFFECT_SELF_DESTROY
)
e6
:
SetCondition
(
c13257334
.
tokendes
)
e6
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
token
:
RegisterEffect
(
e6
,
true
)
Duel
.
SpecialSummonComplete
()
end
end
function
c13257334
.
tokenatk
(
e
,
c
)
return
e
:
GetOwner
():
GetAttack
()
end
function
c13257334
.
tokenlv
(
e
,
c
)
return
e
:
GetOwner
():
GetLevel
()
end
function
c13257334
.
tokenrace
(
e
,
c
)
return
e
:
GetOwner
():
GetRace
()
end
function
c13257334
.
tokenatt
(
e
,
c
)
return
e
:
GetOwner
():
GetAttribute
()
end
function
c13257334
.
tokendes
(
e
)
return
not
e
:
GetOwner
():
IsRelateToCard
(
e
:
GetHandler
())
end
function
c13257334
.
upcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
return
d
~=
nil
and
d
:
IsFaceup
()
and
((
a
:
GetControler
()
==
tp
and
a
:
IsSetCard
(
0x351
)
and
a
:
IsRelateToBattle
())
or
(
d
:
GetControler
()
==
tp
and
d
:
IsSetCard
(
0x351
)
and
d
:
IsRelateToBattle
()))
end
function
c13257334
.
uptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetAttacker
()
local
at
=
Duel
.
GetAttackTarget
()
if
tc
:
IsControler
(
1
-
tp
)
then
tc
=
at
end
if
not
tc
and
tc
:
IsFacedown
()
then
return
false
end
e
:
SetLabelObject
(
tc
)
if
chk
==
0
then
return
tc
:
IsControler
(
tp
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
and
tc
:
IsSetCard
(
0x351
)
and
e
:
GetHandler
()
~=
tc
end
e
:
SetLabelObject
(
tc
)
end
function
c13257334
.
upop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
local
c
=
e
:
GetHandler
()
if
tc
:
IsRelateToBattle
()
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE_CAL
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2
:
SetValue
(
c13257334
.
efilter
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE_CAL
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c13257334
.
efilter
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
function
c13257334
.
smop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
==
e
:
GetLabelObject
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_MSET
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
function
c13257334
.
bgmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
13257334
,
7
))
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