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
REIKAI
ygopro
Commits
39d3291c
Commit
39d3291c
authored
Aug 09, 2013
by
argon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e27bccd2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
259 additions
and
13 deletions
+259
-13
ocgcore/card.cpp
ocgcore/card.cpp
+12
-7
script/c14005031.lua
script/c14005031.lua
+79
-0
script/c15721123.lua
script/c15721123.lua
+45
-0
script/c16943770.lua
script/c16943770.lua
+4
-3
script/c42216237.lua
script/c42216237.lua
+59
-0
script/c53550467.lua
script/c53550467.lua
+3
-3
script/c78610936.lua
script/c78610936.lua
+57
-0
No files found.
ocgcore/card.cpp
View file @
39d3291c
...
@@ -656,16 +656,21 @@ void card::xyz_overlay(card_set* materials) {
...
@@ -656,16 +656,21 @@ void card::xyz_overlay(card_set* materials) {
return
;
return
;
card_set
des
;
card_set
des
;
if
(
materials
->
size
()
==
1
)
{
if
(
materials
->
size
()
==
1
)
{
(
*
materials
->
begin
())
->
reset
(
RESET_LEAVE
+
RESET_OVERLAY
,
RESET_EVENT
);
card
*
pcard
=
*
materials
->
begin
();
xyz_add
(
*
materials
->
begin
(),
&
des
);
pcard
->
reset
(
RESET_LEAVE
+
RESET_OVERLAY
,
RESET_EVENT
);
if
(
pcard
->
unique_code
)
pduel
->
game_field
->
remove_unique_card
(
pcard
);
xyz_add
(
pcard
,
&
des
);
}
else
{
}
else
{
field
::
card_vector
cv
;
field
::
card_vector
cv
;
for
(
auto
cit
=
materials
->
begin
();
cit
!=
materials
->
end
();
++
cit
)
for
(
auto
cit
:
*
materials
)
cv
.
push_back
(
*
cit
);
cv
.
push_back
(
cit
);
std
::
sort
(
cv
.
begin
(),
cv
.
end
(),
card
::
card_operation_sort
);
std
::
sort
(
cv
.
begin
(),
cv
.
end
(),
card
::
card_operation_sort
);
for
(
auto
cvit
=
cv
.
begin
();
cvit
!=
cv
.
end
();
++
cvit
)
{
for
(
auto
pcard
:
cv
)
{
(
*
cvit
)
->
reset
(
RESET_LEAVE
+
RESET_OVERLAY
,
RESET_EVENT
);
pcard
->
reset
(
RESET_LEAVE
+
RESET_OVERLAY
,
RESET_EVENT
);
xyz_add
(
*
cvit
,
&
des
);
if
(
pcard
->
unique_code
)
pduel
->
game_field
->
remove_unique_card
(
pcard
);
xyz_add
(
pcard
,
&
des
);
}
}
}
}
if
(
des
.
size
())
if
(
des
.
size
())
...
...
script/c14005031.lua
0 → 100644
View file @
39d3291c
--Moon Dance Ritual
function
c14005031
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1e0
)
e1
:
SetTarget
(
c14005031
.
target
)
e1
:
SetOperation
(
c14005031
.
activate
)
c
:
RegisterEffect
(
e1
)
--disable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
c14005031
.
disable
)
e2
:
SetCondition
(
c14005031
.
discon
)
e2
:
SetCode
(
EFFECT_DISABLE
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetCondition
(
c14005031
.
descon
)
e3
:
SetOperation
(
c14005031
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c14005031
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetOverlayCount
()
==
0
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
end
function
c14005031
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c14005031
.
filter
(
chk
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c14005031
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c14005031
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c14005031
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
c
:
SetCardTarget
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
14005031
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_REPEAT
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c14005031
.
matcon
)
e1
:
SetOperation
(
c14005031
.
matop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
function
c14005031
.
disable
(
e
,
c
)
return
c
:
IsType
(
TYPE_EFFECT
)
end
function
c14005031
.
discon
(
e
)
return
e
:
GetHandler
():
GetFirstCardTarget
()
~=
nil
end
function
c14005031
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
():
GetFirstCardTarget
()
return
tc
and
eg
:
IsContains
(
tc
)
end
function
c14005031
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
function
c14005031
.
matcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFirstCardTarget
()
~=
nil
end
function
c14005031
.
matop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
c
:
GetFirstCardTarget
()
if
tc
then
Duel
.
Overlay
(
tc
,
Group
.
FromCards
(
c
))
end
end
script/c15721123.lua
0 → 100644
View file @
39d3291c
--Confronting the "C"
function
c15721123
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
15721123
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c15721123
.
spcon
)
e1
:
SetTarget
(
c15721123
.
sptg
)
e1
:
SetOperation
(
c15721123
.
spop
)
c
:
RegisterEffect
(
e1
)
end
function
c15721123
.
cfilter
(
c
,
tp
)
return
c
:
GetSummonPlayer
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_EXTRA
)
end
function
c15721123
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c15721123
.
cfilter
,
1
,
nil
,
1
-
tp
)
end
function
c15721123
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c15721123
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetValue
(
c15721123
.
efilter
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e1
)
end
end
function
c15721123
.
efilter
(
e
,
te
)
if
not
te
:
IsActiveType
(
TYPE_MONSTER
)
then
return
false
end
local
c
=
e
:
GetHandler
()
local
ec
=
te
:
GetHandler
()
if
ec
:
IsHasCardTarget
(
c
)
then
return
true
end
return
te
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
and
te
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
and
c
:
IsRelateToEffect
(
te
)
end
script/c16943770.lua
View file @
39d3291c
...
@@ -45,16 +45,17 @@ function c16943770.indcon(e)
...
@@ -45,16 +45,17 @@ function c16943770.indcon(e)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
TYPE_TOKEN
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
TYPE_TOKEN
)
end
end
function
c16943770
.
cfilter
(
c
)
function
c16943770
.
cfilter
(
c
)
return
c
:
IsSet
ard
(
0x101b
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsSet
Card
(
0x101b
)
and
not
c
:
IsCode
(
16943770
)
and
c
:
IsAbleToRemoveAsCost
()
end
end
function
c16943770
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c16943770
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c16943770
.
cfilter
,
tp
,
LOCATION_
MZON
E
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c16943770
.
cfilter
,
tp
,
LOCATION_
GRAV
E
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c16943770
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c16943770
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c16943770
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c16943770
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
31533705
,
0x101b
,
0x4011
,
0
,
0
,
3
,
RACE_MACHINE
,
ATTRIBUTE_WIND
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
end
...
...
script/c42216237.lua
0 → 100644
View file @
39d3291c
--Angel of Zera
function
c42216237
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
c42216237
.
atkval
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetOperation
(
c42216237
.
spreg
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
42216237
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetRange
(
LOCATION_REMOVED
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e3
:
SetCondition
(
c42216237
.
spcon
)
e3
:
SetCost
(
c42216237
.
spcost
)
e3
:
SetTarget
(
c42216237
.
sptg
)
e3
:
SetOperation
(
c42216237
.
spop
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
end
function
c42216237
.
atkval
(
e
,
c
)
return
Duel
.
GetFieldGroupCount
(
c
:
GetControler
(),
0
,
LOCATION_REMOVED
)
*
100
end
function
c42216237
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
SetLabel
(
Duel
.
GetTurnCount
())
e
:
GetHandler
():
RegisterFlagEffect
(
42216237
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
function
c42216237
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
e
:
GetLabelObject
():
GetLabel
()
~=
Duel
.
GetTurnCount
()
and
c
:
GetFlagEffect
(
42216237
)
>
0
end
function
c42216237
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
42216237
)
==
0
end
Duel
.
RegisterFlagEffect
(
tp
,
42216237
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c42216237
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
c
=
e
:
GetHandler
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
c
:
ResetFlagEffect
(
42216237
)
end
function
c42216237
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
1
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
script/c53550467.lua
View file @
39d3291c
...
@@ -19,7 +19,7 @@ function c53550467.initial_effect(c)
...
@@ -19,7 +19,7 @@ function c53550467.initial_effect(c)
e2
:
SetCondition
(
c53550467
.
con
)
e2
:
SetCondition
(
c53550467
.
con
)
e2
:
SetTarget
(
c53550467
.
tg
)
e2
:
SetTarget
(
c53550467
.
tg
)
e2
:
SetValue
(
c53550467
.
efval
)
e2
:
SetValue
(
c53550467
.
efval
)
c
:
RegisterEffect
(
e
1
)
c
:
RegisterEffect
(
e
2
)
--destroy
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
53550467
,
0
))
e3
:
SetDescription
(
aux
.
Stringid
(
53550467
,
0
))
...
@@ -40,7 +40,7 @@ function c53550467.con(e)
...
@@ -40,7 +40,7 @@ function c53550467.con(e)
return
Duel
.
IsExistingMatchingCard
(
c53550467
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
return
Duel
.
IsExistingMatchingCard
(
c53550467
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
end
function
c53550467
.
tg
(
e
,
c
)
function
c53550467
.
tg
(
e
,
c
)
return
c
~=
e
:
GetHandler
()
and
c
:
Is
Faceup
()
and
c
:
Is
AttackBelow
(
1800
)
return
c
~=
e
:
GetHandler
()
and
c
:
IsAttackBelow
(
1800
)
end
end
function
c53550467
.
efval
(
e
,
re
,
tp
)
function
c53550467
.
efval
(
e
,
re
,
tp
)
return
e
:
GetHandlerPlayer
()
~=
tp
return
e
:
GetHandlerPlayer
()
~=
tp
...
@@ -65,6 +65,6 @@ end
...
@@ -65,6 +65,6 @@ end
function
c53550467
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c53550467
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
Destroy
(
t
g
,
REASON_EFFECT
)
Duel
.
Destroy
(
t
c
,
REASON_EFFECT
)
end
end
end
end
script/c78610936.lua
0 → 100644
View file @
39d3291c
--Xyz Encore
function
c78610936
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1e0
)
e1
:
SetTarget
(
c78610936
.
target
)
e1
:
SetOperation
(
c78610936
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c78610936
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsAbleToExtra
()
and
c
:
GetOverlayCount
()
>
0
end
function
c78610936
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c78610936
.
filter
(
chk
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c78610936
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c78610936
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
Duel
.
SetChainLimit
(
c78610936
.
chlimit
)
end
function
c78610936
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c78610936
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
GetLevel
()
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
1
-
tp
)
and
not
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
end
function
c78610936
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
local
mg
=
tc
:
GetOverlayGroup
()
if
Duel
.
SendtoDeck
(
tc
,
nil
,
0
,
REASON_EFFECT
)
>
0
then
local
ft
=
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
if
ft
>
0
and
mg
:
GetCount
()
>
0
then
if
mg
:
GetCount
()
>
ft
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
mg
=
mg
:
Select
(
tp
,
ft
,
ft
,
nil
)
end
local
tc
=
mg
:
GetFirst
()
while
tc
do
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP_DEFENCE
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
-
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
tc
=
mg
:
GetNext
()
end
Duel
.
SpecialSummonComplete
()
end
end
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