Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-THC-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
八宫一月
ygopro-THC-cards
Commits
12d5077a
Commit
12d5077a
authored
Jan 16, 2022
by
Grajade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update c86379108.lua
parent
f6b278e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
script/c86379108.lua
script/c86379108.lua
+15
-11
No files found.
script/c86379108.lua
View file @
12d5077a
--符之二『人形十字军』
function
c86379108
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
...
...
@@ -9,18 +8,19 @@ function c86379108.initial_effect(c)
e1
:
SetTarget
(
c86379108
.
tg
)
e1
:
SetOperation
(
c86379108
.
op
)
c
:
RegisterEffect
(
e1
)
end
--
function
c86379108
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0x186
)
and
c
:
IsReleasable
()
and
bit
.
band
(
c
:
GetOriginalType
(),
TYPE_MONSTER
)
~=
0
function
c86379108
.
costfilter
(
c
,
tp
)
local
b1
=
Duel
.
IsPlayerCanDraw
(
tp
)
local
b2
=
(
bit
.
band
(
c
:
GetOriginalAttribute
(),
ATTRIBUTE_LIGHT
)
~=
0
)
return
c
:
IsSetCard
(
0x186
)
and
c
:
IsReleasable
()
and
bit
.
band
(
c
:
GetOriginalType
(),
TYPE_MONSTER
)
~=
0
and
(
not
b2
or
b1
)
end
function
c86379108
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c86379108
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
()
)
end
function
c86379108
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c86379108
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c86379108
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Release
(
g
,
REASON_COST
)
if
g
:
GetFirst
():
GetOriginalAttribute
()
==
ATTRIBUTE_LIGHT
then
if
bit
.
band
(
g
:
GetFirst
():
GetOriginalAttribute
(),
ATTRIBUTE_LIGHT
)
~=
0
then
e
:
SetLabel
(
1
)
else
e
:
SetLabel
(
0
)
...
...
@@ -28,9 +28,14 @@ function c86379108.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function
c86379108
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
()
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
e
:
GetLabel
()
and
e
:
GetLabel
()
==
1
then
e
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DRAW
)
else
e
:
SetCategory
(
CATEGORY_DESTROY
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c86379108
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -39,8 +44,7 @@ function c86379108.op(e,tp,eg,ep,ev,re,r,rp,chk)
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
local
ct
=
e
:
GetLabel
()
if
ct
==
1
then
if
e
:
GetLabel
()
and
e
:
GetLabel
()
==
1
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
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