Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alstroemeria-silentlove
ygopro-222DIY-cards
Commits
cb1d8010
Commit
cb1d8010
authored
Dec 23, 2025
by
Huangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3a7d3cee
Pipeline
#42127
failed with stages
in 3 minutes and 40 seconds
Changes
20
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
281 additions
and
201 deletions
+281
-201
expansions/script/c11602210.lua
expansions/script/c11602210.lua
+2
-3
expansions/script/c11602265.lua
expansions/script/c11602265.lua
+1
-1
expansions/script/c11602280.lua
expansions/script/c11602280.lua
+1
-1
expansions/script/c16170050.lua
expansions/script/c16170050.lua
+12
-7
expansions/script/c16170061.lua
expansions/script/c16170061.lua
+18
-8
expansions/script/c16170062.lua
expansions/script/c16170062.lua
+16
-7
expansions/script/c16172073.lua
expansions/script/c16172073.lua
+23
-3
expansions/script/c21379150.lua
expansions/script/c21379150.lua
+26
-21
expansions/script/c32500170.lua
expansions/script/c32500170.lua
+1
-1
expansions/script/c3435017.lua
expansions/script/c3435017.lua
+22
-27
expansions/script/c3435018.lua
expansions/script/c3435018.lua
+24
-27
expansions/script/c40020355.lua
expansions/script/c40020355.lua
+11
-5
expansions/script/c40020357.lua
expansions/script/c40020357.lua
+30
-25
expansions/script/c40020359.lua
expansions/script/c40020359.lua
+17
-16
expansions/script/c40020361.lua
expansions/script/c40020361.lua
+52
-37
expansions/script/c40020367.lua
expansions/script/c40020367.lua
+1
-1
expansions/script/c40020380.lua
expansions/script/c40020380.lua
+15
-4
expansions/script/c40020385.lua
expansions/script/c40020385.lua
+7
-5
expansions/script/c61200302.lua
expansions/script/c61200302.lua
+1
-1
expansions/script/c64833525.lua
expansions/script/c64833525.lua
+1
-1
No files found.
expansions/script/c11602210.lua
View file @
cb1d8010
...
@@ -50,9 +50,8 @@ function c11602210.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -50,9 +50,8 @@ function c11602210.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c11602210
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c11602210
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
rp
==
tp
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
rp
==
tp
and
rc
:
IsSetCard
(
0x9548
)
and
rc
:
IsAllTypes
(
TYPE_SPELL
)
or
rc
:
IsAllTypes
(
TYPE_TRAP
)
or
rc
:
IsType
(
TYPE_QUICKPLAY
)
and
(
rc
:
IsAllTypes
(
TYPE_SPELL
)
or
rc
:
IsAllTypes
(
TYPE_TRAP
)
or
rc
:
IsType
(
TYPE_QUICKPLAY
))
and
rc
:
IsSetCard
(
0x9548
)
end
end
function
c11602210
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c11602210
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c11602265.lua
View file @
cb1d8010
...
@@ -53,7 +53,7 @@ function c11602265.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -53,7 +53,7 @@ function c11602265.op(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
e
:
GetHandler
():
GetBattleTarget
()
local
tc
=
e
:
GetHandler
():
GetBattleTarget
()
local
code
=
tc
:
GetCode
()
local
code
=
tc
:
GetCode
()
--act limit
--act limit
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
()
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
...
...
expansions/script/c11602280.lua
View file @
cb1d8010
...
@@ -119,7 +119,7 @@ function c11602280.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -119,7 +119,7 @@ function c11602280.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
function
c11602280
.
cfilter
(
c
,
tp
)
function
c11602280
.
cfilter
(
c
,
tp
)
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetReasonPlayer
()
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetReasonPlayer
()
==
1
-
tp
end
end
function
c11602280
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c11602280
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c16170050.lua
View file @
cb1d8010
...
@@ -27,6 +27,15 @@ function cm.initial_effect(c)
...
@@ -27,6 +27,15 @@ function cm.initial_effect(c)
e1
:
SetOperation
(
cm
.
cpop
)
e1
:
SetOperation
(
cm
.
cpop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
check_effect_usable
(
e
,
te
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
return
e
:
IsActivatable
(
tp
,
true
)
else
local
tg
=
e
:
GetTarget
()
or
aux
.
TRUE
local
op
=
e
:
GetOperation
()
return
op
~=
nil
and
tg
(
te
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
end
end
function
cm
.
rlcheck2
(
c
,
tp
)
function
cm
.
rlcheck2
(
c
,
tp
)
if
not
c
:
IsLocation
(
LOCATION_DECK
)
then
return
false
end
if
not
c
:
IsLocation
(
LOCATION_DECK
)
then
return
false
end
if
not
c
:
IsSetCard
(
0x3cc7
)
or
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
16170021
)
then
return
false
end
if
not
c
:
IsSetCard
(
0x3cc7
)
or
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
16170021
)
then
return
false
end
...
@@ -108,10 +117,8 @@ function cm.cpfilter(c,e,tp,eg,ep,ev,re,r,rp)
...
@@ -108,10 +117,8 @@ function cm.cpfilter(c,e,tp,eg,ep,ev,re,r,rp)
local
tab
=
c
.
activate_effect
local
tab
=
c
.
activate_effect
if
not
c
:
IsSetCard
(
0x3cc7
)
or
not
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
or
not
c
:
IsFaceupEx
()
then
return
false
end
if
not
c
:
IsSetCard
(
0x3cc7
)
or
not
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
or
not
c
:
IsFaceupEx
()
then
return
false
end
if
not
tab
then
return
false
end
if
not
tab
then
return
false
end
for
_
,
te
in
ipairs
(
tab
)
do
for
_
,
te
in
ipairs
(
tab
)
do
local
con
=
te
:
GetCondition
()
or
aux
.
TRUE
if
cm
.
check_effect_usable
(
te
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
local
tg
=
te
:
GetTarget
()
or
aux
.
TRUE
if
te
:
GetOperation
()
and
((
te
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
(
te
:
GetCode
()
==
EVENT_CHAINING
or
te
:
GetCode
()
==
EVENT_FREE_CHAIN
))
or
not
te
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
and
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
then
return
true
return
true
end
end
end
end
...
@@ -132,9 +139,7 @@ function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -132,9 +139,7 @@ function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local
desc_tab
=
{}
local
desc_tab
=
{}
if
not
tab
then
return
false
end
if
not
tab
then
return
false
end
for
_
,
te
in
ipairs
(
tab
)
do
for
_
,
te
in
ipairs
(
tab
)
do
local
con
=
te
:
GetCondition
()
or
aux
.
TRUE
if
cm
.
check_effect_usable
(
te
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
local
tg
=
te
:
GetTarget
()
or
aux
.
TRUE
if
te
:
GetOperation
()
and
((
te
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
(
te
:
GetCode
()
==
EVENT_CHAINING
or
te
:
GetCode
()
==
EVENT_FREE_CHAIN
))
or
not
te
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
and
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
then
table.insert
(
res_tab
,
te
)
table.insert
(
res_tab
,
te
)
table.insert
(
desc_tab
,
te
:
GetDescription
())
table.insert
(
desc_tab
,
te
:
GetDescription
())
end
end
...
...
expansions/script/c16170061.lua
View file @
cb1d8010
...
@@ -33,7 +33,7 @@ function cm.initial_effect(c)
...
@@ -33,7 +33,7 @@ function cm.initial_effect(c)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e4
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e4
:
SetCountLimit
(
1
,
m
)
e4
:
SetCountLimit
(
1
,
m
+
1
)
e4
:
SetTarget
(
cm
.
cptg
)
e4
:
SetTarget
(
cm
.
cptg
)
e4
:
SetOperation
(
cm
.
cpop
)
e4
:
SetOperation
(
cm
.
cpop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
...
@@ -43,11 +43,15 @@ function cm.initial_effect(c)
...
@@ -43,11 +43,15 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e4
:
Clone
()
local
e6
=
e4
:
Clone
()
e6
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e6
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e6
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_FIELD
)
e6
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e6
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e6
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
c
:
RegisterEffect
(
e6
)
c
:
RegisterEffect
(
e6
)
local
e7
=
e4
:
Clone
()
local
e7
=
e4
:
Clone
()
e7
:
SetDescription
(
aux
.
Stringid
(
m
,
4
))
e7
:
SetDescription
(
aux
.
Stringid
(
m
,
4
))
e7
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_FIELD
)
e7
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e7
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e7
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
c
:
RegisterEffect
(
e7
)
c
:
RegisterEffect
(
e7
)
local
e8
=
e4
:
Clone
()
local
e8
=
e4
:
Clone
()
e8
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
e8
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
...
@@ -78,7 +82,7 @@ function cm.scost(e,c,tp)
...
@@ -78,7 +82,7 @@ function cm.scost(e,c,tp)
end
end
function
cm
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
rlcheck
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
rlcheck
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
()
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
Release
(
g
,
REASON_COST
)
end
end
function
cm
.
rlcheck2
(
c
,
tp
)
function
cm
.
rlcheck2
(
c
,
tp
)
...
@@ -131,14 +135,22 @@ function cm.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -131,14 +135,22 @@ function cm.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
end
function
cm
.
check_effect_usable
(
e
,
te
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
e
:
GetTarget
()
or
aux
.
TRUE
local
op
=
e
:
GetOperation
()
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
if
(
te
:
GetCode
()
==
e
:
GetCode
()
and
Duel
.
CheckEvent
(
e
:
GetCode
()))
then
return
e
:
IsActivatable
(
tp
,
true
)
end
end
return
op
and
tg
(
te
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
end
function
cm
.
cpfilter
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
cpfilter
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tab
=
c
.
activate_effect
local
tab
=
c
.
activate_effect
if
not
c
:
IsSetCard
(
0x3cc7
)
or
not
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
then
return
false
end
if
not
c
:
IsSetCard
(
0x3cc7
)
or
not
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
then
return
false
end
if
not
tab
then
return
false
end
if
not
tab
then
return
false
end
for
_
,
te
in
ipairs
(
tab
)
do
for
_
,
te
in
ipairs
(
tab
)
do
local
con
=
te
:
GetCondition
()
or
aux
.
TRUE
if
cm
.
check_effect_usable
(
te
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
local
tg
=
te
:
GetTarget
()
or
aux
.
TRUE
if
te
:
GetOperation
()
and
(
Duel
.
CheckEvent
(
te
:
GetCode
())
or
not
te
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
(
te
:
GetCode
()
==
EVENT_FREE_CHAIN
and
e
:
GetCode
()
==
EVENT_FREE_CHAIN
))
and
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
then
return
true
return
true
end
end
end
end
...
@@ -159,9 +171,7 @@ function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -159,9 +171,7 @@ function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local
desc_tab
=
{}
local
desc_tab
=
{}
if
not
tab
then
return
false
end
if
not
tab
then
return
false
end
for
_
,
te
in
ipairs
(
tab
)
do
for
_
,
te
in
ipairs
(
tab
)
do
local
con
=
te
:
GetCondition
()
or
aux
.
TRUE
if
cm
.
check_effect_usable
(
te
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
local
tg
=
te
:
GetTarget
()
or
aux
.
TRUE
if
te
:
GetOperation
()
and
(
Duel
.
CheckEvent
(
te
:
GetCode
())
or
not
te
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
(
te
:
GetCode
()
==
EVENT_FREE_CHAIN
and
e
:
GetCode
()
==
EVENT_FREE_CHAIN
))
and
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
then
table.insert
(
res_tab
,
te
)
table.insert
(
res_tab
,
te
)
table.insert
(
desc_tab
,
te
:
GetDescription
())
table.insert
(
desc_tab
,
te
:
GetDescription
())
end
end
...
...
expansions/script/c16170062.lua
View file @
cb1d8010
...
@@ -42,11 +42,15 @@ function cm.initial_effect(c)
...
@@ -42,11 +42,15 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e4
:
Clone
()
local
e6
=
e4
:
Clone
()
e6
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e6
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e6
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_FIELD
)
e6
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e6
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e6
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
c
:
RegisterEffect
(
e6
)
c
:
RegisterEffect
(
e6
)
local
e7
=
e4
:
Clone
()
local
e7
=
e4
:
Clone
()
e7
:
SetDescription
(
aux
.
Stringid
(
m
,
4
))
e7
:
SetDescription
(
aux
.
Stringid
(
m
,
4
))
e7
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_FIELD
)
e7
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e7
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e7
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
c
:
RegisterEffect
(
e7
)
c
:
RegisterEffect
(
e7
)
local
e8
=
e4
:
Clone
()
local
e8
=
e4
:
Clone
()
e8
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
e8
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
...
@@ -123,14 +127,22 @@ function cm.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -123,14 +127,22 @@ function cm.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
end
function
cm
.
check_effect_usable
(
e
,
te
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
e
:
GetTarget
()
or
aux
.
TRUE
local
op
=
e
:
GetOperation
()
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
if
(
te
:
GetCode
()
==
e
:
GetCode
()
and
Duel
.
CheckEvent
(
e
:
GetCode
()))
then
return
e
:
IsActivatable
(
tp
,
true
)
end
end
return
op
and
tg
(
te
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
end
function
cm
.
cpfilter
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
cpfilter
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tab
=
c
.
activate_effect
local
tab
=
c
.
activate_effect
if
not
c
:
IsSetCard
(
0x3cc7
)
or
not
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
then
return
false
end
if
not
c
:
IsSetCard
(
0x3cc7
)
or
not
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
then
return
false
end
if
not
tab
then
return
false
end
if
not
tab
then
return
false
end
for
_
,
te
in
ipairs
(
tab
)
do
for
_
,
te
in
ipairs
(
tab
)
do
local
con
=
te
:
GetCondition
()
or
aux
.
TRUE
if
cm
.
check_effect_usable
(
te
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
local
tg
=
te
:
GetTarget
()
or
aux
.
TRUE
if
te
:
GetOperation
()
and
(
Duel
.
CheckEvent
(
te
:
GetCode
())
or
not
te
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
(
te
:
GetCode
()
==
EVENT_FREE_CHAIN
and
e
:
GetCode
()
==
EVENT_FREE_CHAIN
))
and
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
then
return
true
return
true
end
end
end
end
...
@@ -149,11 +161,8 @@ function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -149,11 +161,8 @@ function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local
tab
=
tc
.
activate_effect
local
tab
=
tc
.
activate_effect
local
res_tab
=
{}
local
res_tab
=
{}
local
desc_tab
=
{}
local
desc_tab
=
{}
if
not
tab
then
return
false
end
for
_
,
te
in
ipairs
(
tab
)
do
for
_
,
te
in
ipairs
(
tab
)
do
local
con
=
te
:
GetCondition
()
or
aux
.
TRUE
if
cm
.
check_effect_usable
(
te
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
local
tg
=
te
:
GetTarget
()
or
aux
.
TRUE
if
te
:
GetOperation
()
and
(
Duel
.
CheckEvent
(
te
:
GetCode
())
or
not
te
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
(
te
:
GetCode
()
==
EVENT_FREE_CHAIN
and
e
:
GetCode
()
==
EVENT_FREE_CHAIN
))
and
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
then
table.insert
(
res_tab
,
te
)
table.insert
(
res_tab
,
te
)
table.insert
(
desc_tab
,
te
:
GetDescription
())
table.insert
(
desc_tab
,
te
:
GetDescription
())
end
end
...
...
expansions/script/c16172073.lua
View file @
cb1d8010
...
@@ -3,6 +3,7 @@ local s,id,o=GetID()
...
@@ -3,6 +3,7 @@ local s,id,o=GetID()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--对玩家效果
--对玩家效果
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
...
@@ -16,6 +17,7 @@ function s.initial_effect(c)
...
@@ -16,6 +17,7 @@ function s.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--双倍战伤
--双倍战伤
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetRange
(
LOCATION_GRAVE
)
...
@@ -25,6 +27,20 @@ function s.initial_effect(c)
...
@@ -25,6 +27,20 @@ function s.initial_effect(c)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
s
.
activate_effect
=
{
e1
,
e2
,
e3
}
s
.
activate_effect
=
{
e1
,
e2
,
e3
}
local
e12
=
e1
:
Clone
()
e12
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_FIELD
)
e12
:
SetRange
(
LOCATION_GRAVE
)
e12
:
SetCost
(
s
.
cost
)
c
:
RegisterEffect
(
e12
)
local
e22
=
e2
:
Clone
()
e22
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_FIELD
)
e22
:
SetRange
(
LOCATION_GRAVE
)
e22
:
SetCost
(
s
.
cost
)
c
:
RegisterEffect
(
e22
)
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
16170067
)
>
0
end
Duel
.
ResetFlagEffect
(
tp
,
16170067
)
end
end
function
s
.
f1
(
c
)
function
s
.
f1
(
c
)
...
@@ -40,11 +56,15 @@ function s.f3(c,tp,race)
...
@@ -40,11 +56,15 @@ function s.f3(c,tp,race)
end
end
function
s
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
f1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
eg
:
IsExists
(
s
.
f2
,
1
,
nil
,
1
-
tp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
f1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
eg
and
eg
:
IsExists
(
s
.
f2
,
1
,
nil
,
1
-
tp
)
end
end
function
s
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
eg
:
Filter
(
s
.
f2
,
nil
,
1
-
tp
)
local
sg
=
Group
.
CreateGroup
()
if
eg
then
sg
=
eg
:
Clone
()
end
local
g
=
sg
:
Filter
(
s
.
f2
,
nil
,
1
-
tp
)
local
race
=
0
local
race
=
0
for
tc
in
aux
.
Next
(
g
)
do
for
tc
in
aux
.
Next
(
g
)
do
race
=
race
|
tc
:
GetRace
()
race
=
race
|
tc
:
GetRace
()
...
@@ -61,7 +81,7 @@ function s.op1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -61,7 +81,7 @@ function s.op1(e,tp,eg,ep,ev,re,r,rp)
race
=
race
|
tc
:
GetRace
()
race
=
race
|
tc
:
GetRace
()
end
end
local
g2
=
Duel
.
GetMatchingGroup
(
s
.
f3
,
tp
,
0
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
nil
,
tp
,
race
)
local
g2
=
Duel
.
GetMatchingGroup
(
s
.
f3
,
tp
,
0
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
nil
,
tp
,
race
)
Duel
.
Remove
(
g2
,
POS_FACE
DOWN
,
REASON_RULE
)
Duel
.
Remove
(
g2
,
POS_FACE
UP
,
REASON_RULE
)
end
end
function
s
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
...
...
expansions/script/c21379150.lua
View file @
cb1d8010
...
@@ -110,30 +110,35 @@ function c21379150.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -110,30 +110,35 @@ function c21379150.spop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sc
=
Duel
.
SelectMatchingCard
(
tp
,
c21379150
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
local
sc
=
Duel
.
SelectMatchingCard
(
tp
,
c21379150
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
sc
and
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
aux
.
NegateAnyFilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
21379150
,
0
))
then
-- 先校验 sc 特殊召唤成功
Duel
.
BreakEffect
()
if
sc
and
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
tc
=
Duel
.
SelectMatchingCard
(
tc
,
aux
.
NegateAnyFilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
):
GetFirst
()
local
hasNegate
=
Duel
.
IsExistingMatchingCard
(
aux
.
NegateAnyFilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
if
hasNegate
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
21379150
,
0
))
then
local
e1
=
Effect
.
CreateEffect
(
c
)
Duel
.
BreakEffect
()
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
-- 1. 选中待无效卡牌,定义为 g(合法 Card 对象)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NegateAnyFilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
):
GetFirst
()
e1
:
SetCode
(
EFFECT_DISABLE
)
-- 2. 关键:增加空值校验,避免传递 nil
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
if
not
g
then
return
end
tc
:
RegisterEffect
(
e1
)
-- 3. 统一变量名,传递 g(合法 Card 对象),不再用 tc
local
e2
=
e1
:
Clone
()
Duel
.
NegateRelatedChain
(
g
,
RESET_TURN_SET
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e2
:
SetValue
(
RESET_TURN_SET
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
tc
:
RegisterEffect
(
e2
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
e1
:
SetCode
(
EFFECT_DISABLE
)
local
e3
=
e1
:
Clone
()
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
g
:
RegisterEffect
(
e1
)
-- 传递 g(合法 Card)
tc
:
RegisterEffect
(
e3
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
g
:
RegisterEffect
(
e2
)
-- 传递 g(合法 Card)
if
g
:
IsType
(
TYPE_TRAPMONSTER
)
then
-- 传递 g(合法 Card)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
g
:
RegisterEffect
(
e3
)
-- 传递 g(合法 Card)
end
end
end
end
end
end
end
function
c21379150
.
rifilter
(
c
,
e
,
tp
)
return
c
==
e
:
GetHandler
()
end
function
c21379150
.
RitualUltimateFilter
(
c
,
filter
,
e
,
tp
,
m1
,
m2
,
level_function
,
greater_or_equal
,
chk
)
function
c21379150
.
RitualUltimateFilter
(
c
,
filter
,
e
,
tp
,
m1
,
m2
,
level_function
,
greater_or_equal
,
chk
)
if
(
filter
and
not
filter
(
c
,
e
,
tp
,
chk
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
if
(
filter
and
not
filter
(
c
,
e
,
tp
,
chk
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
local
mg
=
m1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
...
...
expansions/script/c32500170.lua
View file @
cb1d8010
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xd56
)
c
:
EnableCounterPermit
(
0xd56
)
aux
.
AddLinkProcedure
(
c
,
nil
,
3
,
nil
,
s
.
lcheck
)
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkRace
,
RACE_MACHINE
)
,
3
,
nil
,
s
.
lcheck
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
...
...
expansions/script/c3435017.lua
View file @
cb1d8010
...
@@ -84,8 +84,15 @@ end
...
@@ -84,8 +84,15 @@ end
-- 同调召唤条件检查
-- 同调召唤条件检查
function
c3435017
.
syncon
(
e
,
c
)
function
c3435017
.
syncon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCountFromEx
(
c
:
GetControler
(),
c
:
GetControler
(),
nil
,
c
)
>
0
local
tp
=
c
:
GetControler
()
and
Duel
.
IsExistingMatchingCard
(
c3435017
.
dreamfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
-- 检查是否有至少1只幻梦怪兽作为素材
local
g
=
Duel
.
GetMatchingGroup
(
c3435017
.
dreamfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
#
g
==
0
then
return
false
end
-- 计算当至少1只幻梦怪兽作为素材离场后,是否有足够的空间召唤同调怪兽
-- Duel.GetLocationCountFromEx的第三个参数传入素材组,会计算素材离场后腾出的空间
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
c
)
>
0
end
end
-- 同调素材选择目标
-- 同调素材选择目标
...
@@ -95,37 +102,25 @@ function c3435017.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c)
...
@@ -95,37 +102,25 @@ function c3435017.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c)
return
Duel
.
IsExistingMatchingCard
(
c3435017
.
dreamfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c3435017
.
dreamfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
--
让玩家必须选择至少1只幻梦怪兽和其他可选怪兽作为素材
--
合并选择:让玩家选择至少1只幻梦怪兽和0-14只其他怪兽
local
dream_g
=
Duel
.
GetMatchingGroup
(
c3435017
.
dreamfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
all_candidates
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
-- 创建一个过滤器,确保至少包含1只幻梦怪兽
-- 首先必须选择至少1只幻梦怪兽
local
function
checkFilter
(
sg
)
local
dream_selected
=
Duel
.
SelectMatchingCard
(
tp
,
c3435017
.
dreamfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
#
dream_g
,
nil
)
return
sg
:
FilterCount
(
c3435017
.
dreamfilter
,
nil
)
>=
1
end
if
#
dream_selected
==
0
then
return
false
end
-- 然后可以选择其他怪兽
local
selected
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
other_candidates
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
other_candidates
:
Sub
(
dream_selected
)
-- 移除已经选择的幻梦怪兽
-- 使用SelectSubGroup让玩家一次选择所有素材,同时确保至少1只幻梦怪兽
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
other_selected
=
Group
.
CreateGroup
()
selected
=
selected
:
SelectSubGroup
(
tp
,
checkFilter
,
false
,
1
,
15
)
-- 最多选择15只怪兽
if
#
other_candidates
>
0
then
other_selected
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
0
,
14
,
nil
)
-- 最多再选14只
end
-- 合并选择的怪兽
if
not
selected
or
#
selected
==
0
then
return
false
end
local
selected
=
Group
.
CreateGroup
()
selected
:
Merge
(
dream_selected
)
selected
:
Merge
(
other_selected
)
if
#
selected
>
0
then
selected
:
KeepAlive
()
selected
:
KeepAlive
()
e
:
SetLabelObject
(
selected
)
e
:
SetLabelObject
(
selected
)
return
true
return
true
else
return
false
end
end
end
-- 同调素材操作
-- 同调素材操作
...
...
expansions/script/c3435018.lua
View file @
cb1d8010
...
@@ -32,6 +32,8 @@ function c3435018.initial_effect(c)
...
@@ -32,6 +32,8 @@ function c3435018.initial_effect(c)
e2
:
SetCondition
(
c3435018
.
condition
)
e2
:
SetCondition
(
c3435018
.
condition
)
e2
:
SetTarget
(
c3435018
.
target
)
e2
:
SetTarget
(
c3435018
.
target
)
e2
:
SetOperation
(
c3435018
.
operation
)
e2
:
SetOperation
(
c3435018
.
operation
)
-- 效果发动及效果不会被无效化
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_INACTIVATE
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
-- 效果2:这张卡不会被对方的效果破坏
-- 效果2:这张卡不会被对方的效果破坏
...
@@ -54,8 +56,15 @@ end
...
@@ -54,8 +56,15 @@ end
-- 同调召唤条件检查
-- 同调召唤条件检查
function
c3435018
.
syncon
(
e
,
c
)
function
c3435018
.
syncon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCountFromEx
(
c
:
GetControler
(),
c
:
GetControler
(),
nil
,
c
)
>
0
local
tp
=
c
:
GetControler
()
and
Duel
.
IsExistingMatchingCard
(
c3435018
.
dreamfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
-- 检查是否有至少1只幻梦怪兽作为素材
local
g
=
Duel
.
GetMatchingGroup
(
c3435018
.
dreamfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
#
g
==
0
then
return
false
end
-- 计算当至少1只幻梦怪兽作为素材离场后,是否有足够的空间召唤同调怪兽
-- Duel.GetLocationCountFromEx的第三个参数传入素材组,会计算素材离场后腾出的空间
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
c
)
>
0
end
end
-- 同调素材选择目标
-- 同调素材选择目标
...
@@ -65,37 +74,25 @@ function c3435018.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c)
...
@@ -65,37 +74,25 @@ function c3435018.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c)
return
Duel
.
IsExistingMatchingCard
(
c3435018
.
dreamfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c3435018
.
dreamfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
-- 让玩家必须选择至少1只幻梦怪兽和其他可选怪兽作为素材
-- 合并选择:让玩家选择至少1只幻梦怪兽和0-14只其他怪兽
local
dream_g
=
Duel
.
GetMatchingGroup
(
c3435018
.
dreamfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
all_candidates
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
-- 首先必须选择至少1只幻梦怪兽
local
dream_selected
=
Duel
.
SelectMatchingCard
(
tp
,
c3435018
.
dreamfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
#
dream_g
,
nil
)
if
#
dream_selected
==
0
then
return
false
end
-- 创建一个过滤器,确保至少包含1只幻梦怪兽
local
function
checkFilter
(
sg
)
return
sg
:
FilterCount
(
c3435018
.
dreamfilter
,
nil
)
>=
1
end
-- 然后可以选择其他怪兽
local
selected
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
other_candidates
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
other_candidates
:
Sub
(
dream_selected
)
-- 移除已经选择的幻梦怪兽
-- 使用SelectSubGroup让玩家一次选择所有素材,同时确保至少1只幻梦怪兽
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
other_selected
=
Group
.
CreateGroup
()
selected
=
selected
:
SelectSubGroup
(
tp
,
checkFilter
,
false
,
1
,
15
)
-- 最多选择15只怪兽
if
#
other_candidates
>
0
then
other_selected
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
0
,
14
,
nil
)
-- 最多再选14只
end
-- 合并选择的怪兽
if
not
selected
or
#
selected
==
0
then
return
false
end
local
selected
=
Group
.
CreateGroup
()
selected
:
Merge
(
dream_selected
)
selected
:
Merge
(
other_selected
)
if
#
selected
>
0
then
selected
:
KeepAlive
()
selected
:
KeepAlive
()
e
:
SetLabelObject
(
selected
)
e
:
SetLabelObject
(
selected
)
return
true
return
true
else
return
false
end
end
end
-- 同调素材操作
-- 同调素材操作
...
...
expansions/script/c40020355.lua
View file @
cb1d8010
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
local
s
,
id
=
GetID
()
local
s
,
id
=
GetID
()
s
.
ui_hint_effect
=
s
.
ui_hint_effect
or
{}
s
.
ui_hint_effect
=
s
.
ui_hint_effect
or
{}
local
CORE_ID
=
40020353
local
CORE_ID
=
40020353
local
ArmedIntervention
=
CORE_ID
local
ArmedIntervention
=
CORE_ID
local
ArmedIntervention_UI
=
CORE_ID
+
10000
local
ArmedIntervention_UI
=
CORE_ID
+
10000
--CB
--CB
s
.
named_with_CelestialBeing
=
1
s
.
named_with_CelestialBeing
=
1
...
@@ -41,9 +41,10 @@ function s.initial_effect(c)
...
@@ -41,9 +41,10 @@ function s.initial_effect(c)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_
SINGLE
+
EFFECT_TYPE_
TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
id
+
100
)
e2
:
SetCountLimit
(
1
,
id
+
100
)
e2
:
SetTarget
(
s
.
thtg
)
e2
:
SetTarget
(
s
.
thtg
)
e2
:
SetOperation
(
s
.
thop
)
e2
:
SetOperation
(
s
.
thop
)
...
@@ -72,9 +73,14 @@ end
...
@@ -72,9 +73,14 @@ end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
loc
=
LOCATION_MZONE
local
loc
=
LOCATION_MZONE
if
aux
.
IsCanBeQuickEffect
(
c
,
tp
,
40020377
)
then
loc
=
LOCATION_ONFIELD
local
has_special_card
=
Duel
.
IsExistingMatchingCard
(
function
(
tc
)
return
tc
:
IsFaceup
()
and
tc
:
IsCode
(
40020377
)
end
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
if
has_special_card
then
loc
=
LOCATION_ONFIELD
end
end
if
chk
==
0
then
if
chk
==
0
then
...
...
expansions/script/c40020357.lua
View file @
cb1d8010
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
local
s
,
id
=
GetID
()
local
s
,
id
=
GetID
()
s
.
ui_hint_effect
=
s
.
ui_hint_effect
or
{}
s
.
ui_hint_effect
=
s
.
ui_hint_effect
or
{}
local
CORE_ID
=
40020353
local
CORE_ID
=
40020353
local
ArmedIntervention
=
CORE_ID
local
ArmedIntervention
=
CORE_ID
local
ArmedIntervention_UI
=
CORE_ID
+
10000
local
ArmedIntervention_UI
=
CORE_ID
+
10000
--CB
--CB
s
.
named_with_CelestialBeing
=
1
s
.
named_with_CelestialBeing
=
1
...
@@ -27,6 +27,7 @@ function s.Exia(c)
...
@@ -27,6 +27,7 @@ function s.Exia(c)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Exia
return
m
and
m
.
named_with_Exia
end
end
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
...
@@ -59,28 +60,29 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -59,28 +60,29 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local
owner
=
e
:
GetHandler
():
GetOwner
()
local
owner
=
e
:
GetHandler
():
GetOwner
()
return
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetFlagEffect
(
owner
,
ArmedIntervention
)
>=
7
return
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetFlagEffect
(
owner
,
ArmedIntervention
)
>=
7
end
end
function
s
.
costfilter
(
c
,
use_extended
)
function
s
.
costfilter
(
c
,
tp
,
loc
)
if
not
(
c
:
IsFaceup
()
and
c
:
IsReleasable
())
then
return
false
end
return
s
.
Exia
(
c
)
and
c
:
IsControler
(
tp
)
and
c
:
IsFaceup
()
and
c
:
IsReleasable
()
if
s
.
Exia
(
c
)
then
return
use_extended
or
c
:
IsType
(
TYPE_MONSTER
)
end
if
s
.
oo
(
c
)
then
return
c
:
IsType
(
TYPE_MONSTER
)
end
return
false
end
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
use_extended
=
aux
.
IsCanBeQuickEffect
(
c
,
tp
,
40020377
)
local
loc
=
LOCATION_MZONE
local
loc
=
LOCATION_MZONE
if
use_extended
then
loc
=
LOCATION_ONFIELD
end
local
has_special_card
=
Duel
.
IsExistingMatchingCard
(
function
(
tc
)
return
tc
:
IsFaceup
()
and
tc
:
IsCode
(
40020377
)
end
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
if
has_special_card
then
loc
=
LOCATION_ONFIELD
end
if
chk
==
0
then
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
costfilter
,
tp
,
loc
,
0
,
1
,
nil
,
use_extended
)
return
Duel
.
IsExistingMatchingCard
(
s
.
costfilter
,
tp
,
loc
,
0
,
1
,
nil
,
tp
,
loc
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
costfilter
,
tp
,
loc
,
0
,
1
,
1
,
nil
,
use_extended
)
local
rg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
costfilter
,
tp
,
loc
,
0
,
1
,
1
,
nil
,
tp
,
loc
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
Release
(
r
g
,
REASON_COST
)
end
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -122,7 +124,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -122,7 +124,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
s
.
tdfilter
(
c
)
function
s
.
tdfilter
(
c
)
return
(
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsLevelAbove
(
5
))
or
c
:
IsCode
(
40020383
)
and
c
:
IsAbleToDeck
()
return
(
(
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsLevelAbove
(
5
))
or
c
:
IsCode
(
40020383
)
)
and
c
:
IsAbleToDeck
()
end
end
function
s
.
lvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
lvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
@@ -132,12 +134,11 @@ function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -132,12 +134,11 @@ function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
s
.
descheck
(
g
,
lv_limit
)
function
s
.
descheck
(
g
,
lv_limit
)
local
sum
=
g
:
GetSum
(
function
(
c
)
local
sum
=
0
local
val
=
0
for
c
in
aux
.
Next
(
g
)
do
if
c
:
GetLevel
()
>
0
then
val
=
val
+
c
:
GetLevel
()
end
if
c
:
GetLevel
()
>
0
then
sum
=
sum
+
c
:
GetLevel
()
end
if
c
:
GetRank
()
>
0
then
val
=
val
+
c
:
GetRank
()
end
if
c
:
GetRank
()
>
0
then
sum
=
sum
+
c
:
GetRank
()
end
return
val
end
end
)
return
sum
<=
lv_limit
return
sum
<=
lv_limit
end
end
...
@@ -156,9 +157,13 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -156,9 +157,13 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetValue
(
3
)
e1
:
SetValue
(
3
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD_DISABLE
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
current_lv
=
c
:
GetLevel
()
local
current_lv
=
c
:
GetLevel
()
local
dg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
dg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
#
dg
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
3
))
then
if
#
dg
>
0
and
dg
:
CheckSubGroup
(
s
.
descheck
,
1
,
#
dg
,
current_lv
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
3
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
dg
:
SelectSubGroup
(
tp
,
s
.
descheck
,
false
,
1
,
#
dg
,
current_lv
)
local
sg
=
dg
:
SelectSubGroup
(
tp
,
s
.
descheck
,
false
,
1
,
#
dg
,
current_lv
)
if
sg
and
#
sg
>
0
then
if
sg
and
#
sg
>
0
then
...
@@ -169,4 +174,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -169,4 +174,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end
end
end
end
\ No newline at end of file
expansions/script/c40020359.lua
View file @
cb1d8010
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
local
s
,
id
=
GetID
()
local
s
,
id
=
GetID
()
s
.
ui_hint_effect
=
s
.
ui_hint_effect
or
{}
s
.
ui_hint_effect
=
s
.
ui_hint_effect
or
{}
local
CORE_ID
=
40020353
local
CORE_ID
=
40020353
local
ArmedIntervention
=
CORE_ID
local
ArmedIntervention
=
CORE_ID
local
ArmedIntervention_UI
=
CORE_ID
+
10000
local
ArmedIntervention_UI
=
CORE_ID
+
10000
--CB
--CB
s
.
named_with_CelestialBeing
=
1
s
.
named_with_CelestialBeing
=
1
...
@@ -56,28 +56,29 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -56,28 +56,29 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
and
Duel
.
GetFlagEffect
(
owner
,
ArmedIntervention
)
>=
5
and
Duel
.
GetFlagEffect
(
owner
,
ArmedIntervention
)
>=
5
end
end
function
s
.
costfilter
(
c
,
use_extended
)
function
s
.
costfilter
(
c
,
tp
,
loc
)
if
not
(
c
:
IsFaceup
()
and
c
:
IsReleasable
())
then
return
false
end
return
s
.
Exia
(
c
)
and
c
:
IsControler
(
tp
)
and
c
:
IsFaceup
()
and
c
:
IsReleasable
()
if
s
.
Exia
(
c
)
then
return
use_extended
or
c
:
IsType
(
TYPE_MONSTER
)
end
if
s
.
oo
(
c
)
then
return
c
:
IsType
(
TYPE_MONSTER
)
end
return
false
end
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
use_extended
=
aux
.
IsCanBeQuickEffect
(
c
,
tp
,
40020377
)
local
loc
=
LOCATION_MZONE
local
loc
=
LOCATION_MZONE
if
use_extended
then
loc
=
LOCATION_ONFIELD
end
local
has_special_card
=
Duel
.
IsExistingMatchingCard
(
function
(
tc
)
return
tc
:
IsFaceup
()
and
tc
:
IsCode
(
40020377
)
end
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
if
has_special_card
then
loc
=
LOCATION_ONFIELD
end
if
chk
==
0
then
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
costfilter
,
tp
,
loc
,
0
,
1
,
nil
,
use_extended
)
return
Duel
.
IsExistingMatchingCard
(
s
.
costfilter
,
tp
,
loc
,
0
,
1
,
nil
,
tp
,
loc
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
costfilter
,
tp
,
loc
,
0
,
1
,
1
,
nil
,
use_extended
)
local
rg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
costfilter
,
tp
,
loc
,
0
,
1
,
1
,
nil
,
tp
,
loc
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
Release
(
r
g
,
REASON_COST
)
end
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
expansions/script/c40020361.lua
View file @
cb1d8010
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
local
s
,
id
=
GetID
()
local
s
,
id
=
GetID
()
s
.
ui_hint_effect
=
s
.
ui_hint_effect
or
{}
s
.
ui_hint_effect
=
s
.
ui_hint_effect
or
{}
local
CORE_ID
=
40020353
local
CORE_ID
=
40020353
local
ArmedIntervention
=
CORE_ID
local
ArmedIntervention
=
CORE_ID
local
ArmedIntervention_UI
=
CORE_ID
+
10000
local
ArmedIntervention_UI
=
CORE_ID
+
10000
local
GLOBAL_END_PHASE_CHECK
=
id
+
900
local
GLOBAL_END_PHASE_CHECK
=
id
+
900
--CB
--CB
...
@@ -27,7 +27,9 @@ function s.Exia(c)
...
@@ -27,7 +27,9 @@ function s.Exia(c)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Exia
return
m
and
m
.
named_with_Exia
end
end
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
...
@@ -41,7 +43,31 @@ function s.initial_effect(c)
...
@@ -41,7 +43,31 @@ function s.initial_effect(c)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCondition
(
s
.
drawcon
)
e2
:
SetTarget
(
s
.
drawtg
)
e2
:
SetOperation
(
s
.
drawop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e3
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE_START
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCondition
(
s
.
copycon
)
-- 增加条件检查标记
e3
:
SetTarget
(
s
.
copytg
)
e3
:
SetOperation
(
s
.
copyop
)
c
:
RegisterEffect
(
e3
)
end
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
owner
=
c
:
GetOwner
()
local
owner
=
c
:
GetOwner
()
...
@@ -50,26 +76,31 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -50,26 +76,31 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
and
Duel
.
GetFlagEffect
(
owner
,
ArmedIntervention
)
>=
9
and
Duel
.
GetFlagEffect
(
owner
,
ArmedIntervention
)
>=
9
end
end
function
s
.
costfilter
(
c
,
use_extended
)
function
s
.
costfilter
(
c
,
tp
,
loc
)
if
not
(
c
:
IsFaceup
()
and
c
:
IsReleasable
())
then
return
false
end
return
s
.
Exia
(
c
)
and
c
:
IsControler
(
tp
)
and
c
:
IsFaceup
()
and
c
:
IsReleasable
()
if
use_extended
and
s
.
Exia
(
c
)
then
return
true
end
if
not
c
:
IsType
(
TYPE_MONSTER
)
then
return
false
end
return
s
.
Exia
(
c
)
or
s
.
QanT
(
c
)
or
s
.
ELS
(
c
)
end
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
use_extended
=
aux
.
IsCanBeQuickEffect
(
c
,
tp
,
40020377
)
local
loc
=
LOCATION_MZONE
local
loc
=
LOCATION_MZONE
if
use_extended
then
loc
=
LOCATION_ONFIELD
end
local
has_special_card
=
Duel
.
IsExistingMatchingCard
(
function
(
tc
)
return
tc
:
IsFaceup
()
and
tc
:
IsCode
(
40020377
)
end
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
if
has_special_card
then
loc
=
LOCATION_ONFIELD
end
if
chk
==
0
then
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
costfilter
,
tp
,
loc
,
0
,
1
,
nil
,
use_extended
)
return
Duel
.
IsExistingMatchingCard
(
s
.
costfilter
,
tp
,
loc
,
0
,
1
,
nil
,
tp
,
loc
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
costfilter
,
tp
,
loc
,
0
,
1
,
1
,
nil
,
use_extended
)
local
rg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
costfilter
,
tp
,
loc
,
0
,
1
,
1
,
nil
,
tp
,
loc
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
Release
(
r
g
,
REASON_COST
)
end
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
...
@@ -81,32 +112,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -81,32 +112,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
c
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetTarget
(
s
.
drawtg
)
e1
:
SetOperation
(
s
.
drawop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE_START
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCondition
(
s
.
copycon
)
e2
:
SetTarget
(
s
.
copytg
)
e2
:
SetOperation
(
s
.
copyop
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e2
)
end
end
end
end
function
s
.
drawcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
id
)
>
0
end
function
s
.
drawtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
drawtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
c1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
local
c1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
...
@@ -115,6 +128,7 @@ function s.drawtg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -115,6 +128,7 @@ function s.drawtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
PLAYER_ALL
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
PLAYER_ALL
,
0
)
end
end
function
s
.
drawop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
drawop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
local
c1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
local
c2
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
local
c2
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
...
@@ -128,8 +142,9 @@ function s.drawop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -128,8 +142,9 @@ function s.drawop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SkipPhase
(
turn_p
,
PHASE_MAIN2
,
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
SkipPhase
(
turn_p
,
PHASE_MAIN2
,
RESET_PHASE
+
PHASE_END
,
1
)
end
end
end
end
function
s
.
copycon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
copycon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
return
Duel
.
GetTurnPlayer
()
==
tp
and
e
:
GetHandler
():
GetFlagEffect
(
id
)
>
0
end
end
function
s
.
copyfilter
(
c
)
function
s
.
copyfilter
(
c
)
...
@@ -150,4 +165,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -150,4 +165,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp)
local
code
=
tc
:
GetOriginalCode
()
local
code
=
tc
:
GetOriginalCode
()
c
:
CopyEffect
(
code
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
1
)
c
:
CopyEffect
(
code
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
1
)
end
end
end
end
\ No newline at end of file
expansions/script/c40020367.lua
View file @
cb1d8010
...
@@ -10,7 +10,7 @@ function s.CelestialBeing(c)
...
@@ -10,7 +10,7 @@ function s.CelestialBeing(c)
end
end
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
s
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
...
...
expansions/script/c40020380.lua
View file @
cb1d8010
...
@@ -101,15 +101,23 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -101,15 +101,23 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
function
s
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
then
return
false
end
if
bit
.
band
(
r
,
REASON_EFFECT
)
==
0
then
return
false
end
if
not
re
then
return
false
end
if
not
re
then
return
false
end
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
return
rc
and
s
.
CelestialBeing
(
rc
)
return
rc
and
s
.
CelestialBeing
(
rc
)
end
end
function
s
.
thfilter
(
c
)
return
s
.
CelestialBeing
(
c
)
and
c
:
IsAbleToHand
()
end
function
s
.
acttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
acttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
...
@@ -117,7 +125,10 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -117,7 +125,10 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
g
=
Duel
.
GetMatchingGroup
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
#
g
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
0
))
then
if
#
g
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
...
@@ -125,8 +136,8 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -125,8 +136,8 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
local
owner
=
c
:
GetOwner
()
local
owner
=
c
:
GetOwner
()
Duel
.
RegisterFlagEffect
(
owner
,
ArmedIntervention
,
0
,
0
,
0
)
Duel
.
RegisterFlagEffect
(
owner
,
ArmedIntervention
,
0
,
0
,
0
)
end
end
end
end
\ No newline at end of file
expansions/script/c40020385.lua
View file @
cb1d8010
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
local
s
,
id
=
GetID
()
local
s
,
id
=
GetID
()
s
.
ui_hint_effect
=
s
.
ui_hint_effect
or
{}
s
.
ui_hint_effect
=
s
.
ui_hint_effect
or
{}
local
CORE_ID
=
40020353
local
CORE_ID
=
40020353
local
ArmedIntervention
=
CORE_ID
local
ArmedIntervention
=
CORE_ID
local
ArmedIntervention_UI
=
CORE_ID
+
10000
local
ArmedIntervention_UI
=
CORE_ID
+
10000
--CB
--CB
s
.
named_with_CelestialBeing
=
1
s
.
named_with_CelestialBeing
=
1
...
@@ -28,19 +28,19 @@ function s.initial_effect(c)
...
@@ -28,19 +28,19 @@ function s.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e2
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e2
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
s
.
estg
)
e2
:
SetTarget
(
s
.
estg
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCountLimit
(
1
,
id
)
e3
:
SetCountLimit
(
1
,
id
+
200
)
e3
:
SetTarget
(
s
.
sptg
)
e3
:
SetTarget
(
s
.
sptg
)
e3
:
SetOperation
(
s
.
spop
)
e3
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
...
@@ -69,7 +69,7 @@ function s.lvtg(e,c)
...
@@ -69,7 +69,7 @@ function s.lvtg(e,c)
end
end
function
s
.
estg
(
e
,
c
)
function
s
.
estg
(
e
,
c
)
return
s
.
CelestialBeing
(
c
)
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
return
s
.
CelestialBeing
(
c
)
end
end
function
s
.
spfilter
(
c
,
e
,
tp
)
function
s
.
spfilter
(
c
,
e
,
tp
)
return
s
.
CelestialBeing
(
c
)
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsLevelBelow
(
5
)
return
s
.
CelestialBeing
(
c
)
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsLevelBelow
(
5
)
...
@@ -183,5 +183,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -183,5 +183,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end
end
function
s
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
expansions/script/c61200302.lua
View file @
cb1d8010
...
@@ -153,6 +153,6 @@ function s.op6(e,tp,eg,ep,ev,re,r,rp)
...
@@ -153,6 +153,6 @@ function s.op6(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
f3
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
f3
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Sendto
Grave
(
g
:
Select
(
tp
,
1
,
1
,
nil
)
,
REASON_EFFECT
)
Duel
.
Sendto
Hand
(
g
:
Select
(
tp
,
1
,
1
,
nil
),
tp
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c64833525.lua
View file @
cb1d8010
...
@@ -45,7 +45,7 @@ function s.get_case(c)
...
@@ -45,7 +45,7 @@ function s.get_case(c)
elseif
oppo_count
>
0
then
elseif
oppo_count
>
0
then
return
2
-- 只有对方
return
2
-- 只有对方
else
else
return
只有自己
return
1
--
只有自己
end
end
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