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
c63024ab
Commit
c63024ab
authored
Nov 25, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/purerosefallen/ygopro-222DIY
into beta
parents
c7771eae
4e125d56
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1720 additions
and
67 deletions
+1720
-67
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c10903000.lua
expansions/script/c10903000.lua
+47
-0
expansions/script/c10903001.lua
expansions/script/c10903001.lua
+87
-0
expansions/script/c10903002.lua
expansions/script/c10903002.lua
+87
-0
expansions/script/c10903003.lua
expansions/script/c10903003.lua
+114
-0
expansions/script/c10970005.lua
expansions/script/c10970005.lua
+64
-64
expansions/script/c1154003.lua
expansions/script/c1154003.lua
+168
-0
expansions/script/c1154005.lua
expansions/script/c1154005.lua
+132
-0
expansions/script/c1156001.lua
expansions/script/c1156001.lua
+99
-0
expansions/script/c1156003.lua
expansions/script/c1156003.lua
+177
-0
expansions/script/c1156005.lua
expansions/script/c1156005.lua
+139
-0
expansions/script/c1156007.lua
expansions/script/c1156007.lua
+85
-0
expansions/script/c1156008.lua
expansions/script/c1156008.lua
+178
-0
expansions/script/c1156009.lua
expansions/script/c1156009.lua
+120
-0
expansions/script/c1156010.lua
expansions/script/c1156010.lua
+215
-0
expansions/script/c22240121.lua
expansions/script/c22240121.lua
+1
-0
expansions/script/c22240122.lua
expansions/script/c22240122.lua
+1
-0
expansions/script/c22240123.lua
expansions/script/c22240123.lua
+1
-0
expansions/script/c22240124.lua
expansions/script/c22240124.lua
+1
-0
expansions/script/c22252201.lua
expansions/script/c22252201.lua
+1
-1
expansions/strings.conf
expansions/strings.conf
+1
-0
lflist.conf
lflist.conf
+2
-2
No files found.
expansions/222DIY.cdb
View file @
c63024ab
No preview for this file type
expansions/script/c10903000.lua
0 → 100644
View file @
c63024ab
--东煌之绊
local
m
=
10903000
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
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
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetTargetRange
(
0
,
1
)
e4
:
SetCondition
(
cm
.
valcon
)
e4
:
SetValue
(
cm
.
val
)
c
:
RegisterEffect
(
e4
)
end
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0x1236
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
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
cm
.
valcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
end
function
cm
.
filter2
(
c
)
return
c
:
IsSetCard
(
0x1236
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
cm
.
val
(
e
,
re
,
dam
,
r
,
rp
,
rc
)
return
dam
+
Duel
.
GetMatchingGroupCount
(
cm
.
filter2
,
e
:
GetHandler
():
GetControler
(),
LOCATION_MZONE
,
0
,
nil
)
*
600
end
expansions/script/c10903001.lua
0 → 100644
View file @
c63024ab
--东煌·平海
local
m
=
10903001
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
cm
.
spcon
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetCondition
(
cm
.
atkcon
)
e2
:
SetValue
(
500
)
c
:
RegisterEffect
(
e2
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetTargetRange
(
0
,
1
)
e4
:
SetCondition
(
cm
.
valcon
)
e4
:
SetValue
(
cm
.
val
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
23571046
,
0
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_GRAVE
)
e5
:
SetCountLimit
(
1
,
m
)
e5
:
SetCondition
(
cm
.
condition
)
e5
:
SetTarget
(
cm
.
target
)
e5
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e5
)
end
function
cm
.
spfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10903002
)
end
function
cm
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
atkcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
valcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
end
function
cm
.
filter2
(
c
)
return
c
:
IsSetCard
(
0x1236
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
cm
.
val
(
e
,
re
,
dam
,
r
,
rp
,
rc
)
return
dam
+
Duel
.
GetMatchingGroupCount
(
cm
.
filter2
,
e
:
GetHandler
():
GetControler
(),
LOCATION_MZONE
,
0
,
nil
)
*
600
end
function
cm
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
end
function
cm
.
cfilter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsSetCard
(
0x1236
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
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
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
expansions/script/c10903002.lua
0 → 100644
View file @
c63024ab
--东煌·宁海
local
m
=
10903002
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
cm
.
spcon
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetCondition
(
cm
.
atkcon
)
e2
:
SetValue
(
500
)
c
:
RegisterEffect
(
e2
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetTargetRange
(
0
,
1
)
e4
:
SetCondition
(
cm
.
valcon
)
e4
:
SetValue
(
cm
.
val
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
23571046
,
0
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_GRAVE
)
e5
:
SetCountLimit
(
1
,
m
)
e5
:
SetCondition
(
cm
.
condition
)
e5
:
SetTarget
(
cm
.
target
)
e5
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e5
)
end
function
cm
.
spfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10903001
)
end
function
cm
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
atkcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
valcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
end
function
cm
.
filter2
(
c
)
return
c
:
IsSetCard
(
0x1236
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
cm
.
val
(
e
,
re
,
dam
,
r
,
rp
,
rc
)
return
dam
+
Duel
.
GetMatchingGroupCount
(
cm
.
filter2
,
e
:
GetHandler
():
GetControler
(),
LOCATION_MZONE
,
0
,
nil
)
*
600
end
function
cm
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
end
function
cm
.
cfilter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsSetCard
(
0x1236
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
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
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
expansions/script/c10903003.lua
0 → 100644
View file @
c63024ab
--东煌·逸仙
local
m
=
10903003
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
cm
.
spcon
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x1236
))
e2
:
SetCondition
(
cm
.
atkcon
)
e2
:
SetValue
(
800
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_CANNOT_DISABLE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e4
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x1236
))
e4
:
SetCondition
(
cm
.
atkcon
)
e4
:
SetValue
(
1
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e5
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e5
:
SetTargetRange
(
0
,
1
)
e5
:
SetCondition
(
cm
.
valcon
)
e5
:
SetValue
(
cm
.
val
)
c
:
RegisterEffect
(
e5
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
51316684
,
0
))
e6
:
SetCategory
(
CATEGORY_DESTROY
)
e6
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCountLimit
(
1
)
e6
:
SetCondition
(
cm
.
rmcon
)
e6
:
SetTarget
(
cm
.
destg
)
e6
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_FIELD
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e7
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e7
:
SetTargetRange
(
1
,
0
)
e7
:
SetValue
(
cm
.
val2
)
c
:
RegisterEffect
(
e7
)
end
function
cm
.
spfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10903001
)
end
function
cm
.
spfilter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10903002
)
end
function
cm
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
atkcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter2
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
valcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
end
function
cm
.
filter2
(
c
)
return
c
:
IsSetCard
(
0x1236
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
cm
.
val
(
e
,
re
,
dam
,
r
,
rp
,
rc
)
return
dam
+
Duel
.
GetMatchingGroupCount
(
cm
.
filter2
,
e
:
GetHandler
():
GetControler
(),
LOCATION_MZONE
,
0
,
nil
)
*
600
end
function
cm
.
val2
(
e
,
re
,
dam
,
r
,
rp
,
rc
)
return
dam
-
800
end
function
cm
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
e
:
GetHandler
():
GetBattledGroup
():
GetCount
()
>
0
and
e
:
GetHandler
():
IsPosition
(
POS_FACEUP_ATTACK
)
end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
cm
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
then
Duel
.
ChangePosition
(
c
,
POS_FACEUP_DEFENSE
)
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
end
expansions/script/c10970005.lua
View file @
c63024ab
--纸上台本 「蓝宝石的存在证明」
function
c10970005
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
2
,
10970001
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c10970005
.
atg
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x1233
))
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c10970005
.
condition0
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
10970005
,
0
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetRange
(
LOCATION_FZONE
)
e5
:
SetHintTiming
(
0
,
0x1c0
)
e5
:
SetCondition
(
c10970005
.
condition
)
e5
:
SetTarget
(
c10970005
.
sptg
)
e5
:
SetOperation
(
c10970005
.
spop
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c10970005
.
condition2
)
e6
:
SetOperation
(
c10970005
.
spop2
)
c
:
RegisterEffect
(
e6
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
2
,
10970001
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c10970005
.
atg
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x1233
))
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c10970005
.
condition0
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
10970005
,
0
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetRange
(
LOCATION_FZONE
)
e5
:
SetHintTiming
(
0
,
0x1c0
)
e5
:
SetCondition
(
c10970005
.
condition
)
e5
:
SetTarget
(
c10970005
.
sptg
)
e5
:
SetOperation
(
c10970005
.
spop
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c10970005
.
condition2
)
e6
:
SetOperation
(
c10970005
.
spop2
)
c
:
RegisterEffect
(
e6
)
end
function
c10970005
.
atg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
c10970005
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
c10970005
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
Duel
.
SelectYesNo
(
tp
,
94
)
then
c10970005
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
e
:
SetOperation
(
c10970005
.
spop
)
else
e
:
SetCategory
(
0
)
e
:
SetProperty
(
0
)
e
:
SetOperation
(
nil
)
end
and
Duel
.
SelectYesNo
(
tp
,
94
)
then
c10970005
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
e
:
SetOperation
(
c10970005
.
spop
)
else
e
:
SetCategory
(
0
)
e
:
SetProperty
(
0
)
e
:
SetOperation
(
nil
)
end
end
function
c10970005
.
condition0
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsPlayerAffectedByEffect
(
tp
,
10970008
)
return
Duel
.
IsPlayerAffectedByEffect
(
tp
,
10970008
)
end
function
c10970005
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10970003
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10970003
)
end
function
c10970005
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c10970005
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c10970005
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c10970005
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c10970005
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
10970008
)
return
Duel
.
IsExistingMatchingCard
(
c10970005
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
10970008
)
end
function
c10970005
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x1233
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x1233
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c10970005
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
10970005
)
==
0
and
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c10970005
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
RegisterFlagEffect
(
tp
,
10970005
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
10970005
)
==
0
and
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c10970005
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
Duel
.
RegisterFlagEffect
(
tp
,
10970005
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c10970005
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10970005
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10970005
.
spfilter
,
tp
,
LOCATION_HAND
+
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
function
c10970005
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10970005
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c10970005
.
spfilter
),
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c1154003.lua
0 → 100644
View file @
c63024ab
--Trick or treat
function
c1154003
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
c1154003
.
lfilter
),
2
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1154003
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
1152003
)
e1
:
SetTarget
(
c1154003
.
tg1
)
e1
:
SetOperation
(
c1154003
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_NO_TURN_RESET
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC_G
)
e2
:
SetRange
(
LOCATION_ONFIELD
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c1154003
.
con2
)
e2
:
SetOperation
(
c1154003
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetRange
(
LOCATION_ONFIELD
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_CHANGE_RACE
)
e3
:
SetValue
(
RACE_FIEND
)
e3
:
SetCondition
(
c1154003
.
con3
)
c
:
RegisterEffect
(
e3
)
--
end
--
function
c1154003
.
lfilter
(
c
)
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
end
--
function
c1154003
.
tfilter1
(
c
)
return
c
:
IsAbleToHand
()
end
function
c1154003
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c1154003
.
tfilter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1154003
.
tfilter1
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
1154003
,
1
))
local
g
=
Duel
.
SelectTarget
(
tp
,
c1154003
.
tfilter1
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
end
--
function
c1154003
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
then
if
Duel
.
SelectYesNo
(
1
-
tp
,
aux
.
Stringid
(
1154003
,
2
))
then
Duel
.
SendtoHand
(
tc
,
tp
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
else
if
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
1151991
,
0
,
0x4011
,
200
,
200
,
1
,
RACE_FIEND
,
ATTRIBUTE_DARK
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
1151991
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP
)
local
e1_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1_1
,
true
)
local
e1_2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
e1_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1_2
,
true
)
local
e1_3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_3
:
SetCode
(
EFFECT_DISABLE
)
e1_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1_3
,
true
)
local
e1_4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1_4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_4
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1_4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1_4
,
true
)
local
e1_5
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1_5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_5
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e1_5
:
SetValue
(
1
)
e1_5
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1_5
,
true
)
local
e1_6
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_6
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1_6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_6
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
e1_6
:
SetValue
(
1
)
e1_6
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1_6
,
true
)
local
e1_7
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_7
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1_7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_7
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
e1_7
:
SetValue
(
1
)
e1_7
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1_7
,
true
)
local
e1_8
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_8
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1_8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_8
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1_8
:
SetValue
(
1
)
e1_8
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1_8
,
true
)
local
e1_9
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_9
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1_9
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_9
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e1_9
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1_9
,
true
)
local
e1_10
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_10
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1_10
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1_10
:
SetRange
(
LOCATION_MZONE
)
e1_10
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1_10
:
SetCountLimit
(
1
)
e1_10
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
3
)
e1_10
:
SetCondition
(
c1154003
.
con1_10
)
e1_10
:
SetOperation
(
c1154003
.
op1_10
)
e1_10
:
SetLabel
(
0
)
token
:
RegisterEffect
(
e1_10
)
end
end
end
end
function
c1154003
.
con1_10
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c1154003
.
op1_10
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
e
:
GetLabel
()
e
:
GetHandler
():
SetTurnCounter
(
ct
+
1
)
if
ct
==
1
then
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
else
e
:
SetLabel
(
1
)
end
end
--
function
c1154003
.
cfilter2
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsRace
(
RACE_FIEND
)
end
function
c1154003
.
con2
(
e
,
c
,
og
)
local
tp
=
e
:
GetHandlerPlayer
()
local
c
=
e
:
GetHandler
()
return
Duel
.
IsExistingMatchingCard
(
c1154003
.
cfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
and
c
:
IsFaceup
()
and
not
c
:
IsDisabled
()
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
--
function
c1154003
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1154003
.
cfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
e
:
GetHandler
():
RegisterFlagEffect
(
1154003
,
0
,
RESET_EVENT
+
0x1fe0000
,
0
)
sg
:
Merge
(
g
)
end
--
function
c1154003
.
con3
(
e
)
return
e
:
GetHandler
():
GetFlagEffect
(
1154003
)
==
0
end
--
expansions/script/c1154005.lua
0 → 100644
View file @
c63024ab
--夏季的恶魔姐妹
function
c1154005
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
c1154005
.
lfilter
),
2
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetCondition
(
c1154005
.
con1
)
e1
:
SetTarget
(
c1154005
.
tg1
)
e1
:
SetOperation
(
c1154005
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
aux
.
imval1
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
aux
.
exccon
)
e3
:
SetTarget
(
c1154005
.
tg3
)
e3
:
SetOperation
(
c1154005
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
function
c1154005
.
lfilter
(
c
)
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
end
--
function
c1154005
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
--
function
c1154005
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
e
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
end
--
function
c1154005
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
token
=
Duel
.
CreateToken
(
tp
,
1154006
)
Duel
.
MoveToField
(
token
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
token
:
CancelToGrave
()
local
e1_4
=
Effect
.
CreateEffect
(
token
)
e1_4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_4
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1_4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_4
:
SetValue
(
TYPE_EQUIP
+
TYPE_SPELL
)
e1_4
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
token
:
RegisterEffect
(
e1_4
,
true
)
local
e1_5
=
Effect
.
CreateEffect
(
token
)
e1_5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_5
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1_5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_5
:
SetValue
(
1
)
token
:
RegisterEffect
(
e1_5
,
true
)
token
:
CancelToGrave
()
if
Duel
.
Equip
(
tp
,
token
,
e
:
GetHandler
(),
false
)
then
local
e1_1
=
Effect
.
CreateEffect
(
token
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1_1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1_1
:
SetRange
(
LOCATION_ONFIELD
)
e1_1
:
SetValue
(
c1154006
.
efilter1_1
)
token
:
RegisterEffect
(
e1_1
,
true
)
local
e1_2
=
Effect
.
CreateEffect
(
token
)
e1_2
:
SetType
(
EFFECT_TYPE_FIELD
)
e1_2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1_2
:
SetCode
(
EFFECT_NO_EFFECT_DAMAGE
)
e1_2
:
SetRange
(
LOCATION_ONFIELD
)
e1_2
:
SetTargetRange
(
1
,
0
)
e1_2
:
SetValue
(
c1154006
.
damval1_2
)
token
:
RegisterEffect
(
e1_2
,
true
)
else
Duel
.
SendtoGrave
(
token
,
REASON_RULE
)
end
end
function
c1154005
.
efilter1_1
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
function
c1154005
.
damval1_2
(
e
,
re
,
val
,
r
,
rp
,
rc
)
if
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
then
return
0
end
return
val
end
--
function
c1154005
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
rc
=
re
:
GetHandler
()
local
np
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_CONTROLER
)
if
chk
==
0
then
return
np
~=
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
end
--
function
c1154005
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
1154007
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_AQUA
,
ATTRIBUTE_WATER
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1154005
,
0
))
then
Duel
.
Hint
(
HINT_CARD
,
0
,
1154005
)
local
token
=
Duel
.
CreateToken
(
tp
,
1154007
)
if
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
e3_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3_1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3_1
:
SetRange
(
LOCATION_MZONE
)
e3_1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3_1
:
SetValue
(
c1154005
.
efilter3_1
)
e3_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_CHAIN
)
e
:
GetHandler
():
RegisterEffect
(
e3_1
,
true
)
end
local
e3_2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3_2
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e3_2
:
SetValue
(
1
)
if
Duel
.
GetTurnPlayer
()
~=
tp
then
e3_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
2
)
else
e3_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
1
)
end
e
:
GetHandler
():
RegisterEffect
(
e3_2
,
true
)
end
end
function
c1154005
.
efilter3_1
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
expansions/script/c1156001.lua
0 → 100644
View file @
c63024ab
--女仆装的小妖梦
function
c1156001
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
--
aux
.
AddLinkProcedure
(
c
,
c1156001
.
matfilter
,
1
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOKEN
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetTarget
(
c1156001
.
tg1
)
e1
:
SetOperation
(
c1156001
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetOperation
(
c1156001
.
tg2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c1156001
.
matfilter
(
c
)
return
c
:
IsRace
(
RACE_ZOMBIE
)
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsSummonType
(
SUMMON_TYPE_NORMAL
)
end
--
function
c1156001
.
tfilter1_1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsRace
(
RACE_ZOMBIE
)
and
c
:
IsFaceup
()
end
function
c1156001
.
tfilter1_2
(
c
)
return
c
:
IsType
(
TYPE_SPIRIT
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
GetLevel
()
<
4
and
c
:
IsAbleToGrave
()
end
function
c1156001
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1156001
.
tfilter1_2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
zone
~=
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
1156002
,
0
,
0x4011
,
0
,
800
,
1
,
RACE_ZOMBIE
,
ATTRIBUTE_WIND
)
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
and
not
Duel
.
IsExistingMatchingCard
(
c1156001
.
tfilter1_1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
--
function
c1156001
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1156001
,
0
))
then
Duel
.
Hint
(
HINT_CARD
,
0
,
1156001
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1156001
.
tfilter1_2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
local
token
=
Duel
.
CreateToken
(
tp
,
1156002
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
local
e1_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1_1
:
SetValue
(
1
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e1_1
,
true
)
end
end
end
end
--
function
c1156001
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e2_1
=
Effect
.
CreateEffect
(
c
)
e2_1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2_1
:
SetCategory
(
CATEGORY_TOHAND
)
e2_1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2_1
:
SetRange
(
LOCATION_MZONE
)
e2_1
:
SetCountLimit
(
1
)
e2_1
:
SetProperty
(
EFFECT_FLAG_REPEAT
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1ee0000
+
RESET_PHASE
+
PHASE_END
)
e2_1
:
SetCondition
(
c1156001
.
con2_1
)
e2_1
:
SetTarget
(
c1156001
.
tg2_1
)
e2_1
:
SetOperation
(
c1156001
.
op2_1
)
c
:
RegisterEffect
(
e2_1
,
true
)
end
function
c1156001
.
con2_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsHasEffect
(
EFFECT_SPIRIT_DONOT_RETURN
)
then
return
false
end
if
e
:
IsHasType
(
EFFECT_TYPE_TRIGGER_F
)
then
return
not
c
:
IsHasEffect
(
EFFECT_SPIRIT_MAYNOT_RETURN
)
else
return
c
:
IsHasEffect
(
EFFECT_SPIRIT_MAYNOT_RETURN
)
end
end
function
c1156001
.
tg2_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c1156001
.
op2_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
Recover
(
tp
,
1200
,
REASON_EFFECT
)
end
end
end
--
expansions/script/c1156003.lua
0 → 100644
View file @
c63024ab
--感情丰富的无表情
function
c1156003
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
nil
,
4
,
4
,
c1156003
.
lcheck
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1156003
,
4
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c1156003
.
tg1
)
e1
:
SetOperation
(
c1156003
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetTarget
(
c1156003
.
tg2
)
e2
:
SetOperation
(
c1156003
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c1156003
.
lcheck
(
g
)
return
g
:
GetClassCount
(
Card
.
GetCode
)
==
g
:
GetCount
()
end
--
function
c1156003
.
tfilter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1156003
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
c1156003
.
tfilter1_1
(
chkc
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1156003
.
tfilter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1156003
.
tfilter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
end
--
function
c1156003
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
1156004
)
Duel
.
MoveToField
(
token
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
token
:
CancelToGrave
()
local
e1_1
=
Effect
.
CreateEffect
(
token
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_1
:
SetValue
(
TYPE_EQUIP
+
TYPE_SPELL
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
token
:
RegisterEffect
(
e1_1
,
true
)
local
e1_2
=
Effect
.
CreateEffect
(
token
)
e1_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_2
:
SetValue
(
1
)
token
:
RegisterEffect
(
e1_2
,
true
)
token
:
CancelToGrave
()
if
Duel
.
Equip
(
tp
,
token
,
tc
,
false
)
then
local
sel
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
1156003
,
0
),
aux
.
Stringid
(
1156003
,
1
),
aux
.
Stringid
(
1156003
,
2
),
aux
.
Stringid
(
1156003
,
3
))
if
sel
==
0
then
local
e1_3
=
Effect
.
CreateEffect
(
c
)
e1_3
:
SetDescription
(
aux
.
Stringid
(
1156003
,
0
))
e1_3
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1_3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e1_3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1_3
:
SetValue
(
c1156003
.
efilter1_3
)
token
:
RegisterEffect
(
e1_3
,
true
)
end
if
sel
==
1
then
local
e1_4
=
Effect
.
CreateEffect
(
c
)
e1_4
:
SetDescription
(
aux
.
Stringid
(
1156003
,
1
))
e1_4
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1_4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e1_4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1_4
:
SetValue
(
1000
)
token
:
RegisterEffect
(
e1_4
,
true
)
local
e1_5
=
Effect
.
CreateEffect
(
c
)
e1_5
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1_5
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1_5
:
SetRange
(
LOCATION_SZONE
)
e1_5
:
SetCondition
(
c1156003
.
con1_5
)
e1_5
:
SetOperation
(
c1156003
.
op1_5
)
token
:
RegisterEffect
(
e1_5
,
true
)
end
if
sel
==
2
then
local
e1_6
=
Effect
.
CreateEffect
(
c
)
e1_6
:
SetDescription
(
aux
.
Stringid
(
1156003
,
2
))
e1_6
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1_6
:
SetType
(
EFFECT_TYPE_EQUIP
)
e1_6
:
SetCode
(
EFFECT_SET_ATTACK
)
e1_6
:
SetValue
(
0
)
token
:
RegisterEffect
(
e1_6
,
true
)
local
e1_7
=
Effect
.
CreateEffect
(
c
)
e1_7
:
SetType
(
EFFECT_TYPE_EQUIP
)
e1_7
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
token
:
RegisterEffect
(
e1_7
,
true
)
end
if
sel
==
3
then
local
e1_8
=
Effect
.
CreateEffect
(
c
)
e1_8
:
SetDescription
(
aux
.
Stringid
(
1156003
,
3
))
e1_8
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1_8
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1_8
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1_8
:
SetRange
(
LOCATION_SZONE
)
e1_8
:
SetTarget
(
c1156003
.
tg1_8
)
e1_8
:
SetOperation
(
c1156003
.
op1_8
)
token
:
RegisterEffect
(
e1_8
,
true
)
end
else
Duel
.
SendtoGrave
(
token
,
REASON_RULE
)
end
end
end
--
function
c1156003
.
efilter1_3
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
--
function
c1156003
.
con1_5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
i
=
0
while
tc
do
if
tc
==
e
:
GetHandler
():
GetEquipTarget
()
then
i
=
1
end
tc
=
eg
:
GetNext
()
end
return
i
==
1
end
function
c1156003
.
op1_5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
num
=
ev
/
2
+
ev
Duel
.
ChangeBattleDamage
(
ep
,
num
)
end
--
function
c1156003
.
tg1_8
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ec
=
e
:
GetHandler
():
GetEquipTarget
()
return
ec
and
eg
:
IsContains
(
ec
)
end
function
c1156003
.
op1_8
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
1156004
)
Duel
.
Draw
(
tp
,
2
,
REASON_EFFECT
)
end
--
function
c1156003
.
tfilter2
(
c
)
return
c
:
IsCode
(
1156004
)
and
c
:
IsFaceup
()
end
function
c1156003
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1156003
.
tfilter2
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
tp
,
LOCATION_GRAVE
)
end
--
function
c1156003
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1156003
.
tfilter2
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
if
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
e2_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e2_1
:
SetValue
(
1
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e
:
GetHandler
():
RegisterEffect
(
e2_1
,
true
)
end
end
end
end
--
expansions/script/c1156005.lua
0 → 100644
View file @
c63024ab
--识文解意的爱书人
function
c1156005
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
c1156005
.
matfilter
,
1
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1156005
,
0
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCondition
(
c1156005
.
con2
)
e2
:
SetTarget
(
c1156005
.
tg2
)
e2
:
SetOperation
(
c1156005
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1156005
,
0
))
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_PREDRAW
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTarget
(
c1156005
.
tg2
)
e3
:
SetOperation
(
c1156005
.
op2
)
c
:
RegisterEffect
(
e3
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TOKEN
+
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EVENT_FREE_CHAIN
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetTarget
(
c1156005
.
tg4
)
e4
:
SetOperation
(
c1156005
.
op4
)
c
:
RegisterEffect
(
e4
)
--
end
--
function
c1156005
.
matfilter
(
c
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
end
--
function
c1156005
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
--
function
c1156005
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
2
end
end
--
function
c1156005
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
2
then
Duel
.
DisableShuffleCheck
()
Duel
.
ConfirmDecktop
(
tp
,
3
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
3
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1156005
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
1156005
,
2
))
local
sg
=
g
:
Select
(
tp
,
1
,
3
,
nil
)
local
tc
=
sg
:
GetFirst
()
while
tc
do
g
:
RemoveCard
(
tc
)
tc
=
sg
:
GetNext
()
end
local
num
=
g
:
GetCount
()
if
num
>
0
then
if
num
==
1
then
local
tc2
=
g
:
GetFirst
()
Duel
.
DisableShuffleCheck
()
Duel
.
MoveSequence
(
tc2
,
1
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
1156005
,
3
))
local
gn
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc2
=
gn
:
GetFirst
()
g
:
RemoveCard
(
tc2
)
local
tc1
=
g
:
GetFirst
()
Duel
.
MoveSequence
(
tc2
,
1
)
Duel
.
MoveSequence
(
tc1
,
1
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
1156005
,
4
))
Duel
.
SortDecktop
(
tp
,
tp
,
3
-
num
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
1156005
,
5
))
local
gn
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc3
=
gn
:
GetFirst
()
g
:
RemoveCard
(
tc3
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
1156005
,
3
))
local
gn
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc2
=
gn
:
GetFirst
()
g
:
RemoveCard
(
tc2
)
local
tc1
=
g
:
GetFirst
()
Duel
.
MoveSequence
(
tc3
,
1
)
Duel
.
MoveSequence
(
tc2
,
1
)
Duel
.
MoveSequence
(
tc1
,
1
)
end
end
end
--
function
c1156005
.
tfilter4
(
c
)
return
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsFaceup
()
and
not
c
:
IsDisabled
()
end
function
c1156005
.
tg4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1156005
.
tfilter4
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
and
zone
~=
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
1156006
,
0
,
0x4011
,
800
,
800
,
1
,
RACE_FIEND
,
ATTRIBUTE_DARK
)
and
Duel
.
GetTurnPlayer
()
==
e
:
GetHandler
():
GetControler
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
--
function
c1156005
.
op4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
1156005
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1156005
.
tfilter4
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
local
e4_1
=
Effect
.
CreateEffect
(
tc
)
e4_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e4_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4_1
:
SetCode
(
EFFECT_DISABLE
)
e4_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e4_1
)
local
e4_2
=
Effect
.
CreateEffect
(
tc
)
e4_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e4_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4_2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e4_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e4_2
)
Duel
.
BreakEffect
()
if
tc
:
IsDisabled
()
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
local
token
=
Duel
.
CreateToken
(
tp
,
1156006
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
end
end
end
--
expansions/script/c1156007.lua
0 → 100644
View file @
c63024ab
--门前的妖怪小姑娘
function
c1156007
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsAttribute
,
ATTRIBUTE_EARTH
),
2
,
2
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_DAMAGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c1156007
.
con1
)
e1
:
SetTarget
(
c1156007
.
tg1
)
e1
:
SetOperation
(
c1156007
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
1156007
)
e2
:
SetCondition
(
aux
.
damcon1
)
e2
:
SetTarget
(
c1156007
.
tg2
)
e2
:
SetOperation
(
c1156007
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
1156007
)
e3
:
SetCondition
(
c1156007
.
con3
)
e3
:
SetTarget
(
c1156007
.
tg2
)
e3
:
SetOperation
(
c1156007
.
op2
)
c
:
RegisterEffect
(
e3
)
--
end
--
function
c1156007
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
and
ep
==
tp
end
function
c1156007
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
1156007
)
==
0
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
ev
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
ev
)
end
function
c1156007
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
1156007
,
RESET_CHAIN
,
0
,
1
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
end
--
function
c1156007
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
tp
,
LOCATION_GRAVE
)
end
function
c1156007
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e2_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2_1
:
SetRange
(
LOCATION_MZONE
)
e2_1
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2_1
:
SetValue
(
1
)
e
:
GetHandler
():
RegisterEffect
(
e2_1
,
true
)
local
e2_2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_2
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e2_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2_2
:
SetValue
(
LOCATION_REMOVED
)
e
:
GetHandler
():
RegisterEffect
(
e2_2
,
true
)
end
end
--
function
c1156007
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
and
Duel
.
GetAttackTarget
()
==
nil
end
expansions/script/c1156008.lua
0 → 100644
View file @
c63024ab
--辉光之针的利立浦特
function
c1156008
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
c1156008
.
lfilter
),
3
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1156008
,
0
))
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EVENT_FREE_CHAIN
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c1156008
.
tg1
)
e1
:
SetOperation
(
c1156008
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1156008
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
1156008
)
e2
:
SetTarget
(
c1156008
.
tg2
)
e2
:
SetOperation
(
c1156008
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c1156008
.
lfilter
(
c
)
return
c
:
GetAttack
()
<
501
and
c
:
IsType
(
TYPE_EFFECT
)
end
--
function
c1156008
.
tfilter1_1
(
c
)
return
c
:
IsAbleToDeck
()
end
function
c1156008
.
tfilter1_2
(
c
)
return
c
:
GetAttack
()
~=
500
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1156008
.
tfilter1_3
(
c
)
return
c
:
IsReleasable
()
and
c
:
GetLevel
()
<
501
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1156008
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
e
:
GetHandler
():
GetLinkedGroup
()
e
:
SetLabelObject
(
g
)
if
chk
==
0
then
return
((
Duel
.
IsExistingMatchingCard
(
c1156008
.
tfilter1_1
,
tp
,
0
,
LOCATION_HAND
,
1
,
nil
)
or
Duel
.
IsExistingMatchingCard
(
c1156008
.
tfilter1_1
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
or
Duel
.
IsExistingMatchingCard
(
c1156008
.
tfilter1_1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
))
or
Duel
.
IsExistingMatchingCard
(
c1156008
.
tfilter1_2
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
g
,
e
))
and
Duel
.
IsExistingMatchingCard
(
c1156008
.
tfilter1_3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
if
Duel
.
IsExistingMatchingCard
(
c1156008
.
tfilter1_1
,
tp
,
0
,
LOCATION_HAND
,
1
,
nil
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
0
,
LOCATION_HAND
)
end
if
Duel
.
IsExistingMatchingCard
(
c1156008
.
tfilter1_1
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
0
,
LOCATION_GRAVE
)
end
if
Duel
.
IsExistingMatchingCard
(
c1156008
.
tfilter1_1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
end
end
--
function
c1156008
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_CARD
,
0
,
1156008
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1156008
.
tfilter1_3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
Release
(
g
,
REASON_EFFECT
)
~=
0
then
local
gn
=
Group
.
CreateGroup
()
if
Duel
.
IsExistingMatchingCard
(
c1156008
.
tfilter1_1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1156008
.
tfilter1_1
,
1
-
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
gn
:
AddCard
(
tc
)
end
if
Duel
.
IsExistingMatchingCard
(
c1156008
.
tfilter1_1
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1156008
.
tfilter1_1
,
1
-
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
gn
:
AddCard
(
tc
)
end
if
Duel
.
IsExistingMatchingCard
(
c1156008
.
tfilter1_1
,
tp
,
0
,
LOCATION_HAND
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1156008
.
tfilter1_1
,
1
-
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
gn
:
AddCard
(
tc
)
end
if
gn
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
gn
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
Duel
.
BreakEffect
()
local
gn
=
e
:
GetHandler
():
GetLinkedGroup
()
local
gr
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
if
gr
:
GetCount
()
>
0
then
local
tcr
=
gr
:
GetFirst
()
while
tcr
do
if
gn
:
GetCount
()
>
0
then
local
tcn
=
gn
:
GetFirst
()
while
tcn
do
if
tcr
==
tcn
then
gr
:
RemoveCard
(
tcr
)
end
tcn
=
gn
:
GetNext
()
end
end
tcr
=
gr
:
GetNext
()
end
end
if
gr
:
GetCount
()
>
0
then
local
g2
=
gr
:
Filter
(
c1156008
.
tfilter1_2
,
nil
)
if
g2
:
GetCount
()
>
0
then
local
tc
=
g2
:
GetFirst
()
while
tc
do
local
e1_1
=
Effect
.
CreateEffect
(
c
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1_1
:
SetValue
(
500
)
e1_1
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
tc
:
RegisterEffect
(
e1_1
)
tc
=
g2
:
GetNext
()
end
Duel
.
BreakEffect
()
local
tc
=
g2
:
GetFirst
()
local
num
=
0
while
tc
do
if
tc
:
GetAttack
()
==
500
then
num
=
1
end
tc
=
g2
:
GetNext
()
end
if
num
==
1
then
local
e1_2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_2
:
SetType
(
EFFECT_TYPE_FIELD
)
e1_2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1_2
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1_2
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
e1_2
:
SetTarget
(
c1156008
.
tg1_2
)
e1_2
:
SetValue
(
1
)
Duel
.
RegisterEffect
(
e1_2
,
tp
)
local
e1_3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_3
:
SetType
(
EFFECT_TYPE_FIELD
)
e1_3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1_3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1_3
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
e1_3
:
SetTarget
(
c1156008
.
tg1_3
)
e1_3
:
SetValue
(
c1156008
.
efilter1_3
)
Duel
.
RegisterEffect
(
e1_3
,
tp
)
end
end
end
end
function
c1156008
.
tg1_2
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsControler
(
tp
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
GetAttack
()
<
501
end
function
c1156008
.
tg1_3
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsControler
(
tp
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
GetAttack
()
<
501
end
function
c1156008
.
efilter1_3
(
e
,
re
,
rp
)
if
not
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
then
return
false
end
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
true
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
return
not
g
:
IsContains
(
e
:
GetHandler
())
end
--
function
c1156008
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c1156008
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
p
,
Card
.
IsAbleToDeck
,
p
,
LOCATION_HAND
,
0
,
1
,
63
,
nil
)
if
g
:
GetCount
()
~=
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
p
)
Duel
.
Draw
(
p
,
g
:
GetCount
(),
REASON_EFFECT
)
end
end
--
expansions/script/c1156009.lua
0 → 100644
View file @
c63024ab
--博丽神社的巫女小姐
function
c1156009
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsType
,
TYPE_EFFECT
),
2
,
4
)
--
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetValue
(
c1156009
.
splimit0
)
c
:
RegisterEffect
(
e0
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c1156009
.
con1
)
e1
:
SetOperation
(
c1156009
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c1156009
.
tg2
)
e2
:
SetOperation
(
c1156009
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_MSET
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c1156009
.
con3
)
e3
:
SetTargetRange
(
0
,
1
)
e3
:
SetTarget
(
aux
.
TRUE
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_SSET
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e3
:
Clone
()
e5
:
SetCode
(
EFFECT_CANNOT_TURN_SET
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e3
:
Clone
()
e6
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e6
:
SetTarget
(
c1156009
.
sumlimit6
)
c
:
RegisterEffect
(
e6
)
--
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_FIELD
)
e7
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e7
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetTargetRange
(
0
,
LOCATION_SZONE
)
e7
:
SetCondition
(
c1156009
.
con7
)
e7
:
SetTarget
(
c1156009
.
tg7
)
c
:
RegisterEffect
(
e7
)
--
end
--
function
c1156009
.
splimit0
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_LINK
)
==
SUMMON_TYPE_LINK
end
--
function
c1156009
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_LINK
end
--
function
c1156009
.
ofilter1
(
c
)
return
c
:
IsAbleToHand
()
end
function
c1156009
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1156009
,
0
))
then
Duel
.
Hint
(
HINT_CARD
,
0
,
1156009
)
local
g
=
Duel
.
GetMatchingGroupCount
(
c1156009
.
ofilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
g
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c1156009
.
ofilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
end
end
end
--
function
c1156009
.
tfilter2
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsPreviousLocation
(
LOCATION_EXTRA
)
and
c
:
GetSummonPlayer
()
~=
tp
and
c
:
IsAbleToDeck
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
end
function
c1156009
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
eg
:
IsExists
(
c1156009
.
tfilter2
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
end
--
function
c1156009
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
eg
:
Filter
(
c1156009
.
tfilter2
,
nil
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
--
function
c1156009
.
cfilter3
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1156009
.
con3
(
e
)
return
e
:
GetHandler
():
GetLinkedGroup
():
FilterCount
(
c1156009
.
cfilter3
,
nil
)
==
0
end
--
function
c1156009
.
sumlimit6
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
return
bit
.
band
(
sumpos
,
POS_FACEDOWN
)
>
0
end
--
function
c1156009
.
con7
(
e
)
return
Duel
.
GetTurnPlayer
()
==
e
:
GetHandler
():
GetControler
()
end
--
function
c1156009
.
tg7
(
e
,
c
)
return
c
:
IsFacedown
()
end
--
expansions/script/c1156010.lua
0 → 100644
View file @
c63024ab
--逆袭的天邪鬼
function
c1156010
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
c1156010
.
lfilter0
,
2
,
4
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1156010
,
0
))
e1
:
SetType
(
EVENT_FREE_CHAIN
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c1156010
.
tg1
)
e1
:
SetOperation
(
c1156010
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_TRIGGER_F
+
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c1156010
.
con2
)
e2
:
SetOperation
(
c1156010
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c1156010
.
lfilter0
(
c
)
return
c
:
GetAttack
()
~=
c
:
GetBaseAttack
()
end
--
function
c1156010
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetTurnPlayer
()
==
e
:
GetHandler
():
GetControler
()
end
end
--
function
c1156010
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
1156010
)
local
c
=
e
:
GetHandler
()
local
sel
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
1156010
,
1
),
aux
.
Stringid
(
1156010
,
2
))
if
sel
==
0
then
local
e1_1
=
Effect
.
CreateEffect
(
c
)
e1_1
:
SetDescription
(
aux
.
Stringid
(
1156010
,
1
))
e1_1
:
SetCategory
(
CATEGORY_DISABLE
+
CATEGORY_ATKCHANGE
)
e1_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1_1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1_1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1_1
:
SetRange
(
LOCATION_MZONE
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
e1_1
:
SetCountLimit
(
1
)
e1_1
:
SetTarget
(
c1156010
.
tg1_1
)
e1_1
:
SetOperation
(
c1156010
.
op1_1
)
c
:
RegisterEffect
(
e1_1
,
true
)
else
local
e1_2
=
Effect
.
CreateEffect
(
c
)
e1_2
:
SetDescription
(
aux
.
Stringid
(
1156010
,
2
))
e1_2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e1_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1_2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1_2
:
SetCode
(
EVENT_FREE_CHAIN
)
e1_2
:
SetRange
(
LOCATION_MZONE
)
e1_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
e1_2
:
SetCountLimit
(
1
)
e1_2
:
SetTarget
(
c1156010
.
tg1_2
)
e1_2
:
SetOperation
(
c1156010
.
op1_2
)
c
:
RegisterEffect
(
e1_2
,
true
)
end
end
--
function
c1156010
.
tfilter1_1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c1156010
.
tg1_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMatchingGroupCount
(
c1156010
.
tfilter1_1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ATKCHANGE
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
end
function
c1156010
.
op1_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c1156010
.
tfilter1_1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tg
=
g
:
GetMaxGroup
(
Card
.
GetAttack
)
if
tg
:
GetCount
()
>
0
then
if
tg
:
GetCount
()
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
sg
=
tg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg
)
local
tc
=
sg
:
GetFirst
()
local
e1_1_1
=
Effect
.
CreateEffect
(
c
)
e1_1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1_1
:
SetCode
(
EFFECT_DISABLE
)
e1_1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_1_1
)
local
e1_1_2
=
Effect
.
CreateEffect
(
c
)
e1_1_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1_2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e1_1_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_1_2
)
local
gn
=
g
:
GetMinGroup
(
Card
.
GetAttack
)
local
tn
=
gn
:
GetFirst
()
local
num
=
tn
:
GetAttack
()
local
e1_1_3
=
Effect
.
CreateEffect
(
c
)
e1_1_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1_3
:
SetCode
(
EFFECT_SET_ATTACK
)
e1_1_3
:
SetValue
(
num
)
e1_1_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_1_3
)
else
local
tc
=
tg
:
GetFirst
()
local
e1_1_1
=
Effect
.
CreateEffect
(
c
)
e1_1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1_1
:
SetCode
(
EFFECT_DISABLE
)
e1_1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_1_1
)
local
e1_1_2
=
Effect
.
CreateEffect
(
c
)
e1_1_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1_2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e1_1_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_1_2
)
local
gn
=
g
:
GetMinGroup
(
Card
.
GetAttack
)
local
tn
=
gn
:
GetFirst
()
local
num
=
tn
:
GetAttack
()
local
e1_1_3
=
Effect
.
CreateEffect
(
c
)
e1_1_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1_3
:
SetCode
(
EFFECT_SET_ATTACK
)
e1_1_3
:
SetValue
(
num
)
e1_1_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_1_3
)
end
end
end
end
--
function
c1156010
.
tfilter1_2
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
and
not
c
:
IsType
(
TYPE_LINK
)
end
function
c1156010
.
tg1_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMatchingGroupCount
(
c1156010
.
tfilter1_2
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ATKCHANGE
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DEFCHANGE
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
end
function
c1156010
.
op1_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1156010
.
tfilter1_2
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
local
atk
=
tc
:
GetAttack
()
local
def
=
tc
:
GetDefense
()
local
e1_2_1
=
Effect
.
CreateEffect
(
c
)
e1_2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2_1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1_2_1
:
SetValue
(
def
)
e1_2_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_2_1
)
local
e1_2_2
=
Effect
.
CreateEffect
(
c
)
e1_2_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2_2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e1_2_2
:
SetValue
(
atk
)
e1_2_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_2_2
)
local
e1_2_3
=
Effect
.
CreateEffect
(
c
)
e1_2_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2_3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1_2_3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1_2_3
:
SetRange
(
LOCATION_MZONE
)
e1_2_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
e1_2_3
:
SetValue
(
c1156010
.
efilter1_2_3
)
e1_2_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_2_3
)
end
end
function
c1156010
.
efilter1_2_3
(
e
,
re
)
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
return
re
:
GetHandler
():
GetAttack
()
>=
e
:
GetHandler
():
GetAttack
()
else
return
false
end
end
--
function
c1156010
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
local
bc
=
Duel
.
GetAttackTarget
()
if
not
bc
then
return
false
end
local
num
=
0
if
bc
:
IsControler
(
1
-
tp
)
then
if
bc
:
GetAttack
()
>
tc
:
GetAttack
()
then
num
=
1
end
bc
=
tc
else
if
bc
:
GetAttack
()
<
tc
:
GetAttack
()
then
num
=
1
end
end
e
:
SetLabelObject
(
bc
)
if
num
==
0
then
return
false
else
return
bc
:
IsFaceup
()
and
e
:
GetHandler
():
GetLinkedGroup
():
IsContains
(
bc
)
end
end
--
function
c1156010
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
e
:
GetLabelObject
()
local
bc
=
Duel
.
GetAttackTarget
()
if
tc
:
IsRelateToBattle
()
and
tc
:
IsFaceup
()
and
tc
:
IsControler
(
tp
)
and
bc
:
IsRelateToBattle
()
then
local
e2_1
=
Effect
.
CreateEffect
(
c
)
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE_CAL
)
e2_1
:
SetValue
(
bc
:
GetAttack
())
tc
:
RegisterEffect
(
e2_1
)
end
end
--
expansions/script/c22240121.lua
View file @
c63024ab
...
...
@@ -52,6 +52,7 @@ end
function
c22240121
.
xyzcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
then
return
false
end
local
olg
=
Duel
.
GetMatchingGroup
(
c22240121
.
xyzfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
c
)
if
olg
:
GetCount
()
>=
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
olg
,
c
)
>
0
then
return
true
end
end
...
...
expansions/script/c22240122.lua
View file @
c63024ab
...
...
@@ -55,6 +55,7 @@ end
function
c22240122
.
xyzcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
then
return
false
end
local
olg
=
Duel
.
GetMatchingGroup
(
c22240122
.
xyzfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
c
)
if
olg
:
GetCount
()
>=
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
olg
,
c
)
>
0
then
return
true
end
end
...
...
expansions/script/c22240123.lua
View file @
c63024ab
...
...
@@ -49,6 +49,7 @@ end
function
c22240123
.
xyzcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
then
return
false
end
local
olg
=
Duel
.
GetMatchingGroup
(
c22240123
.
xyzfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
c
)
if
olg
:
GetCount
()
>=
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
olg
,
c
)
>
0
then
return
true
end
end
...
...
expansions/script/c22240124.lua
View file @
c63024ab
...
...
@@ -49,6 +49,7 @@ end
function
c22240124
.
xyzcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
then
return
false
end
local
olg
=
Duel
.
GetMatchingGroup
(
c22240124
.
xyzfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
c
)
if
olg
:
GetCount
()
>=
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
olg
,
c
)
>
0
then
return
true
end
end
...
...
expansions/script/c22252201.lua
View file @
c63024ab
...
...
@@ -53,7 +53,7 @@ end
function
c22252201
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
c22252201
.
announce_filter2
=
{
22251001
,
OPCODE_ISCODE
,
22251002
,
OPCODE_ISCODE
,
22251101
,
OPCODE_ISCODE
,
22251201
,
OPCODE_ISCODE
,
22251501
,
OPCODE_ISCODE
,
22252001
,
OPCODE_ISCODE
,
22252101
,
OPCODE_ISCODE
,
22252201
,
OPCODE_ISCODE
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
}
c22252201
.
announce_filter2
=
{
22251001
,
OPCODE_ISCODE
,
22251002
,
OPCODE_ISCODE
,
22251101
,
OPCODE_ISCODE
,
22251201
,
OPCODE_ISCODE
,
22251501
,
OPCODE_ISCODE
,
22252001
,
OPCODE_ISCODE
,
22252101
,
OPCODE_ISCODE
,
22252201
,
OPCODE_ISCODE
,
22251102
,
OPCODE_ISCODE
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
,
OPCODE_OR
}
local
ac
=
Duel
.
AnnounceCardFilter
(
tp
,
table.unpack
(
c22252201
.
announce_filter2
))
c
:
SetHint
(
CHINT_CARD
,
ac
)
--tohand
...
...
expansions/strings.conf
View file @
c63024ab
...
...
@@ -68,6 +68,7 @@
!
setname
0
x2233
纸上台本
!
setname
0
x234
Island
!
setname
0
x235
星彩
!
setname
0
x1236
东煌
#樱幕 111
...
...
lflist.conf
View file @
c63024ab
...
...
@@ -30,7 +30,7 @@
#101
10173058
1
--恶魔科学塑型体
#109
10970010
0
--
搜寻魔术
#
搜寻魔术
#112
11200006
0
--魔法与奇迹的代价 美树沙耶加
#120
...
...
@@ -75,7 +75,7 @@
37564324
0
--残留的愿望·
Coconatsu
37564330
1
--源数网络
37564338
1
--恋色的舞姬·纱由里
37564505
1
--
Nanahira
&
Halozy
37564505
2
--
Nanahira
&
Halozy
37564510
1
--
Koinomi
37564701
0
--邪眼之魔女-桑德莉佣
37564836
1
--邪符『不祥之兆』
...
...
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