Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-2pick
Commits
c0597fb8
Commit
c0597fb8
authored
Oct 03, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push by Appveyor
parent
146b2f27
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
0 additions
and
2896 deletions
+0
-2896
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c12000001.lua
expansions/script/c12000001.lua
+0
-115
expansions/script/c12000002.lua
expansions/script/c12000002.lua
+0
-170
expansions/script/c12000003.lua
expansions/script/c12000003.lua
+0
-149
expansions/script/c12000004.lua
expansions/script/c12000004.lua
+0
-176
expansions/script/c12000005.lua
expansions/script/c12000005.lua
+0
-126
expansions/script/c12000006.lua
expansions/script/c12000006.lua
+0
-119
expansions/script/c12000007.lua
expansions/script/c12000007.lua
+0
-90
expansions/script/c12000008.lua
expansions/script/c12000008.lua
+0
-72
expansions/script/c12000009.lua
expansions/script/c12000009.lua
+0
-76
expansions/script/c12000010.lua
expansions/script/c12000010.lua
+0
-58
expansions/script/c12000030.lua
expansions/script/c12000030.lua
+0
-108
expansions/script/c12000031.lua
expansions/script/c12000031.lua
+0
-86
expansions/script/c12000032.lua
expansions/script/c12000032.lua
+0
-139
expansions/script/c12000033.lua
expansions/script/c12000033.lua
+0
-76
expansions/script/c12000034.lua
expansions/script/c12000034.lua
+0
-80
expansions/script/c12000035.lua
expansions/script/c12000035.lua
+0
-82
expansions/script/c12000038.lua
expansions/script/c12000038.lua
+0
-82
expansions/script/c12000039.lua
expansions/script/c12000039.lua
+0
-109
expansions/script/c12000040.lua
expansions/script/c12000040.lua
+0
-43
expansions/script/c12000041.lua
expansions/script/c12000041.lua
+0
-99
expansions/script/c12000042.lua
expansions/script/c12000042.lua
+0
-123
expansions/script/c12000046.lua
expansions/script/c12000046.lua
+0
-97
expansions/script/c12000047.lua
expansions/script/c12000047.lua
+0
-120
expansions/script/c12000048.lua
expansions/script/c12000048.lua
+0
-77
expansions/script/c12000050.lua
expansions/script/c12000050.lua
+0
-62
expansions/script/c12000051.lua
expansions/script/c12000051.lua
+0
-64
expansions/script/c12000052.lua
expansions/script/c12000052.lua
+0
-91
expansions/script/c12000053.lua
expansions/script/c12000053.lua
+0
-90
expansions/script/c12000055.lua
expansions/script/c12000055.lua
+0
-77
expansions/script/c12000057.lua
expansions/script/c12000057.lua
+0
-40
No files found.
expansions/222DIY.cdb
View file @
c0597fb8
No preview for this file type
expansions/script/c12000001.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 旋转餐厅
function
c12000001
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c12000001
.
target
)
e1
:
SetOperation
(
c12000001
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsType
,
TYPE_TOKEN
))
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
c12000001
.
spcon
)
e3
:
SetTarget
(
c12000001
.
sptg
)
e3
:
SetOperation
(
c12000001
.
spop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_GRAVE
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetCost
(
aux
.
bfgcost
)
e4
:
SetTarget
(
c12000001
.
thtg
)
e4
:
SetOperation
(
c12000001
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
c12000001
.
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
,
12000011
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP_DEFENSE
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c12000001
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000011
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP_DEFENSE
,
tp
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
12000011
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1
,
true
)
Duel
.
SpecialSummonComplete
()
end
end
function
c12000001
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
rp
~=
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c12000001
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft1
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ft2
=
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
(
ft1
+
ft2
)
>
0
and
not
((
ft1
+
ft2
)
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
))
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000011
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP
,
tp
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000011
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP
,
1
-
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
ft1
+
ft2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
ft1
+
ft2
,
0
,
0
)
end
function
c12000001
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ft1
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ft2
=
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
if
(
ft1
+
ft2
)
>
0
and
not
((
ft1
+
ft2
)
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
))
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000011
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP
,
tp
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000011
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP
,
1
-
tp
)
then
local
fid
=
c
:
GetFieldID
()
for
i
=
1
,
ft1
do
local
token
=
Duel
.
CreateToken
(
tp
,
12000011
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
for
i
=
1
,
ft2
do
local
token
=
Duel
.
CreateToken
(
tp
,
12000011
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP
)
end
Duel
.
SpecialSummonComplete
()
end
end
function
c12000001
.
thfilter
(
c
,
lv
,
race
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
GetLevel
()
==
lv
and
c
:
GetRace
()
==
race
and
c
:
IsAbleToHand
()
and
c
:
IsLevelAbove
(
5
)
end
function
c12000001
.
filter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfbe
)
and
Duel
.
IsExistingMatchingCard
(
c12000001
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
:
GetLevel
(),
c
:
GetRace
())
end
function
c12000001
.
chkfilter
(
c
,
lv
,
race
)
return
c
:
IsFaceup
()
and
c
:
GetLevel
()
==
lv
end
function
c12000001
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c42000001
.
chkfilter
(
chkc
,
e
:
GetLabel
())
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000001
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000001
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
e
:
SetLabel
(
g
:
GetFirst
():
GetAttribute
())
end
function
c12000001
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
local
lv
=
tc
:
GetLevel
()
local
race
=
tc
:
GetRace
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c12000001
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
lv
,
race
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
expansions/script/c12000002.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 糕点突进
function
c12000002
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
12000002
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c12000002
.
target
)
e1
:
SetOperation
(
c12000002
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c12000002
.
spcon
)
e2
:
SetTarget
(
c12000002
.
sptg
)
e2
:
SetOperation
(
c12000002
.
spop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c12000002
.
descon
)
e3
:
SetCost
(
c12000002
.
descost
)
e3
:
SetTarget
(
c12000002
.
destg
)
e3
:
SetOperation
(
c12000002
.
desop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetRange
(
LOCATION_GRAVE
)
e4
:
SetCost
(
aux
.
bfgcost
)
e4
:
SetTarget
(
c12000002
.
actg
)
e4
:
SetOperation
(
c12000002
.
acop
)
c
:
RegisterEffect
(
e4
)
end
function
c12000002
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToGrave
()
end
function
c12000002
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000002
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12000002
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000002
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
c12000002
.
cfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSummonPlayer
()
==
tp
and
c
:
GetCode
()
~=
12000013
end
function
c12000002
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c12000002
.
cfilter
,
1
,
nil
,
tp
)
end
function
c12000002
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000013
,
0xfbe
,
0x5011
,
0
,
0
,
1
,
RACE_FAIRY
,
ATTRIBUTE_EARTH
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c12000002
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000013
,
0xfbe
,
0x5011
,
0
,
0
,
1
,
RACE_FAIRY
,
ATTRIBUTE_EARTH
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
12000013
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1
,
true
)
Duel
.
SpecialSummonComplete
()
end
end
function
c12000002
.
cfilter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_TOKEN
)
end
function
c12000002
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c12000002
.
cfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c12000002
.
cfilter2
(
c
)
return
c
:
IsType
(
TYPE_TOKEN
)
end
function
c12000002
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c12000002
.
cfilter2
,
1
,
nil
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c12000002
.
cfilter2
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c12000002
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c12000002
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c12000002
.
acfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_TOKEN
)
end
function
c12000002
.
actg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000002
.
acfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
c12000002
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c12000002
.
acfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
ct
=
g
:
GetCount
()
local
tc
=
g
:
GetFirst
()
local
fid
=
e
:
GetHandler
():
GetFieldID
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
ct
*
1000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterFlagEffect
(
12000002
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
,
fid
)
--no battle damage
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_NO_BATTLE_DAMAGE
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
g
:
KeepAlive
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabelObject
(
g
)
e1
:
SetCondition
(
c12000002
.
adcon
)
e1
:
SetOperation
(
c12000002
.
adop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c12000002
.
adfilter
(
c
,
fid
)
return
c
:
GetFlagEffectLabel
(
12000002
)
==
fid
end
function
c12000002
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
if
not
g
:
IsExists
(
c12000002
.
adfilter
,
1
,
nil
,
e
:
GetLabel
())
then
g
:
DeleteGroup
()
e
:
Reset
()
return
false
else
return
true
end
end
function
c12000002
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
local
tg
=
g
:
Filter
(
c12000002
.
adfilter
,
nil
,
e
:
GetLabel
())
g
:
DeleteGroup
()
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
end
expansions/script/c12000003.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 糕点爆发
function
c12000003
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c12000003
.
cost
)
e1
:
SetCountLimit
(
1
,
12000003
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c12000003
.
target
)
e1
:
SetOperation
(
c12000003
.
activate
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c12000003
.
spcon
)
e2
:
SetTarget
(
c12000003
.
sptg
)
e2
:
SetOperation
(
c12000003
.
spop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
c12000003
.
descost
)
e3
:
SetTarget
(
c12000003
.
destg
)
e3
:
SetOperation
(
c12000003
.
desop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TOHAND
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_GRAVE
)
e4
:
SetCost
(
c12000003
.
thcost
)
e4
:
SetTarget
(
c12000003
.
thtg
)
e4
:
SetOperation
(
c12000003
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
c12000003
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c12000003
.
filter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToHand
()
end
function
c12000003
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000003
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12000003
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000003
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c12000003
.
cfilter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c12000003
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c12000003
.
cfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c12000003
.
cfilter2
(
c
)
return
c
:
IsType
(
TYPE_TOKEN
)
end
function
c12000003
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c12000003
.
cfilter2
,
1
,
nil
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c12000003
.
cfilter2
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c12000003
.
cfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
GetPreviousControler
()
==
tp
end
function
c12000003
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c12000003
.
cfilter
,
1
,
nil
,
tp
)
end
function
c12000003
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000012
,
0xfbe
,
0x4011
,
500
,
500
,
2
,
RACE_BEAST
,
ATTRIBUTE_LIGHT
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c12000003
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000012
,
0xfbe
,
0x4011
,
500
,
500
,
2
,
RACE_BEAST
,
ATTRIBUTE_LIGHT
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
12000012
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1
,
true
)
Duel
.
SpecialSummonComplete
()
end
end
function
c12000003
.
desfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c12000003
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000003
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000003
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c12000003
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c12000003
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
function
c12000003
.
thfilter
(
c
,
att
,
race
)
return
c
:
IsAttribute
(
att
)
and
c
:
IsRace
(
race
)
and
c
:
IsAbleToHand
()
and
c
:
IsLevelAbove
(
5
)
end
function
c12000003
.
cfilter3
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_TOKEN
)
and
Duel
.
IsExistingMatchingCard
(
c12000003
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
:
GetAttribute
(),
c
:
GetRace
())
end
function
c12000003
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c12000003
.
cfilter3
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c12000003
.
cfilter3
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
e
:
SetLabelObject
(
g
:
GetFirst
())
end
function
c12000003
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
att
=
e
:
GetLabelObject
():
GetAttribute
()
local
race
=
e
:
GetLabelObject
():
GetRace
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000003
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
att
,
race
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c12000004.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 融合秘方
function
c12000004
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
12000004
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c12000004
.
target
)
e1
:
SetOperation
(
c12000004
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c12000004
.
spcon
)
e2
:
SetTarget
(
c12000004
.
sptg
)
e2
:
SetOperation
(
c12000004
.
spop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
c12000004
.
spcon2
)
e3
:
SetTarget
(
c12000004
.
sptg
)
e3
:
SetOperation
(
c12000004
.
spop2
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_GRAVE
)
e4
:
SetCost
(
aux
.
bfgcost
)
e4
:
SetTarget
(
c12000004
.
fstg
)
e4
:
SetOperation
(
c12000004
.
fsop
)
c
:
RegisterEffect
(
e4
)
end
function
c12000004
.
filter
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsSetCard
(
0xfbe
)
end
function
c12000004
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000004
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12000004
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000004
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tg
=
g
:
GetFirst
()
if
tg
==
nil
then
return
end
Duel
.
Remove
(
tg
,
POS_FACEDOWN
,
REASON_EFFECT
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetRange
(
LOCATION_REMOVED
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_STANDBY
+
RESET_SELF_TURN
,
1
)
e1
:
SetCondition
(
c12000004
.
thcon
)
e1
:
SetOperation
(
c12000004
.
thop
)
e1
:
SetLabel
(
0
)
tg
:
RegisterEffect
(
e1
)
end
function
c12000004
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c12000004
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
e
:
GetLabel
()
e
:
GetHandler
():
SetTurnCounter
(
ct
+
1
)
if
ct
==
0
then
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
end
end
function
c12000004
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetActivateLocation
()
==
LOCATION_HAND
and
re
:
GetHandlerPlayer
()
~=
tp
end
function
c12000004
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
42000014
,
0xfbe
,
0x4011
,
800
,
800
,
3
,
RACE_PSYCHO
,
ATTRIBUTE_LIGHT
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c12000004
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000014
,
0xfbe
,
0x4011
,
800
,
800
,
3
,
RACE_PSYCHO
,
ATTRIBUTE_LIGHT
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
12000014
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1
,
true
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
token
:
RegisterEffect
(
e2
,
true
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
token
:
RegisterEffect
(
e3
,
true
)
Duel
.
SpecialSummonComplete
()
end
end
function
c12000004
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
()
end
function
c12000004
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000014
,
0xfbe
,
0x4011
,
800
,
800
,
3
,
RACE_PSYCHO
,
ATTRIBUTE_LIGHT
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
12000014
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c12000004
.
spfilter1
(
c
,
e
)
return
c
:
IsType
(
TYPE_TOKEN
)
and
not
c
:
IsImmuneToEffect
(
e
)
and
c
:
IsReleasable
()
end
function
c12000004
.
spfilter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
and
c
:
IsReleasable
()
end
function
c12000004
.
spfilter3
(
c
)
return
c
:
IsCanBeFusionMaterial
()
and
c
:
IsType
(
TYPE_TOKEN
)
end
function
c12000004
.
fstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsType
,
nil
,
TYPE_TOKEN
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c12000004
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
):
Filter
(
c12000004
.
spfilter3
,
nil
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c12000004
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c12000004
.
fsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c12000004
.
spfilter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c12000004
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
):
Filter
(
c12000004
.
spfilter3
,
nil
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c12000004
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
Release
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
expansions/script/c12000005.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 糕点神龙
function
c12000005
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
12000005
)
e1
:
SetCondition
(
c12000005
.
descon
)
e1
:
SetTarget
(
c12000005
.
destg
)
e1
:
SetOperation
(
c12000005
.
desop
)
c
:
RegisterEffect
(
e1
)
--attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SET_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
c12000005
.
atkval
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TOHAND
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCost
(
c12000005
.
thcost
)
e4
:
SetTarget
(
c12000005
.
thtg
)
e4
:
SetOperation
(
c12000005
.
thop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_TOHAND
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_REMOVE
)
e5
:
SetRange
(
LOCATION_GRAVE
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetCountLimit
(
1
,
12000005
)
e5
:
SetCondition
(
c12000005
.
rthcon
)
e5
:
SetTarget
(
c12000005
.
rthtg
)
e5
:
SetOperation
(
c12000005
.
rthop
)
c
:
RegisterEffect
(
e5
)
end
function
c12000005
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfbe
)
end
function
c12000005
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c12000005
.
cfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
function
c12000005
.
desfilter
(
c
)
return
c
:
IsType
(
TYPE_TOKEN
)
end
function
c12000005
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tk
=
Duel
.
GetMatchingGroup
(
c12000005
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tkc
=
tk
:
GetCount
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
tkc
>
3
then
tkc
=
3
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsType
(
TYPE_TOKEN
)
end
if
chk
==
0
then
return
ft
>-
tkc
and
Duel
.
IsExistingTarget
(
c12000005
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
3
,
nil
)
end
local
g
=
Group
.
CreateGroup
()
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
g
=
Duel
.
SelectTarget
(
tp
,
c12000005
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
3
,
3
,
nil
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
g
=
Duel
.
SelectTarget
(
tp
,
c12000005
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
tkc
,
nil
)
if
g
:
GetCount
()
<
3
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
c12000005
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
3
-
g
:
GetCount
(),
nil
)
g
:
Merge
(
sg
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c12000005
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
tg
:
GetCount
()
>
0
then
if
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
==
3
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
function
c12000005
.
atkval
(
e
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
return
g
:
GetCount
()
*
500
end
function
c12000005
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c12000005
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToHand
()
end
function
c12000005
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000005
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
2
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
2
,
tp
,
LOCATION_DECK
)
end
function
c12000005
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000005
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
2
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c12000005
.
cfilter1
(
c
,
tp
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsPreviousLocation
(
LOCATION_GRAVE
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsFaceup
()
end
function
c12000005
.
rthcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c12000005
.
cfilter1
,
1
,
nil
,
tp
)
end
function
c12000005
.
rthtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c12000005
.
rthop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
end
end
expansions/script/c12000006.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 樱桃双子
function
c12000006
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
c12000006
.
ffilter
,
2
,
true
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
,
12000006
)
e1
:
SetCost
(
c12000006
.
spcost
)
e1
:
SetTarget
(
c12000006
.
sptg
)
e1
:
SetOperation
(
c12000006
.
spop
)
c
:
RegisterEffect
(
e1
)
--atk/lv up
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000006
,
0
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
12000106
)
e2
:
SetOperation
(
c12000006
.
operation
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
12000206
)
e3
:
SetTarget
(
c12000006
.
destg
)
e3
:
SetOperation
(
c12000006
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c12000006
.
ffilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c12000006
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToGrave
()
end
function
c12000006
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000006
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000006
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c12000006
.
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
,
true
,
true
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c12000006
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
c
:
IsRelateToEffect
(
e
)
then
local
sp
=
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
c
:
CompleteProcedure
()
if
sp
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000016
,
0xfbe
,
0x4011
,
300
,
300
,
1
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12000006
,
1
))
then
Duel
.
BreakEffect
()
if
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
==
0
then
return
end
local
token
=
Duel
.
CreateToken
(
tp
,
12000016
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetAbsoluteRange
(
tp
,
1
,
0
)
e2
:
SetTarget
(
c12000006
.
splimit
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
end
function
c12000006
.
splimit
(
e
,
c
)
return
not
c
:
IsSetCard
(
0xfbe
)
end
function
c12000006
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
800
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetReset
(
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetValue
(
2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c12000006
.
desfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_NORMAL
)
end
function
c12000006
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000006
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000006
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c12000006
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
c
=
e
:
GetHandler
()
if
tc
:
IsRelateToEffect
(
e
)
and
c
:
IsRelateToEffect
(
e
)
then
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
expansions/script/c12000007.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 双子樱桃
function
c12000007
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
,
12000007
)
e1
:
SetCost
(
c12000007
.
spcost
)
e1
:
SetTarget
(
c12000007
.
sptg
)
e1
:
SetOperation
(
c12000007
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
12000107
)
e3
:
SetTarget
(
c12000007
.
destg
)
e3
:
SetOperation
(
c12000007
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c12000007
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToGrave
()
end
function
c12000007
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000007
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000007
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c12000007
.
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
,
true
,
true
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c12000007
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
c
:
IsRelateToEffect
(
e
)
then
local
sp
=
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
c
:
CompleteProcedure
()
if
sp
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000016
,
0xfbe
,
0x4011
,
300
,
300
,
1
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12000007
,
0
))
then
Duel
.
BreakEffect
()
if
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
==
0
then
return
end
local
token
=
Duel
.
CreateToken
(
tp
,
12000016
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetAbsoluteRange
(
tp
,
1
,
0
)
e2
:
SetTarget
(
c12000007
.
splimit
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
end
function
c12000007
.
splimit
(
e
,
c
)
return
not
c
:
IsSetCard
(
0xfbe
)
end
function
c12000007
.
desfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_NORMAL
)
end
function
c12000007
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000007
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000007
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c12000007
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
c
=
e
:
GetHandler
()
if
tc
:
IsRelateToEffect
(
e
)
and
c
:
IsRelateToEffect
(
e
)
then
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
\ No newline at end of file
expansions/script/c12000008.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 前点心
function
c12000008
.
initial_effect
(
c
)
--deck search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
12000008
)
e1
:
SetTarget
(
c12000008
.
target
)
e1
:
SetOperation
(
c12000008
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
12000108
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c12000008
.
target
)
e2
:
SetOperation
(
c12000008
.
activate
)
c
:
RegisterEffect
(
e2
)
end
function
c12000008
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
<
5
then
return
false
end
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
5
)
local
result
=
g
:
FilterCount
(
Card
.
IsAbleToHand
,
nil
)
>
0
return
result
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
0
,
LOCATION_DECK
)
end
function
c12000008
.
filter
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsSetCard
(
0xfbe
)
end
function
c12000008
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
5
)
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
5
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
5
)
if
g
:
GetCount
()
>
0
then
Duel
.
DisableShuffleCheck
()
if
g
:
IsExists
(
c12000008
.
filter
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12000008
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
FilterSelect
(
tp
,
c12000008
.
filter
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
g
:
Sub
(
sg
)
end
end
end
function
c12000008
.
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
,
12000014
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c12000008
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000014
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP
,
tp
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
12000014
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1
,
true
)
Duel
.
SpecialSummonComplete
()
end
end
\ No newline at end of file
expansions/script/c12000009.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 后点心
function
c12000009
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
12000009
)
e1
:
SetCost
(
c12000009
.
cost
)
e1
:
SetTarget
(
c12000009
.
target
)
e1
:
SetOperation
(
c12000009
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
12000109
)
e2
:
SetCost
(
c12000009
.
thcost
)
e2
:
SetTarget
(
c12000009
.
thtg
)
e2
:
SetOperation
(
c12000009
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c12000009
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c12000009
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000009
.
cfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000009
.
cfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c12000009
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToRemove
()
and
c
:
IsFaceup
()
end
function
c12000009
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c12000009
.
filter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000009
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000009
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
c12000009
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
c12000009
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
function
c12000009
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToHand
()
end
function
c12000009
.
cfilter3
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_TOKEN
)
and
Duel
.
IsExistingMatchingCard
(
c12000009
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
:
GetAttribute
(),
c
:
GetRace
())
end
function
c12000009
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c12000009
.
cfilter3
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c12000009
.
cfilter3
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
e
:
SetLabelObject
(
g
:
GetFirst
())
end
function
c12000009
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
att
=
e
:
GetLabelObject
():
GetAttribute
()
local
race
=
e
:
GetLabelObject
():
GetRace
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000009
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
att
,
race
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c12000010.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 日点心
function
c12000010
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
12000010
)
e1
:
SetTarget
(
c12000010
.
target1
)
e1
:
SetOperation
(
c12000010
.
activate1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000010
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
12000110
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c12000010
.
thtg
)
e2
:
SetOperation
(
c12000010
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c12000010
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfbe
)
end
function
c12000010
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
c12000010
.
filter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000010
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
SelectTarget
(
tp
,
c12000010
.
filter1
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
end
function
c12000010
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
+
REASON_RETURN
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
DiscardHand
(
tp
,
aux
.
TRUE
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
)
end
end
function
c12000010
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c12000010
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000010
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
3
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12000010
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c12000010
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetCount
()
>=
3
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
3
,
3
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_ATOHAND
)
local
tg
=
sg
:
Select
(
1
-
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
\ No newline at end of file
expansions/script/c12000030.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 水果布丁
function
c12000030
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
c12000030
.
ffilter
,
2
,
false
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12000030
,
0
))
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetCountLimit
(
1
,
12000030
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
12000030
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c12000030
.
target
)
e1
:
SetOperation
(
c12000030
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000030
,
1
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
12000130
)
e2
:
SetCondition
(
c12000030
.
tgcon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c12000030
.
tgtg
)
e2
:
SetOperation
(
c12000030
.
tgop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12000030
,
2
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c12000030
.
thcon
)
e3
:
SetTarget
(
c12000030
.
thtg
)
e3
:
SetOperation
(
c12000030
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c12000030
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
not
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
function
c12000030
.
thfilter
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsSSetable
()
end
function
c12000030
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c12000030
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c12000030
.
thfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000030
.
thfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
end
function
c12000030
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsSSetable
()
then
Duel
.
SSet
(
tp
,
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
function
c12000030
.
ffilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c12000030
.
filter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c12000030
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000030
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
)
end
function
c12000030
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000030
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c12000030
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
and
(
Duel
.
IsAbleToEnterBP
()
or
(
Duel
.
GetCurrentPhase
()
>=
PHASE_BATTLE_START
and
Duel
.
GetCurrentPhase
()
<=
PHASE_BATTLE
))
end
function
c12000030
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_NORMAL
)
end
function
c12000030
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c12000030
.
filter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c12000030
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
c
=
e
:
GetHandler
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_RISE_TO_FULL_HEIGHT
)
e1
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e1
:
SetLabel
(
tc
:
GetRealFieldID
())
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_ONLY_BE_ATTACKED
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fc0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
,
true
)
end
end
expansions/script/c12000031.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 糕点神龙
function
c12000031
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xfbe
),
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12000031
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
12000031
)
e1
:
SetCondition
(
c12000031
.
opcon
)
e1
:
SetTarget
(
c12000031
.
optg
)
e1
:
SetOperation
(
c12000031
.
opop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000031
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
)
e2
:
SetCountLimit
(
1
,
12000131
)
e2
:
SetCondition
(
c12000031
.
spcon
)
e2
:
SetTarget
(
c12000031
.
sptg
)
e2
:
SetOperation
(
c12000031
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c12000031
.
opcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c12000031
.
opfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
and
c
:
IsLevelAbove
(
7
)
end
function
c12000031
.
optg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000031
.
opfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c12000031
.
opop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000031
.
opfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
>
0
then
Duel
.
BreakEffect
()
local
tc
=
g
:
GetFirst
()
local
code
=
tc
:
GetOriginalCode
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetValue
(
code
)
c
:
RegisterEffect
(
e1
)
c
:
CopyEffect
(
code
,
RESET_EVENT
+
0x1fe0000
,
1
)
end
end
end
end
function
c12000031
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
Duel
.
GetTurnPlayer
()
~=
tp
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
end
function
c12000031
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft1
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
(
ft1
)
>
0
and
not
((
ft1
)
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
))
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000011
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP
,
tp
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000011
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP
,
1
-
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
ft1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
ft1
,
0
,
0
)
end
function
c12000031
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ft1
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
(
ft1
)
>
0
and
not
((
ft1
)
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
))
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000011
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP
,
tp
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000011
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP
,
1
-
tp
)
then
local
fid
=
c
:
GetFieldID
()
for
i
=
1
,
ft1
do
local
token
=
Duel
.
CreateToken
(
tp
,
12000011
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
Duel
.
SpecialSummonComplete
()
end
end
\ No newline at end of file
expansions/script/c12000032.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 魔式神龙
function
c12000032
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
ritlimit
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000032
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
12000032
)
e2
:
SetTarget
(
c12000032
.
target
)
e2
:
SetOperation
(
c12000032
.
operation
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12000032
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_PREDRAW
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCountLimit
(
1
,
12000131
)
e3
:
SetCondition
(
c12000032
.
thcon
)
e3
:
SetTarget
(
c12000032
.
thtg
)
e3
:
SetOperation
(
c12000032
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c12000032
.
coco
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
Duel
.
GetTurnPlayer
()
~=
tp
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
end
function
c12000032
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c12000032
.
cofilter
(
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsDisabled
()
and
c
:
IsType
(
TYPE_EFFECT
)
end
function
c12000032
.
cotg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c12000032
.
cofilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000032
.
cofilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000032
.
cofilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
c12000032
.
coop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
not
tc
:
IsDisabled
()
and
tc
:
IsControler
(
1
-
tp
)
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c12000032
.
filter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
+
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c12000032
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000032
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
sg
=
Duel
.
GetMatchingGroup
(
c12000032
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
sg
,
sg
:
GetCount
(),
0
,
0
)
Duel
.
SetChainLimit
(
c12000032
.
chlimit
)
end
function
c12000032
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c12000032
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
Duel
.
GetMatchingGroup
(
c12000032
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
end
function
c12000032
.
aclimit
(
e
,
re
,
tp
)
local
tc
=
e
:
GetLabelObject
()
return
re
:
GetHandler
():
IsCode
(
tc
:
GetCode
())
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c12000032
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
==
Duel
.
GetTurnPlayer
()
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
4
and
Duel
.
GetDrawCount
(
tp
)
>
0
end
function
c12000032
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
5
)
local
result
=
g
:
FilterCount
(
Card
.
IsAbleToHand
,
nil
)
>
0
return
result
end
local
dt
=
Duel
.
GetDrawCount
(
tp
)
if
dt
~=
0
then
_replace_count
=
0
_replace_max
=
dt
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_DRAW_COUNT
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DRAW
)
e1
:
SetValue
(
0
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
2
,
tp
,
LOCATION_DECK
)
end
function
c12000032
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
_replace_count
=
_replace_count
+
1
if
_replace_count
<=
_replace_max
then
Duel
.
ConfirmDecktop
(
tp
,
5
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
5
)
local
checkm
=
g
:
FilterCount
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
)
local
checks
=
g
:
FilterCount
(
Card
.
IsSetCard
,
nil
,
0xfbe
)
if
g
:
GetCount
()
>
0
and
checkm
==
0
and
checks
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
2
,
2
,
nil
)
if
sg
:
FilterCount
(
Card
.
IsAbleToHand
,
nil
)
==
2
then
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
ShuffleHand
(
tp
)
else
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
end
Duel
.
ShuffleDeck
(
tp
)
else
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
\ No newline at end of file
expansions/script/c12000033.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点魔式厨房
function
c12000033
.
initial_effect
(
c
)
aux
.
AddRitualProcGreaterCode
(
c
,
12000032
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCondition
(
aux
.
exccon
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetCountLimit
(
1
,
12000033
)
e1
:
SetTarget
(
c12000033
.
thtg
)
e1
:
SetOperation
(
c12000033
.
thop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000033
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_RECOVER
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCountLimit
(
1
,
12000133
)
e2
:
SetCondition
(
c12000033
.
descon
)
e2
:
SetTarget
(
c12000033
.
destg
)
e2
:
SetOperation
(
c12000033
.
desop
)
c
:
RegisterEffect
(
e2
)
end
function
c12000033
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToHand
()
end
function
c12000033
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000033
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12000033
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000033
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c12000033
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_HAND
)
or
c
:
IsPreviousLocation
(
LOCATION_DECK
)
end
function
c12000033
.
desfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsDestructable
()
end
function
c12000033
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000033
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c12000033
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
tg
=
g
:
GetMinGroup
(
Card
.
GetAttack
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tg
,
1
,
0
,
0
)
end
function
c12000033
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c12000033
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tg
=
g
:
GetMinGroup
(
Card
.
GetAttack
)
if
tg
:
GetCount
()
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
tg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg
)
local
tc
=
sg
:
GetFirst
()
local
atk
=
tc
:
IsFaceup
()
and
tc
:
GetAttack
()
or
0
if
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
==
1
and
atk
~=
0
then
Duel
.
Recover
(
tp
,
atk
,
REASON_EFFECT
)
end
else
local
tc
=
tg
:
GetFirst
()
local
atk
=
tc
:
IsFaceup
()
and
tc
:
GetAttack
()
or
0
if
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
==
1
and
atk
~=
0
then
Duel
.
Recover
(
tp
,
atk
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c12000034.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 提拉米苏
function
c12000034
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xfbe
),
4
,
2
)
c
:
EnableReviveLimit
()
--todeck
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12000034
,
0
))
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
,
12000034
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c12000034
.
cost
)
e1
:
SetTarget
(
c12000034
.
target
)
e1
:
SetOperation
(
c12000034
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000034
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCategory
(
CATEGORY_DECKDES
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
12000134
)
e2
:
SetCondition
(
c12000034
.
discon
)
e2
:
SetTarget
(
c12000034
.
distg
)
e2
:
SetOperation
(
c12000034
.
disop
)
c
:
RegisterEffect
(
e2
)
end
function
c12000034
.
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
c12000034
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
1
-
tp
,
LOCATION_DECK
,
0
)
>=
5
or
Duel
.
GetFieldGroupCount
(
1
-
tp
,
0
,
LOCATION_GRAVE
)
>
0
end
end
function
c12000034
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
ConfirmDecktop
(
1
-
tp
,
5
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
5
)
local
slv
=
Duel
.
GetFieldGroupCount
(
1
-
tp
,
0
,
LOCATION_GRAVE
)
local
checkm
=
g
:
FilterCount
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
)
g
:
Remove
(
Card
.
IsLevelAbove
,
nil
,
slv
+
1
)
if
g
:
GetCount
()
>
0
and
checkm
>
0
and
slv
>
0
then
repeat
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
g
:
RemoveCard
(
tc
)
slv
=
slv
-
tc
:
GetLevel
()
Duel
.
Overlay
(
e
:
GetHandler
(),
Group
.
FromCards
(
tc
))
g
:
Remove
(
Card
.
IsLevelAbove
,
nil
,
slv
+
1
)
until
g
:
GetCount
()
==
0
or
slv
<=
0
or
not
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12000034
,
2
))
end
end
function
c12000034
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c12000034
.
filter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToDeck
()
end
function
c12000034
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
c12000034
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000034
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000034
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
2
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c12000034
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
local
ct
=
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_HAND
+
LOCATION_EXTRA
)
local
dg
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
ct
>
0
and
dg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
rg
=
dg
:
Select
(
tp
,
1
,
ct
,
nil
)
Duel
.
HintSelection
(
rg
)
Duel
.
SendtoDeck
(
rg
,
nil
,
2
,
REASON_EFFECT
)
end
end
expansions/script/c12000035.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 巧克力布丁拼盘
function
c12000035
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
nil
,
9
,
2
,
c12000035
.
ovfilter
,
aux
.
Stringid
(
12000035
,
1
),
2
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
c12000035
.
activate
)
c
:
RegisterEffect
(
e1
)
if
c12000035
.
counter
==
nil
then
c12000035
.
counter
=
true
c12000035
[
0
]
=
0
c12000035
[
1
]
=
0
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
e2
:
SetOperation
(
c12000035
.
resetcount
)
Duel
.
RegisterEffect
(
e2
,
0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_RELEASE
)
e3
:
SetOperation
(
c12000035
.
addcount
)
Duel
.
RegisterEffect
(
e3
,
0
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EVENT_DISCARD
)
e4
:
SetOperation
(
c12000035
.
addcount
)
Duel
.
RegisterEffect
(
e4
,
0
)
end
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_UNCOPYABLE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e5
:
SetCondition
(
c12000035
.
immcon
)
e5
:
SetValue
(
c12000035
.
efilter
)
c
:
RegisterEffect
(
e5
)
end
function
c12000035
.
immcon
(
e
)
return
e
:
GetHandler
()
end
function
c12000035
.
efilter
(
e
,
te
)
if
te
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
or
te
:
IsType
(
TYPE_TOKEN
)
then
return
true
else
return
aux
.
qlifilter
(
e
,
te
)
end
end
function
c12000035
.
resetcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c12000035
[
0
]
=
0
c12000035
[
1
]
=
0
end
function
c12000035
.
addcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
while
tc
do
local
pl
=
tc
:
GetPreviousLocation
()
if
pl
==
LOCATION_MZONE
and
tc
:
IsSetCard
(
0xfbe
)
then
local
p
=
tc
:
GetReasonPlayer
()
c12000035
[
p
]
=
c12000035
[
p
]
+
1
elseif
pl
==
LOCATION_HAND
and
tc
:
IsSetCard
(
0xfbe
)
then
local
p
=
tc
:
GetPreviousControler
()
c12000035
[
p
]
=
c12000035
[
p
]
+
1
end
tc
=
eg
:
GetNext
()
end
end
function
c12000035
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
c12000035
.
droperation
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c12000035
.
droperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
12000035
)
Duel
.
Draw
(
tp
,
c12000035
[
tp
],
REASON_EFFECT
)
end
function
c12000035
.
ovfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfbe
)
and
c
:
GetCode
()
~=
12000035
and
c
:
IsType
(
TYPE_XYZ
)
end
\ No newline at end of file
expansions/script/c12000038.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 幻想糕点
function
c12000038
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xfbe
),
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12000038
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
12000038
)
e1
:
SetCondition
(
c12000038
.
spcon
)
e1
:
SetTarget
(
c12000038
.
sptg
)
e1
:
SetOperation
(
c12000038
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000038
,
1
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
12000138
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c12000038
.
tgtg
)
e2
:
SetOperation
(
c12000038
.
tgop
)
c
:
RegisterEffect
(
e2
)
end
function
c12000038
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c12000038
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
and
c
:
IsLevelAbove
(
7
)
end
function
c12000038
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c12000038
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c12000038
.
spfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000038
.
spfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c12000038
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c12000038
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
Duel
.
IsExistingMatchingCard
(
c12000038
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
)
>
0
end
function
c12000038
.
filter2
(
c
,
e
,
tp
,
mc
)
return
c
:
IsSetCard
(
0xfbe
)
and
mc
:
IsCanBeXyzMaterial
(
c
)
and
c
:
IsType
(
TYPE_XYZ
)
end
function
c12000038
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c12000038
.
filter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000038
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c12000038
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c12000038
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
tc
)
<=
0
then
return
end
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000038
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
)
local
sc
=
g
:
GetFirst
()
if
sc
then
local
mg
=
tc
:
GetOverlayGroup
()
if
mg
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
sc
,
mg
)
end
sc
:
SetMaterial
(
Group
.
FromCards
(
tc
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
tc
))
Duel
.
SpecialSummon
(
sc
,
SUMMON_TYPE_XYZ
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
sc
:
CompleteProcedure
()
end
end
\ No newline at end of file
expansions/script/c12000039.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 水果兔
function
c12000039
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSynchroType
,
TYPE_SYNCHRO
),
aux
.
NonTuner
(
c12000039
.
tfilter
),
1
)
c
:
EnableReviveLimit
()
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12000039
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1e0
)
e1
:
SetCountLimit
(
1
,
12000039
)
e1
:
SetTarget
(
c12000039
.
thtg
)
e1
:
SetOperation
(
c12000039
.
thop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000039
,
1
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetCountLimit
(
1
,
12000039
)
e2
:
SetCost
(
c12000039
.
stcost
)
e2
:
SetTarget
(
c12000039
.
sttg
)
e2
:
SetOperation
(
c12000039
.
stop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
c12000039
.
sptg
)
e3
:
SetOperation
(
c12000039
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c12000039
.
tfilter
(
c
)
return
c
:
IsAbleToHand
()
end
function
c12000039
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsAbleToHand
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000039
.
tfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000039
.
tfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c12000039
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
function
c12000039
.
costfilter
(
c
,
ft
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsFaceup
()
and
c
:
IsAbleToDeckAsCost
()
and
(
ft
>
0
or
(
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_SZONE
)))
end
function
c12000039
.
stcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
chk
==
0
then
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c12000039
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
,
ft
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000039
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
ft
,
tp
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
c12000039
.
stfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsSSetable
()
end
function
c12000039
.
sttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000039
.
stfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
function
c12000039
.
stop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000039
.
stfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c12000039
.
filter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
12000039
)
end
function
c12000039
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c12000039
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000039
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000039
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c12000039
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
c
=
e
:
GetHandler
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
==
1
and
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x47e0000
)
e1
:
SetValue
(
LOCATION_REMOVED
)
c
:
RegisterEffect
(
e1
,
true
)
end
end
end
expansions/script/c12000040.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 暴走皇后
function
c12000040
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xfbe
),
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12000040
,
0
))
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c12000040
.
descon
)
e1
:
SetTarget
(
c12000040
.
destg
)
e1
:
SetOperation
(
c12000040
.
desop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_DISABLE_SPSUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
c
:
RegisterEffect
(
e2
)
end
function
c12000040
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c12000040
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetChainLimit
(
c12000040
.
chlimit
)
end
function
c12000040
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
c12000040
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c12000040
.
aclimit
(
e
,
re
,
tp
)
local
tc
=
e
:
GetLabelObject
()
return
re
:
GetHandler
():
IsCode
(
tc
:
GetCode
())
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
\ No newline at end of file
expansions/script/c12000041.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 甜甜圈小姐
function
c12000041
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12000041
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
12000041
)
e1
:
SetCondition
(
c12000041
.
spcon
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000041
,
1
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
22000041
)
e2
:
SetCost
(
c12000041
.
cost
)
e2
:
SetTarget
(
c12000041
.
target
)
e2
:
SetOperation
(
c12000041
.
operation
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12000041
,
2
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
c12000041
.
thtg
)
e3
:
SetOperation
(
c12000041
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c12000041
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0xfbe
)
end
function
c12000041
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12000041
.
filter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
1
,
c
)
end
function
c12000041
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
not
c
:
IsPublic
()
end
function
c12000041
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
c12000041
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000041
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
c
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
ShuffleHand
(
tp
)
end
function
c12000041
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
nil
)
end
end
function
c12000041
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--indestructable
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE
)
e1
:
SetTargetRange
(
LOCATION_SZONE
,
LOCATION_SZONE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x47e0000
+
EVENT_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c12000041
.
thfilter
(
c
)
return
c
:
IsLevelAbove
(
7
)
and
c
:
IsFaceup
()
end
function
c12000041
.
stfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
()
end
function
c12000041
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c12000041
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000041
.
thfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
1
and
(
Duel
.
CheckLocation
(
tp
,
LOCATION_SZONE
,
6
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_SZONE
,
7
))
and
Duel
.
IsExistingMatchingCard
(
c12000041
.
stfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000041
.
thfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c12000041
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
c
=
e
:
GetHandler
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
==
1
and
c
:
IsRelateToEffect
(
e
)
and
(
Duel
.
CheckLocation
(
tp
,
LOCATION_SZONE
,
6
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_SZONE
,
7
))
and
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000041
.
stfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
expansions/script/c12000042.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 水果冻糕
function
c12000042
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
12000042
)
e1
:
SetCost
(
c12000042
.
spcost
)
e1
:
SetTarget
(
c12000042
.
sptg
)
e1
:
SetOperation
(
c12000042
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000042
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
12000142
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c12000042
.
thtg
)
e2
:
SetOperation
(
c12000042
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c12000042
.
tgfilter
(
c
)
local
atk
=
c
:
GetAttack
()
local
def
=
c
:
GetDefense
()
local
lv
=
c
:
GetLevel
()
local
race
=
c
:
GetRace
()
local
att
=
c
:
GetAttribute
()
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000019
,
0xfbe
,
0x5011
,
atk
,
def
,
lv
,
race
,
att
)
and
c
:
IsAbleToGrave
()
end
function
c12000042
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000042
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000042
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
e
:
SetLabelObject
(
g
:
GetFirst
())
end
function
c12000042
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c12000042
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
e
:
GetLabelObject
()
local
atk
=
tc
:
GetAttack
()
local
def
=
tc
:
GetDefense
()
local
lv
=
tc
:
GetLevel
()
local
race
=
tc
:
GetRace
()
local
att
=
tc
:
GetAttribute
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000019
,
0xfbe
,
0x5011
,
atk
,
def
,
lv
,
race
,
att
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
12000019
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
token
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
e2
:
SetValue
(
def
)
e2
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
token
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e3
:
SetValue
(
lv
)
e3
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
token
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_CHANGE_RACE
)
e4
:
SetValue
(
race
)
e4
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
token
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_CHANGE_ATTRIBUTE
)
e5
:
SetValue
(
att
)
e5
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
token
:
RegisterEffect
(
e5
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e8
:
SetValue
(
1
)
e8
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e8
,
true
)
if
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
Duel
.
Equip
(
tp
,
c
,
token
)
c
:
CancelToGrave
()
--Equip limit
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e6
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e6
:
SetValue
(
c12000042
.
eqlimit
)
e6
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e6
)
end
end
end
function
c12000042
.
eqlimit
(
e
,
c
)
return
c
:
GetControler
()
==
e
:
GetOwnerPlayer
()
end
function
c12000042
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_RITUAL
)
and
(
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
or
c
:
IsSetCard
(
0xfbe
))
end
function
c12000042
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000042
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12000042
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000042
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c12000046.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 糕点融合
function
c12000046
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12000046
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c12000046
.
target
)
e1
:
SetOperation
(
c12000046
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000046
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c12000046
.
tdtg
)
e2
:
SetOperation
(
c12000046
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
c12000046
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
end
function
c12000046
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0xfbe
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c12000046
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c12000046
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c12000046
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c12000046
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c12000046
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c12000046
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c12000046
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
function
c12000046
.
tdfilter
(
c
)
return
c
:
IsType
(
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
)
and
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToExtra
()
end
function
c12000046
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c12000046
.
tdfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000046
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000046
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c12000046
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
tc
,
nil
,
0
,
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
expansions/script/c12000047.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 糕点导书
function
c12000047
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
12000047
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c12000047
.
target
)
e1
:
SetOperation
(
c12000047
.
operation
)
c
:
RegisterEffect
(
e1
)
--Equip limit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12000047
,
0
))
e3
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
,
12000047
)
e3
:
SetCondition
(
c12000047
.
tgcon
)
e3
:
SetCost
(
c12000047
.
tgcost
)
e3
:
SetTarget
(
c12000047
.
tgtg
)
e3
:
SetOperation
(
c12000047
.
tgop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
12000047
,
1
))
e4
:
SetCategory
(
CATEGORY_TOHAND
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetCountLimit
(
1
,
12000147
)
e4
:
SetCondition
(
c12000047
.
thcon
)
e4
:
SetTarget
(
c12000047
.
thtg
)
e4
:
SetOperation
(
c12000047
.
thop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_EQUIP
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_TO_GRAVE
)
e5
:
SetCountLimit
(
1
,
12000247
)
e5
:
SetTarget
(
c12000047
.
eqtg
)
e5
:
SetOperation
(
c12000047
.
operation
)
c
:
RegisterEffect
(
e5
)
end
function
c12000047
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c12000047
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
end
end
function
c12000047
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
GetEquipTarget
():
IsSetCard
(
0xfbe
)
end
function
c12000047
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c12000047
.
tgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000047
.
tgfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000047
.
tgfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c12000047
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
ec
=
c
:
GetEquipTarget
()
if
chk
==
0
then
return
c
:
IsAbleToHand
()
and
ec
:
IsAbleToGrave
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
ec
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
c
,
1
,
0
,
0
)
end
function
c12000047
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ec
=
c
:
GetEquipTarget
()
if
ec
and
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
SendtoGrave
(
ec
,
REASON_EFFECT
)
end
end
function
c12000047
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetEquipTarget
():
IsSetCard
(
0xfbe
)
end
function
c12000047
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToHand
()
and
c
:
IsFaceup
()
end
function
c12000047
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
c12000047
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000047
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000047
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c12000047
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
sg
:
GetCount
()
>
0
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
function
c12000047
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
expansions/script/c12000048.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 樱花饼
function
c12000048
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_HANDES
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
12000048
)
e1
:
SetCost
(
c12000048
.
cost
)
e1
:
SetTarget
(
c12000048
.
target
)
e1
:
SetOperation
(
c12000048
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c12000048
.
thtg
)
e2
:
SetOperation
(
c12000048
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c12000048
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_HAND
,
0
,
e
:
GetHandler
())
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
12000048
)
==
0
and
g
:
GetCount
()
>
1
and
g
:
GetCount
()
==
g
:
FilterCount
(
Card
.
IsAbleToGraveAsCost
,
nil
)
end
Duel
.
SendtoGrave
(
g
,
REASON_DISCARD
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_SSET
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c12000048
.
filter
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsSetCard
(
0xfbe
)
end
function
c12000048
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000048
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
)
Duel
.
SetChainLimit
(
c12000048
.
chlimit
)
end
function
c12000048
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c12000048
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000048
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c12000048
.
aclimit
(
e
,
re
,
tp
)
local
tc
=
e
:
GetLabelObject
()
return
re
:
GetHandler
():
IsCode
(
tc
:
GetCode
())
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c12000048
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000011
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c12000048
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000011
,
0
,
0x4011
,
800
,
800
,
3
,
RACE_ZOMBIE
,
ATTRIBUTE_FIRE
,
POS_FACEUP
,
tp
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
12000011
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1
,
true
)
Duel
.
SpecialSummonComplete
()
end
end
\ No newline at end of file
expansions/script/c12000050.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 草莓蛋糕
function
c12000050
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
12000050
)
e1
:
SetTarget
(
c12000050
.
sptg
)
e1
:
SetOperation
(
c12000050
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCountLimit
(
1
,
12000150
)
e2
:
SetTarget
(
c12000050
.
damtg
)
e2
:
SetOperation
(
c12000050
.
damop
)
c
:
RegisterEffect
(
e2
)
end
function
c12000050
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c12000050
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12000050
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c12000050
.
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
,
c12000050
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
function
c12000050
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
300
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
300
)
end
function
c12000050
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c12000050
.
damval
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_NO_EFFECT_DAMAGE
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c12000050
.
damval
(
e
,
re
,
val
,
r
,
rp
,
rc
)
if
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
then
return
0
else
return
val
end
end
\ No newline at end of file
expansions/script/c12000051.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 掉包作战
function
c12000051
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
12000051
)
e1
:
SetTarget
(
c12000051
.
target1
)
e1
:
SetTarget
(
c12000051
.
target2
)
e1
:
SetOperation
(
c12000051
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
12000151
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c12000051
.
thtg
)
e2
:
SetOperation
(
c12000051
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c12000051
.
tgfilter1
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToGrave
()
end
function
c12000051
.
tgfilter2
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToDeck
()
end
function
c12000051
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000051
.
tgfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12000051
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000051
.
tgfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c12000051
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000051
.
tgfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c12000051
.
tgfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
tg
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
tg
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
c12000051
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfbe
)
end
function
c12000051
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
c12000051
.
filter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000051
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
SelectTarget
(
tp
,
c12000051
.
filter1
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
end
function
c12000051
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
+
REASON_RETURN
)
end
end
\ No newline at end of file
expansions/script/c12000052.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 誓言皇后
function
c12000052
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
,
12000052
)
e1
:
SetCost
(
c12000052
.
spcost
)
e1
:
SetTarget
(
c12000052
.
sptg
)
e1
:
SetOperation
(
c12000052
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
12000152
)
e3
:
SetTarget
(
c12000052
.
destg
)
e3
:
SetOperation
(
c12000052
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c12000052
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToGrave
()
end
function
c12000052
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000052
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000052
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c12000052
.
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
,
true
,
true
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c12000052
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
c
:
IsRelateToEffect
(
e
)
then
local
sp
=
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
c
:
CompleteProcedure
()
if
sp
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
12000016
,
0xfbe
,
0x4011
,
300
,
300
,
1
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12000052
,
0
))
then
Duel
.
BreakEffect
()
if
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
==
0
then
return
end
local
token
=
Duel
.
CreateToken
(
tp
,
12000016
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetAbsoluteRange
(
tp
,
1
,
0
)
e2
:
SetTarget
(
c12000052
.
splimit
)
e2
:
SetReset
(
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
end
function
c12000052
.
splimit
(
e
,
c
)
return
not
c
:
IsSetCard
(
0xfbe
)
end
function
c12000052
.
desfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsType
(
TYPE_NORMAL
)
end
function
c12000052
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12000052
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12000052
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c12000052
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
c
=
e
:
GetHandler
()
if
tc
:
IsRelateToEffect
(
e
)
and
c
:
IsRelateToEffect
(
e
)
then
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
expansions/script/c12000053.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 沾糖小姐
function
c12000053
.
initial_effect
(
c
)
--special summon
--summon with no tribute
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12000053
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SUMMON_PROC
)
e1
:
SetCondition
(
c12000053
.
ntcon
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12000053
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
12000053
+
EFFECT_COUNT_CODE_DUEL
)
e3
:
SetCost
(
c12000053
.
cost
)
e3
:
SetTarget
(
c12000053
.
target
)
e3
:
SetOperation
(
c12000053
.
operation
)
c
:
RegisterEffect
(
e3
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000053
,
1
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetTarget
(
c12000053
.
thgt
)
e2
:
SetOperation
(
c12000053
.
thop
)
c
:
RegisterEffect
(
e2
)
local
e4
=
e2
:
Clone
()
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e4
)
end
function
c12000053
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsAbleToGrave
()
end
function
c12000053
.
thgt
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000053
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12000053
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000053
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
c12000053
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfbe
)
end
function
c12000053
.
ntcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
return
minc
==
0
and
c
:
GetLevel
()
>
4
and
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12000053
.
cfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c12000053
.
costfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToHandAsCost
()
and
c
:
IsSetCard
(
0xfbe
)
end
function
c12000053
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
if
ft
<
0
then
return
false
end
if
ft
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12000053
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
else
return
Duel
.
IsExistingMatchingCard
(
c12000053
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
if
ft
==
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000053
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
else
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12000053
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
end
end
function
c12000053
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
700
)
end
function
c12000053
.
operation
(
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
Duel
.
Damage
(
tp
,
700
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c12000055.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点 糕点回转
function
c12000055
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--special Draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000055
,
0
))
e2
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_HANDES
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCost
(
c12000055
.
spcost
)
e2
:
SetTarget
(
c12000055
.
sptg
)
e2
:
SetOperation
(
c12000055
.
spop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCost
(
aux
.
bfgcost
)
e3
:
SetCondition
(
c12000055
.
sumcon
)
e3
:
SetTarget
(
c12000055
.
target
)
e3
:
SetOperation
(
c12000055
.
activate
)
c
:
RegisterEffect
(
e3
)
end
function
c12000055
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c12000055
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c12000055
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c12000055
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
==
0
then
return
end
local
tc
=
Duel
.
GetOperatedGroup
():
GetFirst
()
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
if
tc
:
IsSetCard
(
0xfbe
)
and
tc
:
IsType
(
TYPE_MONSTER
)
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c12000055
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12000055
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sc
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
else
Duel
.
DiscardHand
(
tp
,
aux
.
TRUE
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
)
end
Duel
.
ShuffleHand
(
tp
)
end
function
c12000055
.
sumcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetActivityCount
(
Duel
.
GetTurnPlayer
(),
ACTIVITY_SPSUMMON
)
>=
2
end
function
c12000055
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
c12000055
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12000055
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c12000055
.
activate
(
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
,
c12000055
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c12000057.lua
deleted
100644 → 0
View file @
146b2f27
--奇迹糕点
function
c12000057
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
c12000057
.
matfilter
,
2
,
2
)
c
:
EnableReviveLimit
()
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12000057
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c12000057
.
drcost
)
e2
:
SetTarget
(
c12000057
.
sptg
)
e2
:
SetOperation
(
c12000057
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c12000057
.
matfilter
(
c
)
return
c
:
IsSetCard
(
0xfbe
)
end
function
c12000057
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToExtraAsCost
()
end
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
0
,
REASON_COST
)
end
function
c12000057
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xfbe
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c12000057
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12000057
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c12000057
.
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
,
c12000057
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
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