Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Soulgamer
ygopro-222DIY-cards
Commits
7be98033
Commit
7be98033
authored
Sep 16, 2021
by
Tachibana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndyd
parent
498381d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
400 additions
and
399 deletions
+400
-399
expansions/script/c47510239.lua
expansions/script/c47510239.lua
+82
-85
expansions/script/c47530026.lua
expansions/script/c47530026.lua
+160
-158
expansions/script/c47530027.lua
expansions/script/c47530027.lua
+158
-156
No files found.
expansions/script/c47510239.lua
View file @
7be98033
...
...
@@ -4,113 +4,110 @@ local cm=_G["c"..m]
cm
.
dfc_front_side
=
m
cm
.
dfc_back_side
=
m
+
2
function
c47510239
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--summon with 1 tribute
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47510239
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SUMMON_PROC
)
e1
:
SetCondition
(
c47510239
.
otcon
)
e1
:
SetOperation
(
c47510239
.
otop
)
e1
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e2
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetOperation
(
c47510239
.
thop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47510239
,
2
))
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetRange
(
LOCATION_PZONE
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetCountLimit
(
1
,
47510240
)
e5
:
SetTarget
(
c47510239
.
sumtg
)
e5
:
SetOperation
(
c47510239
.
sumop
)
c
:
RegisterEffect
(
e5
)
--Change
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
47510239
,
3
))
e6
:
SetType
(
EFFECT_TYPE_IGNITION
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCountLimit
(
1
,
47510239
)
e6
:
SetCost
(
c47510239
.
chcost
)
e6
:
SetTarget
(
c47510239
.
changetg
)
e6
:
SetOperation
(
c47510239
.
changeop
)
c
:
RegisterEffect
(
e6
)
aux
.
EnablePendulumAttribute
(
c
)
--summon with 1 tribute
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47510239
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SUMMON_PROC
)
e1
:
SetCondition
(
c47510239
.
otcon
)
e1
:
SetOperation
(
c47510239
.
otop
)
e1
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e2
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetOperation
(
c47510239
.
thop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47510239
,
2
))
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetRange
(
LOCATION_PZONE
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetCountLimit
(
1
,
47510240
)
e5
:
SetTarget
(
c47510239
.
sumtg
)
e5
:
SetOperation
(
c47510239
.
sumop
)
c
:
RegisterEffect
(
e5
)
--Change
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
47510239
,
3
))
e6
:
SetType
(
EFFECT_TYPE_IGNITION
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCountLimit
(
1
,
47510239
)
e6
:
SetCost
(
c47510239
.
chcost
)
e6
:
SetTarget
(
c47510239
.
changetg
)
e6
:
SetOperation
(
c47510239
.
changeop
)
c
:
RegisterEffect
(
e6
)
end
function
c47510239
.
otfilter
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
return
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c47510239
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
c
:
GetLevel
()
>
4
and
minc
<=
1
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c47510239
.
otfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
,
tp
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
c
:
GetLevel
()
>
4
and
minc
<=
1
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c47510239
.
otfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
,
tp
)
end
function
c47510239
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c47510239
.
otfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
1
,
c
,
tp
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c47510239
.
otfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
1
,
c
,
tp
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
c47510239
.
thfilter
(
c
,
e
,
tp
,
zone
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsLevelAbove
(
7
)
and
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsLevelAbove
(
7
)
and
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
function
c47510239
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47510239
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47510239
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
end
end
end
function
c47510239
.
sumfilter
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsRace
(
RACE_FAIRY
)
return
c
:
IsFacedown
()
or
not
c
:
IsRace
(
RACE_FAIRY
)
end
function
c47510239
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsSummonable
(
true
,
nil
,
1
)
or
c
:
IsMSetable
(
true
,
nil
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
0
,
0
)
local
c
=
e
:
GetHandler
()
local
minc
,
maxc
=
c
:
GetTributeRequirement
()
if
chk
==
0
then
return
Duel
.
IsPlayerCanSummon
(
tp
,
SUMMON_TYPE_ADVANCE
,
c
)
and
Duel
.
CheckTribute
(
c
,
minc
,
maxc
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
tp
,
LOCATION_PZONE
)
end
function
c47510239
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
pos
=
0
if
c
:
IsSummonable
(
true
,
nil
,
1
)
then
pos
=
pos
+
POS_FACEUP_ATTACK
end
if
c
:
IsMSetable
(
true
,
nil
,
1
)
then
pos
=
pos
+
POS_FACEDOWN_DEFENSE
end
if
pos
==
0
then
return
end
if
Duel
.
SelectPosition
(
tp
,
c
,
pos
)
==
POS_FACEUP_ATTACK
then
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
else
Duel
.
MSet
(
tp
,
c
,
true
,
nil
,
1
)
end
local
c
=
e
:
GetHandler
()
local
minc
,
maxc
=
c
:
GetTributeRequirement
()
if
not
c
:
IsRelateToEffect
(
e
)
or
not
Duel
.
CheckTribute
(
c
,
minc
,
maxc
)
or
not
Duel
.
IsPlayerCanSummon
(
tp
,
SUMMON_TYPE_ADVANCE
,
c
)
then
return
end
local
SummonCheck
=
Duel
.
CheckTribute
(
c
,
minc
,
maxc
)
if
SummonCheck
then
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
end
end
function
c47510239
.
chfilter
(
c
)
return
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsLevelAbove
(
7
)
and
c
:
IsAbleToGraveAsCost
()
return
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsLevelAbove
(
7
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c47510239
.
chcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c47510239
.
chfilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
2
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47510239
.
chfilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
2
,
2
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c47510239
.
chfilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
2
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47510239
.
chfilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
2
,
2
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c47510239
.
changetg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
.
dfc_back_side
and
c
.
dfc_front_side
==
c
:
GetOriginalCode
()
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
.
dfc_back_side
and
c
.
dfc_front_side
==
c
:
GetOriginalCode
()
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c47510239
.
changeop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
local
tcode
=
c
.
dfc_back_side
c
:
SetEntityCode
(
tcode
,
true
)
c
:
ReplaceEffect
(
tcode
,
0
,
0
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
local
tcode
=
c
.
dfc_back_side
c
:
SetEntityCode
(
tcode
,
true
)
c
:
ReplaceEffect
(
tcode
,
0
,
0
)
end
\ No newline at end of file
expansions/script/c47530026.lua
View file @
7be98033
--吉姆强袭型改
function
c47530026
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c47530026
.
psplimit
)
c
:
RegisterEffect
(
e1
)
--summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
47530026
,
1
))
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetTarget
(
c47530026
.
sumtg
)
e2
:
SetOperation
(
c47530026
.
sumop
)
c
:
RegisterEffect
(
e2
)
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LIMIT_SUMMON_PROC
)
e1
:
SetCondition
(
c47530026
.
ttcon
)
e1
:
SetOperation
(
c47530026
.
ttop
)
e1
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_LIMIT_SET_PROC
)
e2
:
SetCondition
(
c47530026
.
setcon
)
c
:
RegisterEffect
(
e2
)
--tribute check
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e5
:
SetValue
(
c47530026
.
valcheck
)
c
:
RegisterEffect
(
e5
)
--buff
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c47530026
.
advcon
)
e6
:
SetValue
(
1
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCondition
(
c47530026
.
advcon
)
e7
:
SetValue
(
c47530026
.
efilter
)
c
:
RegisterEffect
(
e7
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e8
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetCondition
(
c47530026
.
advcon
)
e8
:
SetValue
(
1
)
c
:
RegisterEffect
(
e8
)
--actlimit
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e9
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetTargetRange
(
0
,
1
)
e9
:
SetValue
(
c47530026
.
aclimit
)
e9
:
SetCondition
(
c47530026
.
actcon
)
c
:
RegisterEffect
(
e9
)
--remove
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetDescription
(
aux
.
Stringid
(
47530026
,
0
))
e10
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e10
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e10
:
SetCondition
(
c47530026
.
rmcon
)
e10
:
SetOperation
(
c47530026
.
rmop
)
c
:
RegisterEffect
(
e10
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c47530026
.
psplimit
)
c
:
RegisterEffect
(
e1
)
--summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
47530026
,
1
))
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetTarget
(
c47530026
.
sumtg
)
e2
:
SetOperation
(
c47530026
.
sumop
)
c
:
RegisterEffect
(
e2
)
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LIMIT_SUMMON_PROC
)
e1
:
SetCondition
(
c47530026
.
ttcon
)
e1
:
SetOperation
(
c47530026
.
ttop
)
e1
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_LIMIT_SET_PROC
)
e2
:
SetCondition
(
c47530026
.
setcon
)
c
:
RegisterEffect
(
e2
)
--tribute check
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e5
:
SetValue
(
c47530026
.
valcheck
)
c
:
RegisterEffect
(
e5
)
--buff
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c47530026
.
advcon
)
e6
:
SetValue
(
1
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCondition
(
c47530026
.
advcon
)
e7
:
SetValue
(
c47530026
.
efilter
)
c
:
RegisterEffect
(
e7
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e8
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetCondition
(
c47530026
.
advcon
)
e8
:
SetValue
(
1
)
c
:
RegisterEffect
(
e8
)
--actlimit
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e9
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetTargetRange
(
0
,
1
)
e9
:
SetValue
(
c47530026
.
aclimit
)
e9
:
SetCondition
(
c47530026
.
actcon
)
c
:
RegisterEffect
(
e9
)
--remove
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetDescription
(
aux
.
Stringid
(
47530026
,
0
))
e10
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e10
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e10
:
SetCondition
(
c47530026
.
rmcon
)
e10
:
SetOperation
(
c47530026
.
rmop
)
c
:
RegisterEffect
(
e10
)
end
function
c47530026
.
IsEFSF
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_EFSF
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_EFSF
end
function
c47530026
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
e
:
SetLabelObject
(
bc
)
return
c
==
Duel
.
GetAttacker
()
and
bc
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
bc
:
IsOnField
()
and
bc
:
IsRelateToBattle
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
e
:
SetLabelObject
(
bc
)
return
c
==
Duel
.
GetAttacker
()
and
bc
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
bc
:
IsOnField
()
and
bc
:
IsRelateToBattle
()
end
function
c47530026
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
e
:
GetLabelObject
()
local
atk1
=
bc
:
GetAttack
()
local
atk2
=
c
:
GetAttack
()
local
atk
=
atk1
+
atk2
if
bc
:
IsRelateToBattle
()
then
local
lp
=
Duel
.
GetLP
(
1
-
tp
)
Duel
.
SetLP
(
1
-
tp
,
lp
-
atk
)
end
local
c
=
e
:
GetHandler
()
local
bc
=
e
:
GetLabelObject
()
local
atk1
=
bc
:
GetAttack
()
local
atk2
=
c
:
GetAttack
()
local
atk
=
atk1
+
atk2
if
bc
:
IsRelateToBattle
()
then
local
lp
=
Duel
.
GetLP
(
1
-
tp
)
Duel
.
SetLP
(
1
-
tp
,
lp
-
atk
)
end
end
function
c47530026
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c47530026
.
actcon
(
e
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c47530026
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
end
function
c47530026
.
advcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c47530026
.
psplimit
(
e
,
c
)
return
not
c
:
IsRace
(
RACE_MACHINE
)
return
not
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530026
.
setfilter
(
c
)
return
c47530026
.
IsEFSF
(
c
)
and
(
c
:
IsType
(
TYPE_TRAP
)
or
c
:
IsType
(
TYPE_SPELL
))
return
c47530026
.
IsEFSF
(
c
)
and
(
c
:
IsType
(
TYPE_TRAP
)
or
c
:
IsType
(
TYPE_SPELL
))
end
function
c47530026
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsSummonable
(
true
,
nil
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c47530026
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
0
,
0
)
local
c
=
e
:
GetHandler
()
local
minc
,
maxc
=
c
:
GetTributeRequirement
()
if
chk
==
0
then
return
Duel
.
IsPlayerCanSummon
(
tp
,
SUMMON_TYPE_ADVANCE
,
c
)
and
Duel
.
CheckTribute
(
c
,
minc
,
maxc
)
and
Duel
.
IsExistingMatchingCard
(
c47530026
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c47530026
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530026
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
false
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
local
c
=
e
:
GetHandler
()
local
minc
,
maxc
=
c
:
GetTributeRequirement
()
if
not
c
:
IsRelateToEffect
(
e
)
or
not
Duel
.
CheckTribute
(
c
,
minc
,
maxc
)
or
not
Duel
.
IsPlayerCanSummon
(
tp
,
SUMMON_TYPE_ADVANCE
,
c
)
then
return
end
if
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530026
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
false
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
function
c47530026
.
otfilter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_MACHINE
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530026
.
ttcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
mg
=
Duel
.
GetMatchingGroup
(
c47530026
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
2
and
Duel
.
CheckTribute
(
c
,
2
,
2
,
mg
)
if
c
==
nil
then
return
true
end
local
mg
=
Duel
.
GetMatchingGroup
(
c47530026
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
2
and
Duel
.
CheckTribute
(
c
,
2
,
2
,
mg
)
end
function
c47530026
.
ttop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c47530026
.
otfilter
,
0
,
LOCATION_MZONE
,
0
,
nil
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
2
,
2
,
mg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
local
mg
=
Duel
.
GetMatchingGroup
(
c47530026
.
otfilter
,
0
,
LOCATION_MZONE
,
0
,
nil
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
2
,
2
,
mg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
c47530026
.
setcon
(
e
,
c
,
minc
)
if
not
c
then
return
true
end
return
false
if
not
c
then
return
true
end
return
false
end
function
c47530026
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
local
tc
=
g
:
GetFirst
()
local
atk
=
0
local
def
=
0
while
tc
do
local
catk
=
tc
:
GetTextAttack
()
local
cdef
=
tc
:
GetTextDefense
()
atk
=
atk
+
(
catk
>=
0
and
catk
or
0
)
def
=
def
+
(
cdef
>=
0
and
cdef
or
0
)
tc
=
g
:
GetNext
()
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
--atk continuous effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
e1
)
--def continuous effect
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
def
)
c
:
RegisterEffect
(
e2
)
end
local
g
=
c
:
GetMaterial
()
local
tc
=
g
:
GetFirst
()
local
atk
=
0
local
def
=
0
while
tc
do
local
catk
=
tc
:
GetTextAttack
()
local
cdef
=
tc
:
GetTextDefense
()
atk
=
atk
+
(
catk
>=
0
and
catk
or
0
)
def
=
def
+
(
cdef
>=
0
and
cdef
or
0
)
tc
=
g
:
GetNext
()
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
--atk continuous effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
e1
)
--def continuous effect
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
def
)
c
:
RegisterEffect
(
e2
)
end
end
\ No newline at end of file
expansions/script/c47530027.lua
View file @
7be98033
function
c47530027
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c47530027
.
psplimit
)
c
:
RegisterEffect
(
e1
)
--summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
47530027
,
1
))
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetTarget
(
c47530027
.
sumtg
)
e2
:
SetOperation
(
c47530027
.
sumop
)
c
:
RegisterEffect
(
e2
)
--spsummon proc
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
47530027
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCode
(
EFFECT_SUMMON_PROC
)
e3
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
e3
:
SetCondition
(
c47530027
.
otcon
)
e3
:
SetOperation
(
c47530027
.
otop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e4
)
--tribute check
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e5
:
SetValue
(
c47530027
.
valcheck
)
c
:
RegisterEffect
(
e5
)
--buff
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c47530027
.
advcon
)
e6
:
SetValue
(
1
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCondition
(
c47530027
.
advcon
)
e7
:
SetValue
(
c47530027
.
efilter
)
c
:
RegisterEffect
(
e7
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e8
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetCondition
(
c47530027
.
advcon
)
e8
:
SetValue
(
1
)
c
:
RegisterEffect
(
e8
)
--actlimit
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e9
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetTargetRange
(
0
,
1
)
e9
:
SetValue
(
c47530027
.
aclimit
)
e9
:
SetCondition
(
c47530027
.
actcon
)
c
:
RegisterEffect
(
e9
)
--remove
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetDescription
(
aux
.
Stringid
(
47530027
,
0
))
e10
:
SetCategory
(
CATEGORY_REMOVE
)
e10
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e10
:
SetCode
(
EVENT_BATTLE_START
)
e10
:
SetCondition
(
c47530027
.
descon
)
e10
:
SetTarget
(
c47530027
.
destg
)
e10
:
SetOperation
(
c47530027
.
desop
)
c
:
RegisterEffect
(
e10
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c47530027
.
psplimit
)
c
:
RegisterEffect
(
e1
)
--summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
47530027
,
1
))
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetTarget
(
c47530027
.
sumtg
)
e2
:
SetOperation
(
c47530027
.
sumop
)
c
:
RegisterEffect
(
e2
)
--spsummon proc
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
47530027
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCode
(
EFFECT_SUMMON_PROC
)
e3
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
e3
:
SetCondition
(
c47530027
.
otcon
)
e3
:
SetOperation
(
c47530027
.
otop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e4
)
--tribute check
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e5
:
SetValue
(
c47530027
.
valcheck
)
c
:
RegisterEffect
(
e5
)
--buff
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c47530027
.
advcon
)
e6
:
SetValue
(
1
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCondition
(
c47530027
.
advcon
)
e7
:
SetValue
(
c47530027
.
efilter
)
c
:
RegisterEffect
(
e7
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e8
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetCondition
(
c47530027
.
advcon
)
e8
:
SetValue
(
1
)
c
:
RegisterEffect
(
e8
)
--actlimit
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e9
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetTargetRange
(
0
,
1
)
e9
:
SetValue
(
c47530027
.
aclimit
)
e9
:
SetCondition
(
c47530027
.
actcon
)
c
:
RegisterEffect
(
e9
)
--remove
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetDescription
(
aux
.
Stringid
(
47530027
,
0
))
e10
:
SetCategory
(
CATEGORY_REMOVE
)
e10
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e10
:
SetCode
(
EVENT_BATTLE_START
)
e10
:
SetCondition
(
c47530027
.
descon
)
e10
:
SetTarget
(
c47530027
.
destg
)
e10
:
SetOperation
(
c47530027
.
desop
)
c
:
RegisterEffect
(
e10
)
end
function
c47530027
.
IsZEON
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_ZEON
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_ZEON
end
function
c47530027
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsDualState
()
and
Duel
.
GetAttacker
()
==
c
and
bc
and
bc
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
and
bc
:
IsAbleToRemove
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsDualState
()
and
Duel
.
GetAttacker
()
==
c
and
bc
and
bc
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
and
bc
:
IsAbleToRemove
()
end
function
c47530027
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
():
GetBattleTarget
(),
1
,
0
,
0
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
():
GetBattleTarget
(),
1
,
0
,
0
)
end
function
c47530027
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bc
=
e
:
GetHandler
():
GetBattleTarget
()
if
bc
:
IsRelateToBattle
()
and
Duel
.
GetControl
(
bc
,
tp
)
==
0
then
local
atk
=
bc
:
GetAttack
()
local
lp
=
Duel
.
GetLP
(
1
-
tp
)
Duel
.
SetLP
(
1
-
tp
,
lp
-
atk
)
end
local
bc
=
e
:
GetHandler
():
GetBattleTarget
()
if
bc
:
IsRelateToBattle
()
and
Duel
.
GetControl
(
bc
,
tp
)
==
0
then
local
atk
=
bc
:
GetAttack
()
local
lp
=
Duel
.
GetLP
(
1
-
tp
)
Duel
.
SetLP
(
1
-
tp
,
lp
-
atk
)
end
end
function
c47530027
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c47530027
.
actcon
(
e
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c47530027
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
end
function
c47530027
.
advcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c47530027
.
psplimit
(
e
,
c
)
return
not
c
:
IsRace
(
RACE_MACHINE
)
return
not
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530027
.
setfilter
(
c
)
return
c47530027
.
IsZEON
(
c
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsType
(
TYPE_COUNTER
)
and
c
:
IsSSetable
()
return
c47530027
.
IsZEON
(
c
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsType
(
TYPE_COUNTER
)
and
c
:
IsSSetable
()
end
function
c47530027
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsSummonable
(
true
,
nil
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c47530027
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
0
,
0
)
local
c
=
e
:
GetHandler
()
local
minc
,
maxc
=
c
:
GetTributeRequirement
()
if
chk
==
0
then
return
Duel
.
IsPlayerCanSummon
(
tp
,
SUMMON_TYPE_ADVANCE
,
c
)
and
Duel
.
CheckTribute
(
c
,
minc
,
maxc
)
and
Duel
.
IsExistingMatchingCard
(
c47530027
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c47530027
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530027
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
false
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
local
c
=
e
:
GetHandler
()
local
minc
,
maxc
=
c
:
GetTributeRequirement
()
if
not
c
:
IsRelateToEffect
(
e
)
or
not
Duel
.
CheckTribute
(
c
,
minc
,
maxc
)
or
not
Duel
.
IsPlayerCanSummon
(
tp
,
SUMMON_TYPE_ADVANCE
,
c
)
then
return
end
if
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530027
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
false
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
function
c47530027
.
otfilter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_MACHINE
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530027
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
mg
=
Duel
.
GetMatchingGroup
(
c47530027
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
if
c
==
nil
then
return
true
end
local
mg
=
Duel
.
GetMatchingGroup
(
c47530027
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
end
function
c47530027
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c47530027
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
1
,
1
,
mg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
local
mg
=
Duel
.
GetMatchingGroup
(
c47530027
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
1
,
1
,
mg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
c47530027
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
local
tc
=
g
:
GetFirst
()
local
atk
=
0
local
def
=
0
while
tc
do
local
catk
=
tc
:
GetTextAttack
()
local
cdef
=
tc
:
GetTextDefense
()
atk
=
atk
+
(
catk
>=
0
and
catk
or
0
)
def
=
def
+
(
cdef
>=
0
and
cdef
or
0
)
tc
=
g
:
GetNext
()
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
--atk continuous effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
e1
)
--def continuous effect
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
def
)
c
:
RegisterEffect
(
e2
)
end
local
g
=
c
:
GetMaterial
()
local
tc
=
g
:
GetFirst
()
local
atk
=
0
local
def
=
0
while
tc
do
local
catk
=
tc
:
GetTextAttack
()
local
cdef
=
tc
:
GetTextDefense
()
atk
=
atk
+
(
catk
>=
0
and
catk
or
0
)
def
=
def
+
(
cdef
>=
0
and
cdef
or
0
)
tc
=
g
:
GetNext
()
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
--atk continuous effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
e1
)
--def continuous effect
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
def
)
c
:
RegisterEffect
(
e2
)
end
end
\ No newline at end of file
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