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
8d1b03d3
Commit
8d1b03d3
authored
Feb 05, 2020
by
gg123gg
Committed by
GitHub
Feb 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
812a95b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
100 additions
and
73 deletions
+100
-73
expansions/script/c12008006.lua
expansions/script/c12008006.lua
+100
-73
No files found.
expansions/script/c12008006.lua
View file @
8d1b03d3
--双色的恋意
function
c12008006
.
initial_effect
(
c
)
--recover
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCategory
(
CATEGORY_RECOVER
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c12008006
.
cost
)
e1
:
SetTarget
(
c12008006
.
tg
)
e1
:
SetOperation
(
c12008006
.
op
)
c
:
RegisterEffect
(
e1
)
end
function
c12008006
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tuc
=
Duel
.
GetTurnCount
()
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
12008106
)
<
tuc
*
2
+
2
end
Duel
.
RegisterFlagEffect
(
tp
,
12008106
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c12008006
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
800
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
800
)
end
function
c12008006
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsSetCard
(
0x1fb3
)
or
c
:
IsSetCard
(
0xfbb
))
and
c
:
IsAbleToHand
()
end
function
c12008006
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
<=
0
then
return
end
Duel
.
BreakEffect
()
local
ct
=
Duel
.
GetFlagEffect
(
tp
,
12008006
)
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
Duel
.
RegisterFlagEffect
(
tp
,
12008006
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
ct
<=
0
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c12008006
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
ct
>=
1
and
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12008006
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
if
ct
>=
2
then
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
end
local
sg
=
Duel
.
GetMatchingGroup
(
c12008006
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
if
ct
>=
3
and
sg
:
GetCount
()
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12008006
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
ts
=
tg
:
GetFirst
()
if
ts
and
Duel
.
SpecialSummonStep
(
ts
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
ts
:
RegisterEffect
(
e1
)
end
Duel
.
SpecialSummonComplete
()
end
local
dg
=
Duel
.
GetMatchingGroup
(
c12008006
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
ct
>=
4
and
dg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12008006
,
2
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
dg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
function
c12008006
.
thfilter2
(
c
)
return
c
:
IsCode
(
12008006
)
and
c
:
IsAbleToHand
()
end
function
c12008006
.
spfilter
(
c
,
e
,
tp
)
return
(
c
:
IsSetCard
(
0x1fb3
)
or
c
:
IsSetCard
(
0xfbb
))
and
c
:
IsFaceup
()
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
--双色的恋意
local
m
=
12008006
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--recover
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCategory
(
CATEGORY_RECOVER
+
CATEGORY_DESTROY
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c12008006
.
cost
)
e1
:
SetTarget
(
c12008006
.
tg
)
e1
:
SetOperation
(
c12008006
.
op
)
c
:
RegisterEffect
(
e1
)
--recover
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12008006
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetCondition
(
c12008006
.
spcon
)
e2
:
SetTarget
(
c12008006
.
sptg
)
e2
:
SetOperation
(
c12008006
.
spop
)
c
:
RegisterEffect
(
e2
)
-- if not c12008006.global_check then
-- c12008006.global_check=true
-- local ge1=Effect.CreateEffect(c)
-- ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
-- ge1:SetCode(EVENT_CHAINING)
-- ge1:SetOperation(c12008006.checkop)
-- Duel.RegisterEffect(ge1,0)
-- end
end
-- function c12008006.checkop(e,tp,eg,ep,ev,re,r,rp)
-- if not eg then return end
-- if re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsCode(12008006) then
-- Duel.RegisterFlagEffect(tp,12008006,RESET_PHASE+PHASE_END,0,1)
-- end
--end
function
c12008006
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
RegisterFlagEffect
(
tp
,
12008006
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c12008006
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
800
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
800
)
end
function
c12008006
.
spfilter
(
c
)
return
c
:
IsCode
(
12008006
)
end
function
c12008006
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
true
then
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
end
local
sg
=
Duel
.
GetMatchingGroup
(
c12008006
.
spfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
e
:
GetHandler
())
if
sg
:
GetCount
()
>
0
then
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
end
end
function
c12008006
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c12008006
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
ct
=
Duel
.
GetFlagEffect
(
tp
,
12008006
)
if
ct
<=
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
800
)
end
if
ct
>=
1
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
if
ct
>=
3
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
if
ct
==
5
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
20000
)
end
end
function
c12008006
.
spfilter1
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c12008006
.
spfilter2
(
c
)
return
c
:
IsCode
(
12008006
)
and
c
:
IsAbleToHand
()
end
function
c12008006
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
Duel
.
GetFlagEffect
(
tp
,
12008006
)
if
ct
<=
0
then
Duel
.
Damage
(
tp
,
800
,
REASON_EFFECT
)
end
if
ct
>=
1
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
if
ct
>=
3
and
Duel
.
IsExistingMatchingCard
(
c12008006
.
spfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12008006
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12008006
.
spfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
if
ct
==
5
then
Duel
.
Recover
(
tp
,
20000
,
REASON_EFFECT
)
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