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
Show 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
local
m
,
cm
=
rscf
.
DefineCard
(
10171001
)
if
rsds
then
return
end
rsds
=
cm
function
rsds
.
cost1
(
e
,
...
)
e
:
SetLabel
(
100
)
return
rscost
.
cost
(
Card
.
IsReleasable
,
"res"
)(
e
,
...
)
end
function
cm
.
costfun
(
e
,
tp
)
e
:
SetValue
(
100
)
end
function
rsds
.
cost2
(
ct
)
return
function
(
e
,
...
)
e
:
SetLabel
(
100
)
return
rscost
.
cost
(
cm
.
rmcfilter
,
"rm"
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
ct
,
ct
)(
e
,
...
)
end
end
function
cm
.
rmcfilter
(
c
,
e
,
tp
)
if
not
c
:
IsAbleToRemoveAsCost
()
or
not
c
:
IsType
(
TYPE_MONSTER
)
then
return
false
end
return
(
c
:
IsCode
(
m
)
and
c
:
IsControler
(
tp
))
or
(
Duel
.
IsPlayerAffectedByEffect
(
tp
,
m
+
19
)
and
not
c
:
IsCode
(
e
:
GetHandler
():
GetCode
()))
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
function
cm
.
thop
(
scode
,
op
)
return
function
(
e
,
tp
,
...
)
local
ct
,
og
,
tc
=
rsop
.
SelectToHand
(
tp
,
cm
.
thfilter
(
scode
),
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,{})
if
ct
>
0
and
op
then
op
(
tc
,
e
,
tp
,
...
)
end
end
end
function
rsds
.
ChainingFun
(
c
,
code
,
cate
,
flag
,
tg
,
op
)
local
e1
=
rsef
.
QO
(
c
,
EVENT_CHAINING
,{
code
,
0
},
1
,
cate
,
flag
,
LOCATION_MZONE
,
cm
.
cfcon
,
nil
,
tg
,
op
)
return
e1
end
function
cm
.
cfcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
for
i
=
1
,
ev
do
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
tep
==
tp
and
(
tecode1
==
m
or
(
tecode2
and
tecode2
==
m
))
and
teloc
&
LOCATION_HAND
+
LOCATION_ONFIELD
~=
0
then
return
true
end
end
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
)
function
c10171001
.
initial_effect
(
c
)
--release self
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCost
(
c10171001
.
rscost
)
e1
:
SetTarget
(
c10171001
.
rstg
)
e1
:
SetOperation
(
c10171001
.
rsop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10171001
,
0
))
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
g
=
Duel
.
GetMatchingGroup
(
cm
.
spefilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
spcode
)
local
rg
=
Duel
.
GetMatchingGroup
(
cm
.
sprmfilter
,
tp
,
LOCATION_GRAVE
,
0
,
c
)
local
ft
=
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
TYPE_FUSION
)
if
chk
==
0
then
if
e
:
GetLabel
()
==
100
then
return
c
:
IsAbleToRemoveAsCost
()
and
rg
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
rmcode
)
and
#
g
>
0
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
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
10171001
,
4
)
opval
[
off
]
=
1
off
=
off
+
1
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
+
1
local
sel
=
opval
[
op
]
e
:
SetLabel
(
sel
)
if
sel
==
0
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
else
return
#
g
>
0
and
ct
==
1
end
end
local
sct
=
math.min
(
ct
,
#
g
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
sct
=
1
end
if
c29724053
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
29724053
)
and
c29724053
[
tp
]
then
sct
=
math.min
(
c29724053
[
tp
],
sct
)
end
sct
=
math.min
(
sct
,
ft
)
local
sct2
=
0
if
e
:
GetLabel
()
==
100
then
e
:
SetLabel
(
0
)
rshint
.
Select
(
tp
,
"rm"
)
local
rg2
=
rg
:
SelectSubGroup
(
tp
,
cm
.
spgfilter
,
false
,
1
,
sct
,
rmcode
)
rg2
:
AddCard
(
c
)
sct2
=
Duel
.
Remove
(
rg2
,
POS_FACEUP
,
REASON_COST
)
-
1
end
e
:
SetValue
(
ct
==
1
and
sct
or
sct2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
sct
,
tp
,
LOCATION_EXTRA
)
e
:
SetCategory
(
CATEGORY_ATKCHANGE
)
end
end
function
cm
.
speop
(
spcode
)
return
function
(
e
,
tp
,
...
)
local
sg
=
Duel
.
GetMatchingGroup
(
cm
.
spefilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
spcode
)
local
sct
=
e
:
GetValue
()
if
sct
<=
0
or
#
sg
<
sct
then
return
end
if
sct
>=
2
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
return
end
if
c29724053
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
29724053
)
and
c29724053
[
tp
]
<
sct
then
return
end
local
ft
=
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
TYPE_FUSION
)
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
function
c10171001
.
rsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sel
=
e
:
GetLabel
()
if
sel
==
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10171001
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
-------------------------
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"
)
else
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
):
GetFirst
()
if
tc
and
not
tc
:
IsImmuneToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_INACTIVATE
)
e3
:
SetLabel
(
1
)
e3
:
SetValue
(
c10171001
.
effectfilter
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e3
,
tp
)
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
end
function
c10171001
.
effectfilter
(
e
,
ct
)
local
te
=
Duel
.
GetChainInfo
(
ct
,
CHAININFO_TRIGGERING_EFFECT
)
local
label
=
e
:
GetLabel
()
local
tc
if
label
==
1
then
tc
=
e
:
GetLabelObject
():
GetLabelObject
()
else
tc
=
e
:
GetLabelObject
()
end
return
tc
and
tc
==
te
:
GetHandler
()
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
()
function
c10171001
.
chk
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
HintSelection
(
Group
.
FromCards
(
tc
))
local
e1
,
e2
=
rscf
.
QuickBuff
({
c
,
tc
},
"atk+,def+"
,
500
,
"rst"
,
rsreset
.
est_pend
)
tc
:
RegisterFlagEffect
(
m
,
rsreset
.
est_pend
-
RESET_LEAVE
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
m
,
5
))
local
e3
,
e4
=
rsef
.
FV_CANNOT_DISABLE
({
c
,
tp
},
"neg,dise"
,
cm
.
imval
(
tc
),
nil
,
nil
,
nil
,
rsreset
.
pend
)
--local phase=Duel.GetCurrentPhase()
--if phase>PHASE_MAIN1 and phase<PHASE_MAIN2 then phase=PHASE_BATTLE end
--local e3=rsef.SV_IMMUNE_EFFECT({c,tc},rsval.imoe,cm.imcon(phase),rsreset.pend)
end
function
cm
.
imval
(
tc
)
return
function
(
e
,
ev
)
local
te
,
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_EFFECT
,
CHAININFO_TRIGGERING_LOCATION
)
return
tc
:
GetFlagEffect
(
m
)
>
0
and
loc
&
LOCATION_MZONE
~=
0
and
te
:
GetHandler
()
==
tc
local
e3
=
e
:
GetLabelObject
()
local
e4
=
e3
:
GetLabelObject
()
local
te
=
c
:
GetReasonEffect
()
if
c
:
GetFlagEffect
(
10171001
)
==
0
or
not
te
or
not
te
:
IsActivated
()
or
te
:
GetHandler
()
~=
c
then
e3
:
Reset
()
e4
:
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
(
c10171001
.
resetop
)
Duel
.
RegisterEffect
(
e0
,
tp
)
end
end
function
c
m
.
imcon
(
phase
)
return
function
(
e
)
local
cp
=
Duel
.
GetCurrentPhase
()
if
cp
>
PHASE_MAIN1
and
cp
<
PHASE_MAIN2
then
cp
=
PHASE_BATTLE
end
return
cp
==
phase
e
nd
function
c
10171001
.
resetop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e3
=
e
:
GetLabelObject
(
)
local
e4
=
e3
:
GetLabelObject
()
e3
:
Reset
()
e4
:
Reset
()
e
:
Reset
()
end
function
c
m
.
embth
filter
(
c
)
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
Is
Previous
SetCard
(
0xa335
,
0xc335
)
function
c
10171001
.
c
filter
(
c
)
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsSetCard
(
0xa335
,
0xc335
)
end
function
c
m
.
emb
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c
m
.
embthfilter
,
1
,
nil
)
function
c
10171001
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c
10171001
.
cfilter
,
1
,
nil
)
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
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
embthop
(
e
,
tp
)
local
c
=
aux
.
ExceptThisCard
(
e
)
if
c
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
function
c10171001
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
end
end
expansions/script/c60002431.lua
View file @
a2c20316
...
...
@@ -36,29 +36,29 @@ end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
ac
=
g
:
GetFirst
()
local
num
=#
g
for
i
=
1
,
num
do
if
talon
[
ac
:
GetCode
()]
=
=
nil
then
g
:
Remove
Card
(
ac
)
local
ag
=
Group
.
CreateGroup
()
for
i
=
1
,
#
g
do
if
talon
[
ac
:
GetCode
()]
~
=
nil
then
ag
:
Add
Card
(
ac
)
end
ac
=
g
:
GetNext
()
end
if
chk
==
0
then
return
g
:
GetCount
()
>
0
end
if
chk
==
0
then
return
a
g
:
GetCount
()
>
0
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--Debug.Message("a")
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
ac
=
g
:
GetFirst
()
local
ag
=
Group
.
CreateGroup
()
for
i
=
1
,
#
g
do
if
talon
[
ac
:
GetCode
()]
=
=
nil
then
g
:
Remove
Card
(
ac
)
if
talon
[
ac
:
GetCode
()]
~
=
nil
then
ag
:
Add
Card
(
ac
)
end
ac
=
g
:
GetNext
()
end
--Debug.Message("b")
if
ag
:
GetCount
()
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
--Debug.Message("c")
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
ag
:
Select
(
tp
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
then
local
ace
=
talon
[
sg
:
GetFirst
():
GetCode
()]
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)
Duel
.
RegisterEffect
(
e3
,
tp
)
e2
:
SetLabelObject
(
e3
)
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
...
...
@@ -98,3 +108,28 @@ function c9910953.effectfilter(e,ct)
end
return
tc
and
tc
==
te
:
GetHandler
()
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