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
Ai
ygopro-222DIY-cards
Commits
7479544d
Commit
7479544d
authored
Aug 21, 2022
by
Tachibana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E
parent
a47e1e45
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
208 additions
and
168 deletions
+208
-168
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c15000060.lua
expansions/script/c15000060.lua
+112
-166
expansions/script/c33200740.lua
expansions/script/c33200740.lua
+0
-1
expansions/script/c33700354.lua
expansions/script/c33700354.lua
+95
-0
expansions/script/c33711107.lua
expansions/script/c33711107.lua
+1
-1
No files found.
expansions/222DIY.cdb
View file @
7479544d
No preview for this file type
expansions/script/c15000060.lua
View file @
7479544d
...
@@ -15,7 +15,7 @@ function cm.initial_effect(c)
...
@@ -15,7 +15,7 @@ function cm.initial_effect(c)
e2
:
SetCategory
(
CATEGORY_COUNTER
)
e2
:
SetCategory
(
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetOperation
(
c
15000060
.
ctop
)
e2
:
SetOperation
(
c
m
.
ctop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--counter
--counter
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
...
@@ -24,7 +24,7 @@ function cm.initial_effect(c)
...
@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetOperation
(
c
15000060
.
ct2op
)
e3
:
SetOperation
(
c
m
.
ct2op
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
Clone
(
e3
)
local
e4
=
Effect
.
Clone
(
e3
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
...
@@ -33,14 +33,13 @@ function cm.initial_effect(c)
...
@@ -33,14 +33,13 @@ function cm.initial_effect(c)
e5
:
SetCode
(
EVENT_FLIP
)
e5
:
SetCode
(
EVENT_FLIP
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
--san Check
--san Check
local
e6
=
Effect
.
CreateEffect
(
c
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetCategory
(
CATEGORY_COUNTER
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetRange
(
LOCATION_FZONE
)
e6
:
SetRange
(
LOCATION_FZONE
)
e6
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e6
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e6
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e6
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e6
:
SetCondition
(
c
15000060
.
sccon
)
e6
:
SetCondition
(
c
m
.
sccon
)
e6
:
SetOperation
(
c
15000060
.
scop
)
e6
:
SetOperation
(
c
m
.
scop
)
c
:
RegisterEffect
(
e6
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
Clone
(
e6
)
local
e7
=
Effect
.
Clone
(
e6
)
e7
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e7
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
...
@@ -49,32 +48,47 @@ function cm.initial_effect(c)
...
@@ -49,32 +48,47 @@ function cm.initial_effect(c)
e8
:
SetCode
(
EVENT_FLIP_SUMMON_SUCCESS
)
e8
:
SetCode
(
EVENT_FLIP_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e8
)
c
:
RegisterEffect
(
e8
)
end
end
cm
.
toss_dice
=
true
function
cm
.
roll
(
min
,
max
)
function
c15000060
.
ctfilter
(
c
)
local
A
=
1103515245
local
B
=
12345
local
M
=
32767
min
=
tonumber
(
min
)
max
=
tonumber
(
max
)
cm
.
r
=
((
cm
.
r
*
A
+
B
)
%
M
)
/
M
if
min
~=
nil
then
if
max
==
nil
then
return
math.floor
(
cm
.
r
*
min
)
+
1
else
max
=
max
-
min
+
1
return
math.floor
(
cm
.
r
*
max
+
min
)
end
end
return
cm
.
r
end
function
cm
.
ctfilter
(
c
)
return
c
:
IsFaceup
()
return
c
:
IsFaceup
()
end
end
function
c15000060
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
ctcount
(
c
)
local
count
=
0
count
=
c
:
GetLevel
()
*
10
if
c
:
IsType
(
TYPE_XYZ
)
then
count
=
c
:
GetRank
()
*
10
end
if
c
:
IsType
(
TYPE_LINK
)
then
count
=
c
:
GetLink
()
*
20
end
if
count
>=
60
then
count
=
60
end
return
count
end
function
cm
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c
15000060
.
ctfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c
m
.
ctfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
while
tc
do
while
tc
do
if
tc
:
GetCounter
(
0x1f33
)
==
0
then
if
tc
:
GetCounter
(
0x1f33
)
==
0
then
if
tc
:
GetLevel
()
~=
nil
then
local
count
=
cm
.
ctcount
(
tc
)
local
x
=
tc
:
GetLevel
()
*
10
tc
:
AddCounter
(
0x1f33
,
count
)
if
x
>=
60
then
x
=
60
end
tc
:
AddCounter
(
0x1f33
,
x
)
end
if
tc
:
IsType
(
TYPE_XYZ
)
then
local
y
=
tc
:
GetRank
()
*
10
if
y
>=
60
then
y
=
60
end
tc
:
AddCounter
(
0x1f33
,
y
)
end
if
tc
:
IsType
(
TYPE_LINK
)
then
local
z
=
tc
:
GetLink
()
*
20
if
z
>=
60
then
z
=
60
end
tc
:
AddCounter
(
0x1f33
,
z
)
end
end
end
tc
=
g
:
GetNext
()
tc
=
g
:
GetNext
()
end
end
...
@@ -83,100 +97,109 @@ function c15000060.ctop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -83,100 +97,109 @@ function c15000060.ctop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
1
)
e1
:
SetTargetRange
(
1
,
1
)
e1
:
SetCondition
(
c
15000060
.
con
)
e1
:
SetCondition
(
c
m
.
con
)
e1
:
SetValue
(
c
15000060
.
actlimit
)
e1
:
SetValue
(
c
m
.
actlimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SSET
)
e2
:
SetCode
(
EFFECT_CANNOT_SSET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
1
,
1
)
e2
:
SetTargetRange
(
1
,
1
)
e2
:
SetCondition
(
c
15000060
.
con
)
e2
:
SetCondition
(
c
m
.
con
)
e2
:
SetTarget
(
c
15000060
.
setlimit
)
e2
:
SetTarget
(
c
m
.
setlimit
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
if
not
cm
.
r
then
local
result
=
0
local
g
=
Duel
.
GetFieldGroup
(
0
,
0xff
,
0xff
):
RandomSelect
(
2
,
8
)
local
ct
=
{}
local
c
=
g
:
GetFirst
()
for
i
=
0
,
7
do
ct
[
c
]
=
i
c
=
g
:
GetNext
()
end
for
i
=
0
,
10
do
result
=
result
+
(
ct
[
g
:
RandomSelect
(
2
,
1
):
GetFirst
()]
<<
(
3
*
i
))
end
g
:
DeleteGroup
()
cm
.
r
=
result
&
0xffffffff
end
Duel
.
RegisterFlagEffect
(
tp
,
15000060
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
15000060
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c
15000060
.
con
(
e
)
function
c
m
.
con
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_FZONE
)
and
e
:
GetHandler
():
IsFaceup
()
return
e
:
GetHandler
():
IsLocation
(
LOCATION_FZONE
)
and
e
:
GetHandler
():
IsFaceup
()
end
end
function
c
15000060
.
actlimit
(
e
,
re
,
tp
)
function
c
m
.
actlimit
(
e
,
re
,
tp
)
return
re
:
IsActiveType
(
TYPE_FIELD
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
GetHandler
():
GetOwner
()
==
e
:
GetHandler
():
GetOwner
()
return
re
:
IsActiveType
(
TYPE_FIELD
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
GetHandler
():
GetOwner
()
==
e
:
GetHandler
():
GetOwner
()
end
end
function
c
15000060
.
setlimit
(
e
,
c
,
tp
)
function
c
m
.
setlimit
(
e
,
c
,
tp
)
return
c
:
IsType
(
TYPE_FIELD
)
and
c
:
GetOwner
()
==
e
:
GetHandler
():
GetOwner
()
return
c
:
IsType
(
TYPE_FIELD
)
and
c
:
GetOwner
()
==
e
:
GetHandler
():
GetOwner
()
end
end
function
c
15000060
.
ct2op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
ct2op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
local
tc
=
eg
:
GetFirst
()
local
tc
=
eg
:
GetFirst
()
while
tc
do
while
tc
do
if
tc
:
IsFaceup
()
and
tc
:
IsControler
(
1
-
tp
)
then
if
tc
:
IsFaceup
()
and
tc
:
IsControler
(
1
-
tp
)
then
if
tc
:
GetCounter
(
0x1f33
)
==
0
then
local
count
=
cm
.
ctcount
(
tc
)
if
tc
:
GetLevel
()
~=
nil
then
tc
:
AddCounter
(
0x1f33
,
count
)
local
x
=
tc
:
GetLevel
()
*
10
if
x
>=
60
then
x
=
60
end
tc
:
AddCounter
(
0x1f33
,
x
)
end
if
tc
:
IsType
(
TYPE_XYZ
)
then
local
y
=
tc
:
GetRank
()
*
10
if
y
>=
60
then
y
=
60
end
tc
:
AddCounter
(
0x1f33
,
y
)
end
if
tc
:
IsType
(
TYPE_LINK
)
then
local
z
=
tc
:
GetLink
()
*
20
if
z
>=
60
then
z
=
60
end
tc
:
AddCounter
(
0x1f33
,
z
)
end
end
end
end
tc
=
eg
:
GetNext
()
tc
=
eg
:
GetNext
()
end
end
Duel
.
RegisterFlagEffect
(
tp
,
15000060
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
15000060
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c
15000060
.
scfilter
(
c
,
tp
)
function
c
m
.
scfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xf33
)
and
c
:
IsControler
(
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xf33
)
and
c
:
IsControler
(
tp
)
end
end
function
c
15000060
.
sc2filter
(
c
,
tp
)
function
c
m
.
sc2filter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x1f33
)
and
c
:
IsControler
(
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x1f33
)
and
c
:
IsControler
(
tp
)
end
end
function
c15000060
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c15000060
.
scfilter
,
1
,
nil
,
tp
)
return
eg
:
IsExists
(
cm
.
scfilter
,
1
,
nil
,
tp
)
end
function
cm
.
scopop
(
e
,
c
,
tc
)
local
z
=
cm
.
ctcount
(
tc
)
local
sc
=
tc
:
GetCounter
(
0x1f33
)
if
sc
<=
z
*
4
/
5
then
local
atk
=
tc
:
GetBaseAttack
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
math.ceil
(
atk
/
2
))
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
,
true
)
end
if
sc
<=
z
*
3
/
5
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
end
if
sc
<=
z
*
1
/
5
then
Duel
.
Remove
(
tc
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
end
function
c15000060
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
15000060
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c15000060
.
ctfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
ctfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
Hint
(
HINT_CARD
,
0
,
15000060
)
end
while
tc
do
while
tc
do
if
tc
:
GetCounter
(
0x1f33
)
~=
0
then
if
tc
:
GetCounter
(
0x1f33
)
~=
0
then
local
tg
=
Group
.
FromCards
(
tc
)
Duel
.
HintSelection
(
Group
.
FromCards
(
tc
))
Duel
.
HintSelection
(
tg
)
local
sc
=
tc
:
GetCounter
(
0x1f33
)
local
sc
=
tc
:
GetCounter
(
0x1f33
)
local
aag
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
0xff
,
0xff
,
nil
)
local
dice1
=
cm
.
roll
(
1
,
10
)
local
ccg
=
Group
.
RandomSelect
(
aag
,
tp
,
10
)
e
:
GetHandler
():
SetTurnCounter
(
dice1
)
local
bc
=
ccg
:
GetFirst
()
local
dice2
=
cm
.
roll
(
1
,
10
)
local
y
=
1
e
:
GetHandler
():
SetTurnCounter
(
dice2
)
while
bc
do
if
dice1
==
10
and
dice2
~=
10
then
dice1
=
0
end
bc
:
RegisterFlagEffect
(
15000061
,
RESET_PHASE
+
PHASE_END
,
0
,
99
,
y
)
if
dice1
~=
10
and
dice2
==
10
then
dice2
=
0
end
y
=
y
+
1
local
x
=
(
dice1
*
10
)
+
dice2
bc
=
ccg
:
GetNext
()
if
dice1
==
10
and
dice2
==
10
then
x
=
100
end
end
if
x
>=
sc
or
eg
:
IsExists
(
cm
.
sc2filter
,
1
,
nil
,
tp
)
then
local
bac
=
Group
.
RandomSelect
(
ccg
,
tp
,
1
):
GetFirst
()
local
x1
=
bac
:
GetFlagEffectLabel
(
15000061
)
e
:
GetHandler
():
SetTurnCounter
(
x1
)
local
bbc
=
Group
.
RandomSelect
(
ccg
,
tp
,
1
):
GetFirst
()
local
x2
=
bbc
:
GetFlagEffectLabel
(
15000061
)
e
:
GetHandler
():
SetTurnCounter
(
x2
)
local
bc
=
ccg
:
GetFirst
()
while
bc
do
bc
:
ResetFlagEffect
(
15000061
)
bc
=
ccg
:
GetNext
()
end
if
x1
==
10
and
x2
~=
10
then
x1
=
0
end
if
x2
==
10
and
x1
~=
10
then
x2
=
0
end
if
x1
==
10
and
x2
==
10
then
x2
=
0
end
local
x
=
(
x1
*
10
)
+
x2
if
x
>=
sc
or
eg
:
IsExists
(
c15000060
.
sc2filter
,
1
,
nil
,
tp
)
then
if
x
<
95
then
if
x
<
95
then
Duel
.
Hint
(
HINT_CARD
,
0
,
15000062
)
Duel
.
Hint
(
HINT_CARD
,
0
,
15000062
)
local
d1
=
Duel
.
TossDice
(
1
-
tp
,
1
)
local
d1
=
Duel
.
TossDice
(
1
-
tp
,
1
)
...
@@ -191,86 +214,9 @@ function c15000060.scop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -191,86 +214,9 @@ function c15000060.scop(e,tp,eg,ep,ev,re,r,rp)
if
d4
>=
tc
:
GetCounter
(
0x1f33
)
then
d4
=
tc
:
GetCounter
(
0x1f33
)
-
1
end
if
d4
>=
tc
:
GetCounter
(
0x1f33
)
then
d4
=
tc
:
GetCounter
(
0x1f33
)
-
1
end
tc
:
RemoveCounter
(
tp
,
0x1f33
,
d4
,
REASON_EFFECT
)
tc
:
RemoveCounter
(
tp
,
0x1f33
,
d4
,
REASON_EFFECT
)
end
end
if
tc
:
IsType
(
TYPE_LINK
)
then
cm
.
scopop
(
e
,
c
,
tc
)
local
z
=
tc
:
GetLink
()
*
20
if
z
>=
60
then
z
=
60
end
local
sc
=
tc
:
GetCounter
(
0x1f33
)
if
sc
<=
z
*
4
/
5
then
local
atk
=
tc
:
GetBaseAttack
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
math.ceil
(
atk
/
2
))
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
,
true
)
end
if
sc
<=
z
*
3
/
5
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
end
if
sc
<=
z
*
1
/
5
then
Duel
.
Remove
(
tc
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
if
tc
:
IsType
(
TYPE_XYZ
)
then
local
y
=
tc
:
GetRank
()
*
10
if
y
>=
60
then
y
=
60
end
local
sc
=
tc
:
GetCounter
(
0x1f33
)
if
sc
<=
y
*
4
/
5
then
local
atk
=
tc
:
GetBaseAttack
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
math.ceil
(
atk
/
2
))
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
,
true
)
end
if
sc
<=
y
*
3
/
5
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
end
if
sc
<=
y
*
1
/
5
then
Duel
.
Remove
(
tc
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
if
(
not
tc
:
IsType
(
TYPE_LINK
)
and
not
tc
:
IsType
(
TYPE_XYZ
))
then
local
x
=
tc
:
GetLevel
()
*
10
if
x
>=
60
then
x
=
60
end
local
sc
=
tc
:
GetCounter
(
0x1f33
)
if
sc
<=
x
*
4
/
5
then
local
atk
=
tc
:
GetBaseAttack
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
math.ceil
(
atk
/
2
))
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
,
true
)
end
if
sc
<=
x
*
3
/
5
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
end
if
sc
<=
x
*
1
/
5
then
Duel
.
Remove
(
tc
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
end
end
if
x
<
sc
and
not
eg
:
IsExists
(
c
15000060
.
sc2filter
,
1
,
nil
,
tp
)
then
if
x
<
sc
and
not
eg
:
IsExists
(
c
m
.
sc2filter
,
1
,
nil
,
tp
)
then
Duel
.
Hint
(
HINT_CARD
,
0
,
15000061
)
Duel
.
Hint
(
HINT_CARD
,
0
,
15000061
)
end
end
end
end
...
...
expansions/script/c33200740.lua
View file @
7479544d
...
@@ -84,7 +84,6 @@ function c33200740.counttg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -84,7 +84,6 @@ function c33200740.counttg(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
0x32a
,
2
)
and
Duel
.
IsExistingTarget
(
c33200740
.
cfilter
,
tp
,
LOCATION_REMOVED
,
0
,
2
,
nil
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
0x32a
,
2
)
and
Duel
.
IsExistingTarget
(
c33200740
.
cfilter
,
tp
,
LOCATION_REMOVED
,
0
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c33200740
.
cfilter
,
tp
,
LOCATION_REMOVED
,
0
,
2
,
2
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c33200740
.
cfilter
,
tp
,
LOCATION_REMOVED
,
0
,
2
,
2
,
nil
)
Duel
.
HintSelection
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
e
:
GetHandler
(),
0
,
0x32a
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
e
:
GetHandler
(),
0
,
0x32a
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
2
,
0
,
0
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
33200740
,
1
))
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
33200740
,
1
))
...
...
expansions/script/c33700354.lua
View file @
7479544d
...
@@ -3,5 +3,100 @@ local m=33700354
...
@@ -3,5 +3,100 @@ local m=33700354
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
aux
.
AddXyzProcedureLevelFree
(
c
,
nil
,
cm
.
gcheck
,
2
,
63
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TOSS_DICE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
cm
.
dicecon
)
e2
:
SetOperation
(
cm
.
diceop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_TOSS_COIN
)
e3
:
SetOperation
(
cm
.
coinop
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
gcheck
(
g
)
return
g
:
GetClassCount
(
Card
.
GetCode
)
==
1
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
))
if
op
==
0
then
local
coinop
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
),
aux
.
Stringid
(
m
,
3
))
_TossCoin
=
Duel
.
TossCoin
function
Duel
.
TossCoin
(
player
,
count
)
local
boolflg
=
false
local
result
=
{
_TossCoin
(
player
,
count
)}
local
result_ret
=
{}
for
i
=
0
,
count
do
if
boolflg
==
false
then
table.insert
(
result_ret
,
coinop
)
else
table.insert
(
result_ret
,
result
[
i
])
end
end
Duel
.
TossCoin
=
_TossCoin
return
table.unpack
(
result_ret
)
end
else
local
diceop
=
Duel
.
AnnounceNumber
(
tp
,
1
,
2
,
3
,
4
,
5
,
6
)
_TossDice
=
Duel
.
TossDice
function
Duel
.
TossDice
(
player
,
count
,
count2
)
local
boolflg
=
true
local
result
=
{
_TossDice
(
player
,
count
,
count2
)}
local
result_ret
=
{}
local
sum
=
count
if
count2
then
sum
=
sum
+
count2
end
for
i
=
0
,
sum
do
if
boolflg
==
true
then
table.insert
(
result_ret
,
diceop
)
boolflg
=
false
else
table.insert
(
result_ret
,
result
[
i
])
end
end
Duel
.
TossDice
=
_TossDice
return
table.unpack
(
result_ret
)
end
end
end
function
cm
.
dicecon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
==
tp
end
function
cm
.
diceop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
flag
=
0
local
dc
=
{
Duel
.
GetDiceResult
()}
for
_
,
v
in
ipairs
(
dc
)
do
if
v
==
6
then
flag
=
flag
+
1
end
end
Duel
.
Recover
(
tp
,
flag
*
2000
,
REASON_EFFECT
)
end
end
function
cm
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
flag
=
0
local
dc
=
{
Duel
.
GetCoinResult
()}
for
_
,
v
in
ipairs
(
dc
)
do
if
v
==
1
then
flag
=
flag
+
1
end
end
Duel
.
Recover
(
tp
,
flag
*
2000
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c33711107.lua
View file @
7479544d
...
@@ -144,7 +144,7 @@ function cm.sumval(e,c)
...
@@ -144,7 +144,7 @@ function cm.sumval(e,c)
return
c
:
IsControler
(
sp
)
return
c
:
IsControler
(
sp
)
end
end
function
cm
.
drcon
(
e
)
function
cm
.
drcon
(
e
)
return
Duel
.
GetTurnPlayer
()
=
1
-
cm
.
GetNorthPlayer
(
e
:
GetHandler
(),
e
:
GetHandlerPlayer
())
return
Duel
.
GetTurnPlayer
()
=
=
1
-
cm
.
GetNorthPlayer
(
e
:
GetHandler
(),
e
:
GetHandlerPlayer
())
end
end
function
cm
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sp
=
cm
.
GetNorthPlayer
(
e
:
GetHandler
(),
tp
)
local
sp
=
cm
.
GetNorthPlayer
(
e
:
GetHandler
(),
tp
)
...
...
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