Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-rush-duel
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
Clara Grace Paulsen
ygopro-rush-duel
Commits
1f1604a9
Commit
1f1604a9
authored
Dec 20, 2021
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2021/12/20 一时风锁改为自定义事件触发
parent
13762787
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
script/c120203030.lua
script/c120203030.lua
+18
-2
No files found.
script/c120203030.lua
View file @
1f1604a9
...
@@ -6,16 +6,25 @@ function cm.initial_effect(c)
...
@@ -6,16 +6,25 @@ function cm.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_GRAVE_ACTION
+
CATEGORY_RECOVER
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_GRAVE_ACTION
+
CATEGORY_RECOVER
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_
TO_GRAVE
)
e1
:
SetCode
(
EVENT_
CUSTOM
+
m
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Event
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_TO_GRAVE
)
ge1
:
SetOperation
(
cm
.
event
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
end
--Activate
--Activate
function
cm
.
filter
(
c
,
tp
)
function
cm
.
filter
(
c
,
tp
)
return
c
:
IsPreviousControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_DECK
)
return
c
:
IsPreviousControler
(
tp
)
end
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
filter
,
1
,
nil
,
1
-
tp
)
return
eg
:
IsExists
(
cm
.
filter
,
1
,
nil
,
1
-
tp
)
...
@@ -31,4 +40,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -31,4 +40,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local
sg
=
g
:
RandomSelect
(
1
-
tp
,
1
)
local
sg
=
g
:
RandomSelect
(
1
-
tp
,
1
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
--Event
function
cm
.
event
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
eg
:
Filter
(
Card
.
IsPreviousLocation
,
nil
,
LOCATION_DECK
)
if
g
:
GetCount
()
>
0
then
Duel
.
RaiseEvent
(
g
,
EVENT_CUSTOM
+
m
,
re
,
r
,
rp
,
ep
,
ev
)
end
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