Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
P
pre-release-database-cdb
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
Mr.Tan
pre-release-database-cdb
Commits
dd9a6c38
Commit
dd9a6c38
authored
Oct 18, 2023
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EM:Pグレニャード:
https://github.com/Fluorohydride/ygopro-pre-script/pull/1208
parent
329e94d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
script/c101203032.lua
script/c101203032.lua
+60
-0
No files found.
script/c101203032.lua
0 → 100644
View file @
dd9a6c38
--EM:Pグレニャード
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--same effect send this card to grave and spsummon another card check
local
e0
=
aux
.
AddThisCardInGraveAlreadyCheck
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
s
.
spcon
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
id
+
1
)
e2
:
SetLabelObject
(
e0
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCondition
(
s
.
thcon
)
e2
:
SetTarget
(
s
.
thtg
)
e2
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
1
,
nil
,
TYPE_LINK
)
end
--to hand
function
s
.
cfilter
(
c
,
tp
,
se
)
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsLink
(
2
)
and
(
se
==
nil
or
c
:
GetReasonEffect
()
~=
se
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
(
c
:
IsLocation
(
LOCATION_REMOVED
)
and
c
:
IsFaceup
()))
and
c
:
IsPreviousControler
(
tp
)
end
function
s
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
se
=
e
:
GetLabelObject
():
GetLabelObject
()
return
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
tp
,
se
)
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
chkc
:
IsAbleToHand
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
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