Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
specials
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
JoyJ
specials
Commits
fc3dc0ec
Commit
fc3dc0ec
authored
May 02, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix set
parent
72b607ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
forbid/special.lua
forbid/special.lua
+17
-16
No files found.
forbid/special.lua
View file @
fc3dc0ec
...
...
@@ -25,22 +25,23 @@ function Auxiliary.PreloadUds()
code
=
ac
,
turn
=
Duel
.
GetTurnCount
()
})
if
not
_FORBID_INITIALIZED
then
_FORBID_INITIALIZED
=
true
local
tempc
=
Duel
.
CreateToken
(
0
,
10000000
)
local
e2
=
Effect
.
CreateEffect
(
tempc
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_IGNORE_RANGE
)
e2
:
SetCode
(
EFFECT_FORBIDDEN
)
e2
:
SetTargetRange
(
0xff
,
0xff
)
e2
:
SetTarget
(
function
(
e
,
c
)
local
code1
,
code2
=
c
:
GetOriginalCodeRule
()
local
turnID
=
c
:
IsOnField
()
and
c
:
GetTurnID
()
or
99
return
_
.
any
(
_FORBID_LIST
,
function
(
m
)
return
(
code1
==
m
.
code
or
code2
==
m
.
code
)
and
turnID
>=
m
.
turn
end
)
end
)
Duel
.
RegisterEffect
(
e2
,
0
)
end
end
)
Duel
.
RegisterEffect
(
e1
,
0
)
local
e2
=
Effect
.
GlobalEffect
()
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_IGNORE_RANGE
)
e2
:
SetCode
(
EFFECT_FORBIDDEN
)
e2
:
SetTargetRange
(
0xff
,
0xff
)
e2
:
SetTarget
(
function
(
e
,
c
)
local
code1
,
code2
=
c
:
GetOriginalCodeRule
()
local
turnID
=
c
:
IsOnField
()
and
c
:
GetTurnID
()
or
99
return
_
.
any
(
_FORBID_LIST
,
function
(
m
)
return
(
code1
==
m
.
code
or
code2
==
m
.
code
)
and
turnID
>=
m
.
turn
end
)
end
)
Duel
.
RegisterEffect
(
e2
,
0
)
local
e3
=
e2
:
Clone
()
e3
:
SetTargetRange
(
LOCATION_HAND
,
LOCATION_HAND
)
Duel
.
RegisterEffect
(
e3
,
0
)
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