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
4eb3e222
Commit
4eb3e222
authored
Oct 28, 2024
by
Huangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
fb9c1af4
Pipeline
#30773
passed with stages
in 36 minutes and 40 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1088 additions
and
0 deletions
+1088
-0
expansions/FiNALE.cdb
expansions/FiNALE.cdb
+0
-0
expansions/pics/50218151.jpg
expansions/pics/50218151.jpg
+0
-0
expansions/pics/c81901002.lua
expansions/pics/c81901002.lua
+98
-0
expansions/pics/c81901006.lua
expansions/pics/c81901006.lua
+143
-0
expansions/pics/c81901007.lua
expansions/pics/c81901007.lua
+122
-0
expansions/pics/c81901009.lua
expansions/pics/c81901009.lua
+152
-0
expansions/pics/c81901010.lua
expansions/pics/c81901010.lua
+148
-0
expansions/pics/c81901012.lua
expansions/pics/c81901012.lua
+137
-0
expansions/pics/c81901015.lua
expansions/pics/c81901015.lua
+147
-0
expansions/pics/c81901016.lua
expansions/pics/c81901016.lua
+141
-0
No files found.
expansions/FiNALE.cdb
View file @
4eb3e222
No preview for this file type
expansions/pics/50218151.jpg
View replaced file @
fb9c1af4
View file @
4eb3e222
121 KB
|
W:
|
H:
186 KB
|
W:
|
H:
2-up
Swipe
Onion skin
expansions/pics/c81901002.lua
0 → 100644
View file @
4eb3e222
--無☆茶☆苦☆茶 鬼杰番长
local
m
=
81901002
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"yakumonue.lua"
)
function
cm
.
initial_effect
(
c
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
cm
.
thcon
)
e1
:
SetCost
(
cm
.
thcost
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e1
)
--disable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
cm
.
distg
)
e2
:
SetValue
(
0
)
c
:
RegisterEffect
(
e2
)
--to hand
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e4
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_TO_GRAVE
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCountLimit
(
1
,
m
+
100
)
e4
:
SetTarget
(
cm
.
thtg2
)
e4
:
SetOperation
(
cm
.
thop2
)
c
:
RegisterEffect
(
e4
)
end
--goback
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
return
tc
:
IsFaceup
()
end
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
end
function
cm
.
thfilter
(
c
)
return
c
:
IsAbleToHand
()
and
(
c
:
IsSummonType
(
SUMMON_TYPE_NORMAL
)
or
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
))
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
thfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetChainLimit
(
cm
.
chain
)
end
function
cm
.
chain
(
e
,
rp
,
tp
)
return
not
(
e
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
and
(
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
or
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_NORMAL
)))
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
thfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
ct
=
g
:
GetCount
()
if
ct
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
Draw
(
1
-
tp
,
ct
,
REASON_EFFECT
)
Duel
.
Recover
(
tp
,
ct
*
1000
,
REASON_EFFECT
)
end
end
--disable and cannnot active
function
cm
.
distg
(
e
,
c
)
return
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
or
c
:
IsSummonType
(
SUMMON_TYPE_NORMAL
)
end
--tohand
function
cm
.
thfilter2
(
c
)
return
c
:
IsSetCard
(
0x1850
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
m
)
end
function
cm
.
thtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
1
-
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
1
-
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
thop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
1
-
tp
,
1
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/pics/c81901006.lua
0 → 100644
View file @
4eb3e222
--無☆茶☆苦☆茶 紫苑毫无疑问是天使
local
m
=
81901006
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"yakumonue.lua"
)
function
cm
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_TO_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
--damage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TO_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
cm
.
damcon1
)
e2
:
SetOperation
(
cm
.
damop1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_TO_HAND
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
cm
.
regcon
)
e3
:
SetOperation
(
cm
.
regop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
cm
.
damcon2
)
e4
:
SetOperation
(
cm
.
damop2
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e5
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_GRAVE_SPSUMMON
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e5
:
SetCountLimit
(
1
,
m
+
500
)
e5
:
SetTarget
(
cm
.
sptg2
)
e5
:
SetOperation
(
cm
.
spop2
)
c
:
RegisterEffect
(
e5
)
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_CHAIN_SOLVING
)
ge1
:
SetOperation
(
cm
.
count
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
ge2
:
SetOperation
(
cm
.
reset
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
--spsummon
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DRAW
and
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
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
)
end
function
cm
.
spfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanTurnSet
()
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINTMSG_SELECT
,
tp
,
HINTMSG_POSCHANGE
)
local
pg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
ChangePosition
(
pg
,
POS_FACEDOWN
)
end
end
--dam
function
cm
.
count
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
cm
.
chain_solving
=
true
end
function
cm
.
reset
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
cm
.
chain_solving
=
false
end
function
cm
.
damcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
and
not
cm
.
chain_solving
end
function
cm
.
damop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
local
ct
=
eg
:
FilterCount
(
Card
.
IsControler
,
nil
,
1
-
tp
)
Duel
.
Damage
(
1
-
tp
,
ct
*
200
,
REASON_EFFECT
)
end
function
cm
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
and
cm
.
chain_solving
end
function
cm
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
eg
:
FilterCount
(
Card
.
IsControler
,
nil
,
1
-
tp
)
e
:
GetHandler
():
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_CHAIN
,
0
,
1
,
ct
)
end
function
cm
.
damcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
m
)
>
0
end
function
cm
.
damop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
local
labels
=
{
e
:
GetHandler
():
GetFlagEffectLabel
(
m
)}
local
ct
=
0
for
i
=
1
,
#
labels
do
ct
=
ct
+
labels
[
i
]
end
e
:
GetHandler
():
ResetFlagEffect
(
m
)
Duel
.
Damage
(
1
-
tp
,
ct
*
200
,
REASON_EFFECT
)
end
--des and spsummon
function
cm
.
spfilter2
(
c
,
e
,
tp
)
return
c
:
GetBaseAttack
()
==
0
and
c
:
IsLevel
(
8
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsSummonableCard
()
end
function
cm
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDestructable
()
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
spfilter2
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
tp
,
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_GRAVE_SPSUMMON
+
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter2
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
==
0
then
return
end
Duel
.
Hint
(
HINTMSG_SELECT
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter2
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
(),
e
,
tp
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
\ No newline at end of file
expansions/pics/c81901007.lua
0 → 100644
View file @
4eb3e222
--無☆茶☆苦☆茶 灾厄流雏
local
m
=
81901007
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"81901011.lua"
)
function
cm
.
initial_effect
(
c
)
--Release
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_RELEASE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
cm
.
rlcon
)
e1
:
SetCost
(
cm
.
rlcost
)
e1
:
SetTarget
(
cm
.
rltg
)
e1
:
SetOperation
(
cm
.
rlop
)
c
:
RegisterEffect
(
e1
)
--Release2
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetCategory
(
CATEGORY_RELEASE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e11
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e11
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e11
:
SetCode
(
EVENT_FREE_CHAIN
)
e11
:
SetRange
(
LOCATION_HAND
)
e11
:
SetCountLimit
(
1
,
m
)
e11
:
SetCondition
(
cm
.
rlcon2
)
e11
:
SetCost
(
cm
.
rlcost
)
e11
:
SetTarget
(
cm
.
rltg
)
e11
:
SetOperation
(
cm
.
rlop
)
c
:
RegisterEffect
(
e11
)
--damage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_DAMAGE
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
m
+
100
)
e2
:
SetCondition
(
cm
.
condition
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e2
)
end
--Release
function
cm
.
rlcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
end
function
cm
.
rlcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
cm
.
rlcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
81901026
)
>
0
end
function
cm
.
rlfilter
(
c
,
tp
)
return
c
:
IsReleasable
()
and
(
Duel
.
GetMZoneCount
(
1
-
tp
,
c
,
tp
)
>
0
or
Duel
.
GetMZoneCount
(
tp
,
c
,
tp
)
>
0
)
end
function
cm
.
rltg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
81900006
,
nil
,
TYPES_TOKEN_MONSTER
,
0
,
0
,
8
,
RACE_ZOMBIE
,
ATTRIBUTE_DARK
,
POS_FACEUP
,
1
-
tp
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
rlfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RELEASE
,
nil
,
1
,
0
,
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
end
function
cm
.
rlop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
rlfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
local
sp
=
tc
:
GetOwner
()
Duel
.
Release
(
g
,
REASON_EFFECT
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
BreakEffect
()
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
81900006
,
nil
,
TYPES_TOKEN_MONSTER
,
0
,
0
,
8
,
RACE_ZOMBIE
,
ATTRIBUTE_DARK
,
POS_FACEUP
,
sp
,
LOCATION_MZONE
,
0
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
81900006
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
sp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
1
)
token
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_NO_BATTLE_DAMAGE
)
e2
:
SetValue
(
1
)
token
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
e3
:
SetValue
(
1
)
token
:
RegisterEffect
(
e3
)
end
end
end
function
cm
.
damcon
(
e
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
end
--damage
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
end
function
cm
.
damfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetLevel
()
>
0
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
dam
=
(
Duel
.
GetMatchingGroup
(
cm
.
damfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
):
GetSum
(
Card
.
GetLevel
))
*
100
local
dg
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
TYPE_TOKEN
)
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
dam
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
dam
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
dg
,
dg
:
GetCount
(),
0
,
0
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
dam
=
(
Duel
.
GetMatchingGroup
(
cm
.
damfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
):
GetSum
(
Card
.
GetLevel
))
*
100
local
dg
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
TYPE_TOKEN
)
Duel
.
Damage
(
1
-
tp
,
dam
,
REASON_EFFECT
)
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/pics/c81901009.lua
0 → 100644
View file @
4eb3e222
--無☆茶☆苦☆茶 邪正人鬼
local
m
=
81901009
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"yakumonue.lua"
)
function
cm
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e11
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e11
:
SetCode
(
EVENT_FREE_CHAIN
)
e11
:
SetRange
(
LOCATION_HAND
)
e11
:
SetCountLimit
(
1
,
m
)
e11
:
SetCost
(
cm
.
spcost
)
e11
:
SetCondition
(
cm
.
spcon2
)
e11
:
SetTarget
(
cm
.
sptg
)
e11
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e11
)
--reverse
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
m
+
100
)
e2
:
SetCost
(
cm
.
rvcost
)
e2
:
SetTarget
(
cm
.
rvtg
)
e2
:
SetOperation
(
cm
.
rvop
)
c
:
RegisterEffect
(
e2
)
--draw
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_RECOVER
+
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
m
+
200
)
e3
:
SetTarget
(
cm
.
drtg
)
e3
:
SetOperation
(
cm
.
drop
)
c
:
RegisterEffect
(
e3
)
end
--spsummon
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
cm
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
Duel
.
GetFlagEffect
(
tp
,
81901026
)
>
0
end
function
cm
.
spfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetBaseAttack
()
==
0
and
c
:
IsCanTurnSet
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
LOCATION_HAND
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
e
:
GetHandler
())
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
4
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINTMSG_SELECT
,
tp
,
HINTMSG_POSCHANGE
)
local
tg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
ChangePosition
(
tg
,
POS_FACEDOWN_DEFENSE
)
end
end
end
--Reverse
function
cm
.
rvcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
end
function
cm
.
rvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
end
function
cm
.
adfilter
(
e
,
c
)
return
c
:
IsFaceup
()
end
function
cm
.
linkfilter
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_LINK
+
TYPE_MONSTER
)
end
function
cm
.
rvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EFFECT
)
local
opt
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
))
if
opt
==
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SWAP_AD
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTarget
(
cm
.
adfilter
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetValue
(
0
)
e2
:
SetTarget
(
cm
.
linkfilter
)
Duel
.
RegisterEffect
(
e2
,
tp
)
else
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_REVERSE_DAMAGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
1
)
e1
:
SetTarget
(
cm
.
refilter
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
cm
.
rev
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
cm
.
refilter
(
e
,
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
GetBaseAttack
()
==
0
end
function
cm
.
rev
(
e
,
re
,
r
,
rp
,
rc
)
local
c
=
e
:
GetHandler
()
return
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
and
(
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
())
end
--draw
function
cm
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
2000
)
end
function
cm
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Draw
(
1
-
tp
,
1
,
REASON_RULE
)
end
\ No newline at end of file
expansions/pics/c81901010.lua
0 → 100644
View file @
4eb3e222
--無☆茶☆苦☆茶-女苑老师差不多得了别这样
local
m
=
81901010
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"81901011.lua"
)
function
cm
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_TO_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
--damage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TO_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
cm
.
damcon1
)
e2
:
SetOperation
(
cm
.
damop1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_TO_HAND
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
cm
.
regcon
)
e3
:
SetOperation
(
cm
.
regop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
cm
.
damcon2
)
e4
:
SetOperation
(
cm
.
damop2
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e5
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TOHAND
+
CATEGORY_RECOVER
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e5
:
SetCountLimit
(
1
,
m
+
500
)
e5
:
SetTarget
(
cm
.
thtg
)
e5
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e5
)
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_CHAIN_SOLVING
)
ge1
:
SetOperation
(
cm
.
count
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
ge2
:
SetOperation
(
cm
.
reset
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
--spsummon
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DRAW
and
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
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
)
end
function
cm
.
spfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINTMSG_SELECT
,
tp
,
HINTMSG_POSCHANGE
)
local
pg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
ChangePosition
(
pg
,
POS_FACEUP_ATTACK
)
end
end
--dam
function
cm
.
count
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
cm
.
chain_solving
=
true
end
function
cm
.
reset
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
cm
.
chain_solving
=
false
end
function
cm
.
damcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
and
not
cm
.
chain_solving
end
function
cm
.
damop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
local
ct
=
eg
:
FilterCount
(
Card
.
IsControler
,
nil
,
1
-
tp
)
Duel
.
Damage
(
1
-
tp
,
ct
*
200
,
REASON_EFFECT
)
end
function
cm
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
and
cm
.
chain_solving
end
function
cm
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
eg
:
FilterCount
(
Card
.
IsControler
,
nil
,
1
-
tp
)
e
:
GetHandler
():
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_CHAIN
,
0
,
1
,
ct
)
end
function
cm
.
damcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
m
)
>
0
end
function
cm
.
damop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
local
labels
=
{
e
:
GetHandler
():
GetFlagEffectLabel
(
m
)}
local
ct
=
0
for
i
=
1
,
#
labels
do
ct
=
ct
+
labels
[
i
]
end
e
:
GetHandler
():
ResetFlagEffect
(
m
)
Duel
.
Damage
(
1
-
tp
,
ct
*
200
,
REASON_EFFECT
)
end
--des and spsummon
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x1850
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDestructable
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
tp
,
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
2000
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
Duel
.
Recover
(
tp
,
2000
,
REASON_EFFECT
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
Hint
(
HINTMSG_SELECT
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
tg
,
tp
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
Duel
.
Draw
(
1
-
tp
,
1
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/pics/c81901012.lua
0 → 100644
View file @
4eb3e222
--無☆茶☆苦☆茶 世界一番!
local
m
=
81901012
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"81901011.lua"
)
function
cm
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e11
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e11
:
SetRange
(
LOCATION_HAND
)
e11
:
SetCode
(
EVENT_FREE_CHAIN
)
e11
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e11
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e11
:
SetCountLimit
(
1
,
m
)
e11
:
SetCost
(
cm
.
spcost
)
e11
:
SetCondition
(
cm
.
spcon2
)
e11
:
SetTarget
(
cm
.
sptg
)
e11
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e11
)
--destory and spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DRAW
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e2
:
SetCountLimit
(
1
,
m
+
100
)
e2
:
SetCondition
(
cm
.
descon
)
e2
:
SetTarget
(
cm
.
destg
)
e2
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCondition
(
cm
.
descon2
)
c
:
RegisterEffect
(
e3
)
--filp
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
4
))
e4
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_RECOVER
+
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_FLIP
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetOperation
(
cm
.
flop
)
c
:
RegisterEffect
(
e4
)
end
--spsummon
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
atk
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
):
GetSum
(
Card
.
GetBaseAttack
)
return
atk
==
0
and
Duel
.
GetTurnPlayer
()
==
tp
end
function
cm
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
atk
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
):
GetSum
(
Card
.
GetBaseAttack
)
return
atk
==
0
and
Duel
.
GetFlagEffect
(
tp
,
81901026
)
>
0
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
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
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
--destory
function
cm
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
cm
.
descon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
atk
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
):
GetSum
(
Card
.
GetBaseAttack
)
return
atk
==
0
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeEffectTarget
(
e
)
and
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
local
sg
=
Group
.
FromCards
(
e
:
GetHandler
())
Duel
.
HintSelection
(
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
sg
:
Merge
(
g2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
sg
,
2
,
0
,
0
)
Duel
.
SetTargetCard
(
sg
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_DEFENSE
)
and
c
:
IsSetCard
(
0x1850
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
tg
:
GetCount
()
>
0
and
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
if
sg
:
GetCount
()
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg2
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
sg2
,
0
,
tp
,
tp
,
false
,
false
,
POS_DEFENSE
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg2
)
Duel
.
Draw
(
1
-
tp
,
2
,
REASON_EFFECT
)
end
end
end
--flip
function
cm
.
flop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
atk
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
):
GetSum
(
Card
.
GetBaseAttack
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_DELAY
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e4
:
SetValue
(
3000
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e5
)
if
atk
==
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Recover
(
1
-
tp
,
1000
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/pics/c81901015.lua
0 → 100644
View file @
4eb3e222
--無☆茶☆苦☆茶 无良记者
local
m
=
81901015
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"81901011.lua"
)
function
cm
.
initial_effect
(
c
)
--special Summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e11
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e11
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_SPECIAL_SUMMON
)
e11
:
SetCode
(
EVENT_FREE_CHAIN
)
e11
:
SetRange
(
LOCATION_HAND
)
e11
:
SetCountLimit
(
1
,
m
)
e11
:
SetCondition
(
cm
.
spcon2
)
e11
:
SetCost
(
cm
.
spcost
)
e11
:
SetTarget
(
cm
.
sptg
)
e11
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e11
)
--remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCategory
(
CATEGORY_REMOVE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
TIMING_BATTLE_PHASE
)
e2
:
SetCountLimit
(
1
,
m
+
100
)
e2
:
SetCondition
(
cm
.
rmcon1
)
e2
:
SetCost
(
cm
.
rmcost
)
e2
:
SetTarget
(
cm
.
rmtg
)
e2
:
SetOperation
(
cm
.
rmop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCategory
(
CATEGORY_REMOVE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetHintTiming
(
TIMING_BATTLE_PHASE
)
e3
:
SetCountLimit
(
1
,
m
+
100
)
e3
:
SetCondition
(
cm
.
rmcon2
)
e3
:
SetCost
(
cm
.
rmcost
)
e3
:
SetTarget
(
cm
.
rmtg
)
e3
:
SetOperation
(
cm
.
rmop
)
c
:
RegisterEffect
(
e3
)
end
--spsummon
function
cm
.
thfilter
(
c
)
return
c
:
IsAbleToHandAsCost
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsFaceup
()
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
function
cm
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
81901026
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINTMSG_SELECT
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
tg
:
GetFirst
(),
tg
:
GetFirst
():
GetOwner
(),
REASON_COST
)
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGrave
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
e
:
GetHandler
(),
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
GetBaseAttack
()
==
0
and
not
c
:
IsSummonableCard
()
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ev
,
ep
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
then
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
Hint
(
HINTMSG_SELECT
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
--tohand
function
cm
.
tgfilter
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
cm
.
rmcost
(
e
,
tp
,
eg
,
ev
,
ep
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tgfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINTMSG_SELECT
,
tp
,
HINTMSG_TOGRAVE
)
local
cg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tgfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
cg
,
REASON_COST
)
end
function
cm
.
rmcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
cm
.
rmcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
atk
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
):
GetSum
(
Card
.
GetBaseAttack
)
return
atk
==
0
end
function
cm
.
rmfilter
(
c
)
return
c
:
IsAbleToRemove
()
and
c
:
IsOnField
()
end
function
cm
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
rmfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
rmfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
2
,
0
,
LOCATION_MZONE
)
Duel
.
SetChainLimit
(
cm
.
chainlm
)
end
function
cm
.
chainlm
(
re
,
rp
,
tp
)
return
not
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
cm
.
rmop
(
e
,
tp
,
eg
,
ev
,
ep
,
re
,
r
,
rp
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
rmfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
rmfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
rc1
=
g1
:
GetFirst
()
local
rc2
=
g2
:
GetFirst
()
g1
:
Merge
(
g2
)
Duel
.
HintSelection
(
g1
)
if
Duel
.
Remove
(
rc1
,
0
,
REASON_COST
+
REASON_TEMPORARY
)
and
Duel
.
Remove
(
rc2
,
0
,
REASON_COST
+
REASON_TEMPORARY
)
then
g1
:
KeepAlive
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetLabelObject
(
g1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
cm
.
retop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
cm
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc1
=
e
:
GetLabelObject
():
GetFirst
()
local
tc2
=
e
:
GetLabelObject
():
GetNext
()
Duel
.
ReturnToField
(
tc1
)
Duel
.
ReturnToField
(
tc2
)
end
expansions/pics/c81901016.lua
0 → 100644
View file @
4eb3e222
--無☆茶☆苦☆茶-帕露帕露嫉妒死了啊!!!
local
m
=
81901016
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"81901011.lua"
)
function
cm
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
--green eyed envy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DISABLE
+
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
m
+
100
)
e2
:
SetCondition
(
cm
.
discon
)
e2
:
SetTarget
(
cm
.
distg
)
e2
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e2
)
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
m
+
200
)
e3
:
SetTarget
(
cm
.
sptg2
)
e3
:
SetOperation
(
cm
.
spop2
)
c
:
RegisterEffect
(
e3
)
end
--splimit
function
cm
.
hspcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
end
function
cm
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
cm
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
not
(
c
:
GetBaseAttack
()
==
0
and
c
:
IsType
(
TYPE_MONSTER
))
end
--spsummon
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
atk
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
):
GetSum
(
Card
.
GetBaseAttack
)
local
ct1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
local
ct2
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
return
atk
==
0
and
Duel
.
GetTurnPlayer
()
==
tp
and
ct1
<
ct2
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
,
tp
,
LOCATION_HAND
)
Duel
.
SetChainLimit
(
cm
.
chain
)
end
function
cm
.
chain
(
re
,
rp
,
tp
)
return
not
(
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
and
(
re
:
GetHandler
():
IsOnField
()))
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
--disable
function
cm
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_HAND
)
end
function
cm
.
disfilter
(
c
)
return
c
:
IsAbleToGrave
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
disfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
SetChainLimit
(
cm
.
chain
)
end
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g1
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
c
)
local
tg1
=
g1
:
GetMaxGroup
(
Card
.
GetAttack
)
local
tg2
=
g2
:
GetMaxGroup
(
Card
.
GetDefense
)
if
g1
:
GetCount
()
==
0
or
g2
:
GetCount
()
==
0
then
return
end
Duel
.
Hint
(
HINTMSG_SELECT
,
tp
,
HINTMSG_DISABLE
)
local
tg
=
tg1
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e2
:
SetValue
(
0
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
Duel
.
Hint
(
HINTMSG_SELECT
,
tp
,
HINTMSG_TOGRAVE
)
local
tg3
=
tg2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
tg3
,
REASON_EFFECT
)
end
--tohand
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x1850
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
IsPlayerCanDraw
(
1
-
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
1
,
1
-
tp
,
LOCATION_DECK
)
end
function
cm
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
Draw
(
1
-
tp
,
1
,
REASON_EFFECT
)
Duel
.
Hint
(
HINTMSG_SELECT
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
\ No newline at end of file
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