Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
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
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
MyCard
ygopro-scripts
Commits
93601950
Commit
93601950
authored
Jun 02, 2019
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cards in the same column
parent
b349a17d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
15 deletions
+23
-15
c10045474.lua
c10045474.lua
+2
-4
c62530723.lua
c62530723.lua
+1
-1
c88086137.lua
c88086137.lua
+10
-6
constant.lua
constant.lua
+3
-3
utility.lua
utility.lua
+7
-1
No files found.
c10045474.lua
View file @
93601950
...
@@ -71,15 +71,13 @@ function c10045474.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -71,15 +71,13 @@ function c10045474.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c10045474
.
distg
(
e
,
c
)
function
c10045474
.
distg
(
e
,
c
)
local
seq
=
e
:
GetLabel
()
local
seq
=
e
:
GetLabel
()
local
p
=
c
:
GetControler
()
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
aux
.
GetColumn
(
c
,
tp
)
==
seq
and
((
p
==
tp
and
c
:
GetSequence
()
==
seq
)
or
(
p
==
1
-
tp
and
c
:
GetSequence
()
==
4
-
seq
))
end
end
function
c10045474
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c10045474
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tseq
=
e
:
GetLabel
()
local
tseq
=
e
:
GetLabel
()
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
if
bit
.
band
(
loc
,
LOCATION_SZONE
)
~=
0
and
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
if
loc
&
LOCATION_SZONE
~=
0
and
seq
<=
4
and
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
((
rp
==
tp
and
seq
==
tseq
)
or
(
rp
==
1
-
tp
and
seq
==
4
-
tseq
))
then
and
((
rp
==
tp
and
seq
==
tseq
)
or
(
rp
==
1
-
tp
and
seq
==
4
-
tseq
))
then
Duel
.
NegateEffect
(
ev
)
Duel
.
NegateEffect
(
ev
)
end
end
...
...
c62530723.lua
View file @
93601950
...
@@ -63,7 +63,7 @@ function c62530723.cfilter(c,seq2)
...
@@ -63,7 +63,7 @@ function c62530723.cfilter(c,seq2)
end
end
function
c62530723
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c62530723
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
return
rp
==
1
-
tp
and
re
:
IsActiveType
(
TYPE_SPELL
)
and
loc
&
LOCATION_SZONE
==
LOCATION_SZONE
return
rp
==
1
-
tp
and
re
:
IsActiveType
(
TYPE_SPELL
)
and
loc
&
LOCATION_SZONE
==
LOCATION_SZONE
and
seq
<=
4
and
Duel
.
IsExistingMatchingCard
(
c62530723
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
seq
)
and
Duel
.
IsExistingMatchingCard
(
c62530723
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
seq
)
end
end
function
c62530723
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c62530723
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
c88086137.lua
View file @
93601950
...
@@ -13,14 +13,18 @@ end
...
@@ -13,14 +13,18 @@ end
function
c88086137
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c88086137
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
loc
,
seq
,
p
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
,
CHAININFO_TRIGGERING_CONTROLER
)
local
loc
,
seq
,
p
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
,
CHAININFO_TRIGGERING_CONTROLER
)
if
loc
&
LOCATION_ONFIELD
==
0
then
return
false
end
local
col
=
0
if
loc
==
LOCATION_SZONE
then
if
loc
&
LOCATION_MZONE
~=
0
then
col
=
aux
.
MZoneSequence
(
seq
)
elseif
loc
&
LOCATION_SZONE
~=
0
then
if
seq
>
4
then
return
false
end
if
seq
>
4
then
return
false
end
seq
=
seq
+
8
col
=
aux
.
SZoneSequence
(
seq
)
else
return
false
end
end
if
p
==
1
-
tp
then
seq
=
seq
+
16
end
if
p
==
1
-
tp
then
col
=
4
-
col
end
return
bit
.
extract
(
c
:
GetColumnZone
(
LOCATION_ONFIELD
),
seq
)
~=
0
return
aux
.
GetColumn
(
c
,
tp
)
==
col
and
(
re
:
IsActiveType
(
TYPE_MONSTER
)
or
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
and
(
re
:
IsActiveType
(
TYPE_MONSTER
)
or
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
and
Duel
.
IsChainNegatable
(
ev
)
and
Duel
.
IsChainNegatable
(
ev
)
end
end
function
c88086137
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c88086137
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
...
...
constant.lua
View file @
93601950
...
@@ -6,16 +6,16 @@ MAX_COUNTER =65535 --max number for adding/removing counters, by card::add_coun
...
@@ -6,16 +6,16 @@ MAX_COUNTER =65535 --max number for adding/removing counters, by card::add_coun
LOCATION_DECK
=
0x01
--卡组
LOCATION_DECK
=
0x01
--卡组
LOCATION_HAND
=
0x02
--手牌
LOCATION_HAND
=
0x02
--手牌
LOCATION_MZONE
=
0x04
--怪兽区
LOCATION_MZONE
=
0x04
--怪兽区
LOCATION_SZONE
=
0x08
--魔陷区
LOCATION_SZONE
=
0x08
--魔陷区
(0~4)+场地区(5)
LOCATION_GRAVE
=
0x10
--墓地
LOCATION_GRAVE
=
0x10
--墓地
LOCATION_REMOVED
=
0x20
--除外区
LOCATION_REMOVED
=
0x20
--除外区
LOCATION_EXTRA
=
0x40
--额外
LOCATION_EXTRA
=
0x40
--额外
LOCATION_OVERLAY
=
0x80
--超量素材
LOCATION_OVERLAY
=
0x80
--超量素材
LOCATION_ONFIELD
=
0x0c
--场上(
怪兽+魔陷
)
LOCATION_ONFIELD
=
0x0c
--场上(
LOCATION_MZONE+LOCATION_SZONE
)
--Locations (for redirect) 若在重定向类效果中指定LOCATION_DECK则为弹回卡组顶部
--Locations (for redirect) 若在重定向类效果中指定LOCATION_DECK则为弹回卡组顶部
LOCATION_DECKBOT
=
0x10001
--弹回卡组底部
LOCATION_DECKBOT
=
0x10001
--弹回卡组底部
LOCATION_DECKSHF
=
0x20001
--弹回卡组并洗牌
LOCATION_DECKSHF
=
0x20001
--弹回卡组并洗牌
--Locations
(for SetRange)
--Locations
of spell cards
LOCATION_FZONE
=
0x100
--场地区
LOCATION_FZONE
=
0x100
--场地区
LOCATION_PZONE
=
0x200
--灵摆区
LOCATION_PZONE
=
0x200
--灵摆区
--Positions 表示形式
--Positions 表示形式
...
...
utility.lua
View file @
93601950
...
@@ -1886,6 +1886,7 @@ function Auxiliary.IsCounterAdded(c,counter)
...
@@ -1886,6 +1886,7 @@ function Auxiliary.IsCounterAdded(c,counter)
end
end
return
false
return
false
end
end
--return the column of card c (from the viewpoint of p)
function
Auxiliary
.
GetColumn
(
c
,
p
)
function
Auxiliary
.
GetColumn
(
c
,
p
)
local
seq
=
c
:
GetSequence
()
local
seq
=
c
:
GetSequence
()
if
c
:
IsLocation
(
LOCATION_MZONE
)
then
if
c
:
IsLocation
(
LOCATION_MZONE
)
then
...
@@ -1895,12 +1896,17 @@ function Auxiliary.GetColumn(c,p)
...
@@ -1895,12 +1896,17 @@ function Auxiliary.GetColumn(c,p)
else
return
nil
end
else
return
nil
end
if
c
:
IsControler
(
p
or
0
)
then
return
seq
else
return
4
-
seq
end
if
c
:
IsControler
(
p
or
0
)
then
return
seq
else
return
4
-
seq
end
end
end
--return the column of
seq
--return the column of
monster zone seq (from the viewpoint of controller)
function
Auxiliary
.
MZoneSequence
(
seq
)
function
Auxiliary
.
MZoneSequence
(
seq
)
if
seq
==
5
then
return
1
end
if
seq
==
5
then
return
1
end
if
seq
==
6
then
return
3
end
if
seq
==
6
then
return
3
end
return
seq
return
seq
end
end
--return the column of spell/trap zone seq (from the viewpoint of controller)
function
Auxiliary
.
SZoneSequence
(
seq
)
if
seq
>
4
then
return
nil
end
return
seq
end
--card effect disable filter(target)
--card effect disable filter(target)
function
Auxiliary
.
disfilter1
(
c
)
function
Auxiliary
.
disfilter1
(
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsDisabled
()
and
(
not
c
:
IsType
(
TYPE_NORMAL
)
or
c
:
GetOriginalType
()
&
TYPE_EFFECT
~=
0
)
return
c
:
IsFaceup
()
and
not
c
:
IsDisabled
()
and
(
not
c
:
IsType
(
TYPE_NORMAL
)
or
c
:
GetOriginalType
()
&
TYPE_EFFECT
~=
0
)
...
...
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