Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro-scripts
Commits
1cf86b67
Commit
1cf86b67
authored
Jan 24, 2026
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into develop
parents
07746a4a
92e166dd
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
290 additions
and
273 deletions
+290
-273
c16708652.lua
c16708652.lua
+30
-16
c17954937.lua
c17954937.lua
+1
-1
c26864586.lua
c26864586.lua
+21
-25
c32671443.lua
c32671443.lua
+24
-25
c34016756.lua
c34016756.lua
+30
-26
c43857222.lua
c43857222.lua
+23
-26
c46961802.lua
c46961802.lua
+23
-34
c56535497.lua
c56535497.lua
+26
-21
c58995660.lua
c58995660.lua
+1
-2
c63136489.lua
c63136489.lua
+0
-1
c64038662.lua
c64038662.lua
+12
-16
c67712104.lua
c67712104.lua
+2
-1
c72859417.lua
c72859417.lua
+12
-22
c74631897.lua
c74631897.lua
+7
-3
c7628844.lua
c7628844.lua
+1
-0
c77124096.lua
c77124096.lua
+1
-0
c79016563.lua
c79016563.lua
+32
-27
c98918572.lua
c98918572.lua
+16
-11
c99890852.lua
c99890852.lua
+28
-16
No files found.
c16708652.lua
View file @
1cf86b67
...
...
@@ -16,31 +16,45 @@ function c16708652.condition(e,tp,eg,ep,ev,re,r,rp)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
and
aux
.
dscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
function
c16708652
.
filter1
(
c
)
return
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
c
:
IsSetCard
(
0x11
)
and
c
:
IsCanChangePosition
()
function
c16708652
.
atkfilter
(
c
)
return
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
c
:
IsCanChangePosition
()
and
c
:
IsAttackAbove
(
1
)
end
function
c16708652
.
filter1
(
c
,
tp
)
return
c16708652
.
atkfilter
(
c
)
and
c
:
IsSetCard
(
0x11
)
and
Duel
.
IsExistingTarget
(
c16708652
.
filter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
)
end
function
c16708652
.
filter2
(
c
)
return
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
c
:
IsSetCard
(
0x11
)
end
function
c16708652
.
chkfilter
(
c
,
tp
)
return
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
c
:
IsSetCard
(
0x11
)
and
c
:
IsCanChangePosition
()
and
Duel
.
IsExistingTarget
(
c16708652
.
filter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
)
function
c16708652
.
tgfilter
(
c
,
e
)
return
c16708652
.
filter2
(
c
)
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c16708652
.
gcheck
(
g
)
return
g
:
IsExists
(
c16708652
.
atkfilter
,
1
,
nil
)
end
function
c16708652
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c16708652
.
chkfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
16708652
,
0
))
local
g1
=
Duel
.
SelectTarget
(
tp
,
c16708652
.
filter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
16708652
,
1
))
local
g2
=
Duel
.
SelectTarget
(
tp
,
c16708652
.
filter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
g1
:
GetFirst
())
e
:
SetLabelObject
(
g1
:
GetFirst
())
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c16708652
.
filter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c16708652
.
tgfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
e
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
c16708652
.
gcheck
,
false
,
2
,
2
)
Duel
.
SetTargetCard
(
sg
)
end
function
c16708652
.
atkfilter2
(
c
)
return
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
c
:
IsCanChangePosition
()
end
function
c16708652
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc1
=
e
:
GetLabelObject
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc2
=
g
:
GetFirst
()
if
tc1
==
tc2
then
tc2
=
g
:
GetNext
()
end
if
tc1
:
IsRelateToEffect
(
e
)
and
tc1
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
tc2
:
IsRelateToEffect
(
e
)
then
Duel
.
ChangePosition
(
tc1
,
POS_FACEUP_DEFENSE
)
local
g
=
Duel
.
GetTargetsRelateToChain
()
if
#
g
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
16708652
,
0
))
local
tc1
=
g
:
FilterSelect
(
tp
,
c16708652
.
atkfilter
,
1
,
1
,
nil
):
GetFirst
()
if
not
tc1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
16708652
,
0
))
tc1
=
g
:
FilterSelect
(
tp
,
c16708652
.
atkfilter2
,
1
,
1
,
nil
):
GetFirst
()
end
if
not
tc1
then
return
end
local
tc2
=
(
g
-
tc1
):
GetFirst
()
if
Duel
.
ChangePosition
(
tc1
,
POS_FACEUP_DEFENSE
)
>
0
and
tc2
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
...
...
c17954937.lua
View file @
1cf86b67
...
...
@@ -66,7 +66,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
Select
Target
(
tp
,
Card
.
IsReleasableByEffect
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
tc
)
local
g
=
Duel
.
Select
MatchingCard
(
tp
,
Card
.
IsReleasableByEffect
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
tc
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Release
(
g
,
REASON_EFFECT
)
...
...
c26864586.lua
View file @
1cf86b67
...
...
@@ -9,36 +9,32 @@ function c26864586.initial_effect(c)
e1
:
SetOperation
(
c26864586
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c26864586
.
filter1
(
c
,
tp
)
local
lv
=
c
:
GetLevel
()
return
lv
>
0
and
c
:
IsFaceup
()
and
Duel
.
IsExistingTarget
(
c26864586
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
c
:
GetRace
(),
c
:
GetAttribute
(),
lv
)
function
c26864586
.
tgfilter
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
1
)
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c26864586
.
filter2
(
c
,
rc
,
at
,
lv
)
return
not
c
:
IsLevel
(
lv
)
and
c
:
IsLevelAbove
(
1
)
and
c
:
IsFaceup
()
and
c
:
IsRace
(
rc
)
and
c
:
IsAttribute
(
at
)
function
c26864586
.
gcheck
(
g
)
return
aux
.
dlvcheck
(
g
)
and
aux
.
SameValueCheck
(
g
,
Card
.
GetAttribute
)
and
aux
.
SameValueCheck
(
g
,
Card
.
GetRace
)
end
function
c26864586
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c26864586
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c26864586
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
local
tc1
=
g1
:
GetFirst
()
e
:
SetLabelObject
(
tc1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
26864586
,
0
))
local
g2
=
Duel
.
SelectTarget
(
tp
,
c26864586
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
tc1
,
tc1
:
GetRace
(),
tc1
:
GetAttribute
(),
tc1
:
GetLevel
())
local
g
=
Duel
.
GetMatchingGroup
(
c26864586
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
if
chk
==
0
then
return
g
:
CheckSubGroup
(
c26864586
.
gcheck
,
2
,
2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
tg
=
g
:
SelectSubGroup
(
tp
,
c26864586
.
gcheck
,
false
,
2
,
2
)
Duel
.
SetTargetCard
(
tg
)
end
function
c26864586
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc1
=
e
:
GetLabelObject
()
local
tc2
=
g
:
GetFirst
()
if
tc1
==
tc2
then
tc2
=
g
:
GetNext
()
end
local
g
=
Duel
.
GetTargetsRelateToChain
()
if
g
:
FilterCount
(
Card
.
IsFaceup
,
nil
)
<
2
then
return
end
if
g
:
GetFirst
():
GetLevel
()
==
g
:
GetNext
():
GetLevel
()
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
26864586
,
0
))
local
tc2
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
tc1
=
(
g
-
tc2
):
GetFirst
()
local
lv
=
tc1
:
GetLevel
()
if
tc2
:
IsLevel
(
lv
)
then
return
end
if
tc1
:
IsFaceup
()
and
tc1
:
IsRelateToEffect
(
e
)
and
tc2
:
IsFaceup
()
and
tc2
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e1
:
SetValue
(
lv
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc2
:
RegisterEffect
(
e1
)
end
end
c32671443.lua
View file @
1cf86b67
...
...
@@ -32,19 +32,14 @@ function c32671443.thfilter(c,e,tp)
return
c
:
IsAbleToHand
()
or
(
ft
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
))
end
function
c32671443
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
1
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c32671443
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c32671443
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c32671443
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
e
:
GetLabel
()
==
1
e
:
SetLabel
(
0
)
return
res
or
Duel
.
IsExistingMatchingCard
(
c32671443
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
e
:
SetLabel
(
0
)
if
chk
==
0
then
return
e
:
IsCostChecked
()
or
Duel
.
IsExistingMatchingCard
(
c32671443
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
end
function
c32671443
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
...
...
@@ -67,27 +62,31 @@ end
function
c32671443
.
atkfilter2
(
c
,
tc
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc008
)
and
not
c
:
IsAttack
(
tc
:
GetAttack
())
end
function
c32671443
.
tgfilter
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc008
)
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c32671443
.
gcheck
(
g
)
return
g
:
GetFirst
():
GetAttack
()
~=
g
:
GetNext
():
GetAttack
()
end
function
c32671443
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c32671443
.
atkfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
32671443
,
2
))
local
g1
=
Duel
.
SelectTarget
(
tp
,
c32671443
.
atkfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
local
tc
=
g1
:
GetFirst
()
e
:
SetLabelObject
(
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c32671443
.
atkfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
tc
,
tc
)
local
g
=
Duel
.
GetMatchingGroup
(
c32671443
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
tg
=
g
:
SelectSubGroup
(
tp
,
c32671443
.
gcheck
,
false
,
2
,
2
)
Duel
.
SetTargetCard
(
tg
)
end
function
c32671443
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
hc
=
e
:
GetLabelObject
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc
=
g
:
GetFirst
()
if
tc
==
hc
then
tc
=
g
:
GetNext
()
end
if
hc
:
IsFaceup
()
and
hc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
g
=
Duel
.
GetTargetsRelateToChain
()
if
g
:
FilterCount
(
Card
.
IsFaceup
,
nil
)
<
2
then
return
end
if
g
:
GetFirst
():
GetAttack
()
==
g
:
GetNext
():
GetAttack
()
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
32671443
,
2
))
local
tc2
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
tc1
=
(
g
-
tc2
):
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
tc
:
GetAttack
())
e1
:
SetValue
(
tc1
:
GetAttack
())
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
hc
:
RegisterEffect
(
e1
)
end
tc2
:
RegisterEffect
(
e1
)
end
c34016756.lua
View file @
1cf86b67
...
...
@@ -10,34 +10,38 @@ function c34016756.initial_effect(c)
e1
:
SetOperation
(
c34016756
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c34016756
.
tgfilter
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c34016756
.
gcheck
(
g
)
return
g
:
IsExists
(
Card
.
IsAttackAbove
,
1
,
nil
,
1
)
end
function
c34016756
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
34016756
,
0
))
local
g1
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
e
:
SetLabelObject
(
g1
:
GetFirst
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
34016756
,
1
))
local
g2
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
g1
:
GetFirst
())
if
chkc
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c34016756
.
tgfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
e
)
if
chk
==
0
then
return
g
:
CheckSubGroup
(
c34016756
.
gcheck
,
2
,
2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
tg
=
g
:
SelectSubGroup
(
tp
,
c34016756
.
gcheck
,
false
,
2
,
2
)
Duel
.
SetTargetCard
(
tg
)
end
function
c34016756
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
hc
=
e
:
GetLabelObject
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc
=
g
:
GetFirst
(
)
if
tc
==
hc
then
tc
=
g
:
GetNext
()
end
if
hc
:
IsFaceup
()
and
hc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
atk
=
hc
:
GetAttack
()
local
g
=
Duel
.
GetTargetsRelateToChain
()
if
g
:
FilterCount
(
Card
.
IsFaceup
,
nil
)
<
2
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
34016756
,
0
)
)
local
tc1
=
g
:
FilterSelect
(
tp
,
Card
.
IsAttackAbove
,
1
,
1
,
nil
,
1
):
GetFirst
()
local
tc2
=
(
g
-
tc1
):
GetFirst
()
local
atk
=
tc1
:
GetAttack
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
math.ceil
(
atk
/
2
))
if
hc
:
RegisterEffect
(
e1
)
then
if
tc1
:
RegisterEffect
(
e1
)
then
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetValue
(
math.ceil
(
atk
/
2
))
tc
:
RegisterEffect
(
e2
)
end
tc2
:
RegisterEffect
(
e2
)
end
end
c43857222.lua
View file @
1cf86b67
...
...
@@ -15,52 +15,49 @@ function c43857222.initial_effect(c)
end
function
c43857222
.
lvfilter1
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
2
)
and
Duel
.
IsExistingTarget
(
c43857222
.
lvfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
)
and
Duel
.
IsExistingTarget
(
c43857222
.
lvfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
1
)
end
function
c43857222
.
lvfilter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
1
)
function
c43857222
.
lvfilter2
(
c
,
lv
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
lv
)
end
function
c43857222
.
lvfilter3
(
c
,
tp
,
lv
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
lv
+
1
)
and
Duel
.
IsExistingTarget
(
c43857222
.
lvfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
)
function
c43857222
.
tgfilter
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
1
)
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c43857222
.
gcheck
(
g
,
lv
)
return
g
:
IsExists
(
Card
.
IsLevelAbove
,
1
,
nil
,
lv
+
1
)
end
function
c43857222
.
lvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c43857222
.
lvfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c43857222
.
lvfilter1
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
tp
)
local
mg
,
lv
=
g
:
GetMaxGroup
(
Card
.
GetLevel
)
local
alv
=
0
if
lv
>
2
then
alv
=
Duel
.
AnnounceLevel
(
tp
,
1
,
math.min
(
lv
-
1
,
6
))
else
alv
=
Duel
.
AnnounceLevel
(
tp
,
1
,
1
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
43857222
,
1
))
local
g1
=
Duel
.
SelectTarget
(
tp
,
c43857222
.
lvfilter3
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
,
alv
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
43857222
,
2
))
Duel
.
SelectTarget
(
tp
,
c43857222
.
lvfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
g1
:
GetFirst
())
e
:
SetLabelObject
(
g1
:
GetFirst
())
local
g
=
Duel
.
GetMatchingGroup
(
c43857222
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
local
_
,
lv
=
g
:
GetMaxGroup
(
Card
.
GetLevel
)
local
alv
=
Duel
.
AnnounceLevel
(
tp
,
1
,
math.min
(
lv
-
1
,
6
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
tg
=
g
:
SelectSubGroup
(
tp
,
c43857222
.
gcheck
,
false
,
2
,
2
,
alv
)
Duel
.
SetTargetCard
(
tg
)
e
:
SetLabel
(
alv
)
end
function
c43857222
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
hc
=
e
:
GetLabelObject
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc
=
g
:
GetFirst
()
if
tc
==
hc
then
tc
=
g
:
GetNext
()
end
local
g
=
Duel
.
GetTargetsRelateToChain
()
if
#
g
==
0
then
return
end
local
lv
=
e
:
GetLabel
()
if
hc
:
IsFaceup
()
and
hc
:
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
43857222
,
1
))
local
tc1
=
g
:
FilterSelect
(
tp
,
c43857222
.
lvfilter2
,
1
,
1
,
nil
,
lv
+
1
):
GetFirst
()
if
tc1
then
local
c
=
e
:
GetHandler
()
local
tc2
=
(
g
-
tc1
):
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
-
lv
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
hc
:
RegisterEffect
(
e1
)
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
if
tc1
:
RegisterEffect
(
e1
)
and
tc2
and
tc2
:
IsFaceup
()
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetValue
(
lv
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
tc
2
:
RegisterEffect
(
e2
)
end
end
end
c46961802.lua
View file @
1cf86b67
...
...
@@ -2,60 +2,49 @@
function
c46961802
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
46961802
,
0
))
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
aux
.
bpcon
)
e1
:
SetTarget
(
c46961802
.
target
)
e1
:
SetOperation
(
c46961802
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c46961802
.
filter1
(
c
,
tp
)
return
c
:
Is
Faceup
()
and
Duel
.
IsExistingTarget
(
c46961802
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
c
:
GetAttack
())
return
c
:
Is
AttackPos
()
and
Duel
.
IsExistingTarget
(
c46961802
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
c
:
GetAttack
())
end
function
c46961802
.
filter2
(
c
,
atk
)
return
c
:
IsFaceup
()
and
c
:
IsAttack
(
atk
)
return
c
:
IsAttackPos
()
and
c
:
IsAttack
(
atk
)
end
function
c46961802
.
tgfilter
(
c
,
e
)
return
c
:
IsAttackPos
()
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c46961802
.
gcheck
(
g
)
return
g
:
GetFirst
():
GetAttack
()
==
g
:
GetNext
():
GetAttack
()
end
function
c46961802
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c46961802
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c46961802
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c46961802
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
g1
:
GetFirst
(),
g1
:
GetFirst
():
GetAttack
()
)
local
g
=
Duel
.
GetMatchingGroup
(
c46961802
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
c46961802
.
gcheck
,
false
,
2
,
2
)
Duel
.
SetTargetCard
(
sg
)
end
function
c46961802
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
Get
ChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc1
=
g
:
GetFirst
()
local
tc2
=
g
:
GetNext
(
)
if
tc1
:
IsFacedown
()
or
tc2
:
IsFacedown
()
or
not
tc1
:
IsRelateToEffect
(
e
)
or
not
tc2
:
IsRelateToEffect
(
e
)
or
not
tc1
:
IsAttack
(
tc2
:
GetAttack
())
then
return
end
local
g
=
Duel
.
Get
TargetsRelateToChain
(
)
if
#
g
<
2
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
46961802
,
1
)
)
local
tc1
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
(
)
local
tc2
=
(
g
-
tc1
):
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc1
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc2
:
RegisterEffect
(
e2
)
tc1
:
RegisterFlagEffect
(
46961802
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
tc2
:
RegisterFlagEffect
(
46961802
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e3
:
SetOperation
(
c46961802
.
atop
)
e3
:
SetLabelObject
(
tc2
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc1
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetLabelObject
(
tc1
)
tc2
:
RegisterEffect
(
e4
)
end
function
c46961802
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
oc
=
e
:
GetLabelObject
()
if
oc
:
GetFlagEffect
(
46961802
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetOwner
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
oc
:
RegisterEffect
(
e1
,
true
)
end
end
c56535497.lua
View file @
1cf86b67
...
...
@@ -19,37 +19,42 @@ function c56535497.initial_effect(c)
e2
:
SetOperation
(
c56535497
.
operation
)
c
:
RegisterEffect
(
e2
)
end
function
c56535497
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_BEAST
)
end
function
c56535497
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
if
Duel
.
GetTurnPlayer
()
==
tp
then
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
else
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
and
aux
.
dscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
function
c56535497
.
filter
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_BEAST
)
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c56535497
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttackAbove
(
1
)
end
function
c56535497
.
gcheck
(
g
)
return
g
:
IsExists
(
c56535497
.
atkfilter
,
1
,
nil
)
end
function
c56535497
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c56535497
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
56535497
,
2
))
local
rg
=
Duel
.
SelectTarget
(
tp
,
c56535497
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
e
:
SetLabelObject
(
rg
:
GetFirst
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
56535497
,
3
))
Duel
.
SelectTarget
(
tp
,
c56535497
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
rg
:
GetFirst
())
local
g
=
Duel
.
GetMatchingGroup
(
c56535497
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
e
)
if
chk
==
0
then
return
#
g
>=
2
and
g
:
IsExists
(
c56535497
.
atkfilter
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
c56535497
.
gcheck
,
false
,
2
,
2
)
Duel
.
SetTargetCard
(
sg
)
end
function
c56535497
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc1
=
e
:
GetLabelObject
()
local
g
=
Duel
.
GetTargetsRelateToChain
()
if
#
g
<
2
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
56535497
,
2
))
local
tc1
=
g
:
FilterSelect
(
tp
,
c56535497
.
atkfilter
,
1
,
1
,
nil
):
GetFirst
()
if
not
tc1
then
return
end
local
tc2
=
g
:
GetFirst
()
if
tc1
==
tc2
then
tc2
=
g
:
GetNext
()
end
if
tc1
:
IsFaceup
()
and
tc1
:
IsRelateToEffect
(
e
)
and
tc2
:
IsFaceup
()
and
tc2
:
IsRelateToEffect
(
e
)
then
local
tc2
=
(
g
-
tc1
):
GetFirst
()
local
atk
=
math.ceil
(
tc1
:
GetAttack
()
/
2
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc1
:
RegisterEffect
(
e1
)
if
tc1
:
RegisterEffect
(
e1
)
and
tc2
and
tc2
:
IsFaceup
()
then
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
...
...
c58995660.lua
View file @
1cf86b67
...
...
@@ -32,14 +32,13 @@ end
function
s
.
effop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
not
tc
:
IsRelateToChain
()
then
return
end
local
d
=
0
if
e
:
GetLabel
()
==
1
then
if
not
tc
:
IsRelateToChain
()
then
return
end
d
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
id
,
1
),
aux
.
Stringid
(
id
,
2
),
aux
.
Stringid
(
id
,
3
))
+
1
else
d
=
Duel
.
TossDice
(
tp
,
1
)
end
if
not
tc
:
IsRelateToChain
()
then
return
end
if
d
==
1
or
d
==
4
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
4
))
...
...
c63136489.lua
View file @
1cf86b67
...
...
@@ -63,7 +63,6 @@ function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
end
function
s
.
gyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
op
=
e
:
GetLabel
()
if
op
==
1
then
...
...
c64038662.lua
View file @
1cf86b67
...
...
@@ -32,20 +32,14 @@ function c64038662.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local
b1
=
Duel
.
IsExistingTarget
(
c64038662
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
2
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
local
b2
=
Duel
.
IsExistingTarget
(
c64038662
.
filter2
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
b1
or
b2
end
local
op
=
0
if
b1
and
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
64038662
,
2
),
aux
.
Stringid
(
64038662
,
3
))
+
1
elseif
b1
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
64038662
,
2
))
+
1
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
64038662
,
3
))
+
2
end
local
op
=
aux
.
SelectFromOptions
(
tp
,
{
b1
,
aux
.
Stringid
(
64038662
,
2
),
1
},
{
b2
,
aux
.
Stringid
(
64038662
,
3
),
2
})
e
:
SetLabel
(
op
)
if
op
==
1
then
e
:
SetCategory
(
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
64038662
,
4
))
local
g1
=
Duel
.
SelectTarget
(
tp
,
c64038662
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c64038662
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
g1
:
GetFirst
())
e
:
SetLabelObject
(
g1
:
GetFirst
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c64038662
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
2
,
2
,
nil
)
else
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
...
...
@@ -55,11 +49,13 @@ function c64038662.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function
c64038662
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
1
then
local
tc1
=
e
:
GetLabelObject
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc2
=
g
:
GetFirst
()
if
tc1
==
tc2
then
tc2
=
g
:
GetNext
()
end
if
tc1
:
IsFaceup
()
and
tc2
:
IsFaceup
()
and
tc1
:
IsRelateToEffect
(
e
)
and
tc2
:
IsRelateToEffect
(
e
)
and
Duel
.
Equip
(
tp
,
tc1
,
tc2
,
false
)
then
local
g
=
Duel
.
GetTargetsRelateToChain
()
if
g
:
FilterCount
(
Card
.
IsFaceup
,
nil
)
<
2
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
64038662
,
4
))
local
tc1
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
tc2
=
(
g
-
tc1
):
GetFirst
()
if
Duel
.
Equip
(
tp
,
tc1
,
tc2
,
false
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
...
...
c67712104.lua
View file @
1cf86b67
...
...
@@ -72,7 +72,8 @@ function c67712104.indcon(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
if
at
==
c
then
return
true
end
local
lg
=
c
:
GetLinkedGroup
()
return
at
and
at
:
IsControler
(
tp
)
and
at
:
IsFaceup
()
and
at
:
IsSetCard
(
0x12b
)
and
lg
:
IsContains
(
at
)
return
at
:
IsControler
(
tp
)
and
at
:
IsFaceup
()
and
at
:
IsSetCard
(
0x12b
)
and
at
:
IsType
(
TYPE_LINK
)
and
lg
:
IsContains
(
at
)
end
function
c67712104
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0x12b
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
...
...
c72859417.lua
View file @
1cf86b67
...
...
@@ -30,38 +30,28 @@ end
function
c72859417
.
ovfilter
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_WINDBEAST
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c72859417
.
fselect
(
g
)
function
c72859417
.
gcheck
(
g
)
return
g
:
IsExists
(
Card
.
IsCanOverlay
,
1
,
nil
)
end
function
c72859417
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
g
=
Duel
.
GetMatchingGroup
(
c72859417
.
ovfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
g
:
CheckSubGroup
(
c72859417
.
fselect
,
2
,
2
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c72859417
.
ovfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
if
chk
==
0
then
return
g
:
CheckSubGroup
(
c72859417
.
gcheck
,
2
,
2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
c72859417
.
fselect
,
false
,
2
,
2
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
c72859417
.
gcheck
,
false
,
2
,
2
)
Duel
.
SetTargetCard
(
sg
)
end
function
c72859417
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
c1
=
g
:
GetFirst
()
local
c2
=
g
:
GetNext
()
if
not
c1
:
IsRelateToEffect
(
e
)
or
not
c2
:
IsRelateToEffect
(
e
)
then
return
end
if
c1
:
IsImmuneToEffect
(
e
)
or
c2
:
IsImmuneToEffect
(
e
)
then
return
end
local
b1
=
c1
:
IsCanOverlay
()
local
b2
=
c2
:
IsCanOverlay
()
if
not
b1
and
not
b2
then
return
end
if
not
(
b1
and
b2
)
then
if
not
b1
and
b2
then
c1
,
c2
=
c2
,
c1
end
else
local
g
=
Duel
.
GetTargetsRelateToChain
()
if
#
g
<
2
then
return
end
if
g
:
IsExists
(
Card
.
IsImmuneToEffect
,
1
,
nil
,
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
c1
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
c2
=
g
:
Filter
(
aux
.
TRUE
,
c1
):
GetFirst
()
end
local
c1
=
g
:
FilterSelect
(
tp
,
Card
.
IsCanOverlay
,
1
,
1
,
nil
):
GetFirst
()
if
not
c1
then
return
end
local
c2
=
(
g
-
c1
):
GetFirst
()
local
mg
=
c1
:
GetOverlayGroup
()
if
mg
:
GetCount
()
>
0
then
Duel
.
Overlay
(
c2
,
mg
,
false
)
end
Duel
.
Overlay
(
c2
,
Group
.
FromCards
(
c1
)
)
Duel
.
Overlay
(
c2
,
c1
)
end
function
c72859417
.
drfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetOverlayCount
()
>=
3
...
...
c74631897.lua
View file @
1cf86b67
...
...
@@ -92,6 +92,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
tc2
=
g
:
SelectUnselect
(
nil
,
tp
,
false
,
true
,
1
,
1
)
if
tc2
then
tc2
:
RegisterFlagEffect
(
id
+
o
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
local
sg
=
Group
.
FromCards
(
tc
,
tc2
)
sg
:
KeepAlive
()
e
:
SetLabelObject
(
sg
)
...
...
@@ -100,12 +101,15 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
return
false
end
function
s
.
disfilter
(
c
)
return
c
:
GetFlagEffect
(
id
+
o
)
==
0
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
e
:
GetHandler
():
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
g
=
e
:
GetLabelObject
()
local
hg
=
g
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
g
:
Sub
(
h
g
)
Duel
.
SendtoGrave
(
h
g
,
REASON_SPSUMMON
+
REASON_DISCARD
)
local
dg
=
g
:
Filter
(
s
.
disfilter
,
nil
)
g
:
Sub
(
d
g
)
Duel
.
SendtoGrave
(
d
g
,
REASON_SPSUMMON
+
REASON_DISCARD
)
Duel
.
Release
(
g
,
REASON_SPSUMMON
)
g
:
DeleteGroup
()
end
...
...
c7628844.lua
View file @
1cf86b67
...
...
@@ -13,6 +13,7 @@ function s.initial_effect(c)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
aux
.
dscon
)
e1
:
SetCost
(
s
.
discost
)
e1
:
SetTarget
(
s
.
distg
)
e1
:
SetOperation
(
s
.
disop
)
...
...
c77124096.lua
View file @
1cf86b67
...
...
@@ -17,6 +17,7 @@ function s.initial_effect(c)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_FUSION_SUMMON
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetLabelObject
(
e0
)
e1
:
SetOperation
(
s
.
operation
)
...
...
c79016563.lua
View file @
1cf86b67
...
...
@@ -50,35 +50,40 @@ function c79016563.atkcon(e,tp,eg,ep,ev,re,r,rp)
return
aux
.
dscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
e
:
GetHandler
():
GetMutualLinkedGroupCount
()
>=
2
end
function
c79016563
.
tgfilter
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c79016563
.
gcheck
(
g
)
return
g
:
IsExists
(
Card
.
IsAttackAbove
,
1
,
nil
,
1
)
end
function
c79016563
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
2
,
2
,
nil
)
if
chkc
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c79016563
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
if
chk
==
0
then
return
g
:
CheckSubGroup
(
c79016563
.
gcheck
,
2
,
2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
c79016563
.
gcheck
,
false
,
2
,
2
)
Duel
.
SetTargetCard
(
sg
)
end
function
c79016563
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc1
=
g
:
GetFirst
()
local
tc2
=
g
:
GetNext
()
if
tc1
:
IsFaceup
()
and
tc1
:
IsRelateToEffect
(
e
)
and
tc2
:
IsFaceup
()
and
tc2
:
IsRelateToEffect
(
e
)
then
local
g
=
Duel
.
GetTargetsRelateToChain
()
if
g
:
FilterCount
(
Card
.
IsFaceup
,
nil
)
<
2
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
79016563
,
2
))
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
atk
=
sg
:
GetFirst
():
GetAttack
()
local
tc1
=
g
:
FilterSelect
(
tp
,
Card
.
IsAttackAbove
,
1
,
1
,
nil
,
1
):
GetFirst
()
local
tc2
=
(
g
-
tc1
):
GetFirst
()
local
atk
=
tc1
:
GetAttack
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
math.ceil
(
atk
/
2
))
if
sg
:
GetFirst
()
:
RegisterEffect
(
e1
)
then
if
tc1
:
RegisterEffect
(
e1
)
then
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetValue
(
math.ceil
(
atk
/
2
))
if
sg
:
GetFirst
()
==
tc1
then
tc2
:
RegisterEffect
(
e2
)
else
tc1
:
RegisterEffect
(
e2
)
end
end
tc2
:
RegisterEffect
(
e2
)
end
end
c98918572.lua
View file @
1cf86b67
...
...
@@ -43,27 +43,32 @@ function c98918572.rop(e,tp,eg,ep,ev,re,r,rp)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c98918572
.
rfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
rc
,
min
,
tp
)
return
tg
:
GetFirst
():
RemoveOverlayCard
(
tp
,
min
,
max
,
REASON_EFFECT
)
end
function
c98918572
.
xyzfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0xf1
)
function
c98918572
.
xyzfilter
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0xf1
)
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c98918572
.
gcheck
(
g
)
return
g
:
IsExists
(
Card
.
IsCanOverlay
,
1
,
nil
)
end
function
c98918572
.
xyztg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c98918572
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
98918572
,
1
))
Duel
.
SelectTarget
(
tp
,
c98918572
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
2
,
2
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c98918572
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
if
chk
==
0
then
return
g
:
CheckSubGroup
(
c98918572
.
gcheck
,
2
,
2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
c98918572
.
gcheck
,
false
,
2
,
2
)
Duel
.
SetTargetCard
(
sg
)
end
function
c98918572
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
Get
ChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
local
g
=
Duel
.
Get
TargetsRelateToChain
(
)
if
g
:
GetCount
()
~=
2
then
return
end
if
g
:
IsExists
(
Card
.
IsImmuneToEffect
,
1
,
nil
,
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
xc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
g
:
RemoveCard
(
xc
)
local
tc
=
g
:
GetFirst
()
if
not
tc
:
IsImmuneToEffect
(
e
)
then
local
xc
=
g
:
FilterSelect
(
tp
,
Card
.
IsCanOverlay
,
1
,
1
,
nil
):
GetFirst
()
if
xc
then
local
tc
=
(
g
-
xc
):
GetFirst
()
local
og
=
xc
:
GetOverlayGroup
()
if
og
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
end
Duel
.
Overlay
(
tc
,
Group
.
FromCards
(
xc
)
)
Duel
.
Overlay
(
tc
,
xc
)
end
end
c99890852.lua
View file @
1cf86b67
...
...
@@ -13,32 +13,44 @@ function c99890852.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c99890852
.
filter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfb
)
and
c
:
IsAbleToHand
()
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
)
return
c99890852
.
thfilter
(
c
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
)
end
function
c99890852
.
thfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfb
)
and
c
:
IsControler
(
tp
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsExtraDeckMonster
()
end
function
c99890852
.
gcheck
(
g
,
tp
)
return
g
:
IsExists
(
c99890852
.
thfilter
,
1
,
nil
,
tp
)
end
function
c99890852
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c99890852
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c99890852
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
e
:
SetLabelObject
(
g
:
GetFirst
()
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Se
lectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
g
=
g
:
Filter
(
Card
.
IsCanBeEffectTarget
,
nil
,
e
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
c99890852
.
gcheck
,
false
,
2
,
2
,
tp
)
Duel
.
Se
tTargetCard
(
s
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
0
,
0
)
end
function
c99890852
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
~=
2
then
return
end
local
hc
=
g
:
GetFirst
()
local
tc
=
g
:
GetNext
()
if
hc
~=
e
:
GetLabelObject
()
then
tc
,
hc
=
hc
,
tc
end
if
hc
:
IsFaceup
()
and
tc
:
IsFaceup
()
and
Duel
.
SendtoHand
(
hc
,
nil
,
REASON_EFFECT
)
~=
0
then
local
atk
=
hc
:
GetBaseAttack
()
local
g
=
Duel
.
GetTargetsRelateToChain
()
if
#
g
==
0
then
return
end
local
tg
=
g
:
Filter
(
c99890852
.
thfilter
,
nil
,
tp
)
local
tc1
=
tg
:
GetFirst
()
if
#
tg
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
tc1
=
tg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
end
if
not
tc1
then
return
end
local
tc2
=
(
g
-
tc1
):
GetFirst
()
if
Duel
.
SendtoHand
(
tc1
,
nil
,
REASON_EFFECT
)
~=
0
and
tc2
and
tc2
:
IsFaceup
()
then
local
atk
=
tc1
:
GetBaseAttack
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
tc
2
:
RegisterEffect
(
e1
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment