Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
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
Nemo Ma
no81cards
Commits
a2c20316
Commit
a2c20316
authored
Jan 12, 2024
by
POLYMER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
b9ae2ca1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
184 additions
and
191 deletions
+184
-191
expansions/script/c10171001.lua
expansions/script/c10171001.lua
+139
-181
expansions/script/c60002431.lua
expansions/script/c60002431.lua
+10
-10
expansions/script/c9910953.lua
expansions/script/c9910953.lua
+35
-0
No files found.
expansions/script/c10171001.lua
View file @
a2c20316
--余火
--余火
if
not
pcall
(
function
()
require
(
"expansions/script/c10199990"
)
end
)
then
require
(
"script/c10199990"
)
end
function
c10171001
.
initial_effect
(
c
)
local
m
,
cm
=
rscf
.
DefineCard
(
10171001
)
--release self
if
rsds
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
rsds
=
cm
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
function
rsds
.
cost1
(
e
,
...
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e
:
SetLabel
(
100
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
return
rscost
.
cost
(
Card
.
IsReleasable
,
"res"
)(
e
,
...
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
end
e1
:
SetCost
(
c10171001
.
rscost
)
function
cm
.
costfun
(
e
,
tp
)
e1
:
SetTarget
(
c10171001
.
rstg
)
e
:
SetValue
(
100
)
e1
:
SetOperation
(
c10171001
.
rsop
)
end
c
:
RegisterEffect
(
e1
)
function
rsds
.
cost2
(
ct
)
--to hand
return
function
(
e
,
...
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e
:
SetLabel
(
100
)
e2
:
SetDescription
(
aux
.
Stringid
(
10171001
,
0
))
return
rscost
.
cost
(
cm
.
rmcfilter
,
"rm"
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
ct
,
ct
)(
e
,
...
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetRange
(
LOCATION_REMOVED
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
c10171001
.
thcon
)
e2
:
SetTarget
(
c10171001
.
thtg
)
e2
:
SetOperation
(
c10171001
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c10171001
.
rscost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c10171001
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xa335
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c10171001
.
rstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
b1
=
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c10171001
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
if
chk
==
0
then
return
b1
or
b2
end
local
off
=
1
local
ops
,
opval
=
{},{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
10171001
,
2
)
opval
[
off
]
=
0
off
=
off
+
1
end
end
end
if
b2
then
function
cm
.
rmcfilter
(
c
,
e
,
tp
)
ops
[
off
]
=
aux
.
Stringid
(
10171001
,
4
)
if
not
c
:
IsAbleToRemoveAsCost
()
or
not
c
:
IsType
(
TYPE_MONSTER
)
then
return
false
end
opval
[
off
]
=
1
return
(
c
:
IsCode
(
m
)
and
c
:
IsControler
(
tp
))
or
(
Duel
.
IsPlayerAffectedByEffect
(
tp
,
m
+
19
)
and
not
c
:
IsCode
(
e
:
GetHandler
():
GetCode
()))
off
=
off
+
1
end
function
rsds
.
SearchFun
(
c
,
scode
,
op
)
local
e1
=
rsef
.
STO
(
c
,
EVENT_SUMMON_SUCCESS
,{
m
,
0
},
nil
,
"se,th"
,
"de,dsp"
,
nil
,
rsds
.
cost2
(
1
),
rsop
.
target
(
cm
.
thfilter
(
scode
),
"th"
,
LOCATION_DECK
),
cm
.
thop
(
scode
,
op
))
local
e2
=
rsef
.
RegisterClone
(
c
,
e1
,
"code"
,
EVENT_SPSUMMON_SUCCESS
)
return
e1
,
e2
end
function
cm
.
thfilter
(
scode
)
return
function
(
c
)
return
c
:
IsCode
(
scode
)
and
c
:
IsAbleToHand
()
end
end
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
+
1
function
cm
.
thop
(
scode
,
op
)
local
sel
=
opval
[
op
]
return
function
(
e
,
tp
,
...
)
e
:
SetLabel
(
sel
)
local
ct
,
og
,
tc
=
rsop
.
SelectToHand
(
tp
,
cm
.
thfilter
(
scode
),
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,{})
if
sel
==
0
then
if
ct
>
0
and
op
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
op
(
tc
,
e
,
tp
,
...
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
else
e
:
SetCategory
(
CATEGORY_ATKCHANGE
)
end
end
end
end
function
rsds
.
ChainingFun
(
c
,
code
,
cate
,
flag
,
tg
,
op
)
function
c10171001
.
rsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
rsef
.
QO
(
c
,
EVENT_CHAINING
,{
code
,
0
},
1
,
cate
,
flag
,
LOCATION_MZONE
,
cm
.
cfcon
,
nil
,
tg
,
op
)
local
sel
=
e
:
GetLabel
()
return
e1
if
sel
==
0
then
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
function
cm
.
cfcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
for
i
=
1
,
ev
do
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10171001
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
te
,
tep
,
tecode1
,
tecode2
,
teloc
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
,
CHAININFO_TRIGGERING_PLAYER
,
CHAININFO_TRIGGERING_CODE
,
CHAININFO_TRIGGERING_CODE2
,
CHAININFO_TRIGGERING_LOCATION
)
if
g
:
GetCount
()
>
0
then
if
tep
==
tp
and
(
tecode1
==
m
or
(
tecode2
and
tecode2
==
m
))
and
teloc
&
LOCATION_HAND
+
LOCATION_ONFIELD
~=
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
return
true
end
end
end
else
return
false
end
function
rsds
.
ExtraSummonFun
(
c
,
code
)
local
e1
=
rscf
.
SetSummonCondition
(
c
,
false
,
cm
.
exsumval
(
code
))
return
e1
end
function
cm
.
exsumval
(
code
,
excode
)
return
function
(
e
,
se
,
sp
,
st
)
--if not e:GetHandler():IsLocation(LOCATION_EXTRA) then return true end
return
se
and
se
:
GetHandler
():
IsCode
(
code
,
excode
or
0
)
end
end
function
rsds
.
TributeFun
(
c
,
code
,
cate
,
flag
,
tg
,
op
,
isign
)
local
e1
=
rsef
.
QO
(
c
,
nil
,{
code
,
0
},{
1
,
code
},
cate
,
flag
,
LOCATION_HAND
,
nil
,
rsds
.
cost1
,
tg
,
op
)
if
isign
then
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
end
return
e1
end
function
rsds
.
SpExtraFun
(
c
,
code
,
rmcode
,
spcode
,
con
,
ct
)
ct
=
ct
or
1
local
e1
=
rsef
.
QO
(
c
,
nil
,{
code
,
1
},{
1
,
code
+
100
},
"sp"
,
nil
,
LOCATION_GRAVE
,
con
,
rscost
.
reglabel
(
100
),
cm
.
spetg
(
rmcode
,
spcode
,
ct
),
cm
.
speop
(
spcode
))
return
e1
end
function
cm
.
spefilter
(
c
,
e
,
tp
,
spcode
)
return
c
:
IsCode
(
spcode
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
sprmfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsSetCard
(
0xa335
)
end
function
cm
.
specfilter
(
c
,
rmcode
)
return
c
:
IsCode
(
rmcode
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
cm
.
spgfilter
(
g
,
rmcode
)
return
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
rmcode
)
end
function
cm
.
spetg
(
rmcode
,
spcode
,
ct
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
spefilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
spcode
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
rg
=
Duel
.
GetMatchingGroup
(
cm
.
sprmfilter
,
tp
,
LOCATION_GRAVE
,
0
,
c
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
):
GetFirst
()
local
ft
=
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
TYPE_FUSION
)
if
tc
and
not
tc
:
IsImmuneToEffect
(
e
)
then
if
chk
==
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
if
e
:
GetLabel
()
==
100
then
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
return
c
:
IsAbleToRemoveAsCost
()
and
rg
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
rmcode
)
and
#
g
>
0
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
else
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
return
#
g
>
0
and
ct
==
1
e1
:
SetValue
(
500
)
end
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
tc
:
RegisterEffect
(
e1
)
local
sct
=
math.min
(
ct
,
#
g
)
local
e2
=
e1
:
Clone
()
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
sct
=
1
end
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
if
c29724053
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
29724053
)
and
c29724053
[
tp
]
then
sct
=
math.min
(
c29724053
[
tp
],
sct
)
end
tc
:
RegisterEffect
(
e2
)
sct
=
math.min
(
sct
,
ft
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
sct2
=
0
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
if
e
:
GetLabel
()
==
100
then
e3
:
SetCode
(
EFFECT_CANNOT_INACTIVATE
)
e
:
SetLabel
(
0
)
e3
:
SetLabel
(
1
)
rshint
.
Select
(
tp
,
"rm"
)
e3
:
SetValue
(
c10171001
.
effectfilter
)
local
rg2
=
rg
:
SelectSubGroup
(
tp
,
cm
.
spgfilter
,
false
,
1
,
sct
,
rmcode
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
rg2
:
AddCard
(
c
)
Duel
.
RegisterEffect
(
e3
,
tp
)
sct2
=
Duel
.
Remove
(
rg2
,
POS_FACEUP
,
REASON_COST
)
-
1
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_DISEFFECT
)
e4
:
SetLabel
(
2
)
Duel
.
RegisterEffect
(
e4
,
tp
)
e3
:
SetLabelObject
(
e4
)
e4
:
SetLabelObject
(
tc
)
--chk
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e0
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
+
RESET_PHASE
+
PHASE_END
)
e0
:
SetLabelObject
(
e3
)
e0
:
SetOperation
(
c10171001
.
chk
)
tc
:
RegisterEffect
(
e0
)
tc
:
RegisterFlagEffect
(
10171001
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
10171001
,
5
))
end
end
e
:
SetValue
(
ct
==
1
and
sct
or
sct2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
sct
,
tp
,
LOCATION_EXTRA
)
end
end
end
end
function
cm
.
speop
(
spcode
)
function
c10171001
.
effectfilter
(
e
,
ct
)
return
function
(
e
,
tp
,
...
)
local
te
=
Duel
.
GetChainInfo
(
ct
,
CHAININFO_TRIGGERING_EFFECT
)
local
sg
=
Duel
.
GetMatchingGroup
(
cm
.
spefilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
spcode
)
local
label
=
e
:
GetLabel
()
local
sct
=
e
:
GetValue
()
local
tc
if
sct
<=
0
or
#
sg
<
sct
then
return
end
if
label
==
1
then
if
sct
>=
2
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
return
end
tc
=
e
:
GetLabelObject
():
GetLabelObject
()
if
c29724053
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
29724053
)
and
c29724053
[
tp
]
<
sct
then
return
end
else
local
ft
=
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
TYPE_FUSION
)
tc
=
e
:
GetLabelObject
()
if
ft
<
sct
then
return
end
local
ct
,
og
=
rsgf
.
SelectSpecialSummon
(
sg
,
tp
,
aux
.
TRUE
,
sct
,
sct
,
nil
,{})
if
#
og
>
0
then
for
tc
in
aux
.
Next
(
og
)
do
tc
:
CompleteProcedure
()
end
end
end
end
return
tc
and
tc
==
te
:
GetHandler
()
end
end
-------------------------
function
c10171001
.
chk
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
initial_effect
(
c
)
local
e2
=
rsef
.
QO
(
c
,
nil
,{
m
,
2
},
nil
,
"sp"
,
nil
,
LOCATION_HAND
+
LOCATION_MZONE
,
nil
,
rsds
.
cost1
,
rsop
.
target2
(
cm
.
resetfun
,
cm
.
spfilter
,
"sp"
,
LOCATION_HAND
),
cm
.
spop
)
local
e3
=
rsef
.
QO
(
c
,
nil
,{
m
,
4
},
nil
,
"atk,def"
,
"dsp"
,
LOCATION_HAND
+
LOCATION_MZONE
,
nil
,
rsds
.
cost1
,
rsop
.
target
(
cm
.
atkfilter
,
"dum"
,
LOCATION_MZONE
,
LOCATION_MZONE
),
cm
.
atkop
)
local
e4
=
rsef
.
FTF
(
c
,
EVENT_LEAVE_FIELD
,{
m
,
0
},
nil
,
"th"
,
nil
,
LOCATION_REMOVED
,
cm
.
embthcon
,
cm
.
embthcost
,
rsop
.
target
(
Card
.
IsAbleToHand
,
"th"
),
cm
.
embthop
)
end
function
cm
.
recop
(
e
,
tp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
end
function
cm
.
resetfun
(
g
,
e
,
tp
)
e
:
SetLabel
(
0
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xa335
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
((
e
:
GetLabel
()
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
)
or
(
e
:
GetLabel
()
==
100
and
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
(),
tp
)
>
0
and
c
~=
e
:
GetHandler
()))
end
function
cm
.
spop
(
e
,
tp
)
rsop
.
SelectSpecialSummon
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,{},
e
,
tp
)
end
function
cm
.
rmfilter
(
c
,
e
,
tp
)
return
c
:
IsAbleToRemove
()
and
c
:
IsFaceup
()
and
(
e
:
GetLabel
()
~=
100
or
c
~=
e
:
GetHandler
())
end
function
cm
.
rmop
(
e
,
tp
)
local
ct
,
og
,
tc
=
rsop
.
SelectRemove
(
tp
,
cm
.
rmfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,{
POS_FACEUP
,
REASON_EFFECT
+
REASON_TEMPORARY
},
e
,
tp
)
if
tc
and
tc
:
IsLocation
(
LOCATION_REMOVED
)
and
Duel
.
ReturnToField
(
tc
)
then
local
e1
=
rsef
.
SV_UPDATE
({
e
:
GetHandler
(),
tc
},
"atk"
,
300
,
nil
,
rsreset
.
est
,
"cd"
)
end
end
function
cm
.
atkfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
(
not
e
:
IsCostChecked
()
or
c
~=
e
:
GetHandler
())
end
function
cm
.
atkop
(
e
,
tp
)
local
ct
=
rsop
.
SelectSolve
(
HINTMSG_FACEUP
,
tp
,
cm
.
atkfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
aux
.
ExceptThisCard
(
e
),
cm
.
solvefun
,
e
,
tp
)
end
function
cm
.
solvefun
(
g
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
Duel
.
HintSelection
(
Group
.
FromCards
(
tc
))
local
e3
=
e
:
GetLabelObject
()
local
e1
,
e2
=
rscf
.
QuickBuff
({
c
,
tc
},
"atk+,def+"
,
500
,
"rst"
,
rsreset
.
est_pend
)
local
e4
=
e3
:
GetLabelObject
()
tc
:
RegisterFlagEffect
(
m
,
rsreset
.
est_pend
-
RESET_LEAVE
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
m
,
5
))
local
te
=
c
:
GetReasonEffect
()
local
e3
,
e4
=
rsef
.
FV_CANNOT_DISABLE
({
c
,
tp
},
"neg,dise"
,
cm
.
imval
(
tc
),
nil
,
nil
,
nil
,
rsreset
.
pend
)
if
c
:
GetFlagEffect
(
10171001
)
==
0
or
not
te
or
not
te
:
IsActivated
()
or
te
:
GetHandler
()
~=
c
then
--local phase=Duel.GetCurrentPhase()
e3
:
Reset
()
--if phase>PHASE_MAIN1 and phase<PHASE_MAIN2 then phase=PHASE_BATTLE end
e4
:
Reset
()
--local e3=rsef.SV_IMMUNE_EFFECT({c,tc},rsval.imoe,cm.imcon(phase),rsreset.pend)
else
end
--reset
function
cm
.
imval
(
tc
)
local
e0
=
Effect
.
CreateEffect
(
c
)
return
function
(
e
,
ev
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
local
te
,
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_EFFECT
,
CHAININFO_TRIGGERING_LOCATION
)
e0
:
SetCode
(
EVENT_CHAIN_END
)
return
tc
:
GetFlagEffect
(
m
)
>
0
and
loc
&
LOCATION_MZONE
~=
0
and
te
:
GetHandler
()
==
tc
e0
:
SetLabelObject
(
e3
)
e0
:
SetOperation
(
c10171001
.
resetop
)
Duel
.
RegisterEffect
(
e0
,
tp
)
end
end
end
end
function
c
m
.
imcon
(
phase
)
function
c
10171001
.
resetop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
function
(
e
)
local
e3
=
e
:
GetLabelObject
(
)
local
cp
=
Duel
.
GetCurrentPhase
()
local
e4
=
e3
:
GetLabelObject
()
if
cp
>
PHASE_MAIN1
and
cp
<
PHASE_MAIN2
then
cp
=
PHASE_BATTLE
end
e3
:
Reset
()
return
cp
==
phase
e4
:
Reset
()
e
nd
e
:
Reset
()
end
end
function
c
m
.
embth
filter
(
c
)
function
c
10171001
.
c
filter
(
c
)
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
Is
Previous
SetCard
(
0xa335
,
0xc335
)
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsSetCard
(
0xa335
,
0xc335
)
end
end
function
c
m
.
emb
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
10171001
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c
m
.
embthfilter
,
1
,
nil
)
return
eg
:
IsExists
(
c
10171001
.
cfilter
,
1
,
nil
)
end
end
function
c
m
.
embthcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
10171001
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCurrentChain
()
==
0
end
if
chk
==
0
then
return
Duel
.
GetCurrentChain
()
==
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
cm
.
embthop
(
e
,
tp
)
function
c10171001
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
aux
.
ExceptThisCard
(
e
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
if
c
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
end
end
end
expansions/script/c60002431.lua
View file @
a2c20316
...
@@ -36,29 +36,29 @@ end
...
@@ -36,29 +36,29 @@ end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
ac
=
g
:
GetFirst
()
local
ac
=
g
:
GetFirst
()
local
num
=#
g
local
ag
=
Group
.
CreateGroup
()
for
i
=
1
,
num
do
for
i
=
1
,
#
g
do
if
talon
[
ac
:
GetCode
()]
=
=
nil
then
if
talon
[
ac
:
GetCode
()]
~
=
nil
then
g
:
Remove
Card
(
ac
)
ag
:
Add
Card
(
ac
)
end
end
ac
=
g
:
GetNext
()
ac
=
g
:
GetNext
()
end
end
if
chk
==
0
then
return
g
:
GetCount
()
>
0
end
if
chk
==
0
then
return
a
g
:
GetCount
()
>
0
end
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--Debug.Message("a")
--Debug.Message("a")
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
ac
=
g
:
GetFirst
()
local
ac
=
g
:
GetFirst
()
local
ag
=
Group
.
CreateGroup
()
for
i
=
1
,
#
g
do
for
i
=
1
,
#
g
do
if
talon
[
ac
:
GetCode
()]
=
=
nil
then
if
talon
[
ac
:
GetCode
()]
~
=
nil
then
g
:
Remove
Card
(
ac
)
ag
:
Add
Card
(
ac
)
end
end
ac
=
g
:
GetNext
()
ac
=
g
:
GetNext
()
end
end
--Debug.Message("b")
if
ag
:
GetCount
()
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
--Debug.Message("c")
local
sg
=
ag
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
then
if
sg
:
GetCount
()
>
0
then
local
ace
=
talon
[
sg
:
GetFirst
():
GetCode
()]
local
ace
=
talon
[
sg
:
GetFirst
():
GetCode
()]
cm
.
ActivateEffect
(
ace
,
tp
,
e
)
cm
.
ActivateEffect
(
ace
,
tp
,
e
)
...
...
expansions/script/c9910953.lua
View file @
a2c20316
...
@@ -84,6 +84,16 @@ function c9910953.setop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -84,6 +84,16 @@ function c9910953.setop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e3
,
tp
)
Duel
.
RegisterEffect
(
e3
,
tp
)
e2
:
SetLabelObject
(
e3
)
e2
:
SetLabelObject
(
e3
)
e3
:
SetLabelObject
(
tc
)
e3
:
SetLabelObject
(
tc
)
--chk
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e0
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e0
:
SetLabelObject
(
e2
)
e0
:
SetOperation
(
c9910953
.
chk
)
tc
:
RegisterEffect
(
e0
)
tc
:
RegisterFlagEffect
(
9910953
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
9910953
,
1
))
end
end
end
end
end
end
...
@@ -98,3 +108,28 @@ function c9910953.effectfilter(e,ct)
...
@@ -98,3 +108,28 @@ function c9910953.effectfilter(e,ct)
end
end
return
tc
and
tc
==
te
:
GetHandler
()
return
tc
and
tc
==
te
:
GetHandler
()
end
end
function
c9910953
.
chk
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e2
=
e
:
GetLabelObject
()
local
e3
=
e2
:
GetLabelObject
()
local
te
=
c
:
GetReasonEffect
()
if
c
:
GetFlagEffect
(
9910953
)
==
0
or
not
te
or
not
te
:
IsActivated
()
or
te
:
GetHandler
()
~=
c
then
e2
:
Reset
()
e3
:
Reset
()
else
--reset
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetCode
(
EVENT_CHAIN_END
)
e0
:
SetLabelObject
(
e3
)
e0
:
SetOperation
(
c9910953
.
resetop
)
Duel
.
RegisterEffect
(
e0
,
tp
)
end
end
function
c9910953
.
resetop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e3
=
e
:
GetLabelObject
()
local
e4
=
e3
:
GetLabelObject
()
e3
:
Reset
()
e4
:
Reset
()
e
:
Reset
()
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