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
2fd922cd
Commit
2fd922cd
authored
Nov 06, 2019
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua fix
parent
16990a8a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
186 deletions
+111
-186
expansions/script/c26807032.lua
expansions/script/c26807032.lua
+0
-27
expansions/script/c33400257.lua
expansions/script/c33400257.lua
+5
-2
expansions/script/c47535020.lua
expansions/script/c47535020.lua
+1
-0
expansions/script/c77702002.lua
expansions/script/c77702002.lua
+105
-103
expansions/script/c81014000.lua
expansions/script/c81014000.lua
+0
-27
expansions/script/c81014034.lua
expansions/script/c81014034.lua
+0
-27
No files found.
expansions/script/c26807032.lua
View file @
2fd922cd
...
...
@@ -70,33 +70,6 @@ function c26807032.initial_effect(c)
e6
:
SetTarget
(
c26807032
.
tdtg
)
e6
:
SetOperation
(
c26807032
.
tdop
)
c
:
RegisterEffect
(
e6
)
if
scard
.
counter
==
nil
then
scard
.
counter
=
true
scard
[
0
]
=
0
scard
[
1
]
=
0
local
ea
=
Effect
.
CreateEffect
(
c
)
ea
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
ea
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ea
:
SetOperation
(
scard
.
resetcount
)
Duel
.
RegisterEffect
(
ea
,
0
)
local
eb
=
Effect
.
CreateEffect
(
c
)
eb
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
eb
:
SetCode
(
EVENT_RELEASE
)
eb
:
SetOperation
(
scard
.
addcount
)
Duel
.
RegisterEffect
(
eb
,
0
)
end
end
function
scard
.
resetcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
scard
[
0
]
=
0
scard
[
1
]
=
0
end
function
scard
.
addcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
while
tc
do
local
p
=
tc
:
GetReasonPlayer
()
scard
[
p
]
=
scard
[
p
]
+
1
tc
=
eg
:
GetNext
()
end
end
function
c26807032
.
cfilter
(
c
,
tp
)
return
c
:
GetOwner
()
==
1
-
tp
and
c
:
IsAbleToRemoveAsCost
()
...
...
expansions/script/c33400257.lua
View file @
2fd922cd
...
...
@@ -26,8 +26,11 @@ function c33400257.refilter(c)
return
(
c
:
IsSetCard
(
0x341
)
or
c
:
IsSetCard
(
0x340
))
and
c
:
IsReleasable
()
end
function
c33400257
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33400257
.
refilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
c33400257
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33400257
.
refilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
e
:
GetHandler
())
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
loc
=
LOCATION_ONFIELD
if
ft
==
0
then
loc
=
LOCATION_MZONE
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33400257
.
refilter
,
tp
,
loc
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
c33400257
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33400257
.
refilter
,
tp
,
loc
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c33400257
.
filter
(
c
,
e
,
tp
)
...
...
expansions/script/c47535020.lua
View file @
2fd922cd
...
...
@@ -95,6 +95,7 @@ function c47535020.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c47535020
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c47535020
.
scfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
...
...
expansions/script/c77702002.lua
View file @
2fd922cd
local
scard
=
c77702002
local
id
=
77702002
local
scard
=
c77702002
local
id
=
77702002
local
m
=
id
local
cm
=
scard
function
scard
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
scard
.
regtg
)
e1
:
SetOperation
(
function
()
Duel
.
Hint
(
HINT_MUSIC
,
0
,
id
*
16
+
math.random
(
0
,
1
))
end
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
e0
:
SetTarget
(
scard
.
regtg
)
e0
:
SetOperation
(
function
()
Duel
.
Hint
(
HINT_MUSIC
,
0
,
id
*
16
+
math.random
(
0
,
1
))
end
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
--cannot set/activate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SSET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
Set
Code
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
Set
Value
(
1
)
e2
:
Set
TargetRange
(
1
,
0
)
e2
:
Set
Target
(
cm
.
setlimit
)
c
:
RegisterEffect
(
e2
)
--Cannot activate
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e3
:
SetTargetRange
(
1
,
0
)
e3
:
SetValue
(
scard
.
efilter
)
c
:
RegisterEffect
(
e3
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_SSET
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e3
:
SetTargetRange
(
1
,
0
)
e3
:
SetValue
(
function
(
e
,
c
)
return
c
:
IsType
(
TYPE_FIELD
)
end
)
e3
:
SetTargetRange
(
1
,
0
)
e3
:
SetValue
(
cm
.
actlimit
)
c
:
RegisterEffect
(
e3
)
local
e
1
=
Effect
.
CreateEffect
(
c
)
e
1
:
SetCategory
(
CATEGORY_DRAW
)
e
1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e
1
:
SetRange
(
LOCATION_FZONE
)
e
1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
1
:
SetCountLimit
(
1
,
m
)
e
1
:
SetCost
(
scard
.
cost
)
e
1
:
SetTarget
(
scard
.
target
)
e
1
:
SetOperation
(
scard
.
activate
)
c
:
RegisterEffect
(
e
1
)
local
e
1
=
Effect
.
CreateEffect
(
c
)
e
1
:
SetDescription
(
m
*
16
+
2
)
e
1
:
SetCategory
(
CATEGORY_DRAW
)
e
1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e
1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e
1
:
SetRange
(
LOCATION_FZONE
)
e
1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
1
:
SetCountLimit
(
1
)
e
1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e
4
=
Effect
.
CreateEffect
(
c
)
e
4
:
SetCategory
(
CATEGORY_DRAW
)
e
4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e
4
:
SetRange
(
LOCATION_FZONE
)
e
4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
4
:
SetCountLimit
(
1
,
m
)
e
4
:
SetCost
(
scard
.
cost
)
e
4
:
SetTarget
(
scard
.
target
)
e
4
:
SetOperation
(
scard
.
activate
)
c
:
RegisterEffect
(
e
4
)
local
e
5
=
Effect
.
CreateEffect
(
c
)
e
5
:
SetDescription
(
m
*
16
+
2
)
e
5
:
SetCategory
(
CATEGORY_DRAW
)
e
5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e
5
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e
5
:
SetRange
(
LOCATION_FZONE
)
e
5
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
5
:
SetCountLimit
(
1
)
e
5
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
)
e
1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
5
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
scard
[
tp
]
>
0
and
Duel
.
IsPlayerCanDraw
(
tp
,
scard
[
tp
])
end
local
ct
=
scard
[
tp
]
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
ct
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
ct
)
end
)
e
1
:
SetOperation
(
scard
.
activate
)
c
:
RegisterEffect
(
e
1
)
local
e
1
=
Effect
.
CreateEffect
(
c
)
e
1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e
1
:
SetCode
(
EVENT_FREE_CHAIN
)
e
1
:
SetRange
(
LOCATION_GRAVE
)
e
1
:
SetCost
(
aux
.
bfgcost
)
e
1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e
1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e
1
:
SetType
(
EFFECT_TYPE_FIELD
)
e
1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e
1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e
1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsType
,
TYPE_RITUAL
))
e
1
:
SetValue
(
function
(
e
,
re
)
e
5
:
SetOperation
(
scard
.
activate
)
c
:
RegisterEffect
(
e
5
)
local
e
6
=
Effect
.
CreateEffect
(
c
)
e
6
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e
6
:
SetCode
(
EVENT_FREE_CHAIN
)
e
6
:
SetRange
(
LOCATION_GRAVE
)
e
6
:
SetCost
(
aux
.
bfgcost
)
e
6
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e
7
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e
7
:
SetType
(
EFFECT_TYPE_FIELD
)
e
7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e
7
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e
7
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsType
,
TYPE_RITUAL
))
e
7
:
SetValue
(
function
(
e
,
re
)
return
e
:
GetOwner
()
~=
re
:
GetOwner
()
and
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
)
e
1
:
SetReset
(
RESET_PHASE
+
PHASE_MAIN2
)
Duel
.
RegisterEffect
(
e
1
,
tp
)
e
7
:
SetReset
(
RESET_PHASE
+
PHASE_MAIN2
)
Duel
.
RegisterEffect
(
e
7
,
tp
)
end
)
c
:
RegisterEffect
(
e
1
)
local
e
2
=
Effect
.
CreateEffect
(
c
)
e
2
:
SetDescription
(
m
*
16
+
4
)
e
2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e
2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e
2
:
SetRange
(
LOCATION_FZONE
)
e
2
:
SetCountLimit
(
1
)
e
2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e
2
:
SetCondition
(
cm
.
descon
)
e
2
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e
2
)
c
:
RegisterEffect
(
e
6
)
local
e
8
=
Effect
.
CreateEffect
(
c
)
e
8
:
SetDescription
(
m
*
16
+
4
)
e
8
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e
8
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e
8
:
SetRange
(
LOCATION_FZONE
)
e
8
:
SetCountLimit
(
1
)
e
8
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e
8
:
SetCondition
(
cm
.
descon
)
e
8
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e
8
)
if
scard
.
counter
==
nil
then
scard
.
counter
=
true
scard
[
0
]
=
0
scard
[
1
]
=
0
local
e
2
=
Effect
.
CreateEffect
(
c
)
e
2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e
2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
e
2
:
SetOperation
(
scard
.
resetcount
)
Duel
.
RegisterEffect
(
e
2
,
0
)
local
e
3
=
Effect
.
CreateEffect
(
c
)
e
3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e
3
:
SetCode
(
EVENT_RELEASE
)
e
3
:
SetOperation
(
scard
.
addcount
)
Duel
.
RegisterEffect
(
e
3
,
0
)
local
e
9
=
Effect
.
CreateEffect
(
c
)
e
9
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e
9
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
e
9
:
SetOperation
(
scard
.
resetcount
)
Duel
.
RegisterEffect
(
e
9
,
0
)
local
e
a
=
Effect
.
CreateEffect
(
c
)
e
a
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e
a
:
SetCode
(
EVENT_RELEASE
)
e
a
:
SetOperation
(
scard
.
addcount
)
Duel
.
RegisterEffect
(
e
a
,
0
)
end
end
function
scard
.
resetcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
@@ -138,39 +138,35 @@ function scard.activate(e,tp,eg,ep,ev,re,r,rp)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
function
scard
.
efilter
(
e
,
re
,
tp
)
return
re
:
GetHandler
():
IsType
(
TYPE_FIELD
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
function
scard
.
regtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
function
scard
.
regtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
--to grave
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
m
*
16
+
3
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetCondition
(
scard
.
gycon
)
e1
:
SetOperation
(
scard
.
gyop
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
SetTurnCounter
(
0
)
c
:
RegisterEffect
(
e1
)
end
function
scard
.
gycon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
function
scard
.
gycon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
scard
.
gyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ct
=
c
:
GetTurnCounter
()
ct
=
ct
+
1
function
scard
.
gyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ct
=
c
:
GetTurnCounter
()
ct
=
ct
+
1
c
:
SetTurnCounter
(
ct
)
if
ct
==
7
then
Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
if
ct
==
3
then
Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
end
end
function
cm
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
@@ -183,3 +179,9 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
,
e
:
GetHandler
())
else
Duel
.
SendtoGrave
(
c
,
REASON_COST
)
end
end
function
cm
.
setlimit
(
e
,
c
,
tp
)
return
c
:
IsType
(
TYPE_FIELD
)
end
function
cm
.
actlimit
(
e
,
re
,
tp
)
return
re
:
IsActiveType
(
TYPE_FIELD
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
expansions/script/c81014000.lua
View file @
2fd922cd
...
...
@@ -76,33 +76,6 @@ function c81014000.initial_effect(c)
e6
:
SetTarget
(
c81014000
.
negtg
)
e6
:
SetOperation
(
c81014000
.
negop
)
c
:
RegisterEffect
(
e6
)
if
scard
.
counter
==
nil
then
scard
.
counter
=
true
scard
[
0
]
=
0
scard
[
1
]
=
0
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
e2
:
SetOperation
(
scard
.
resetcount
)
Duel
.
RegisterEffect
(
e2
,
0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_RELEASE
)
e3
:
SetOperation
(
scard
.
addcount
)
Duel
.
RegisterEffect
(
e3
,
0
)
end
end
function
scard
.
resetcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
scard
[
0
]
=
0
scard
[
1
]
=
0
end
function
scard
.
addcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
while
tc
do
local
p
=
tc
:
GetReasonPlayer
()
scard
[
p
]
=
scard
[
p
]
+
1
tc
=
eg
:
GetNext
()
end
end
function
c81014000
.
setlimit
(
e
,
c
,
tp
)
return
c
:
IsType
(
TYPE_FIELD
)
...
...
expansions/script/c81014034.lua
View file @
2fd922cd
...
...
@@ -65,33 +65,6 @@ function c81014034.initial_effect(c)
e5
:
SetCondition
(
c81014034
.
drcon
)
e5
:
SetOperation
(
c81014034
.
drop
)
c
:
RegisterEffect
(
e5
)
if
scard
.
counter
==
nil
then
scard
.
counter
=
true
scard
[
0
]
=
0
scard
[
1
]
=
0
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
e2
:
SetOperation
(
scard
.
resetcount
)
Duel
.
RegisterEffect
(
e2
,
0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_RELEASE
)
e3
:
SetOperation
(
scard
.
addcount
)
Duel
.
RegisterEffect
(
e3
,
0
)
end
end
function
scard
.
resetcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
scard
[
0
]
=
0
scard
[
1
]
=
0
end
function
scard
.
addcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
while
tc
do
local
p
=
tc
:
GetReasonPlayer
()
scard
[
p
]
=
scard
[
p
]
+
1
tc
=
eg
:
GetNext
()
end
end
function
c81014034
.
setlimit
(
e
,
c
,
tp
)
return
c
:
IsType
(
TYPE_FIELD
)
...
...
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