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
b9734c79
Commit
b9734c79
authored
Oct 09, 2024
by
POLYMER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e8a886dc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
710 deletions
+38
-710
expansions/script/c11451619.lua
expansions/script/c11451619.lua
+6
-2
expansions/script/c49811382.lua
expansions/script/c49811382.lua
+31
-28
expansions/script/c53737018.lua
expansions/script/c53737018.lua
+0
-122
expansions/script/c53737019.lua
expansions/script/c53737019.lua
+0
-123
expansions/script/c53737020.lua
expansions/script/c53737020.lua
+0
-151
expansions/script/c53737021.lua
expansions/script/c53737021.lua
+0
-131
expansions/script/c53737022.lua
expansions/script/c53737022.lua
+0
-153
expansions/script/c88800927.lua
expansions/script/c88800927.lua
+1
-0
No files found.
expansions/script/c11451619.lua
View file @
b9734c79
...
...
@@ -91,9 +91,13 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if
#
sg
==
2
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
11451619
,
0
))
then
Duel
.
SwapSequence
(
sg
:
GetFirst
(),
sg
:
GetNext
())
end
if
#
sg
<=
2
then
return
end
if
#
sg
<=
2
then
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
return
end
for
i
=
1
,
10
do
if
not
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
11451619
,
1
))
then
return
end
if
not
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
11451619
,
1
))
then
break
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
11451619
,
2
))
local
wg
=
sg
:
Select
(
tp
,
2
,
2
,
nil
)
Duel
.
SwapSequence
(
wg
:
GetFirst
(),
wg
:
GetNext
())
...
...
expansions/script/c49811382.lua
View file @
b9734c79
...
...
@@ -2,17 +2,17 @@
local
cm
,
m
=
GetID
()
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
34022290
)
aux
.
AddCodeList
(
c
,
34022290
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
setg
)
e1
:
SetOperation
(
cm
.
seop
)
c
:
RegisterEffect
(
e1
)
--cannot be target
--cannot be target
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
...
...
@@ -21,7 +21,7 @@ function cm.initial_effect(c)
e0
:
SetTargetRange
(
0x0c
,
0
)
e0
:
SetTarget
(
cm
.
target
)
e0
:
SetValue
(
aux
.
tgoval
)
--
c:RegisterEffect(e0)
c
:
RegisterEffect
(
e0
)
--cannot remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
...
...
@@ -32,25 +32,25 @@ function cm.initial_effect(c)
e2
:
SetTarget
(
cm
.
efilter
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetRange
(
0x100
)
e3
:
SetTargetRange
(
0x0c
,
0
)
e3
:
SetTarget
(
cm
.
target
2
)
e3
:
SetTarget
(
cm
.
eftg
2
)
e3
:
SetLabelObject
(
e2
)
--
c:RegisterEffect(e3)
--spsummon
c
:
RegisterEffect
(
e3
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetCountLimit
(
1
,
m
+
1
)
e5
:
SetRange
(
LOCATION_FZONE
)
e5
:
SetTarget
(
cm
.
efftg
)
e5
:
SetOperation
(
cm
.
effop
)
c
:
RegisterEffect
(
e5
)
--inactivatable
--inactivatable
local
ge4
=
Effect
.
CreateEffect
(
c
)
ge4
:
SetType
(
EFFECT_TYPE_FIELD
)
ge4
:
SetCode
(
EFFECT_CANNOT_INACTIVATE
)
ge4
:
SetCondition
(
cm
.
actcon
)
ge4
:
SetCondition
(
cm
.
actcon
)
ge4
:
SetValue
(
cm
.
effectfilter
)
Duel
.
RegisterEffect
(
ge4
,
0
)
local
ge5
=
ge4
:
Clone
()
...
...
@@ -62,43 +62,43 @@ function cm.target(e,c)
return
(
c
:
IsSetCard
(
0x52
)
and
c
:
IsLocation
(
0x04
))
or
c
:
GetType
()
==
0x40002
end
function
cm
.
target
2
(
e
,
c
)
function
cm
.
eftg
2
(
e
,
c
)
return
cm
.
target
(
e
,
c
)
and
c
:
IsFaceup
()
end
function
cm
.
efilter
(
e
,
c
,
rp
,
r
,
re
)
return
r
&
REASON_EFFECT
>
0
return
c
==
e
:
GetHandler
()
and
r
&
REASON_EFFECT
~=
0
end
function
cm
.
tgsfilter
(
c
)
return
(
aux
.
IsCodeListed
(
c
,
34022290
)
or
c
:
IsCode
(
55569674
))
and
c
:
IsAbleToHand
()
return
(
aux
.
IsCodeListed
(
c
,
34022290
)
or
c
:
IsCode
(
55569674
))
and
c
:
IsAbleToHand
()
end
function
cm
.
tgsfilter2
(
c
)
return
c
:
IsCode
(
34022290
)
and
c
:
IsAbleToHand
()
return
c
:
IsCode
(
34022290
)
and
c
:
IsAbleToHand
()
end
function
cm
.
setg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tgsfilter
,
tp
,
0x11
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
tgsfilter2
,
tp
,
0x11
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
2
,
tp
,
0x11
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
2
,
tp
,
0x11
)
end
function
cm
.
seop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tgsfilter2
,
tp
,
0x11
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tgsfilter
,
tp
,
0x11
,
0
,
1
,
1
,
nil
)
if
#
g1
>
0
then
g
:
Merge
(
g1
)
end
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tgsfilter
,
tp
,
0x11
,
0
,
1
,
1
,
nil
)
if
#
g1
>
0
then
g
:
Merge
(
g1
)
end
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
cm
.
tgefilter
(
c
)
return
c
:
IsPublic
()
and
c
:
IsSetCard
(
0x52
)
and
c
:
IsType
(
0x1
)
return
c
:
IsPublic
()
and
c
:
IsSetCard
(
0x52
)
and
c
:
IsType
(
0x1
)
end
function
cm
.
efftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -143,7 +143,7 @@ function cm.effop2(e,tp,eg,ep,ev,re,r,rp)
for
tc
in
aux
.
Next
(
Duel
.
GetMatchingGroup
(
cm
.
conefilter
,
tp
,
0x04
,
0
,
nil
))
do
tc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
for
cc
in
aux
.
Next
(
e
:
GetLabelObject
())
do
local
code
=
cc
:
GetOriginalCode
()
local
code
=
cc
:
GetOriginalCode
()
local
e2
=
Effect
.
CreateEffect
(
tc
)
e2
:
SetDescription
(
aux
.
Stringid
(
34022290
,
1
))
e2
:
SetCategory
(
CATEGORY_REMOVE
)
...
...
@@ -192,9 +192,11 @@ end
function
cm
.
conefilter3
(
c
)
return
c
:
IsCode
(
34022290
)
and
c
:
GetFlagEffect
(
m
+
1
)
==
0
end
function
cm
.
effcon3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
conefilter3
,
tp
,
0xff
,
0
,
1
,
nil
)
end
function
cm
.
effop3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
for
tc
in
aux
.
Next
(
Duel
.
GetMatchingGroup
(
cm
.
conefilter3
,
tp
,
0xff
,
0
,
nil
))
do
tc
:
RegisterFlagEffect
(
m
+
1
,
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
...
...
@@ -212,8 +214,9 @@ function cm.effop3(e,tp,eg,ep,ev,re,r,rp)
Card
.
RegisterEffect
=
cregister
end
end
function
cm
.
actcon
(
e
)
return
Duel
.
Get
FieldGroupCount
(
e
:
GetHandler
():
GetControler
(),
0x10
,
0
)
==
0
return
Duel
.
Get
MatchingGroupCount
(
Card
.
IsType
,
e
:
GetHandler
():
GetControler
(),
0x10
,
0
,
nil
,
0x1
)
==
0
end
function
cm
.
effectfilter
(
e
,
ct
)
...
...
expansions/script/c53737018.lua
deleted
100644 → 0
View file @
e8a886dc
local
m
=
53737018
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"次元秽魔导 独一"
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1
)
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
cm
.
acop1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetOperation
(
cm
.
acop2
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_PZONE
)
e4
:
SetCountLimit
(
3
,
EFFECT_COUNT_CODE_SINGLE
)
e4
:
SetCost
(
cm
.
cost
)
e4
:
SetTarget
(
cm
.
sptg
)
e4
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e5
:
SetCategory
(
CATEGORY_COUNTER
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_PZONE
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e5
:
SetCountLimit
(
3
,
EFFECT_COUNT_CODE_SINGLE
)
e5
:
SetCost
(
cm
.
cost
)
e5
:
SetTarget
(
cm
.
cttg
)
e5
:
SetOperation
(
cm
.
ctop
)
c
:
RegisterEffect
(
e5
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e6
:
SetType
(
EFFECT_TYPE_IGNITION
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCountLimit
(
1
)
e6
:
SetCost
(
cm
.
setcost
)
e6
:
SetTarget
(
cm
.
settg
)
e6
:
SetOperation
(
cm
.
setop
)
c
:
RegisterEffect
(
e6
)
end
function
cm
.
acop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsActiveType
(
TYPE_SPELL
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
then
e
:
GetHandler
():
AddCounter
(
0x1
,
1
)
end
end
function
cm
.
acfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsFaceup
()
end
function
cm
.
acop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
eg
:
IsExists
(
cm
.
acfilter
,
1
,
nil
)
then
e
:
GetHandler
():
AddCounter
(
0x1
,
1
)
end
end
function
cm
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
cm
.
ctfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanAddCounter
(
0x1
,
1
)
end
function
cm
.
cttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
cm
.
ctfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
ctfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
cm
.
ctfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
0x1
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
cm
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
tc
:
AddCounter
(
0x1
,
1
)
end
end
function
cm
.
setcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x1
,
3
,
REASON_COST
)
end
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x1
,
3
,
REASON_COST
)
end
function
cm
.
setfilter
(
c
)
return
c
:
IsSetCard
(
0x6531
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsSSetable
()
end
function
cm
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
function
cm
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
tc
then
Duel
.
SSet
(
tp
,
tc
)
end
end
expansions/script/c53737019.lua
deleted
100644 → 0
View file @
e8a886dc
local
m
=
53737019
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"次元秽魔导 弱体"
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1
)
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
cm
.
acop1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetOperation
(
cm
.
acop2
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e4
:
SetCategory
(
CATEGORY_DESTROY
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_PZONE
)
e4
:
SetTarget
(
cm
.
pentg
)
e4
:
SetOperation
(
cm
.
penop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e5
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
3
,
EFFECT_COUNT_CODE_SINGLE
)
e5
:
SetCost
(
cm
.
atkcost1
)
e5
:
SetTarget
(
cm
.
atktg
)
e5
:
SetOperation
(
cm
.
atkop
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
e6
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e6
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e6
:
SetCondition
(
cm
.
atkcon
)
e6
:
SetCost
(
cm
.
atkcost2
)
c
:
RegisterEffect
(
e6
)
end
function
cm
.
acop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsActiveType
(
TYPE_SPELL
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
then
e
:
GetHandler
():
AddCounter
(
0x1
,
1
)
end
end
function
cm
.
acfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsFaceup
()
end
function
cm
.
acop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
eg
:
IsExists
(
cm
.
acfilter
,
1
,
nil
)
then
e
:
GetHandler
():
AddCounter
(
0x1
,
1
)
end
end
function
cm
.
penfilter
(
c
,
scale
)
return
c
:
IsCanHaveCounter
(
0x1
)
and
Duel
.
IsCanAddCounter
(
tp
,
0x1
,
1
,
c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
GetLeftScale
()
<=
scale
and
not
c
:
IsForbidden
()
end
function
cm
.
pentg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
scale
=
Duel
.
GetMatchingGroupCount
(
cm
.
acfilter
,
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
,
nil
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDestructable
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
penfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
scale
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
penop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
penfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
Duel
.
GetMatchingGroupCount
(
cm
.
acfilter
,
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
,
nil
)):
GetFirst
()
if
tc
and
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
and
tc
:
IsCanAddCounter
(
0x1
,
1
)
then
tc
:
AddCounter
(
0x1
,
1
)
end
end
end
function
cm
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
cm
.
atkcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
end
function
cm
.
atkcost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x1
,
3
,
REASON_COST
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x1
,
3
,
REASON_COST
)
end
function
cm
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
atk
=
tc
:
GetAttack
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
Duel
.
GetCounter
(
tp
,
1
,
0
,
0x1
)
*-
300
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
if
atk
~=
0
and
tc
:
IsAttack
(
0
)
then
Duel
.
BreakEffect
()
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
end
expansions/script/c53737020.lua
deleted
100644 → 0
View file @
e8a886dc
local
m
=
53737020
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"次元秽魔导 失暇"
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1
,
LOCATION_PZONE
+
LOCATION_MZONE
)
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetOperation
(
cm
.
acop1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetRange
(
LOCATION_PZONE
)
e3
:
SetOperation
(
cm
.
acop2
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_PZONE
)
e4
:
SetCost
(
cm
.
thcost
)
e4
:
SetTarget
(
cm
.
thtg
)
e4
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e5
:
SetCategory
(
CATEGORY_REMOVE
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
3
)
e5
:
SetCondition
(
cm
.
rmcon
)
e5
:
SetCost
(
cm
.
rmcost
)
e5
:
SetTarget
(
cm
.
rmtg
)
e5
:
SetOperation
(
cm
.
rmop
)
c
:
RegisterEffect
(
e5
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e6
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e6
:
SetCondition
(
cm
.
effcon
)
e6
:
SetOperation
(
cm
.
regop
)
c
:
RegisterEffect
(
e2
)
if
not
cm
.
global_check
then
cm
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
ge1
:
SetLabel
(
m
)
ge1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
ge1
:
SetOperation
(
aux
.
sumreg
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
ge1
:
Clone
()
ge2
:
SetCode
(
EVENT_FLIP_SUMMON_SUCCESS
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
function
cm
.
acop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsActiveType
(
TYPE_SPELL
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
then
e
:
GetHandler
():
AddCounter
(
0x1
,
1
)
end
end
function
cm
.
acfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsFaceup
()
end
function
cm
.
acop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
eg
:
IsExists
(
cm
.
acfilter
,
1
,
nil
)
then
e
:
GetHandler
():
AddCounter
(
0x1
,
1
)
end
end
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x1
,
2
,
REASON_COST
)
end
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x1
,
2
,
REASON_COST
)
end
function
cm
.
thfilter
(
c
)
return
c
:
IsCanHaveCounter
(
0x1
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_TO_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsLocation
,
LOCATION_DECK
))
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
cm
.
effcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_PENDULUM
)
end
function
cm
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
cm
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
m
)
>
0
end
function
cm
.
rmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
100
)
return
true
end
function
cm
.
costfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x6531
)
and
c
:
IsAbleToGraveAsCost
()
and
not
Duel
.
IsExistingMatchingCard
(
cm
.
bfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
c
:
GetCode
())
end
function
cm
.
bfilter
(
c
,
code
)
return
c
:
IsCode
(
code
)
and
c
:
IsFaceup
()
end
function
cm
.
rmfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToRemove
()
end
function
cm
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
e
:
GetLabel
()
~=
100
then
return
false
end
e
:
SetLabel
(
0
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
rmfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
e
:
GetHandler
():
IsAbleToRemove
()
then
g
:
AddCard
(
e
:
GetHandler
())
end
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
and
#
g
>
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
)
end
function
cm
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
rmfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
e
:
GetHandler
():
IsAbleToRemove
()
then
g
:
AddCard
(
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg
=
g
:
Select
(
tp
,
2
,
2
,
nil
)
if
sg
:
GetCount
()
>
0
then
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
expansions/script/c53737021.lua
deleted
100644 → 0
View file @
e8a886dc
local
m
=
53737021
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"次元秽魔导 卑侮"
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1
)
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
cm
.
acop1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetOperation
(
cm
.
acop2
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e4
:
SetCategory
(
CATEGORY_REMOVE
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_PZONE
)
e4
:
SetCountLimit
(
3
)
e4
:
SetCost
(
cm
.
cost
)
e4
:
SetTarget
(
cm
.
rmtg
)
e4
:
SetOperation
(
cm
.
rmop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e5
:
SetValue
(
cm
.
atkval
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
e6
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e7
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e7
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e7
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e7
:
SetCode
(
EVENT_CHAINING
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCountLimit
(
1
)
e7
:
SetCondition
(
cm
.
negcon
)
e7
:
SetCost
(
cm
.
negcost
)
e7
:
SetTarget
(
cm
.
negtg
)
e7
:
SetOperation
(
cm
.
negop
)
c
:
RegisterEffect
(
e7
)
end
function
cm
.
acop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsActiveType
(
TYPE_SPELL
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
then
e
:
GetHandler
():
AddCounter
(
0x1
,
1
)
end
end
function
cm
.
acfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsFaceup
()
end
function
cm
.
acop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
eg
:
IsExists
(
cm
.
acfilter
,
1
,
nil
)
then
e
:
GetHandler
():
AddCounter
(
0x1
,
1
)
end
end
function
cm
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
cm
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
>
0
and
Duel
.
IsPlayerCanRemove
(
1
-
tp
)
end
end
function
cm
.
rmfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToRemove
()
end
function
cm
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
==
0
or
not
Duel
.
IsPlayerCanRemove
(
1
-
tp
)
then
return
end
local
b1
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
1
):
GetFirst
():
IsAbleToRemove
()
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
rmfilter
,
1
-
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
local
opt
=
0
if
b1
and
b2
then
opt
=
Duel
.
SelectOption
(
1
-
tp
,
aux
.
Stringid
(
m
,
2
),
aux
.
Stringid
(
m
,
3
))
+
1
elseif
b1
then
opt
=
1
elseif
b2
then
opt
=
2
end
if
opt
==
1
then
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
1
)
Duel
.
DisableShuffleCheck
()
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
elseif
opt
==
2
then
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
rmfilter
,
1
-
tp
,
LOCATION_DECK
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_REMOVE
)
local
sg
=
g
:
Select
(
1
-
tp
,
1
,
1
,
nil
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
cm
.
atkval
(
e
)
return
Duel
.
GetCounter
(
e
:
GetHandlerPlayer
(),
1
,
0
,
0x1
)
*-
100
end
function
cm
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
cm
.
negcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x1
,
2
,
REASON_COST
)
end
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x1
,
2
,
REASON_COST
)
end
function
cm
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
cm
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Group
.
__add
(
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
rp
,
LOCATION_HAND
,
0
,
re
:
GetHandler
()),
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
rp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
re
:
GetHandler
()))
if
Duel
.
IsChainDisablable
(
0
)
and
#
g
>
0
and
Duel
.
SelectYesNo
(
rp
,
aux
.
Stringid
(
m
,
4
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
rp
,
HINTMSG_REMOVE
)
local
sg
=
g
:
Select
(
rp
,
1
,
1
,
nil
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
return
end
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
expansions/script/c53737022.lua
deleted
100644 → 0
View file @
e8a886dc
local
m
=
53737022
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"次元秽魔导 志穷"
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1
,
LOCATION_PZONE
+
LOCATION_MZONE
)
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetOperation
(
cm
.
acop1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetRange
(
LOCATION_PZONE
)
e3
:
SetOperation
(
cm
.
acop2
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e4
:
SetCategory
(
CATEGORY_DISABLE
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_PZONE
)
e4
:
SetCountLimit
(
3
)
e4
:
SetCost
(
cm
.
discost
)
e4
:
SetTarget
(
cm
.
distg
)
e4
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DRAW
+
CATEGORY_COUNTER
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_HAND
)
e5
:
SetCost
(
cm
.
spcost
)
e5
:
SetTarget
(
cm
.
sptg
)
e5
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e5
)
end
function
cm
.
acop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsActiveType
(
TYPE_SPELL
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
then
e
:
GetHandler
():
AddCounter
(
0x1
,
1
)
end
end
function
cm
.
acfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsFaceup
()
end
function
cm
.
acop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
eg
:
IsExists
(
cm
.
acfilter
,
1
,
nil
)
then
e
:
GetHandler
():
AddCounter
(
0x1
,
1
)
end
end
function
cm
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
cm
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
cm
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
aux
.
NegateAnyFilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
NegateAnyFilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISABLE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
NegateAnyFilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
((
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
())
or
tc
:
IsType
(
TYPE_TRAPMONSTER
))
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3
)
end
end
end
function
cm
.
rlfilter
(
c
,
tp
)
return
c
:
GetCounter
(
0x1
)
>
0
and
c
:
IsReleasable
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
rlfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
end
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
rlfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
e
:
SetLabel
(
tc
:
GetCounter
(
0x1
)
*
2
)
Duel
.
Release
(
tc
,
REASON_COST
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
return
end
Duel
.
AdjustAll
()
local
b1
=
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
local
ct
=
e
:
GetLabel
()
local
b2
=
ct
>
0
and
Duel
.
GetMatchingGroupCount
(
Card
.
IsCanAddCounter
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
,
0x1
,
1
)
>
0
if
b1
or
b2
then
local
off
=
1
local
ops
,
opval
=
{},{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
m
,
2
)
opval
[
off
]
=
0
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
m
,
3
)
opval
[
off
]
=
1
off
=
off
+
1
end
ops
[
off
]
=
aux
.
Stringid
(
m
,
4
)
opval
[
off
]
=
2
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
+
1
local
sel
=
opval
[
op
]
if
sel
==
0
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
elseif
sel
==
1
then
while
ct
>
0
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_COUNTER
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsCanAddCounter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
0x1
,
1
):
GetFirst
()
if
not
tc
then
break
end
tc
:
AddCounter
(
0x1
,
1
)
ct
=
ct
-
1
end
end
end
end
expansions/script/c88800927.lua
View file @
b9734c79
...
...
@@ -47,6 +47,7 @@ function c88800927.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c88800927
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
88800927
,
0
,
TYPES_EFFECT_TRAP_MONSTER
,
0
,
2000
,
5
,
RACE_ZOMBIE
,
ATTRIBUTE_DARK
)
then
return
end
c
:
AddMonsterAttribute
(
TYPE_EFFECT
+
TYPE_TRAP
)
...
...
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