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
Ai
ygopro-222DIY-cards
Commits
f639c653
Commit
f639c653
authored
Jun 14, 2019
by
2924713558
Committed by
GitHub
Jun 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
39a1997d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
621 additions
and
606 deletions
+621
-606
expansions/script/c17050901.lua
expansions/script/c17050901.lua
+66
-56
expansions/script/c26800001.lua
expansions/script/c26800001.lua
+86
-86
expansions/script/c26806000.lua
expansions/script/c26806000.lua
+59
-59
expansions/script/c26806003.lua
expansions/script/c26806003.lua
+70
-70
expansions/script/c75646502.lua
expansions/script/c75646502.lua
+58
-54
expansions/script/c81012044.lua
expansions/script/c81012044.lua
+114
-114
expansions/script/c81014039.lua
expansions/script/c81014039.lua
+94
-93
expansions/script/c81040003.lua
expansions/script/c81040003.lua
+74
-74
No files found.
expansions/script/c17050901.lua
View file @
f639c653
--斯忒诺
local
m
=
17050901
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
local
e0
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -9,8 +8,69 @@ function cm.initial_effect(c)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetRange
(
LOCATION_EXTRA
)
e0
:
SetCondition
(
cm
.
xyzcon
)
e0
:
SetOperation
(
cm
.
xyzop
)
e0
:
SetCondition
(
function
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCountFromEx
(
tp
)
local
ct
=-
ft
local
nmb
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
)
local
minc
=
2
local
maxc
=
99
if
min
then
if
min
>
minc
then
minc
=
min
end
if
max
<
maxc
then
maxc
=
max
end
if
minc
>
maxc
then
return
false
end
end
return
ct
<
minc
and
Duel
.
CheckXyzMaterial
(
c
,
cm
.
xyzfilter
,
7
,
minc
,
maxc
,
nmb
)
end
)
e0
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
return
true
end
local
nmb
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
)
local
minc
=
2
local
maxc
=
99
if
min
then
if
min
>
minc
then
minc
=
min
end
if
max
<
maxc
then
maxc
=
max
end
end
local
g
=
Duel
.
SelectXyzMaterial
(
tp
,
c
,
cm
.
xyzfilter
,
7
,
minc
,
maxc
,
nmb
)
if
g
then
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
return
true
else
return
false
end
end
)
e0
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
local
sg
=
Group
.
CreateGroup
()
local
tc
=
og
:
GetFirst
()
while
tc
do
local
sg1
=
tc
:
GetOverlayGroup
()
sg
:
Merge
(
sg1
)
tc
=
og
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
c
:
SetMaterial
(
og
)
Duel
.
Overlay
(
c
,
og
)
Duel
.
ShuffleHand
(
tp
)
else
local
mg
=
e
:
GetLabelObject
()
local
sg
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
local
sg1
=
tc
:
GetOverlayGroup
()
sg
:
Merge
(
sg1
)
tc
=
mg
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
c
:
SetMaterial
(
mg
)
Duel
.
Overlay
(
c
,
mg
)
Duel
.
ShuffleHand
(
tp
)
mg
:
DeleteGroup
()
end
end
)
e0
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e0
)
--spsummon proc
...
...
@@ -60,59 +120,9 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e6
)
end
cm
.
pendulum_level
=
7
function
cm
.
xyzfilter
(
c
,
xyzcard
)
if
c
:
IsLocation
(
LOCATION_ONFIELD
+
LOCATION_REMOVED
)
and
c
:
IsFacedown
()
then
return
false
end
return
c
:
IsCanBeXyzMaterial
(
xyzcard
)
and
c
:
IsXyzLevel
(
xyzcard
,
7
)
end
function
cm
.
xyzfilter1
(
c
,
xyzcard
)
return
c
:
IsXyzLevel
(
xyzcard
,
7
)
and
c
:
IsRace
(
RACE_REPTILE
)
and
c
:
IsCanBeXyzMaterial
(
xyzcard
)
end
function
cm
.
xyzcon
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
local
minc
=
2
local
maxc
=
99
if
min
then
minc
=
math.max
(
minc
,
min
)
maxc
=
math.min
(
maxc
,
max
)
end
local
mg
=
nil
local
exg
=
nil
if
og
then
mg
=
og
:
Filter
(
cm
.
xyzfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
exg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
nil
,
c
)
mg
:
Merge
(
exg
)
end
return
Senya
.
CheckGroup
(
mg
,
Senya
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
)
end
function
cm
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
local
g
=
nil
if
og
and
not
min
then
g
=
og
else
local
mg
=
nil
local
exg
=
nil
if
og
then
mg
=
og
:
Filter
(
cm
.
xyzfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
exg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
nil
,
c
)
mg
:
Merge
(
exg
)
end
local
minc
=
2
local
maxc
=
99
if
min
then
minc
=
math.max
(
minc
,
min
)
maxc
=
math.min
(
maxc
,
max
)
end
g
=
Senya
.
SelectGroup
(
tp
,
HINTMSG_XMATERIAL
,
mg
,
Senya
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
)
end
c
:
SetMaterial
(
g
)
Senya
.
OverlayGroup
(
c
,
g
,
false
,
true
)
Duel
.
ShuffleHand
(
tp
)
function
cm
.
xyzfilter
(
c
)
return
(
c
:
IsFaceup
()
or
not
c
:
IsLocation
(
LOCATION_MZONE
))
and
(
c
:
IsRace
(
RACE_REPTILE
)
or
not
c
:
IsLocation
(
LOCATION_HAND
+
LOCATION_GRAVE
))
end
function
cm
.
spfilter
(
c
,
ft
)
return
c
:
IsFaceup
()
...
...
expansions/script/c26800001.lua
View file @
f639c653
--大轮之华·大崎甘奈
function
c26800001
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
26800001
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
c26800001
.
matfilter
,
2
)
--indes
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetCondition
(
c26800001
.
indcon
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
26800001
,
0
))
e3
:
SetCategory
(
CATEGORY_REMOVE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
26800001
)
e3
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e3
:
SetCost
(
c26800001
.
descost
)
e3
:
SetTarget
(
c26800001
.
destg
)
e3
:
SetOperation
(
c26800001
.
desop
)
c
:
RegisterEffect
(
e3
)
--draw(battle)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
26800001
,
1
))
e4
:
SetCategory
(
CATEGORY_DRAW
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCondition
(
c26800001
.
drcon
)
e4
:
SetTarget
(
c26800001
.
drtg
)
e4
:
SetOperation
(
c26800001
.
drop
)
c
:
RegisterEffect
(
e4
)
end
function
c26800001
.
matfilter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
end
function
c26800001
.
indcon
(
e
)
return
Duel
.
GetTurnPlayer
()
~=
e
:
GetHandlerPlayer
()
end
function
c26800001
.
cfilter
(
c
,
g
)
return
g
:
IsContains
(
c
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
end
function
c26800001
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c26800001
.
cfilter
,
1
,
nil
,
lg
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c26800001
.
cfilter
,
1
,
1
,
nil
,
lg
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c26800001
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
Is
Controler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_
DESTROY
,
g
,
1
,
0
,
0
)
end
function
c26800001
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Remove
(
tc
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
function
c26800001
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetBattledGroupCount
()
>
0
end
function
c26800001
.
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
)
end
function
c26800001
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
--大轮之华·大崎甘奈
function
c26800001
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
26800001
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
c26800001
.
matfilter
,
2
)
--indes
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetCondition
(
c26800001
.
indcon
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
26800001
,
0
))
e3
:
SetCategory
(
CATEGORY_REMOVE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
26800001
)
e3
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e3
:
SetCost
(
c26800001
.
descost
)
e3
:
SetTarget
(
c26800001
.
destg
)
e3
:
SetOperation
(
c26800001
.
desop
)
c
:
RegisterEffect
(
e3
)
--draw(battle)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
26800001
,
1
))
e4
:
SetCategory
(
CATEGORY_DRAW
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCondition
(
c26800001
.
drcon
)
e4
:
SetTarget
(
c26800001
.
drtg
)
e4
:
SetOperation
(
c26800001
.
drop
)
c
:
RegisterEffect
(
e4
)
end
function
c26800001
.
matfilter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
end
function
c26800001
.
indcon
(
e
)
return
Duel
.
GetTurnPlayer
()
~=
e
:
GetHandlerPlayer
()
end
function
c26800001
.
cfilter
(
c
,
g
)
return
g
:
IsContains
(
c
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
end
function
c26800001
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c26800001
.
cfilter
,
1
,
nil
,
lg
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c26800001
.
cfilter
,
1
,
1
,
nil
,
lg
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c26800001
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
Is
AbleToRemove
()
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_
REMOVE
,
g
,
1
,
0
,
0
)
end
function
c26800001
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Remove
(
tc
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
function
c26800001
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetBattledGroupCount
()
>
0
end
function
c26800001
.
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
)
end
function
c26800001
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
expansions/script/c26806000.lua
View file @
f639c653
--海伊
function
c26806000
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
26806000
)
e1
:
SetCondition
(
c26806000
.
spcon
)
e1
:
SetTarget
(
c26806000
.
sptg
)
e1
:
SetOperation
(
c26806000
.
spop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
26806900
)
e3
:
SetTarget
(
c26806000
.
thtg
)
e3
:
SetOperation
(
c26806000
.
thop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e4
)
end
function
c26806000
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
Is
Race
(
RACE_DRAGON
+
RACE_PLANT
)
and
c
:
IsType
(
TYPE_TUNER
)
end
function
c26806000
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c26806000
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c26806000
.
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
c26806000
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
c26806000
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAttack
(
2200
)
and
c
:
IsDefense
(
600
)
and
c
:
IsAbleToHand
()
end
function
c26806000
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c26806000
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c26806000
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c26806000
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c26806000
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
--海伊
function
c26806000
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
26806000
)
e1
:
SetCondition
(
c26806000
.
spcon
)
e1
:
SetTarget
(
c26806000
.
sptg
)
e1
:
SetOperation
(
c26806000
.
spop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
26806900
)
e3
:
SetTarget
(
c26806000
.
thtg
)
e3
:
SetOperation
(
c26806000
.
thop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e4
)
end
function
c26806000
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
Is
Attribute
(
ATTRIBUTE_WATER
)
end
function
c26806000
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c26806000
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c26806000
.
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
c26806000
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
c26806000
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAttack
(
2200
)
and
c
:
IsDefense
(
600
)
and
c
:
IsAbleToHand
()
end
function
c26806000
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c26806000
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c26806000
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c26806000
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c26806000
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
expansions/script/c26806003.lua
View file @
f639c653
--彼此的世界·海伊
function
c26806003
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
nil
,
6
,
2
)
c
:
EnableReviveLimit
()
--special summon (hand)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
26806003
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
26806003
)
e1
:
SetCondition
(
c26806003
.
spcon
)
e1
:
SetTarget
(
c26806003
.
sptg
)
e1
:
SetOperation
(
c26806003
.
spop
)
c
:
RegisterEffect
(
e1
)
--activate limit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
26806003
,
1
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_DRAW_PHASE
)
e2
:
SetCountLimit
(
1
,
26806903
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c26806003
.
cost
)
e2
:
SetOperation
(
c26806003
.
operation
)
c
:
RegisterEffect
(
e2
)
end
function
c26806003
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c26806003
.
spfilter
(
c
,
e
,
tp
)
return
c
:
Is
SetCard
(
0x55
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c26806003
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c26806003
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c26806003
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c26806003
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c26806003
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c26806003
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_DISCARD_HAND
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_TO_GRAVE_AS_COST
)
e2
:
SetTargetRange
(
0
,
LOCATION_HAND
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
--彼此的世界·海伊
function
c26806003
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
nil
,
6
,
2
)
c
:
EnableReviveLimit
()
--special summon (hand)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
26806003
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
26806003
)
e1
:
SetCondition
(
c26806003
.
spcon
)
e1
:
SetTarget
(
c26806003
.
sptg
)
e1
:
SetOperation
(
c26806003
.
spop
)
c
:
RegisterEffect
(
e1
)
--activate limit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
26806003
,
1
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_DRAW_PHASE
)
e2
:
SetCountLimit
(
1
,
26806903
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c26806003
.
cost
)
e2
:
SetOperation
(
c26806003
.
operation
)
c
:
RegisterEffect
(
e2
)
end
function
c26806003
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c26806003
.
spfilter
(
c
,
e
,
tp
)
return
c
:
Is
Attack
(
2200
)
and
c
:
IsDefense
(
600
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c26806003
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c26806003
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c26806003
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c26806003
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c26806003
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c26806003
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_DISCARD_HAND
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_TO_GRAVE_AS_COST
)
e2
:
SetTargetRange
(
0
,
LOCATION_HAND
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
expansions/script/c75646502.lua
View file @
f639c653
--失落终端 艾拉
function
c75646502
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_EFFECT
),
2
)
c
:
EnableReviveLimit
()
--remove
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
75646502
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
75646502
)
e1
:
SetTarget
(
c75646502
.
target
)
e1
:
SetOperation
(
c75646502
.
operation
)
c
:
RegisterEffect
(
e1
)
--cannot be target
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c75646502
.
condition
)
e2
:
SetValue
(
aux
.
imval1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e3
)
end
function
c75646502
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
75646505
,
0
,
0x4011
,
2800
,
2800
,
8
,
RACE_CYBERSE
,
ATTRIBUTE_LIGHT
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
tp
,
0
)
end
function
c75646502
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
75646505
,
0
,
0x4011
,
2800
,
2800
,
8
,
RACE_CYBERSE
,
ATTRIBUTE_LIGHT
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
75646505
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetValue
(
75646502
)
token
:
RegisterEffect
(
e1
,
true
)
token
:
CopyEffect
(
75646502
,
RESET_EVENT
+
RESETS_STANDARD
,
1
)
Duel
.
SpecialSummonComplete
()
end
end
function
c75646502
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsType
(
TYPE_LINK
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
(),
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
TYPE_TOKEN
)
--失落终端 艾拉
function
c75646502
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_EFFECT
),
2
)
c
:
EnableReviveLimit
()
--remove
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
75646502
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
75646502
)
e1
:
SetCondition
(
c18940556
.
condition
)
e1
:
SetTarget
(
c75646502
.
target
)
e1
:
SetOperation
(
c75646502
.
operation
)
c
:
RegisterEffect
(
e1
)
--cannot be target
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c75646502
.
con
)
e2
:
SetValue
(
aux
.
imval1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e3
)
end
function
c75646502
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
c75646502
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
75646505
,
0
,
0x4011
,
2800
,
2800
,
8
,
RACE_CYBERSE
,
ATTRIBUTE_LIGHT
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
tp
,
0
)
end
function
c75646502
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
75646505
,
0
,
0x4011
,
2800
,
2800
,
8
,
RACE_CYBERSE
,
ATTRIBUTE_LIGHT
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
75646505
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetValue
(
75646502
)
token
:
RegisterEffect
(
e1
,
true
)
token
:
CopyEffect
(
75646502
,
RESET_EVENT
+
RESETS_STANDARD
,
1
)
Duel
.
SpecialSummonComplete
()
end
end
function
c75646502
.
con
(
e
)
return
e
:
GetHandler
():
IsType
(
TYPE_LINK
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
TYPE_TOKEN
)
end
\ No newline at end of file
expansions/script/c81012044.lua
View file @
f639c653
--咖啡厅相遇·爱米莉
function
c81012044
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
c
:
EnableReviveLimit
()
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c81012044
.
thcost
)
e1
:
SetTarget
(
c81012044
.
thtg
)
e1
:
SetOperation
(
c81012044
.
thop
)
c
:
RegisterEffect
(
e1
)
--Indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetOperation
(
c81012044
.
operation
)
c
:
RegisterEffect
(
e2
)
--chain attack
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_BATTLED
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
81012044
)
e3
:
SetCondition
(
c81012044
.
cacon
)
e3
:
SetOperation
(
c81012044
.
caop
)
c
:
RegisterEffect
(
e3
)
--search
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_DESTROY
)
e4
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetCode
(
EVENT_RELEASE
)
e4
:
SetCountLimit
(
1
,
81012944
)
e4
:
SetTarget
(
c81012044
.
destg
)
e4
:
SetOperation
(
c81012044
.
desop
)
c
:
RegisterEffect
(
e4
)
end
function
c81012044
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
Card
.
Is
SetCard
,
1
,
nil
,
0x10ec
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
Card
.
IsRace
,
1
,
1
,
nil
,
RACE_PYRO
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c81012044
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
end
function
c81012044
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c81012044
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c81012044
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c81012044
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c81012044
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
function
c81012044
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
c81012044
.
indtg
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetValue
(
1
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c81012044
.
indtg
(
e
,
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsType
(
TYPE_RITUAL
)
end
function
c81012044
.
cacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
if
not
d
then
return
false
end
if
a
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
d
:
IsControler
(
tp
)
then
a
,
d
=
d
,
a
end
if
a
:
IsType
(
TYPE_PENDULUM
)
and
a
:
IsType
(
TYPE_RITUAL
)
and
not
a
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
d
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
e
:
SetLabelObject
(
a
)
return
true
else
return
false
end
end
function
c81012044
.
caop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
if
tc
:
IsFaceup
()
and
tc
:
IsControler
(
tp
)
and
tc
:
IsRelateToBattle
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e1
)
if
tc
:
IsChainAttackable
()
then
Duel
.
ChainAttack
()
end
end
end
function
c81012044
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c81012044
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
--咖啡厅相遇·爱米莉
function
c81012044
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
c
:
EnableReviveLimit
()
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c81012044
.
thcost
)
e1
:
SetTarget
(
c81012044
.
thtg
)
e1
:
SetOperation
(
c81012044
.
thop
)
c
:
RegisterEffect
(
e1
)
--Indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetOperation
(
c81012044
.
operation
)
c
:
RegisterEffect
(
e2
)
--chain attack
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_BATTLED
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
81012044
)
e3
:
SetCondition
(
c81012044
.
cacon
)
e3
:
SetOperation
(
c81012044
.
caop
)
c
:
RegisterEffect
(
e3
)
--search
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_DESTROY
)
e4
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetCode
(
EVENT_RELEASE
)
e4
:
SetCountLimit
(
1
,
81012944
)
e4
:
SetTarget
(
c81012044
.
destg
)
e4
:
SetOperation
(
c81012044
.
desop
)
c
:
RegisterEffect
(
e4
)
end
function
c81012044
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
Card
.
Is
Race
,
1
,
nil
,
RACE_PYRO
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
Card
.
IsRace
,
1
,
1
,
nil
,
RACE_PYRO
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c81012044
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
end
function
c81012044
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c81012044
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c81012044
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c81012044
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c81012044
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
function
c81012044
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
c81012044
.
indtg
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetValue
(
1
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c81012044
.
indtg
(
e
,
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsType
(
TYPE_RITUAL
)
end
function
c81012044
.
cacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
if
not
d
then
return
false
end
if
a
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
d
:
IsControler
(
tp
)
then
a
,
d
=
d
,
a
end
if
a
:
IsType
(
TYPE_PENDULUM
)
and
a
:
IsType
(
TYPE_RITUAL
)
and
not
a
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
d
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
e
:
SetLabelObject
(
a
)
return
true
else
return
false
end
end
function
c81012044
.
caop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
if
tc
:
IsFaceup
()
and
tc
:
IsControler
(
tp
)
and
tc
:
IsRelateToBattle
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e1
)
if
tc
:
IsChainAttackable
()
then
Duel
.
ChainAttack
()
end
end
end
function
c81012044
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c81012044
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
expansions/script/c81014039.lua
View file @
f639c653
--鲜为人知的王女
function
c81014039
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
,
1
)
c
:
EnableReviveLimit
()
--banish
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
81014039
,
0
))
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e1
:
SetCondition
(
c81014039
.
rmcond
)
e1
:
SetTarget
(
c81014039
.
rmtg
)
e1
:
SetOperation
(
c81014039
.
rmop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
81014039
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
81014039
)
e2
:
SetCost
(
c81014039
.
spcost
)
e2
:
SetTarget
(
c81014039
.
sptg
)
e2
:
SetOperation
(
c81014039
.
spop
)
c
:
RegisterEffect
(
e2
)
--activate limit
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
0
,
1
)
e3
:
SetCondition
(
c81014039
.
condition
)
e3
:
SetValue
(
c81014039
.
aclimit
)
c
:
RegisterEffect
(
e3
)
end
function
c81014039
.
rmcond
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetMaterial
():
IsExists
(
Card
.
IsCode
,
1
,
nil
,
81014009
)
and
c
:
IsRelateToBattle
()
and
c
:
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c81014039
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
c81014039
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
c81014039
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetMaterial
():
IsExists
(
Card
.
IsCode
,
1
,
nil
,
81014010
)
and
c
:
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c81014039
.
costfilter
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsFaceup
()
end
function
c81014039
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c81014039
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c81014039
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c81014039
.
spfilter
(
c
,
e
,
tp
,
tid
)
return
c
:
GetTurnID
()
==
tid
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c81014039
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tid
=
Duel
.
GetTurnCount
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c81014039
.
spfilter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
,
e
,
tp
,
tid
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c81014039
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tid
=
Duel
.
GetTurnCount
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c81014039
.
spfilter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
1
,
nil
,
e
,
tp
,
tid
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c81014039
.
condition
(
e
)
local
c
=
e
:
GetHandler
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
and
c
:
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c81014039
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
--鲜为人知的王女
function
c81014039
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
,
1
)
c
:
EnableReviveLimit
()
--banish
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
81014039
,
0
))
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e1
:
SetCondition
(
c81014039
.
rmcond
)
e1
:
SetTarget
(
c81014039
.
rmtg
)
e1
:
SetOperation
(
c81014039
.
rmop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
81014039
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
81014039
)
e2
:
SetCondition
(
c81014039
.
spcon
)
e2
:
SetCost
(
c81014039
.
spcost
)
e2
:
SetTarget
(
c81014039
.
sptg
)
e2
:
SetOperation
(
c81014039
.
spop
)
c
:
RegisterEffect
(
e2
)
--activate limit
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
0
,
1
)
e3
:
SetCondition
(
c81014039
.
condition
)
e3
:
SetValue
(
c81014039
.
aclimit
)
c
:
RegisterEffect
(
e3
)
end
function
c81014039
.
rmcond
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetMaterial
():
IsExists
(
Card
.
IsCode
,
1
,
nil
,
81014009
)
and
c
:
IsRelateToBattle
()
and
c
:
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c81014039
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
c81014039
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
c81014039
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetMaterial
():
IsExists
(
Card
.
IsCode
,
1
,
nil
,
81014010
)
and
c
:
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c81014039
.
costfilter
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsFaceup
()
end
function
c81014039
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c81014039
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c81014039
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c81014039
.
spfilter
(
c
,
e
,
tp
,
tid
)
return
c
:
GetTurnID
()
==
tid
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c81014039
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tid
=
Duel
.
GetTurnCount
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c81014039
.
spfilter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
,
e
,
tp
,
tid
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c81014039
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tid
=
Duel
.
GetTurnCount
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c81014039
.
spfilter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
1
,
nil
,
e
,
tp
,
tid
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c81014039
.
condition
(
e
)
local
c
=
e
:
GetHandler
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
and
c
:
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c81014039
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
expansions/script/c81040003.lua
View file @
f639c653
--天穹剑士·周子
function
c81040003
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DEFCHANGE
+
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
81040003
)
e1
:
SetCondition
(
c81040003
.
defcon
)
e1
:
SetOperation
(
c81040003
.
defop
)
c
:
RegisterEffect
(
e1
)
--activate limit
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetCountLimit
(
1
,
81040903
)
e3
:
SetCondition
(
c81040003
.
aetcon
)
e3
:
SetOperation
(
c81040003
.
actop
)
c
:
RegisterEffect
(
e3
)
end
function
c81040003
.
defcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
d
=
a
:
GetBattleTarget
()
e
:
SetLabelObject
(
d
)
return
a
:
IsControler
(
1
-
tp
)
and
d
and
d
:
IsType
(
TYPE_RITUAL
)
and
d
:
IsControler
(
tp
)
and
d
~=
e
:
GetHandler
()
end
function
c81040003
.
defop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
e
:
GetLabelObject
()
if
tc
:
IsRelateToBattle
()
and
tc
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e1
:
SetValue
(
c
:
GetDefense
())
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e3
:
SetValue
(
c
:
GetAttack
())
e3
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
tc
:
RegisterEffect
(
e3
)
end
end
function
c81040003
.
aetcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_GRAVE
)
end
function
c81040003
.
actop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetCondition
(
c81040003
.
actcon
)
e1
:
SetValue
(
c81040003
.
actlimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c81040003
.
actcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
end
function
c81040003
.
actlimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
--天穹剑士·周子
function
c81040003
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DEFCHANGE
+
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
81040003
)
e1
:
SetCondition
(
c81040003
.
defcon
)
e1
:
SetOperation
(
c81040003
.
defop
)
c
:
RegisterEffect
(
e1
)
--activate limit
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetCountLimit
(
1
,
81040903
)
e3
:
SetCondition
(
c81040003
.
aetcon
)
e3
:
SetOperation
(
c81040003
.
actop
)
c
:
RegisterEffect
(
e3
)
end
function
c81040003
.
defcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
d
=
a
:
GetBattleTarget
()
e
:
SetLabelObject
(
d
)
return
a
:
IsControler
(
1
-
tp
)
and
d
and
d
:
IsType
(
TYPE_RITUAL
)
and
d
:
IsControler
(
tp
)
and
d
~=
e
:
GetHandler
()
end
function
c81040003
.
defop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
e
:
GetLabelObject
()
if
tc
:
IsRelateToBattle
()
and
tc
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e1
:
SetValue
(
c
:
GetDefense
())
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e3
:
SetValue
(
c
:
GetAttack
())
e3
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
tc
:
RegisterEffect
(
e3
)
end
end
function
c81040003
.
aetcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_GRAVE
)
end
function
c81040003
.
actop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetCondition
(
c81040003
.
actcon
)
e1
:
SetValue
(
c81040003
.
actlimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c81040003
.
actcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
end
function
c81040003
.
actlimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
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