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
32e46bf5
Commit
32e46bf5
authored
Nov 10, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push by Appveyor
parent
688d97e9
Changes
54
Hide whitespace changes
Inline
Side-by-side
Showing
54 changed files
with
7 additions
and
4253 deletions
+7
-4253
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c2116001.lua
expansions/script/c2116001.lua
+0
-60
expansions/script/c2116002.lua
expansions/script/c2116002.lua
+0
-49
expansions/script/c2116003.lua
expansions/script/c2116003.lua
+0
-41
expansions/script/c2116004.lua
expansions/script/c2116004.lua
+0
-86
expansions/script/c2116005.lua
expansions/script/c2116005.lua
+0
-57
expansions/script/c21401101.lua
expansions/script/c21401101.lua
+0
-137
expansions/script/c21401102.lua
expansions/script/c21401102.lua
+0
-113
expansions/script/c21401103.lua
expansions/script/c21401103.lua
+0
-103
expansions/script/c21401104.lua
expansions/script/c21401104.lua
+0
-97
expansions/script/c21401105.lua
expansions/script/c21401105.lua
+0
-82
expansions/script/c21401106.lua
expansions/script/c21401106.lua
+0
-120
expansions/script/c21401107.lua
expansions/script/c21401107.lua
+0
-114
expansions/script/c21401108.lua
expansions/script/c21401108.lua
+0
-105
expansions/script/c21401109.lua
expansions/script/c21401109.lua
+0
-61
expansions/script/c21401110.lua
expansions/script/c21401110.lua
+0
-62
expansions/script/c21401111.lua
expansions/script/c21401111.lua
+0
-65
expansions/script/c21401112.lua
expansions/script/c21401112.lua
+0
-64
expansions/script/c21401113.lua
expansions/script/c21401113.lua
+0
-88
expansions/script/c21401114.lua
expansions/script/c21401114.lua
+0
-99
expansions/script/c21401115.lua
expansions/script/c21401115.lua
+0
-73
expansions/script/c21401116.lua
expansions/script/c21401116.lua
+0
-113
expansions/script/c21401117.lua
expansions/script/c21401117.lua
+0
-107
expansions/script/c21401118.lua
expansions/script/c21401118.lua
+0
-107
expansions/script/c21401119.lua
expansions/script/c21401119.lua
+0
-100
expansions/script/c21401120.lua
expansions/script/c21401120.lua
+0
-123
expansions/script/c21401121.lua
expansions/script/c21401121.lua
+0
-88
expansions/script/c21401122.lua
expansions/script/c21401122.lua
+0
-92
expansions/script/c21401123.lua
expansions/script/c21401123.lua
+0
-94
expansions/script/c21401124.lua
expansions/script/c21401124.lua
+0
-116
expansions/script/c21401125.lua
expansions/script/c21401125.lua
+0
-108
expansions/script/c21401126.lua
expansions/script/c21401126.lua
+0
-76
expansions/script/c21401127.lua
expansions/script/c21401127.lua
+0
-79
expansions/script/c21401128.lua
expansions/script/c21401128.lua
+0
-80
expansions/script/c21401129.lua
expansions/script/c21401129.lua
+0
-70
expansions/script/c21401130.lua
expansions/script/c21401130.lua
+0
-89
expansions/script/c33700186.lua
expansions/script/c33700186.lua
+7
-0
expansions/script/c99601011.lua
expansions/script/c99601011.lua
+0
-76
expansions/script/c99677703.lua
expansions/script/c99677703.lua
+0
-171
expansions/script/c99677704.lua
expansions/script/c99677704.lua
+0
-67
expansions/script/c99677707.lua
expansions/script/c99677707.lua
+0
-73
expansions/script/c99677708.lua
expansions/script/c99677708.lua
+0
-73
expansions/script/c99677709.lua
expansions/script/c99677709.lua
+0
-35
expansions/script/c99677710.lua
expansions/script/c99677710.lua
+0
-71
expansions/script/c99677711.lua
expansions/script/c99677711.lua
+0
-73
expansions/script/c99677712.lua
expansions/script/c99677712.lua
+0
-105
expansions/script/c99677713.lua
expansions/script/c99677713.lua
+0
-76
expansions/script/c99677714.lua
expansions/script/c99677714.lua
+0
-19
expansions/script/c99677793.lua
expansions/script/c99677793.lua
+0
-62
expansions/script/c99677794.lua
expansions/script/c99677794.lua
+0
-45
expansions/script/c99677795.lua
expansions/script/c99677795.lua
+0
-33
expansions/script/c99677796.lua
expansions/script/c99677796.lua
+0
-47
expansions/script/c99677797.lua
expansions/script/c99677797.lua
+0
-94
expansions/strings.conf
expansions/strings.conf
+0
-15
No files found.
expansions/222DIY.cdb
View file @
32e46bf5
No preview for this file type
expansions/script/c2116001.lua
deleted
100644 → 0
View file @
688d97e9
--囚鸟之影
function
c2116001
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetValue
(
2116000
)
c
:
RegisterEffect
(
e1
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_LVCHANGE
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetCountLimit
(
1
)
e4
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
fil
=
function
(
c
,
lv
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
GetLevel
()
>
0
and
c
:
GetLevel
()
~=
lv
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
fil
(
chkc
,
e
:
GetHandler
():
GetLevel
())
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
fil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
:
GetHandler
():
GetLevel
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
fil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
:
GetHandler
():
GetLevel
())
end
)
e4
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e1
:
SetValue
(
tc
:
GetLevel
())
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
end
end
)
c
:
RegisterEffect
(
e4
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
2116001
,
RESET_EVENT
+
0x1fc0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
)
c
:
RegisterEffect
(
e2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
function
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
if
not
(
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
)
then
return
false
end
local
c
=
e
:
GetHandler
()
if
c
:
GetFlagEffect
(
2116001
)
==
0
then
return
false
end
return
c
:
GetBattleTarget
()
end
)
e1
:
SetValue
(
1200
)
c
:
RegisterEffect
(
e1
)
end
\ No newline at end of file
expansions/script/c2116002.lua
deleted
100644 → 0
View file @
688d97e9
--囚鸟的信使
function
c2116002
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetTargetRange
(
POS_FACEUP_DEFENSE
,
0
)
e1
:
SetCountLimit
(
1
,
2116000
)
e1
:
SetCondition
(
c2116002
.
spcon
)
e1
:
SetOperation
(
c2116002
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetTargetRange
(
POS_FACEUP
,
0
)
e2
:
SetCountLimit
(
1
,
2116001
)
e2
:
SetCondition
(
c2116002
.
spcon2
)
e2
:
SetOperation
(
c2116002
.
spop2
)
c
:
RegisterEffect
(
e2
)
end
function
c2116002
.
filter
(
c
)
return
c
:
IsCode
(
2116000
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c2116002
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c2116002
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
c
)
end
function
c2116002
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c2116002
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
c
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
ShuffleDeck
(
tp
)
end
function
c2116002
.
filter2
(
c
)
return
c
:
IsCode
(
2116000
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c2116002
.
spcon2
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c2116002
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
c
)
end
function
c2116002
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c2116002
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
c
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
\ No newline at end of file
expansions/script/c2116003.lua
deleted
100644 → 0
View file @
688d97e9
--囚鸟的仆从
function
c2116003
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
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
:
SetCountLimit
(
1
,
2116003
)
e1
:
SetCondition
(
function
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetMZoneCount
(
c
:
GetControler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
c
:
GetControler
(),
LOCATION_GRAVE
,
0
,
1
,
nil
,
2116000
)
end
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SSET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
tp
)
end
)
e3
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c2116003
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
)
e3
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstMatchingCard
(
c2116003
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
if
tc
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
)
c
:
RegisterEffect
(
e3
)
end
function
c2116003
.
filter
(
c
)
return
c
:
IsCode
(
2116004
)
and
c
:
IsAbleToHand
()
end
\ No newline at end of file
expansions/script/c2116004.lua
deleted
100644 → 0
View file @
688d97e9
--迷惘的少女
function
c2116004
.
initial_effect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetRange
(
LOCATION_HAND
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetHintTiming
(
0
,
0x1c0
+
TIMING_MAIN_END
)
e4
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
end
)
e4
:
SetCost
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
fil
=
function
(
c
)
return
c
:
IsCode
(
2116000
,
2116002
,
2116003
)
and
c
:
IsAbleToRemoveAsCost
()
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
fil
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
c
:
GetFlagEffect
(
2116004
)
==
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
fil
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
c
:
RegisterFlagEffect
(
2116004
,
RESET_CHAIN
,
0
,
1
)
end
)
e4
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsSummonable
(
true
,
nil
,
1
)
or
c
:
IsMSetable
(
true
,
nil
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
0
,
0
)
end
)
e4
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
pos
=
0
if
c
:
IsSummonable
(
true
,
nil
,
1
)
then
pos
=
pos
+
POS_FACEUP_ATTACK
end
if
c
:
IsMSetable
(
true
,
nil
,
1
)
then
pos
=
pos
+
POS_FACEDOWN_DEFENSE
end
if
pos
==
0
then
return
end
if
Duel
.
SelectPosition
(
tp
,
c
,
pos
)
==
POS_FACEUP_ATTACK
then
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
else
Duel
.
MSet
(
tp
,
c
,
true
,
nil
,
1
)
end
end
)
c
:
RegisterEffect
(
e4
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1c0
+
TIMING_MAIN_END
)
e1
:
SetCost
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
GetFlagEffect
(
2116005
)
==
0
end
c
:
RegisterFlagEffect
(
2116005
,
RESET_CHAIN
,
0
,
1
)
end
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
end
)
e1
:
SetTarget
(
c2116004
.
target
)
e1
:
SetOperation
(
c2116004
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c2116004
.
filter
(
c
,
e
,
tp
,
lv1
)
local
lv2
=
c
:
GetLevel
()
return
lv1
>
0
and
lv2
>
0
and
c
:
IsCode
(
2116000
)
and
c
:
IsAbleToRemove
()
and
Duel
.
IsExistingMatchingCard
(
c2116004
.
exfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
lv1
+
lv2
)
end
function
c2116004
.
exfilter
(
c
,
e
,
tp
,
lv
)
return
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
GetLevel
()
==
lv
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c2116004
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToRemove
()
and
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c2116004
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetLevel
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
2
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c2116004
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
not
c
:
IsAbleToRemove
()
or
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
rg
=
Duel
.
SelectMatchingCard
(
tp
,
c2116004
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
c
:
GetLevel
())
local
lv
=
rg
:
GetFirst
():
GetLevel
()
+
c
:
GetLevel
()
rg
:
AddCard
(
c
)
Duel
.
Remove
(
rg
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c2116004
.
exfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
lv
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
\ No newline at end of file
expansions/script/c2116005.lua
deleted
100644 → 0
View file @
688d97e9
--东洋的航海家
function
c2116005
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c2116005
.
target
)
e1
:
SetOperation
(
c2116005
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c2116005
.
filter1
(
c
)
return
c
:
IsCode
(
2116000
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
end
function
c2116005
.
filter2
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c2116005
.
filter3
(
c
)
return
c
:
IsCode
(
2116000
)
and
c
:
IsDiscardable
()
end
function
c2116005
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
v
=
{
Duel
.
IsExistingMatchingCard
(
c2116005
.
filter1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c2116005
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
,
Duel
.
IsExistingMatchingCard
(
c2116005
.
filter3
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
}
if
chk
==
0
then
return
v
[
1
]
or
v
[
2
]
end
local
selt
=
{
tp
}
local
keyt
=
{}
for
i
=
1
,
2
do
if
v
[
i
]
then
table.insert
(
selt
,
aux
.
Stringid
(
2116005
,
i
-
1
))
table.insert
(
keyt
,
i
)
end
end
local
sel
=
keyt
[
Duel
.
SelectOption
(
table.unpack
(
selt
))
+
1
]
c
:
RegisterFlagEffect
(
1
,
RESET_EVENT
+
0x1fe0000
+
RESET_CHAIN
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
2116005
,
sel
-
1
))
if
sel
==
1
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
LOCATION_GRAVE
,
tp
,
1
)
else
e
:
SetCategory
(
CATEGORY_DRAW
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
end
e
:
SetLabel
(
sel
)
end
function
c2116005
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
1
then
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c2116005
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
sg
:
GetFirst
():
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
then
return
end
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
Duel
.
Draw
(
tp
,
2
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c21401101.lua
deleted
100644 → 0
View file @
688d97e9
--Shielder 玛修·基列莱特
function
c21401101
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--scale
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LSCALE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCondition
(
c21401101
.
slcon
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CHANGE_RSCALE
)
c
:
RegisterEffect
(
e2
)
--to hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
21401101
,
0
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetRange
(
LOCATION_PZONE
)
e3
:
SetCountLimit
(
1
,
21401101
)
e3
:
SetCode
(
EVENT_TO_DECK
)
e3
:
SetCost
(
c21401101
.
thcost1
)
e3
:
SetCondition
(
c21401101
.
thcon1
)
e3
:
SetTarget
(
c21401101
.
thtg1
)
e3
:
SetOperation
(
c21401101
.
thop1
)
c
:
RegisterEffect
(
e3
)
--to hand
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e4
:
SetTarget
(
c21401101
.
thtg2
)
e4
:
SetOperation
(
c21401101
.
tgop2
)
c
:
RegisterEffect
(
e4
)
--indes
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
21401101
,
0
))
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_NO_TURN_RESET
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
+
EFFECT_COUNT_CODE_DUEL
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetTarget
(
c21401101
.
target
)
e5
:
SetOperation
(
c21401101
.
operation
)
c
:
RegisterEffect
(
e5
)
end
function
c21401101
.
slcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
seq
=
e
:
GetHandler
():
GetSequence
()
local
tc
=
Duel
.
GetFieldCard
(
e
:
GetHandlerPlayer
(),
LOCATION_SZONE
,
13
-
seq
)
return
tc
and
tc
:
IsSetCard
(
0xf00
)
and
tc
:
GetLeftScale
()
==
7
end
function
c21401101
.
cfilter
(
c
,
tp
)
return
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
and
(
c
:
GetPreviousSequence
()
==
6
or
c
:
GetPreviousSequence
()
==
7
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsSetCard
(
0xf00
)
end
function
c21401101
.
thcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SendtoExtraP
(
e
:
GetHandler
(),
tp
,
REASON_COST
)
end
function
c21401101
.
thfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
GetOwner
()
==
tp
and
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsSetCard
(
0xf00
)
end
function
c21401101
.
thcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c21401101
.
thfilter
,
1
,
nil
,
tp
)
end
function
c21401101
.
thfilter1
(
c
)
return
c
:
IsSetCard
(
0xf00
)
and
c
:
IsAbleToHand
()
end
function
c21401101
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401101
.
thfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c21401101
.
thop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401101
,
0
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21401101
.
thfilter1
,
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
c21401101
.
thfilter2
(
c
)
return
c
:
IsSetCard
(
0xf0b
)
and
c
:
IsAbleToHand
()
end
function
c21401101
.
thtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401101
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c21401101
.
tgop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401101
,
1
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21401101
.
thfilter2
,
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
c21401101
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c21401101
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsOnField
()
and
c21401101
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401101
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c21401101
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
function
c21401101
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsControler
(
tp
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
c21401101
.
efilter
)
e1
:
SetOwnerPlayer
(
tp
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e2
:
SetValue
(
c21401101
.
valcon
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c21401101
.
efilter
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
function
c21401101
.
valcon
(
e
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
end
\ No newline at end of file
expansions/script/c21401102.lua
deleted
100644 → 0
View file @
688d97e9
--剑之从者 盖乌斯·尤里乌斯·凯撒
function
c21401102
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCost
(
c21401102
.
dbcost
)
e1
:
SetTarget
(
c21401102
.
dbtg
)
e1
:
SetOperation
(
c21401102
.
dbop
)
c
:
RegisterEffect
(
e1
)
--damage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CUSTOM
+
0xf0f
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c21401102
.
damcon
)
e2
:
SetOperation
(
c21401102
.
damop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TODECK
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
c21401102
.
descost2
)
e3
:
SetTarget
(
c21401102
.
destg2
)
e3
:
SetOperation
(
c21401102
.
desop2
)
c
:
RegisterEffect
(
e3
)
end
function
c21401102
.
dbfilter
(
c
)
return
c
:
IsFaceup
()
end
function
c21401102
.
dbcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SendtoExtraP
(
e
:
GetHandler
(),
tp
,
REASON_COST
)
end
function
c21401102
.
dbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c21401102
.
dbfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401102
.
dbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401102
,
0
))
Duel
.
SelectTarget
(
tp
,
c21401102
.
dbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c21401102
.
dbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
tc
:
RegisterFlagEffect
(
21401102
,
RESET_EVENT
+
0x1220000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
21401102
,
1
))
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetCondition
(
c21401102
.
descon1
)
e1
:
SetTarget
(
c21401102
.
destg1
)
e1
:
SetOperation
(
c21401102
.
desop1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c21401102
.
descon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
return
eg
:
IsContains
(
tc
)
and
tc
:
GetFlagEffect
(
21401102
)
~=
0
end
function
c21401102
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c21401102
.
destg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401102
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c21401102
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c21401102
.
desop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401102
,
2
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21401102
.
filter
,
tp
,
0
,
LOCATION_SZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
function
c21401102
.
filter2
(
c
)
return
c
:
IsFaceup
()
end
function
c21401102
.
descost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
3
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401102
.
destg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401102
.
filter2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c21401102
.
filter2
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c21401102
.
desop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401102
,
3
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21401102
.
filter2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
function
c21401102
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
():
IsControler
(
tp
)
and
eg
:
GetFirst
():
IsSetCard
(
0xf00
)
end
function
c21401102
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Damage
(
1
-
tp
,
800
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c21401103.lua
deleted
100644 → 0
View file @
688d97e9
--Archer 罗宾汉
function
c21401103
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--atkdown
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCost
(
c21401103
.
atkcost
)
e1
:
SetTarget
(
c21401103
.
atktg
)
e1
:
SetOperation
(
c21401103
.
atkop
)
c
:
RegisterEffect
(
e1
)
--add counter
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetCode
(
EVENT_ADD_COUNTER
+
0xf0f
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
c21401103
.
acop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
c21401103
.
descost
)
e3
:
SetTarget
(
c21401103
.
destg
)
e3
:
SetOperation
(
c21401103
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c21401103
.
cfilter
(
c
)
return
c
:
GetAttack
()
~=
0
and
c
:
IsFaceup
()
end
function
c21401103
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SendtoExtraP
(
e
:
GetHandler
(),
tp
,
REASON_COST
)
end
function
c21401103
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401103
.
cfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
end
function
c21401103
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
-
300
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
tc
=
g
:
GetNext
()
end
end
function
c21401103
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
AddCounter
(
0xf0f
,
1
)
end
function
c21401103
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
3
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401103
.
filter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c21401103
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c21401103
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401103
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401103
,
0
))
local
g
=
Duel
.
SelectTarget
(
tp
,
c21401103
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
local
atk
=
tc
:
GetAttack
()
local
batk
=
tc
:
GetBaseAttack
()
if
atk
<
batk
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVED
,
tc
,
1
,
0
,
0
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
0
,
0
)
end
end
function
c21401103
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
atk
=
tc
:
GetAttack
()
local
batk
=
tc
:
GetBaseAttack
()
if
atk
<
batk
then
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
else
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
end
\ No newline at end of file
expansions/script/c21401104.lua
deleted
100644 → 0
View file @
688d97e9
--Lancer 库·丘林
function
c21401104
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--recover
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_RECOVER
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetCost
(
c21401104
.
recost
)
e1
:
SetCondition
(
c21401104
.
reccon
)
e1
:
SetTarget
(
c21401104
.
rectg
)
e1
:
SetOperation
(
c21401104
.
recop
)
c
:
RegisterEffect
(
e1
)
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetTarget
(
c21401104
.
reptg
)
e2
:
SetOperation
(
c21401104
.
repop
)
c
:
RegisterEffect
(
e2
)
--remove
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_REMOVE
)
e3
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EVENT_BATTLE_START
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
c21401104
.
rmcost
)
e3
:
SetTarget
(
c21401104
.
rmtg
)
e3
:
SetCondition
(
c21401104
.
rmcon
)
e3
:
SetOperation
(
c21401104
.
rmop
)
c
:
RegisterEffect
(
e3
)
end
function
c21401104
.
reccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
==
tp
end
function
c21401104
.
recost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SendtoExtraP
(
e
:
GetHandler
(),
tp
,
REASON_COST
)
end
function
c21401104
.
rectg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c21401104
.
recop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Recover
(
tp
,
ev
,
REASON_EFFECT
)
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
end
function
c21401104
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetAttack
()
>
0
and
e
:
GetHandler
():
GetDefense
()
>
0
end
return
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
21401104
,
0
))
end
function
c21401104
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_DEFENSE
)
e1
:
SetValue
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e1
)
end
function
c21401104
.
rmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
3
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401104
.
rmcon
(
e
)
local
c
=
e
:
GetHandler
()
return
Duel
.
GetAttacker
()
==
c
and
c
:
GetBattleTarget
()
end
function
c21401104
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
e
:
GetHandler
():
GetBattleTarget
()
if
chk
==
0
then
return
tc
and
tc
:
IsControler
(
1
-
tp
)
and
tc
:
IsAbleToRemove
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
tc
,
1
,
0
,
0
)
Duel
.
SetChainLimit
(
c21401104
.
limit
(
tc
))
end
function
c21401104
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
():
GetBattleTarget
()
if
tc
:
IsRelateToBattle
()
then
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
c21401104
.
limit
(
c
)
return
function
(
e
,
lp
,
tp
)
return
e
:
GetHandler
()
~=
c
end
end
\ No newline at end of file
expansions/script/c21401105.lua
deleted
100644 → 0
View file @
688d97e9
--骑之从者 牛若丸
function
c21401105
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--add counter
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCategory
(
CATEGORY_COUNTER
)
e1
:
SetCost
(
c21401105
.
addcost
)
e1
:
SetTarget
(
c21401105
.
addtg
)
e1
:
SetOperation
(
c21401105
.
addop
)
c
:
RegisterEffect
(
e1
)
--immune
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetValue
(
c21401105
.
imfilter
)
c
:
RegisterEffect
(
e2
)
--damage
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c21401105
.
damcon
)
e3
:
SetCost
(
c21401105
.
damcost
)
e3
:
SetOperation
(
c21401105
.
damop
)
c
:
RegisterEffect
(
e3
)
end
function
c21401105
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xf00
)
end
function
c21401105
.
addcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SendtoExtraP
(
e
:
GetHandler
(),
tp
,
REASON_COST
)
end
function
c21401105
.
addtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDestructable
(
e
)
and
Duel
.
IsExistingMatchingCard
(
c21401105
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
local
sg
=
Duel
.
GetMatchingGroup
(
c21401105
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
end
function
c21401105
.
addop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
sg
=
Duel
.
GetMatchingGroup
(
c21401105
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
sg
:
GetFirst
()
while
tc
do
tc
:
AddCounter
(
0xf0f
,
1
)
tc
=
sg
:
GetNext
()
end
end
function
c21401105
.
imfilter
(
e
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
end
function
c21401105
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetAttackAnnouncedCount
()
==
0
end
function
c21401105
.
damcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetAttackAnnouncedCount
()
==
0
and
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
3
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401105
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
atk
=
c
:
GetAttack
()
Duel
.
Damage
(
1
-
tp
,
atk
,
REASON_EFFECT
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
\ No newline at end of file
expansions/script/c21401106.lua
deleted
100644 → 0
View file @
688d97e9
--Caster 美狄亚
function
c21401106
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCost
(
c21401106
.
spcost
)
e1
:
SetTarget
(
c21401106
.
sptg
)
e1
:
SetOperation
(
c21401106
.
spop
)
c
:
RegisterEffect
(
e1
)
--add counter
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
21401106
,
2
))
e2
:
SetCategory
(
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c21401106
.
addcost
)
e2
:
SetTarget
(
c21401106
.
addtg
)
e2
:
SetOperation
(
c21401106
.
addop
)
c
:
RegisterEffect
(
e2
)
--negate
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
21401106
,
3
))
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c21401106
.
negcost
)
e3
:
SetTarget
(
c21401106
.
negtg
)
e3
:
SetOperation
(
c21401106
.
negop
)
c
:
RegisterEffect
(
e3
)
end
function
c21401106
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xf00
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
GetLevel
()
==
2
end
function
c21401106
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SendtoExtraP
(
e
:
GetHandler
(),
tp
,
REASON_COST
)
end
function
c21401106
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401106
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c21401106
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401106
,
0
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21401106
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c21401106
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0xf0b
)
and
c
:
IsDiscardable
()
end
function
c21401106
.
addcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401106
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
DiscardHand
(
tp
,
c21401106
.
costfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c21401106
.
addtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
3
,
0
,
0xf0f
)
end
function
c21401106
.
addop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
e
:
GetHandler
():
AddCounter
(
0xf0f
,
3
)
end
end
function
c21401106
.
negcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
3
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401106
.
negfilter
(
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsType
(
TYPE_NORMAL
)
end
function
c21401106
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsOnField
()
and
c21401106
.
negfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401106
.
negfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
c
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401106
,
1
))
local
g
=
Duel
.
SelectTarget
(
tp
,
c21401106
.
negfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
c
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
c21401106
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
c
:
SetCardTarget
(
tc
)
tc
:
RegisterFlagEffect
(
21401106
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
--indes
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCondition
(
c21401106
.
indcon
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCondition
(
c21401106
.
indcon
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c21401106
.
indcon
(
e
)
return
e
:
GetOwner
():
IsHasCardTarget
(
e
:
GetHandler
())
end
\ No newline at end of file
expansions/script/c21401107.lua
deleted
100644 → 0
View file @
688d97e9
--杀之从者 荆轲
function
c21401107
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCost
(
c21401107
.
thcost
)
e1
:
SetTarget
(
c21401107
.
thtg
)
e1
:
SetOperation
(
c21401107
.
thop
)
c
:
RegisterEffect
(
e1
)
--cannot be target
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c21401107
.
con
)
e2
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c21401107
.
con
)
e3
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e3
)
--destroy
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_DESTROY
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetCountLimit
(
1
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetCost
(
c21401107
.
descost
)
e4
:
SetTarget
(
c21401107
.
destg
)
e4
:
SetOperation
(
c21401107
.
desop
)
c
:
RegisterEffect
(
e4
)
end
function
c21401107
.
cfilter
(
c
)
return
c
:
IsAbleToRemove
()
end
function
c21401107
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SendtoExtraP
(
e
:
GetHandler
(),
tp
,
REASON_COST
)
end
function
c21401107
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401107
.
cfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c21401107
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401107
,
0
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21401107
.
cfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
Remove
(
tc
,
POS_FACEDOWM
,
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
,
2
)
e1
:
SetCondition
(
c21401107
.
thcon2
)
e1
:
SetOperation
(
c21401107
.
thop2
)
e1
:
SetLabel
(
0
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c21401107
.
thcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c21401107
.
thop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
e
:
GetLabel
()
e
:
GetHandler
():
SetTurnCounter
(
ct
+
1
)
if
ct
==
1
then
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
else
e
:
SetLabel
(
1
)
end
end
function
c21401107
.
con
(
e
)
return
Duel
.
GetFieldGroupCount
(
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
)
>
1
end
function
c21401107
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
3
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401107
.
filter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
c21401107
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c21401107
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401107
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401107
,
1
))
local
g
=
Duel
.
SelectTarget
(
tp
,
c21401107
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c21401107
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c21401108.lua
deleted
100644 → 0
View file @
688d97e9
--Berserker 吕布奉先
function
c21401108
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCost
(
c21401108
.
thcost
)
e1
:
SetTarget
(
c21401108
.
thtg
)
e1
:
SetOperation
(
c21401108
.
thop
)
c
:
RegisterEffect
(
e1
)
--atkup
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
(
c21401108
.
atkcon
)
e2
:
SetValue
(
600
)
c
:
RegisterEffect
(
e2
)
--pierce
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_PIERCE
)
c
:
RegisterEffect
(
e3
)
--to defense
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e4
:
SetCondition
(
c21401108
.
poscon
)
e4
:
SetOperation
(
c21401108
.
posop
)
c
:
RegisterEffect
(
e4
)
--destroy
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e5
:
SetCountLimit
(
1
,
21401108
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCost
(
c21401108
.
descost
)
e5
:
SetTarget
(
c21401108
.
destg
)
e5
:
SetOperation
(
c21401108
.
desop
)
c
:
RegisterEffect
(
e5
)
end
function
c21401108
.
cfilter
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
IsSetCard
(
0xf0b
)
end
function
c21401108
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SendtoExtraP
(
e
:
GetHandler
(),
1
-
tp
,
REASON_COST
)
end
function
c21401108
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401108
.
cfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c21401108
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401108
,
0
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21401108
.
cfilter
,
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
c21401108
.
atkcon
(
e
)
local
c
=
e
:
GetHandler
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
end
function
c21401108
.
poscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bg
=
Duel
.
GetAttackTarget
()
return
e
:
GetHandler
()
==
Duel
.
GetAttacker
()
and
e
:
GetHandler
():
IsRelateToBattle
()
and
bg
~=
nil
and
bit
.
band
(
bg
:
GetBattlePosition
(),
POS_DEFENSE
)
~=
0
end
function
c21401108
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsAttackPos
()
then
Duel
.
ChangePosition
(
c
,
POS_FACEUP_DEFENSE
)
end
end
function
c21401108
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
3
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
3
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401108
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c21401108
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c21401108
.
filter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401108
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401108
,
1
))
local
g
=
Duel
.
SelectTarget
(
tp
,
c21401108
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
2
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c21401108
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c21401109.lua
deleted
100644 → 0
View file @
688d97e9
--玛修·基列莱特
function
c21401109
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
21401109
)
e1
:
SetCost
(
c21401109
.
thcost
)
e1
:
SetTarget
(
c21401109
.
thtg
)
e1
:
SetOperation
(
c21401109
.
thop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
21401109
)
e2
:
SetCondition
(
c21401109
.
spcon
)
e2
:
SetTarget
(
c21401109
.
sptg
)
e2
:
SetOperation
(
c21401109
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c21401109
.
thfilter
(
c
)
return
(
c
:
IsCode
(
21401101
)
or
c
:
IsCode
(
21401130
))
and
c
:
IsAbleToHand
()
end
function
c21401109
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401109
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c21401109
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_DISCARD
)
end
function
c21401109
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21401109
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c21401109
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
21401101
)
end
function
c21401109
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c21401109
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c21401109
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c21401109
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsExistingMatchingCard
(
c21401109
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c21401110.lua
deleted
100644 → 0
View file @
688d97e9
--弓之从者 阿拉什
function
c21401110
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--addcounter
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCondition
(
c21401110
.
addcon
)
e1
:
SetOperation
(
c21401110
.
addop
)
c
:
RegisterEffect
(
e1
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c21401110
.
descost
)
e2
:
SetTarget
(
c21401110
.
destg
)
e2
:
SetOperation
(
c21401110
.
desop
)
c
:
RegisterEffect
(
e2
)
end
function
c21401110
.
addcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
function
c21401110
.
addop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
AddCounter
(
0xf0f
,
1
)
end
function
c21401110
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
1
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
1
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
1
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401110
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c21401110
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
e
:
GetHandler
())
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
if
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_BP
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
3
)
e1
:
SetTargetRange
(
1
,
1
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
\ No newline at end of file
expansions/script/c21401111.lua
deleted
100644 → 0
View file @
688d97e9
--杀之从者 小次郎
function
c21401111
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c21401111
.
descon
)
e1
:
SetTarget
(
c21401111
.
destg
)
e1
:
SetOperation
(
c21401111
.
desop
)
c
:
RegisterEffect
(
e1
)
--atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e2
:
SetCondition
(
c21401111
.
atkcon
)
e2
:
SetCost
(
c21401111
.
atkcost
)
e2
:
SetOperation
(
c21401111
.
atkop
)
c
:
RegisterEffect
(
e2
)
end
function
c21401111
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToBattle
()
then
return
false
end
local
bc
=
c
:
GetBattleTarget
()
e
:
SetLabelObject
(
bc
)
return
bc
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
bc
:
IsOnField
()
and
bc
:
IsRelateToBattle
()
end
function
c21401111
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetLabelObject
():
IsAbleToRemove
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetLabelObject
(),
1
,
0
,
0
)
end
function
c21401111
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bc
=
e
:
GetLabelObject
()
if
bc
:
IsRelateToBattle
()
then
Duel
.
Destroy
(
bc
,
REASON_EFFECT
)
end
end
function
c21401111
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetBattleTarget
()
~=
nil
end
function
c21401111
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
1
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
1
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
1
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401111
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE_CAL
)
e1
:
SetValue
(
3000
)
c
:
RegisterEffect
(
e1
)
end
end
\ No newline at end of file
expansions/script/c21401112.lua
deleted
100644 → 0
View file @
688d97e9
--Rider 圣乔治
function
c21401112
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--cannot be target
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
c21401112
.
tgtg
)
e1
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e1
)
--race change
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCondition
(
c21401112
.
racecon
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c21401112
.
racecost
)
e2
:
SetOperation
(
c21401112
.
raceop
)
c
:
RegisterEffect
(
e2
)
end
function
c21401112
.
tgtg
(
e
,
c
)
return
c
:
IsSetCard
(
0xf00
)
and
c
~=
e
:
GetHandler
()
end
function
c21401112
.
racecon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
c21401112
.
filter
(
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsRace
(
RACE_DRAGON
)
end
function
c21401112
.
racetg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401112
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
sg
=
Duel
.
GetMatchingGroup
(
c21401112
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
end
function
c21401112
.
racecost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
2
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
2
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
2
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401112
.
raceop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
sg
=
Duel
.
GetMatchingGroup
(
c21401112
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
sg
:
GetCount
()
>
0
then
local
sc
=
sg
:
GetFirst
()
while
sc
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_RACE
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
RACE_DRAGON
)
sc
:
RegisterEffect
(
e1
)
sc
=
sg
:
GetNext
()
end
end
end
\ No newline at end of file
expansions/script/c21401113.lua
deleted
100644 → 0
View file @
688d97e9
--Caster 汉斯克·里斯蒂安·安徒生
function
c21401113
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--add counter
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
21401113
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c21401113
.
addcost
)
e1
:
SetTarget
(
c21401113
.
addtg
)
e1
:
SetOperation
(
c21401113
.
addop
)
c
:
RegisterEffect
(
e1
)
--atkup
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
21401113
,
1
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c21401113
.
atkcost
)
e2
:
SetCondition
(
c21401113
.
atkcon
)
e2
:
SetTarget
(
c21401113
.
atktg
)
e2
:
SetOperation
(
c21401113
.
atkop
)
c
:
RegisterEffect
(
e2
)
end
function
c21401113
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xf0b
)
and
not
c
:
IsPublic
()
end
function
c21401113
.
addcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401113
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21401113
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
2
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
e
:
SetLabel
(
g
:
GetCount
())
end
function
c21401113
.
addtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
e
:
GetLabel
(),
0
,
0xf0f
)
end
function
c21401113
.
addop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
e
:
GetHandler
():
AddCounter
(
0xf0f
,
e
:
GetLabel
())
end
end
function
c21401113
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
2
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
2
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
2
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401113
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
c21401113
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetCurrentPhase
()
==
PHASE_DAMAGE
and
Duel
.
IsDamageCalculated
()
then
return
false
end
return
true
end
function
c21401113
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
recover
=
0
if
g
:
GetCount
()
>
0
then
local
sc
=
g
:
GetFirst
()
while
sc
do
atk1
=
sc
:
GetAttack
()
def1
=
sc
:
GetDefense
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
800
)
sc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
sc
:
RegisterEffect
(
e2
)
atk2
=
sc
:
GetAttack
()
def2
=
sc
:
GetDefense
()
recover
=
recover
+
atk2
+
def2
-
atk1
-
def1
sc
=
g
:
GetNext
()
end
Duel
.
Recover
(
tp
,
recover
/
2
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c21401114.lua
deleted
100644 → 0
View file @
688d97e9
--塔拉斯克
function
c21401114
.
initial_effect
(
c
)
--equip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
c21401114
.
eqtg
)
e1
:
SetOperation
(
c21401114
.
eqop
)
c
:
RegisterEffect
(
e1
)
--equip effect
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetCondition
(
c21401114
.
eqcon1
)
e2
:
SetValue
(
2000
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetCondition
(
c21401114
.
eqcon1
)
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e3
:
SetValue
(
1800
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetCondition
(
c21401114
.
eqcon2
)
e4
:
SetValue
(
-
2000
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_EQUIP
)
e5
:
SetCondition
(
c21401114
.
eqcon2
)
e5
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e5
:
SetValue
(
-
1800
)
c
:
RegisterEffect
(
e5
)
--destroy sub
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_EQUIP
)
e6
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e6
:
SetCondition
(
c21401114
.
eqcon1
)
e6
:
SetCode
(
EFFECT_DESTROY_SUBSTITUTE
)
e6
:
SetValue
(
c21401114
.
repval
)
c
:
RegisterEffect
(
e6
)
--immune
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_EQUIP
)
e7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e7
:
SetCondition
(
c21401114
.
eqcon3
)
e7
:
SetValue
(
c21401114
.
efilter
)
c
:
RegisterEffect
(
e7
)
end
function
c21401114
.
filter
(
c
)
return
c
:
IsFaceup
()
end
function
c21401114
.
eqcon1
(
e
)
return
e
:
GetHandler
():
GetEquipTarget
():
IsSetCard
(
0xf04
)
end
function
c21401114
.
eqcon2
(
e
)
return
not
e
:
GetHandler
():
GetEquipTarget
():
IsSetCard
(
0xf04
)
end
function
c21401114
.
eqcon3
(
e
)
return
e
:
GetHandler
():
GetEquipTarget
():
IsCode
(
87355597
)
end
function
c21401114
.
eqtg
(
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
c21401114
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c21401114
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c21401114
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
c
)
end
function
c21401114
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
if
not
tc
:
IsRelateToEffect
(
e
)
or
not
tc
:
IsFaceup
()
then
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
return
end
if
not
Duel
.
Equip
(
tp
,
c
,
tc
,
true
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c21401114
.
eqlimit
)
e1
:
SetLabelObject
(
tc
)
c
:
RegisterEffect
(
e1
)
end
function
c21401114
.
eqlimit
(
e
,
c
)
return
e
:
GetLabelObject
()
==
c
end
function
c21401114
.
repval
(
e
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
end
function
c21401114
.
efilter
(
e
,
re
)
return
e
:
GetHandler
()
~=
re
:
GetHandler
()
end
\ No newline at end of file
expansions/script/c21401115.lua
deleted
100644 → 0
View file @
688d97e9
--剑之从者 齐格飞里德
function
c21401115
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0xf01
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableCounterPermit
(
0xf0f
)
--immune
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c21401115
.
imcon
)
e1
:
SetValue
(
c21401115
.
imfilter
)
c
:
RegisterEffect
(
e1
)
--add counter
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetCode
(
EVENT_ADD_COUNTER
+
0xf0f
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
c21401115
.
acop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
c21401115
.
descost
)
e3
:
SetTarget
(
c21401115
.
destg
)
e3
:
SetOperation
(
c21401115
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c21401115
.
imcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c21401115
.
imfilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
GetRace
(
RACE_DRAGON
)
and
te
:
GetOwnerPlayer
()
~=
e
:
GetHandlerPlayer
()
end
function
c21401115
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
AddCounter
(
0xf0f
,
1
)
end
function
c21401115
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
4
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
4
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
4
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401115
.
filter
(
c
)
return
c
:
GetRace
(
RACE_DRAGON
)
end
function
c21401115
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
g
=
Duel
.
GetMatchingGroup
(
c21401115
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
0
)
end
function
c21401115
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c21401115
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
local
og
=
Duel
.
GetOperatedGroup
()
local
mg
,
matk
=
og
:
GetMaxGroup
(
Card
.
GetBaseAttack
)
if
matk
>
0
then
Duel
.
Damage
(
1
-
tp
,
matk
,
REASON_EFFECT
)
end
end
end
expansions/script/c21401116.lua
deleted
100644 → 0
View file @
688d97e9
--弓之从者 卫宫
function
c21401116
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0xf02
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableCounterPermit
(
0xf0f
)
--immune
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e1
:
SetCondition
(
c21401116
.
imcon
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetValue
(
c21401116
.
imfilter
)
c
:
RegisterEffect
(
e1
)
--atk and def
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
21401116
,
0
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c21401116
.
atktg
)
e2
:
SetOperation
(
c21401116
.
atkop
)
c
:
RegisterEffect
(
e2
)
--exattack
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
21401116
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetCountLimit
(
1
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c21401116
.
excost
)
e3
:
SetOperation
(
c21401116
.
exop
)
c
:
RegisterEffect
(
e3
)
end
function
c21401116
.
imcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c21401116
.
imfilter
(
e
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
end
function
c21401116
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
end
function
c21401116
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
atk
=
c
:
GetAttack
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
chkc
~=
c
and
c21401116
.
atkfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401116
.
atkfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401116
,
1
))
Duel
.
SelectTarget
(
tp
,
c21401116
.
atkfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
c
,
atk
)
end
function
c21401116
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
atk
=
tc
:
GetAttack
()
local
def
=
tc
:
GetDefense
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e2
:
SetValue
(
def
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e2
)
end
end
function
c21401116
.
excost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
4
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
4
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
4
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401116
.
exop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_ATTACK_ALL
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--atkdown
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetOperation
(
c21401116
.
atkop2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c21401116
.
atkop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
500
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
end
\ No newline at end of file
expansions/script/c21401117.lua
deleted
100644 → 0
View file @
688d97e9
--枪之从者 伊丽莎白·巴托里
function
c21401117
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0xf03
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableCounterPermit
(
0xf0f
)
--akt down
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c21401117
.
adcon
)
e1
:
SetTarget
(
c21401117
.
adtg
)
e1
:
SetOperation
(
c21401117
.
adop
)
c
:
RegisterEffect
(
e1
)
--token
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c21401117
.
tkcost
)
e2
:
SetTarget
(
c21401117
.
tktg
)
e2
:
SetOperation
(
c21401117
.
tkop
)
c
:
RegisterEffect
(
e2
)
--atkup
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetCountLimit
(
1
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
c21401117
.
val
)
c
:
RegisterEffect
(
e3
)
--immune
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c21401117
.
imcon
)
e4
:
SetValue
(
c21401117
.
efilter
)
c
:
RegisterEffect
(
e4
)
end
function
c21401117
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c21401117
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetAttack
()
>
0
and
c
:
GetDefense
()
>
0
end
function
c21401117
.
adtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
c21401117
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401117
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
c21401117
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c21401117
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
sc
=
g
:
GetFirst
()
local
def
=
sc
:
GetDefense
()
if
def
>
0
and
sc
:
GetAttack
()
>
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
-
def
)
sc
:
RegisterEffect
(
e1
)
end
end
function
c21401117
.
tkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
4
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
4
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
4
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401117
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
21401132
,
0
,
0x4011
,
0
,
3000
,
8
,
RACE_ROCK
,
ATTRIBUTE_DARK
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c21401117
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
or
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
21401132
,
0
,
0x4011
,
0
,
3000
,
8
,
RACE_ROCK
,
ATTRIBUTE_DARK
)
then
return
end
local
token
=
Duel
.
CreateToken
(
tp
,
21401132
)
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_SYNCHRO_MATERIAL
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
1
)
token
:
RegisterEffect
(
e1
,
true
)
end
function
c21401117
.
val
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
Card
.
IsCode
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
nil
,
21401132
)
*
700
end
function
c21401117
.
efilter
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
function
c21401117
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
21401132
)
end
function
c21401117
.
imcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c21401117
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
\ No newline at end of file
expansions/script/c21401118.lua
deleted
100644 → 0
View file @
688d97e9
--骑之从者 玛尔达
function
c21401118
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0xf04
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableCounterPermit
(
0xf0f
)
--equip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c21401118
.
eqcon
)
e1
:
SetTarget
(
c21401118
.
eqtg
)
e1
:
SetOperation
(
c21401118
.
eqop
)
c
:
RegisterEffect
(
e1
)
--recover
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_RECOVER
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2
:
SetCondition
(
c21401118
.
recon
)
e2
:
SetTarget
(
c21401118
.
retg
)
e2
:
SetOperation
(
c21401118
.
reop
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
c21401118
.
spcost
)
e3
:
SetTarget
(
c21401118
.
sptg
)
e3
:
SetOperation
(
c21401118
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c21401118
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c21401118
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_DRAGON
)
end
function
c21401118
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
c21401118
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401118
.
filter
,
tp
,
0
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
1
,
nil
)
end
end
function
c21401118
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c21401118
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
sc
=
g
:
GetFirst
()
if
not
sc
:
IsRelateToEffect
(
e
)
or
sc
:
IsFacedown
()
then
return
end
if
not
Duel
.
Equip
(
tp
,
sc
,
c
,
false
)
then
return
end
--Add Equip limit
sc
:
RegisterFlagEffect
(
21401118
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
e
:
SetLabelObject
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c21401118
.
eqlimit
)
sc
:
RegisterEffect
(
e1
)
end
function
c21401118
.
eqlimit
(
e
,
c
)
return
e
:
GetOwner
()
==
c
end
function
c21401118
.
recon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
Duel
.
GetAttackTarget
()
~=
nil
and
e
:
GetHandler
():
GetEquipCount
()
>
0
end
function
c21401118
.
retg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
ev
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
0
,
0
,
tp
,
ev
)
end
function
c21401118
.
reop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
*
e
:
GetHandler
():
GetEquipCount
(),
REASON_EFFECT
)
end
function
c21401118
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
4
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
4
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
4
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401118
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
21401114
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
end
function
c21401118
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c21401118
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
)
end
function
c21401118
.
spop
(
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
,
c21401118
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
\ No newline at end of file
expansions/script/c21401119.lua
deleted
100644 → 0
View file @
688d97e9
--术之从者 童谣
function
c21401119
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0xf05
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableCounterPermit
(
0xf0f
)
--add counter
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCondition
(
c21401119
.
accon
)
e1
:
SetTarget
(
c21401119
.
actg
)
e1
:
SetOperation
(
c21401119
.
acop
)
c
:
RegisterEffect
(
e1
)
--token
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c21401119
.
tkcost
)
e2
:
SetTarget
(
c21401119
.
tktg
)
e2
:
SetOperation
(
c21401119
.
tkop
)
c
:
RegisterEffect
(
e2
)
--negate
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_REMOVE
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c21401119
.
negcon
)
e3
:
SetCost
(
c21401119
.
negcost
)
e3
:
SetTarget
(
c21401119
.
negtg
)
e3
:
SetOperation
(
c21401119
.
negop
)
c
:
RegisterEffect
(
e3
)
end
function
c21401119
.
accon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c21401119
.
actg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
0xf0f
,
2
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
2
,
0
,
0xf0f
)
end
function
c21401119
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
e
:
GetHandler
():
AddCounter
(
0xf0f
,
2
)
end
end
function
c21401119
.
tkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
4
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
4
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
4
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401119
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
21401131
,
0
,
0x4011
,
300
,
300
,
1
,
RACE_SPELLCASTER
,
ATTRIBUTE_LIGHT
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c21401119
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
if
ft
<=
0
or
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
21401131
,
0
,
0x4011
,
300
,
300
,
1
,
RACE_SPELLCASTER
,
ATTRIBUTE_LIGHT
)
then
return
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
for
i
=
1
,
ft
do
local
token
=
Duel
.
CreateToken
(
tp
,
21401131
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
Duel
.
SpecialSummonComplete
()
end
function
c21401119
.
cfilter
(
c
)
return
c
:
IsCode
(
21401131
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
end
function
c21401119
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
+
TYPE_MONSTER
)
and
Duel
.
IsChainNegatable
(
ev
)
and
rp
~=
tp
end
function
c21401119
.
negcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c21401119
.
cfilter
,
1
,
nil
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c21401119
.
cfilter
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c21401119
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
re
:
GetHandler
():
IsAbleToRemove
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
eg
,
1
,
0
,
0
)
end
end
function
c21401119
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c21401120.lua
deleted
100644 → 0
View file @
688d97e9
--杀之从者 卡米拉
function
c21401120
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0xf06
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableCounterPermit
(
0xf0f
)
--def down
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c21401120
.
ddcon
)
e1
:
SetTarget
(
c21401120
.
ddtg
)
e1
:
SetOperation
(
c21401120
.
ddop
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCondition
(
c21401120
.
indcon
)
e2
:
SetTarget
(
c21401120
.
indtg
)
e2
:
SetOperation
(
c21401120
.
indop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TODECK
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
c21401120
.
remcost
)
e3
:
SetTarget
(
c21401120
.
remtg
)
e3
:
SetOperation
(
c21401120
.
remop
)
c
:
RegisterEffect
(
e3
)
end
function
c21401120
.
ddcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c21401120
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetDefense
()
>
0
and
c
:
GetAttack
()
>
0
end
function
c21401120
.
ddtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
c21401120
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401120
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
c21401120
.
ddop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c21401120
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
sc
=
g
:
GetFirst
()
local
atk
=
sc
:
GetAttack
()
local
def1
=
sc
:
GetDefense
()
if
atk
>
0
and
def1
>
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
-
atk
)
sc
:
RegisterEffect
(
e1
)
end
local
def2
=
sc
:
GetDefense
()
ev
=
def1
-
def2
if
ev
>=
1000
then
local
ct
=
math.floor
(
ev
/
1000
)
c
:
AddCounter
(
0xf0f
,
ct
)
end
end
function
c21401120
.
filter2
(
c
)
return
c
:
IsFaceup
()
end
function
c21401120
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
end
function
c21401120
.
indtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c21401120
.
filter2
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401120
.
filter2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c21401120
.
filter2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c21401120
.
indop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c21401120
.
remcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
4
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
4
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
4
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401120
.
remtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
c21401120
.
remop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401120
,
3
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
local
atk
=
tc
:
GetPreviousAttackOnField
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
atk
/
2
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
end
end
\ No newline at end of file
expansions/script/c21401121.lua
deleted
100644 → 0
View file @
688d97e9
--狂之从者 赫拉克勒斯
function
c21401121
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0xf07
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableCounterPermit
(
0xf0f
)
--immune
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c21401121
.
atkcon
)
e1
:
SetValue
(
c21401121
.
efilter
)
c
:
RegisterEffect
(
e1
)
--atkup
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
(
c21401121
.
atkcon
)
e2
:
SetValue
(
800
)
c
:
RegisterEffect
(
e2
)
--pierce
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_PIERCE
)
c
:
RegisterEffect
(
e3
)
--to defense
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e4
:
SetCondition
(
c21401121
.
poscon
)
e4
:
SetOperation
(
c21401121
.
posop
)
c
:
RegisterEffect
(
e4
)
--special summon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_DELAY
)
e5
:
SetCode
(
EVENT_LEAVE_FIELD
)
e5
:
SetCondition
(
c21401121
.
spcon
)
e5
:
SetTarget
(
c21401121
.
sptg
)
e5
:
SetOperation
(
c21401121
.
spop
)
c
:
RegisterEffect
(
e5
)
end
function
c21401121
.
imcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c21401121
.
imfilter
(
e
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
end
function
c21401121
.
atkcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
end
function
c21401121
.
poscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bg
=
Duel
.
GetAttackTarget
()
return
e
:
GetHandler
()
==
Duel
.
GetAttacker
()
and
e
:
GetHandler
():
IsRelateToBattle
()
and
bg
~=
nil
and
bit
.
band
(
bg
:
GetBattlePosition
(),
POS_DEFENSE
)
~=
0
end
function
c21401121
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsAttackPos
()
then
Duel
.
ChangePosition
(
c
,
POS_FACEUP_DEFENSE
)
end
end
function
c21401121
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
count
=
c
:
GetCounter
(
0xf0f
)
e
:
SetLabel
(
count
)
return
count
>=
1
end
function
c21401121
.
spfilter
(
c
,
e
,
tp
,
code
)
return
c
:
IsCode
(
code
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
function
c21401121
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c21401121
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
1
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
e
:
GetLabel
()
>
1
then
e
:
GetHandler
():
AddCounter
(
0xf0f
,
e
:
GetLabel
()
-
1
)
end
end
function
c21401121
.
efilter
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
\ No newline at end of file
expansions/script/c21401122.lua
deleted
100644 → 0
View file @
688d97e9
--剑之从者 阿尔托利亚·潘德拉贡
function
c21401122
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0xf01
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableCounterPermit
(
0xf0f
)
--immune
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c21401122
.
imcon
)
e1
:
SetValue
(
c21401122
.
imfilter
)
c
:
RegisterEffect
(
e1
)
--boost
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetValue
(
300
)
c
:
RegisterEffect
(
e2
)
--disable
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_DISABLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e3
:
SetTarget
(
c21401122
.
distg
)
c
:
RegisterEffect
(
e3
)
--destroy
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_DESTROY
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCost
(
c21401122
.
descost
)
e5
:
SetTarget
(
c21401122
.
destg
)
e5
:
SetOperation
(
c21401122
.
desop
)
c
:
RegisterEffect
(
e5
)
end
function
c21401122
.
imcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c21401122
.
imfilter
(
e
,
te
)
return
(
te
:
IsActiveType
(
TYPE_SPELL
)
or
(
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
GetRace
(
RACE_SPELLCASTER
)))
and
te
:
GetOwnerPlayer
()
~=
e
:
GetHandlerPlayer
()
end
function
c21401122
.
distg
(
e
,
c
)
return
c
==
e
:
GetHandler
():
GetBattleTarget
()
end
function
c21401122
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
5
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
5
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
5
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401122
.
sfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c21401122
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
op
=
0
local
g1
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
c21401122
.
sfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401122
,
0
))
if
g1
:
GetCount
()
>
0
and
g2
:
GetCount
()
>
0
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
21401122
,
1
),
aux
.
Stringid
(
21401122
,
2
))
+
1
elseif
g1
:
GetCount
()
>
0
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
21401122
,
1
))
+
1
elseif
g2
:
GetCount
()
>
0
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
21401122
,
2
))
+
2
end
if
op
==
1
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g1
,
g1
:
GetCount
(),
0
,
0
)
elseif
op
==
2
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g2
,
g2
:
GetCount
(),
0
,
0
)
end
e
:
SetLabel
(
op
)
end
function
c21401122
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
1
then
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
elseif
e
:
GetLabel
()
==
2
then
local
g
=
Duel
.
GetMatchingGroup
(
c21401122
.
sfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c21401123.lua
deleted
100644 → 0
View file @
688d97e9
--Archer 吉尔伽美什
function
c21401123
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0xf02
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableCounterPermit
(
0xf0f
)
--draw
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCondition
(
c21401123
.
drcon
)
e1
:
SetTarget
(
c21401123
.
drtg
)
e1
:
SetOperation
(
c21401123
.
drop
)
c
:
RegisterEffect
(
e1
)
--boost
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetValue
(
600
)
c
:
RegisterEffect
(
e2
)
--add counter
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_COUNTER
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetCode
(
EVENT_ADD_COUNTER
+
0xf0f
)
e3
:
SetCountLimit
(
1
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetOperation
(
c21401123
.
acop
)
c
:
RegisterEffect
(
e3
)
--remove
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_REMOVE
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCost
(
c21401123
.
remcost
)
e4
:
SetTarget
(
c21401123
.
remtg
)
e4
:
SetOperation
(
c21401123
.
remop
)
c
:
RegisterEffect
(
e4
)
end
function
c21401123
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c21401123
.
drtg
(
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
c21401123
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
function
c21401123
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
AddCounter
(
0xf0f
,
2
)
end
function
c21401123
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttackAbove
(
3000
)
end
function
c21401123
.
remcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
5
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
5
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
5
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401123
.
remtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21401123
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
function
c21401123
.
remop
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
for
i
=
0
,
4
do
if
Duel
.
CheckLocation
(
1
-
tp
,
LOCATION_MZONE
,
i
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetOperation
(
c21401123
.
disop
)
e1
:
SetLabel
(
i
+
16
)
e1
:
SetCode
(
EFFECT_DISABLE_FIELD
)
c
:
RegisterEffect
(
e1
)
end
end
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
end
function
c21401123
.
disop
(
e
,
tp
)
return
bit
.
lshift
(
0x1
,
e
:
GetLabel
())
end
\ No newline at end of file
expansions/script/c21401124.lua
deleted
100644 → 0
View file @
688d97e9
--裁定者 贞德
function
c21401124
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableCounterPermit
(
0xf0f
)
--indes
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetValue
(
c21401124
.
indval
)
c
:
RegisterEffect
(
e1
)
--immune
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
21401124
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c21401124
.
imcost
)
e2
:
SetTarget
(
c21401124
.
imtg
)
e2
:
SetOperation
(
c21401124
.
imop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c21401124
.
descost
)
e3
:
SetTarget
(
c21401124
.
destg
)
e3
:
SetOperation
(
c21401124
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c21401124
.
indval
(
e
,
c
)
return
not
c
:
IsSetCard
(
0xf09
)
end
function
c21401124
.
imcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
5
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
5
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
5
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401124
.
imtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
c21401124
.
imop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsControler
(
tp
),
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
while
tc
do
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsControler
(
tp
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
c21401124
.
efilter
)
e1
:
SetOwnerPlayer
(
tp
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e2
:
SetValue
(
c21401124
.
valcon
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
end
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
+
2
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
+
2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
+
2
)
tc
:
RegisterEffect
(
e3
)
c
:
RegisterFlagEffect
(
34707034
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
,
fid
)
end
function
c21401124
.
efilter
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
function
c21401124
.
valcon
(
e
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
end
function
c21401124
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf0f
,
5
,
REASON_COST
)
end
local
c1
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf0f
,
5
,
REASON_COST
)
local
c2
=
e
:
GetHandler
():
GetCounter
(
0xf0f
)
if
c1
==
c2
+
5
then
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
0xf0f
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c21401124
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
function
c21401124
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
~=
0
then
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEP
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c21401125.lua
deleted
100644 → 0
View file @
688d97e9
--裁定者-降临礼装
function
c21401125
.
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
:
SetTarget
(
c21401125
.
target
)
e1
:
SetOperation
(
c21401125
.
activate
)
c
:
RegisterEffect
(
e1
)
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
21401125
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c21401125
.
shcost
)
e2
:
SetCondition
(
c21401125
.
shcon
)
e2
:
SetTarget
(
c21401125
.
shtg
)
e2
:
SetOperation
(
c21401125
.
shop
)
c
:
RegisterEffect
(
e2
)
end
function
c21401125
.
filter
(
c
,
e
,
tp
,
m1
,
m2
,
ft
)
if
not
c
:
IsSetCard
(
0xf08
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
mg
:
Merge
(
m2
)
if
ft
>
0
then
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
else
return
ft
>-
1
and
mg
:
IsExists
(
c21401125
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
c21401125
.
mfilterf
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
else
return
false
end
end
function
c21401125
.
mfilter
(
c
)
return
c
:
GetLevel
()
>
0
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsSetCard
(
0xf00
)
and
not
c
:
IsForbidden
()
end
function
c21401125
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c21401125
.
mfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
return
Duel
.
IsExistingMatchingCard
(
c21401125
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
mg2
,
ft
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c21401125
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c21401125
.
mfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21401125
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg1
,
mg2
,
ft
)
local
tc
=
g
:
GetFirst
()
if
tc
then
local
mg
=
mg1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
mg
:
Merge
(
mg2
)
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
c21401125
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
:
Merge
(
mat2
)
end
tc
:
SetMaterial
(
mat
)
local
mat2
=
mat
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
mat
:
Sub
(
mat2
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
SendtoExtraP
(
mat2
,
tp
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_RITUAL
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
function
c21401125
.
shcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
end
function
c21401125
.
shcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeckAsCost
()
end
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
end
function
c21401125
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xf08
)
and
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c
:
IsAbleToHand
()
end
function
c21401125
.
shtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_DECK
)
and
chkc
:
IsControler
(
tp
)
and
c21401125
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401125
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c21401125
.
shop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c21401125
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
expansions/script/c21401126.lua
deleted
100644 → 0
View file @
688d97e9
--概念礼装 限制/零毁
function
c21401126
.
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
:
SetCost
(
c21401126
.
cost
)
e1
:
SetTarget
(
c21401126
.
target
)
e1
:
SetOperation
(
c21401126
.
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
(
c21401126
.
eqlimit
)
c
:
RegisterEffect
(
e2
)
--cannot be target
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
c21401126
.
value
)
c
:
RegisterEffect
(
e3
)
--Atk up
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetValue
(
500
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_EQUIP
)
e5
:
SetCondition
(
c21401126
.
atkcon
)
e5
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e5
:
SetValue
(
c21401126
.
val
)
c
:
RegisterEffect
(
e5
)
end
function
c21401126
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xf00
)
end
function
c21401126
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
Duel
.
PayLPCost
(
tp
,
1000
)
end
function
c21401126
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c21401126
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401126
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c21401126
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c21401126
.
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
c21401126
.
eqlimit
(
e
,
c
)
return
c
:
IsSetCard
(
0xf00
)
end
function
c21401126
.
value
(
e
,
re
,
rp
)
local
tc
=
re
:
GetHandler
()
return
re
:
IsActiveType
(
TYPE_EQUIP
)
and
re
~=
e
:
GetHandler
()
and
tc
:
IsSetCard
(
0xf0b
)
end
function
c21401126
.
val
(
e
)
local
tc
=
e
:
GetHandler
():
GetEquipTarget
()
return
tc
:
GetBaseAttack
()
/
2
end
function
c21401126
.
atkcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
)
and
Duel
.
GetAttacker
()
==
e
:
GetHandler
():
GetEquipTarget
()
end
\ No newline at end of file
expansions/script/c21401127.lua
deleted
100644 → 0
View file @
688d97e9
--概念礼装 元素转换
function
c21401127
.
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
:
SetCost
(
c21401127
.
cost
)
e1
:
SetTarget
(
c21401127
.
target
)
e1
:
SetOperation
(
c21401127
.
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
(
c21401127
.
eqlimit
)
c
:
RegisterEffect
(
e2
)
--cannot be target
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
c21401127
.
value
)
c
:
RegisterEffect
(
e3
)
--Atk Def up
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetValue
(
500
)
c
:
RegisterEffect
(
e4
)
--add counter
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCategory
(
CATEGORY_COUNTER
)
e5
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetCondition
(
c21401127
.
accon
)
e5
:
SetOperation
(
c21401127
.
acop
)
c
:
RegisterEffect
(
e5
)
end
function
c21401127
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xf00
)
end
function
c21401127
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
Duel
.
PayLPCost
(
tp
,
1000
)
end
function
c21401127
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c21401127
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401127
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c21401127
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c21401127
.
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
c21401127
.
eqlimit
(
e
,
c
)
return
c
:
IsSetCard
(
0xf00
)
end
function
c21401127
.
value
(
e
,
re
,
rp
)
local
tc
=
re
:
GetHandler
()
return
re
:
IsActiveType
(
TYPE_EQUIP
)
and
re
~=
e
:
GetHandler
()
and
tc
:
IsSetCard
(
0xf0b
)
end
function
c21401127
.
accon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
eg
:
GetFirst
()
==
e
:
GetHandler
():
GetEquipTarget
()
and
ev
>=
500
end
function
c21401127
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
():
GetEquipTarget
()
local
ct
=
math.floor
(
ev
/
500
)
tc
:
AddCounter
(
0xf0f
,
ct
)
end
\ No newline at end of file
expansions/script/c21401128.lua
deleted
100644 → 0
View file @
688d97e9
--概念礼装 虚数环
function
c21401128
.
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
:
SetCost
(
c21401128
.
cost
)
e1
:
SetTarget
(
c21401128
.
target
)
e1
:
SetOperation
(
c21401128
.
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
(
c21401128
.
eqlimit
)
c
:
RegisterEffect
(
e2
)
--cannot be target
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
c21401128
.
value
)
c
:
RegisterEffect
(
e3
)
--Atk up
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetValue
(
500
)
c
:
RegisterEffect
(
e4
)
--damage double
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetRange
(
LOCATION_SZONE
)
e6
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e6
:
SetCondition
(
c21401128
.
damcon
)
e6
:
SetOperation
(
c21401128
.
damop
)
c
:
RegisterEffect
(
e6
)
end
function
c21401128
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xf00
)
end
function
c21401128
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
Duel
.
PayLPCost
(
tp
,
1000
)
end
function
c21401128
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c21401128
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401128
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c21401128
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c21401128
.
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
c21401128
.
eqlimit
(
e
,
c
)
return
c
:
IsSetCard
(
0xf00
)
end
function
c21401128
.
value
(
e
,
re
,
rp
)
local
tc
=
re
:
GetHandler
()
return
re
:
IsActiveType
(
TYPE_EQUIP
)
and
re
~=
e
:
GetHandler
()
and
tc
:
IsSetCard
(
0xf0b
)
end
function
c21401128
.
atkcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
)
and
Duel
.
GetAttacker
()
==
e
:
GetHandler
():
GetEquipTarget
()
end
function
c21401128
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
()
==
e
:
GetHandler
():
GetEquipTarget
()
and
ep
~=
tp
and
eg
:
GetFirst
():
GetBattleTarget
()
~=
nil
end
function
c21401128
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
*
2
)
end
\ No newline at end of file
expansions/script/c21401129.lua
deleted
100644 → 0
View file @
688d97e9
--概念礼装 万华镜
function
c21401129
.
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
:
SetCost
(
c21401129
.
cost
)
e1
:
SetTarget
(
c21401129
.
target
)
e1
:
SetOperation
(
c21401129
.
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
(
c21401129
.
eqlimit
)
c
:
RegisterEffect
(
e2
)
--cannot be target
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
c21401129
.
value
)
c
:
RegisterEffect
(
e3
)
--Atk up
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetValue
(
500
)
c
:
RegisterEffect
(
e4
)
end
function
c21401129
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xf00
)
end
function
c21401129
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
Duel
.
PayLPCost
(
tp
,
1000
)
end
function
c21401129
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c21401129
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21401129
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c21401129
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c21401129
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsType
(
TYPE_XYZ
)
then
lv
=
tc
:
GetRank
()
elseif
tc
:
IsType
(
TYPE_MONSTER
)
then
lv
=
tc
:
GetLevel
()
end
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
and
lv
>=
3
then
tc
:
AddCounter
(
0xf0f
,
math.floor
(
lv
/
3
))
else
tc
:
AddCounter
(
0xf0f
,
1
)
end
end
end
function
c21401129
.
eqlimit
(
e
,
c
)
return
c
:
IsSetCard
(
0xf00
)
end
function
c21401129
.
value
(
e
,
re
,
rp
)
local
tc
=
re
:
GetHandler
()
return
re
:
IsActiveType
(
TYPE_EQUIP
)
and
re
~=
e
:
GetHandler
()
and
tc
:
IsSetCard
(
0xf0b
)
end
\ No newline at end of file
expansions/script/c21401130.lua
deleted
100644 → 0
View file @
688d97e9
--命运-冠位指定
function
c21401130
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf0f
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c21401130
.
target
)
e1
:
SetOperation
(
c21401130
.
activate
)
c
:
RegisterEffect
(
e1
)
--add counter
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetCondition
(
c21401130
.
ctcon
)
e4
:
SetOperation
(
c21401130
.
ctop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e5
)
--Remove counter replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_RCOUNTER_REPLACE
+
0xf0f
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetCondition
(
c21401130
.
rcon
)
e4
:
SetOperation
(
c21401130
.
rop
)
c
:
RegisterEffect
(
e4
)
--Draw
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetCategory
(
CATEGORY_DRAW
)
e7
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e7
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e7
:
SetCode
(
EVENT_CUSTOM
+
0xf0f
)
e7
:
SetRange
(
LOCATION_FZONE
)
e7
:
SetCondition
(
c21401130
.
drcon
)
e7
:
SetOperation
(
c21401130
.
drop
)
c
:
RegisterEffect
(
e7
)
end
function
c21401130
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
2
end
end
function
c21401130
.
filter
(
c
)
return
c
:
IsSetCard
(
0xf00
)
and
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c21401130
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
<
3
then
return
end
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
3
)
Duel
.
ConfirmCards
(
tp
,
g
)
if
not
Duel
.
CheckLocation
(
tp
,
LOCATION_SZONE
,
6
)
and
not
Duel
.
CheckLocation
(
tp
,
LOCATION_SZONE
,
7
)
then
return
end
if
g
:
IsExists
(
c21401130
.
filter
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
21401130
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21401130
,
1
))
local
sg
=
g
:
FilterSelect
(
tp
,
c21401130
.
filter
,
1
,
1
,
nil
)
local
tc
=
sg
:
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
else
Duel
.
ShuffleDeck
(
tp
)
end
end
function
c21401130
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xf00
)
end
function
c21401130
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c21401130
.
cfilter
,
1
,
nil
)
end
function
c21401130
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
eg
:
FilterCount
(
c21401130
.
cfilter
,
nil
)
if
ct
>
0
then
e
:
GetHandler
():
AddCounter
(
0xf0f
,
ct
)
end
end
function
c21401130
.
rcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_COST
)
~=
0
and
ep
==
e
:
GetOwnerPlayer
()
and
e
:
GetHandler
():
GetCounter
(
0xf0f
)
>=
ev
end
function
c21401130
.
rop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RemoveCounter
(
ep
,
0xf0f
,
ev
,
REASON_EFFECT
)
end
function
c21401130
.
cfilter2
(
c
)
return
(
c
:
IsSetCard
(
0xf00
)
or
c
:
IsSetCard
(
0xf0b
))
and
c
:
IsAbleToHand
()
end
function
c21401130
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
():
IsControler
(
tp
)
and
eg
:
GetFirst
():
IsType
(
TYPE_MONSTER
)
end
function
c21401130
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c33700186.lua
View file @
32e46bf5
...
@@ -85,6 +85,13 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -85,6 +85,13 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
g
:
Sub
(
Duel
.
GetOperatedGroup
())
g
:
Sub
(
Duel
.
GetOperatedGroup
())
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
else
local
hg
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
nil
)
if
hg
:
GetCount
()
>=
3
then
local
tg
=
hg
:
RandomSelect
(
tp
,
3
)
Duel
.
BreakEffect
()
Duel
.
SendtoDeck
(
tg
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SortDecktop
(
tp
,
tp
,
g
:
GetCount
())
Duel
.
SortDecktop
(
tp
,
tp
,
g
:
GetCount
())
...
...
expansions/script/c99601011.lua
deleted
100644 → 0
View file @
688d97e9
--GOD AMAZON NIGHT KNIGHT
function
c99601011
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
99601011
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c99601011
.
target
)
e1
:
SetOperation
(
c99601011
.
activate
)
c
:
RegisterEffect
(
e1
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99601011
,
0
))
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetCountLimit
(
1
,
99601211
)
e2
:
SetCost
(
c99601011
.
drcost
)
e2
:
SetTarget
(
c99601011
.
drtg
)
e2
:
SetOperation
(
c99601011
.
drop
)
c
:
RegisterEffect
(
e2
)
end
function
c99601011
.
filter
(
c
)
return
c
:
IsSetCard
(
0x703
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c99601011
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c99601011
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c99601011
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c99601011
.
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
c99601011
.
drcost
(
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
c99601011
.
drfilter
(
c
,
e
)
return
c
:
IsSetCard
(
0x703
)
and
c
:
IsAbleToDeck
()
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c99601011
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c99601011
.
drfilter
,
tp
,
LOCATION_GRAVE
,
0
,
e
:
GetHandler
(),
e
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
g
:
GetClassCount
(
Card
.
GetCode
)
>
4
end
local
sg
=
Group
.
CreateGroup
()
for
i
=
1
,
3
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g1
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
g
:
Remove
(
Card
.
IsCode
,
nil
,
g1
:
GetFirst
():
GetCode
())
sg
:
Merge
(
g1
)
end
Duel
.
SetTargetCard
(
sg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
3
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c99601011
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
if
not
tg
or
tg
:
FilterCount
(
Card
.
IsRelateToEffect
,
nil
,
e
)
~=
3
then
return
end
Duel
.
SendtoDeck
(
tg
,
nil
,
0
,
REASON_EFFECT
)
local
g
=
Duel
.
GetOperatedGroup
()
if
g
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
ShuffleDeck
(
tp
)
end
local
ct
=
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
if
ct
==
3
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c99677703.lua
deleted
100644 → 0
View file @
688d97e9
--模型舰队·xuefeng
function
c99677703
.
initial_effect
(
c
)
--special summon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e5
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e5
:
SetRange
(
LOCATION_HAND
)
e5
:
SetCondition
(
c99677703
.
spscon
)
e5
:
SetCountLimit
(
1
,
99677703
)
c
:
RegisterEffect
(
e5
)
--fusion
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99677703
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
99677753
)
e1
:
SetCondition
(
c99677703
.
spcon
)
e1
:
SetTarget
(
c99677703
.
sptg
)
e1
:
SetOperation
(
c99677703
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_FLIP
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
--Run
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
99677703
,
1
))
e6
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e6
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e6
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e6
:
SetCode
(
EVENT_CHAINING
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCountLimit
(
1
,
996777603
)
e6
:
SetCondition
(
c99677703
.
spcon2
)
e6
:
SetCost
(
c99677703
.
spcost2
)
e6
:
SetTarget
(
c99677703
.
sptg2
)
e6
:
SetOperation
(
c99677703
.
spop2
)
c
:
RegisterEffect
(
e6
)
end
function
c99677703
.
spscon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetMZoneCount
(
c
:
GetControler
())
>
0
end
function
c99677703
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
~=
PHASE_DAMAGE
and
ph
~=
PHASE_DAMAGE_CAL
end
function
c99677703
.
spfilter1
(
c
,
e
)
return
c
:
IsCanBeFusionMaterial
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c99677703
.
spfilter2
(
c
,
e
,
tp
,
m
,
f
,
gc
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x70e
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
gc
)
end
function
c99677703
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
local
mg1
=
Duel
.
GetMatchingGroup
(
Card
.
IsCanBeFusionMaterial
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
0
,
c
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c99677703
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
c
)
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
(
c99677703
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
c
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c99677703
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
local
mg1
=
Duel
.
GetMatchingGroup
(
c99677703
.
spfilter1
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
0
,
c
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c99677703
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
c
)
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
(
c99677703
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
c
)
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
,
c
)
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
,
c
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
function
c99677703
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
local
mg1
=
Duel
.
GetMatchingGroup
(
c99677703
.
spfilter1
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
0
,
c
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c99677703
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
c
)
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
(
c99677703
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
c
)
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
,
c
)
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
,
c
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
function
c99677703
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsContains
(
e
:
GetHandler
())
end
function
c99677703
.
spcost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsFaceup
()
and
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c99677703
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x70e
)
and
c
:
GetLevel
()
==
1
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c99677703
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c99677703
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
)
end
function
c99677703
.
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
,
c99677703
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
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/c99677704.lua
deleted
100644 → 0
View file @
688d97e9
--模型舰队的大建
function
c99677704
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99677704
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
99677704
)
e2
:
SetCost
(
c99677704
.
thcost2
)
e2
:
SetTarget
(
c99677704
.
thtg2
)
e2
:
SetOperation
(
c99677704
.
thop2
)
c
:
RegisterEffect
(
e2
)
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetCondition
(
c99677704
.
thcon
)
e3
:
SetTarget
(
c99677704
.
thtg
)
e3
:
SetOperation
(
c99677704
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c99677704
.
thcost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c99677704
.
filter2
(
c
)
return
c
:
IsSetCard
(
0x70e
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c99677704
.
thtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c99677704
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c99677704
.
thop2
(
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
,
c99677704
.
filter2
,
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
c99677704
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
function
c99677704
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x70e
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
c
:
IsFaceup
end
function
c99677704
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c99677704
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
end
function
c99677704
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c99677704
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c99677707.lua
deleted
100644 → 0
View file @
688d97e9
--模型舰队·
function
c99677707
.
initial_effect
(
c
)
--Run
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99677707
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
99677707
)
e1
:
SetCondition
(
c99677707
.
spcon2
)
e1
:
SetCost
(
c99677707
.
spcost2
)
e1
:
SetTarget
(
c99677707
.
sptg2
)
e1
:
SetOperation
(
c99677707
.
spop2
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99677707
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e2
:
SetTarget
(
c99677707
.
destg
)
e2
:
SetOperation
(
c99677707
.
desop
)
e2
:
SetCountLimit
(
1
,
99677757
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e2
:
Clone
()
e4
:
SetCode
(
EVENT_FLIP
)
c
:
RegisterEffect
(
e4
)
end
function
c99677707
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsContains
(
e
:
GetHandler
())
end
function
c99677707
.
spcost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsFaceup
()
and
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c99677707
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x70e
)
and
c
:
IsLevelBelow
(
2
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c99677707
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c99677707
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
)
end
function
c99677707
.
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
,
c99677707
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c99677707
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c99677707
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c99677708.lua
deleted
100644 → 0
View file @
688d97e9
--模型舰队·妙高
function
c99677708
.
initial_effect
(
c
)
--Run
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99677708
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
99677708
)
e1
:
SetCondition
(
c99677708
.
spcon2
)
e1
:
SetCost
(
c99677708
.
spcost2
)
e1
:
SetTarget
(
c99677708
.
sptg2
)
e1
:
SetOperation
(
c99677708
.
spop2
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99677708
,
0
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCountLimit
(
1
,
99677758
)
e2
:
SetCondition
(
c99677708
.
negcon
)
e2
:
SetTarget
(
c99677708
.
negtg
)
e2
:
SetOperation
(
c99677708
.
negop
)
c
:
RegisterEffect
(
e2
)
end
function
c99677708
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsContains
(
e
:
GetHandler
())
end
function
c99677708
.
spcost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsFaceup
()
and
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c99677708
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x70e
)
and
c
:
IsLevelBelow
(
4
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c99677708
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c99677708
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
)
end
function
c99677708
.
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
,
c99677708
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c99677708
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c99677708
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c99677708
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c99677709.lua
deleted
100644 → 0
View file @
688d97e9
--模型舰队·吹雪
function
c99677709
.
initial_effect
(
c
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99677709
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
99677759
)
e1
:
SetTarget
(
c99677709
.
target
)
e1
:
SetOperation
(
c99677709
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_FLIP
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
end
function
c99677709
.
spfilter2
(
c
)
return
c
:
IsSetCard
(
0x70e
)
and
c
:
IsType
(
TYPE_MONSTER
+
TYPE_SPELL
+
TYPE_TRAP
)
and
not
c
:
IsCode
(
99677709
)
and
c
:
IsAbleToHand
()
end
function
c99677709
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c99677709
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c99677709
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c99677709
.
spfilter2
,
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
\ No newline at end of file
expansions/script/c99677710.lua
deleted
100644 → 0
View file @
688d97e9
--紧急瞬间偷袭
function
c99677710
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99677710
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
99677710
+
EFFECT_COUNT_CODE_DUEL
)
e1
:
SetTarget
(
c99677710
.
target
)
e1
:
SetOperation
(
c99677710
.
operation
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99677710
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetCondition
(
c99677710
.
thcon
)
e2
:
SetTarget
(
c99677710
.
thtg
)
e2
:
SetOperation
(
c99677710
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c99677710
.
filter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToDeck
()
and
Duel
.
IsExistingMatchingCard
(
c99677710
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetCode
())
end
function
c99677710
.
spfilter
(
c
,
e
,
tp
,
code
)
return
c
:
IsSetCard
(
0x70e
)
and
not
c
:
IsCode
(
code
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c99677710
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c99677710
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingTarget
(
c99677710
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c99677710
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c99677710
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c99677710
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
function
c99677710
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
function
c99677710
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x70e
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
c
:
IsFaceup
end
function
c99677710
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c99677710
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
end
function
c99677710
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c99677710
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c99677711.lua
deleted
100644 → 0
View file @
688d97e9
--模型舰队·
function
c99677711
.
initial_effect
(
c
)
--Run
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99677711
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
99677711
)
e1
:
SetCondition
(
c99677711
.
spcon2
)
e1
:
SetCost
(
c99677711
.
spcost2
)
e1
:
SetTarget
(
c99677711
.
sptg2
)
e1
:
SetOperation
(
c99677711
.
spop2
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99677711
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetTarget
(
c99677711
.
destg
)
e2
:
SetOperation
(
c99677711
.
desop
)
e2
:
SetCountLimit
(
1
,
99677761
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_FLIP
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e2
:
Clone
()
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e4
)
end
function
c99677711
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsContains
(
e
:
GetHandler
())
end
function
c99677711
.
spcost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsFaceup
()
and
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c99677711
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x70e
)
and
c
:
IsLevelBelow
(
7
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c99677711
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c99677711
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
)
end
function
c99677711
.
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
,
c99677711
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c99677711
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c99677711
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c99677712.lua
deleted
100644 → 0
View file @
688d97e9
--模型舰队·北上
function
c99677712
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
99677712
)
e1
:
SetTarget
(
c99677712
.
target
)
e1
:
SetOperation
(
c99677712
.
operation
)
c
:
RegisterEffect
(
e1
)
--ad
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99677712
,
0
))
e2
:
SetCategory
(
CATEGORY_POSITION
)
e2
:
SetType
(
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e2
:
SetTarget
(
c99677712
.
adtg
)
e2
:
SetOperation
(
c99677712
.
adop
)
e2
:
SetCountLimit
(
1
,
99677762
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e2
:
Clone
()
e4
:
SetCode
(
EVENT_FLIP
)
c
:
RegisterEffect
(
e4
)
end
function
c99677712
.
filter0
(
c
)
return
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c99677712
.
filter1
(
c
,
e
)
return
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c99677712
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
gc
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x70e
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
gc
)
end
function
c99677712
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
local
mg1
=
Duel
.
GetMatchingGroup
(
c99677712
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
c
)
local
res
=
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c99677712
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
c
)
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
(
c99677712
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
c
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c99677712
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
local
mg1
=
Duel
.
GetMatchingGroup
(
c99677712
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
c
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c99677712
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
c
)
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
(
c99677712
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
c
)
end
if
(
Duel
.
GetMZoneCount
(
tp
)
>
0
and
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
,
c
)
tc
:
SetMaterial
(
mat1
)
Duel
.
Remove
(
mat1
,
POS_FACEUP
,
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
,
c
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
function
c99677712
.
adtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
0
)
end
function
c99677712
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
,
POS_FACEDOWN_DEFENSE
,
POS_FACEUP_ATTACK
,
POS_FACEUP_ATTACK
)
end
end
expansions/script/c99677713.lua
deleted
100644 → 0
View file @
688d97e9
--模型舰队·矶风
function
c99677713
.
initial_effect
(
c
)
--Run
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99677713
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
99677713
)
e2
:
SetCondition
(
c99677713
.
spcon2
)
e2
:
SetCost
(
c99677713
.
spcost2
)
e2
:
SetTarget
(
c99677713
.
sptg2
)
e2
:
SetOperation
(
c99677713
.
spop2
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99677713
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
99677763
)
e1
:
SetTarget
(
c99677713
.
sptg
)
e1
:
SetOperation
(
c99677713
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_FLIP
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
end
function
c99677713
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x70e
)
and
not
c
:
IsCode
(
99677713
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c99677713
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c99677713
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c99677713
.
spop
(
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
,
c99677713
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c99677713
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsContains
(
e
:
GetHandler
())
end
function
c99677713
.
spcost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsFaceup
()
and
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c99677713
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x70e
)
and
c
:
IsLevelBelow
(
2
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c99677713
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c99677713
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
)
end
function
c99677713
.
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
,
c99677713
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
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/c99677714.lua
deleted
100644 → 0
View file @
688d97e9
--加贺桑
function
c99677714
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99677714
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
99677714
+
EFFECT_COUNT_CODE_DUEL
)
e1
:
SetOperation
(
c99677714
.
spop
)
c
:
RegisterEffect
(
e1
)
end
function
c99677714
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x70e
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c99677714
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
\ No newline at end of file
expansions/script/c99677793.lua
deleted
100644 → 0
View file @
688d97e9
--阿武隈 八万钢
function
c99677793
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x70e
),
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--a d
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
99677793
,
0
))
e5
:
SetCategory
(
CATEGORY_POSITION
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
,
99677793
)
e5
:
SetTarget
(
c99677793
.
target
)
e5
:
SetOperation
(
c99677793
.
operation
)
c
:
RegisterEffect
(
e5
)
--synchro effect
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99677793
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1c0
+
TIMING_MAIN_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c99677793
.
sccon
)
e2
:
SetTarget
(
c99677793
.
sctarg
)
e2
:
SetOperation
(
c99677793
.
scop
)
c
:
RegisterEffect
(
e2
)
end
function
c99677793
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
Duel
.
GetTurnPlayer
()
~=
tp
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
end
function
c99677793
.
sctarg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c99677793
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
GetControler
()
~=
tp
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
end
end
function
c99677793
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
0
)
end
function
c99677793
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
,
POS_FACEDOWN_DEFENSE
,
POS_FACEUP_ATTACK
,
POS_FACEUP_ATTACK
)
end
end
\ No newline at end of file
expansions/script/c99677794.lua
deleted
100644 → 0
View file @
688d97e9
--二羽鹤 翔鹤
function
c99677794
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x70e
),
2
,
true
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99677794
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
99677794
)
e1
:
SetCondition
(
c99677794
.
spcon
)
e1
:
SetTarget
(
c99677794
.
sptg
)
e1
:
SetOperation
(
c99677794
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e4
=
e1
:
Clone
()
e4
:
SetCode
(
EVENT_FLIP
)
c
:
RegisterEffect
(
e4
)
end
function
c99677794
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x70e
)
and
c
:
IsControler
(
tp
)
end
function
c99677794
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
eg
:
IsContains
(
e
:
GetHandler
())
and
eg
:
IsExists
(
c99677794
.
cfilter
,
1
,
nil
,
tp
)
end
function
c99677794
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x70e
)
and
c
:
IsLevelBelow
(
6
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c99677794
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c99677794
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingTarget
(
c99677794
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c99677794
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c99677794
.
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
\ No newline at end of file
expansions/script/c99677795.lua
deleted
100644 → 0
View file @
688d97e9
--一航战的骄傲 赤城
function
c99677795
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x70e
),
2
,
true
)
--adchange
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99677795
,
0
))
e1
:
SetCategory
(
CATEGORY_POSITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c99677795
.
target
)
e1
:
SetOperation
(
c99677795
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c99677795
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanTurnSet
()
end
function
c99677795
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c99677795
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c99677795
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c99677795
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
0
)
end
function
c99677795
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
and
tc
:
IsFaceup
()
then
Duel
.
ChangePosition
(
tc
,
POS_FACEDOWN_DEFENSE
)
end
end
\ No newline at end of file
expansions/script/c99677796.lua
deleted
100644 → 0
View file @
688d97e9
--二羽鹤 瑞鹤
function
c99677796
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x70e
),
1
)
c
:
EnableReviveLimit
()
--remove
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
99677796
,
0
))
e5
:
SetCategory
(
CATEGORY_REMOVE
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCondition
(
c99677796
.
condition
)
e5
:
SetCountLimit
(
1
,
99677796
)
e5
:
SetTarget
(
c99677796
.
rmtg
)
e5
:
SetOperation
(
c99677796
.
rmop
)
c
:
RegisterEffect
(
e5
)
--synchro level
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SYNCHRO_LEVEL
)
e2
:
SetValue
(
c99677796
.
slevel
)
c
:
RegisterEffect
(
e2
)
end
function
c99677796
.
slevel
(
e
,
c
)
local
lv
=
e
:
GetHandler
():
GetLevel
()
return
6
*
65536
+
lv
end
function
c99677796
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetTurnPlayer
()
==
tp
then
return
false
end
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_STANDBY
or
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
end
function
c99677796
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsAbleToRemove
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
IsAbleToRemove
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c99677796
.
rmop
(
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
\ No newline at end of file
expansions/script/c99677797.lua
deleted
100644 → 0
View file @
688d97e9
--模型舰队·
function
c99677797
.
initial_effect
(
c
)
--Run
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99677797
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
99677797
)
e1
:
SetCondition
(
c99677797
.
spcon2
)
e1
:
SetCost
(
c99677797
.
spcost2
)
e1
:
SetTarget
(
c99677797
.
sptg2
)
e1
:
SetOperation
(
c99677797
.
spop2
)
c
:
RegisterEffect
(
e1
)
--pos
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99677797
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetTarget
(
c99677797
.
postg
)
e2
:
SetOperation
(
c99677797
.
posop
)
e2
:
SetCountLimit
(
1
,
99977998
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_FLIP
)
c
:
RegisterEffect
(
e3
)
--pos Summon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
99677797
,
0
))
e4
:
SetCategory
(
CATEGORY_DESTROY
)
e4
:
SetType
(
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetTarget
(
c99677797
.
postg4
)
e4
:
SetOperation
(
c99677797
.
posop
)
e4
:
SetCountLimit
(
1
,
99977998
)
c
:
RegisterEffect
(
e4
)
end
function
c99677797
.
filter4
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanTurnSet
()
end
function
c99677797
.
postg4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_MZONE
and
c99677797
.
filter4
(
chkc
)
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c99677797
.
filter4
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c99677797
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsContains
(
e
:
GetHandler
())
end
function
c99677797
.
spcost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsFaceup
()
and
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c99677797
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x70e
)
and
c
:
IsLevelBelow
(
3
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c99677797
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c99677797
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
)
end
function
c99677797
.
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
,
c99677797
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c99677797
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanTurnSet
()
end
function
c99677797
.
postg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_MZONE
and
c99677797
.
filter
(
chkc
)
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c99677797
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c99677797
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
ChangePosition
(
tc
,
POS_FACEDOWN_DEFENSE
)
end
end
\ No newline at end of file
expansions/strings.conf
View file @
32e46bf5
...
@@ -101,20 +101,6 @@
...
@@ -101,20 +101,6 @@
#is_named_with_Singer_Arthur 歌姬亚瑟
#is_named_with_Singer_Arthur 歌姬亚瑟
#is_named_with_Regal_Arthur 富豪亚瑟
#is_named_with_Regal_Arthur 富豪亚瑟
#车神 214 0xf00-0xf0f
!
counter
0
xf0f
NP
指示物
!
setname
0
xf00
从者 從者
!
setname
0
xf01
剑之从者 劍之從者
!
setname
0
xf02
弓之从者 弓之從者
!
setname
0
xf03
枪之从者 槍之從者
!
setname
0
xf04
骑之从者 騎之從者
!
setname
0
xf05
术之从者 術之從者
!
setname
0
xf06
杀之从者 殺之從者
!
setname
0
xf07
狂之从者 狂之從者
!
setname
0
xf08
裁定者 裁定者
!
setname
0
xf09
复仇者 復仇者
!
setname
0
xf0b
礼装 禮裝
#兔锅 222
#兔锅 222
#named_with_Shirasawa_Tama 白泽球
#named_with_Shirasawa_Tama 白泽球
#named_with_Solid Solid
#named_with_Solid Solid
...
@@ -182,7 +168,6 @@
...
@@ -182,7 +168,6 @@
#小百合 986
#小百合 986
#花草 996 0x700-0x70f
#花草 996 0x700-0x70f
!
setname
0
x70e
模型舰队
!
setname
0
x1702
时空魔女
!
setname
0
x1702
时空魔女
#人形 999
#人形 999
...
...
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