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
1
Issues
1
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
HiiragiGuardians
ygopro-THC-cards
Commits
794d09f2
Commit
794d09f2
authored
Feb 02, 2025
by
GuGu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Gds.lua
parent
afea8590
Pipeline
#32913
passed with stage
in 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
147 additions
and
0 deletions
+147
-0
expansions/script/nef/Gds.lua
expansions/script/nef/Gds.lua
+147
-0
No files found.
expansions/script/nef/Gds.lua
View file @
794d09f2
...
...
@@ -121,3 +121,150 @@ function Gds.efcdptg(e,c)
if
g
:
GetCount
()
<=
0
then
return
false
end
return
g
:
IsContains
(
c
)
end
--
--形式变更时点(抄的油库
Goil
=
{}
--AFI
local
Goil
=
false
EVENT_Goil_POS
=
2008
local
ms
=
{}
ms
[
0
]
=
{}
ms
[
1
]
=
{}
for
i
=
0
,
13
do
ms
[
0
][
i
]
=
{}
ms
[
1
][
i
]
=
{}
end
local
lasts
=
{}
function
Gds
.
AdjustFieldInfoStore
(
c
)
if
Goil
==
true
then
return
end
Goil
=
true
--store
local
g
=
Group
.
CreateGroup
()
g
:
KeepAlive
()
--adjust
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e0
:
SetCode
(
EVENT_ADJUST
)
e0
:
SetOperation
(
Gds
.
AdjustFieldInfoCheck
)
e0
:
SetLabelObject
(
g
)
Duel
.
RegisterEffect
(
e0
,
0
)
end
function
Gds
.
AdjustFieldInfoCheck
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--define
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
local
preg
=
e
:
GetLabelObject
()
if
g
:
GetCount
()
>
0
then
--check
Gds
.
AdjustFieldInfoCheckMI
(
g
,
preg
,
e
)
--renew
preg
:
Clear
()
preg
:
Merge
(
g
)
Gds
.
AdjustFieldInfoRenewMI
(
g
)
else
if
preg
:
GetCount
()
==
0
then
return
end
preg
:
Clear
()
end
end
function
Gds
.
AdjustFieldInfoCheckMI
(
g
,
preg
,
e
)
local
n
=
-
1
-- now seq
local
p
=
-
1
-- now player
local
pn
=
-
1
-- pre seq
local
pp
=
-
1
-- pre player
local
tempg1
=
{}
-- up group(newVal > oldVal or cannot compare)
local
tempg2
=
{}
-- down group(newVal < oldVal)
local
isChange
=
not
g
:
Equal
(
preg
)
tempg1
[
0
]
=
Group
.
CreateGroup
()
tempg2
[
0
]
=
Group
.
CreateGroup
()
local
tempc
=
g
:
GetFirst
()
while
(
tempc
)
do
p
=
tempc
:
GetControler
()
n
=
tempc
:
GetSequence
()
if
tempc
:
IsLocation
(
LOCATION_SZONE
)
then
n
=
n
+
7
end
if
preg
:
IsContains
(
tempc
)
then
pp
,
pn
=
Gds
.
AdjustFieldInfoFindMI
(
tempc
)
if
pp
<
0
or
pn
<
0
or
ms
[
pp
][
pn
][
-
1
]
~=
tempc
:
GetRealFieldID
()
then
-- do nothing
else
--pos
local
pos
=
ms
[
pp
][
pn
][
1
]
if
pos
~=
tempc
:
GetPosition
()
then
Duel
.
RaiseSingleEvent
(
tempc
,
EVENT_Goil_POS
,
e
,
0
,
0
,
0
,
tempc
:
GetPosition
())
if
tempc
:
IsFaceup
()
then
tempg1
[
0
]:
AddCard
(
tempc
)
else
tempg2
[
0
]:
AddCard
(
tempc
)
end
end
end
end
tempc
=
g
:
GetNext
()
end
if
tempg1
[
0
]:
GetCount
()
>
0
then
Duel
.
RaiseEvent
(
tempg1
[
0
],
EVENT_Goil_POS
,
e
,
0
,
0
,
0
,
1
)
isChange
=
true
end
if
tempg2
[
0
]:
GetCount
()
>
0
then
Duel
.
RaiseEvent
(
tempg2
[
0
],
EVENT_Goil_POS
,
e
,
0
,
0
,
0
,
2
)
isChange
=
true
end
if
isChange
then
lasts
=
Nef
.
DeepCopy
(
ms
)
end
end
function
Gds
.
AdjustFieldInfoRenewMI
(
g
)
local
n
=
-
1
local
p
=
-
1
for
i
=
0
,
13
do
ms
[
0
][
i
][
0
]
=
nil
ms
[
1
][
i
][
0
]
=
nil
end
tempc
=
g
:
GetFirst
()
while
(
tempc
)
do
n
=
tempc
:
GetSequence
()
if
tempc
:
IsLocation
(
LOCATION_SZONE
)
then
n
=
n
+
7
end
p
=
tempc
:
GetControler
()
ms
[
p
][
n
][
0
]
=
tempc
ms
[
p
][
n
][
-
1
]
=
tempc
:
GetRealFieldID
()
ms
[
p
][
n
][
1
]
=
tempc
:
GetPosition
()
tempc
=
g
:
GetNext
()
end
end
function
Gds
.
AdjustFieldInfoFindMI
(
c
)
local
i
,
j
for
i
=
0
,
1
do
for
j
=
0
,
13
do
if
ms
[
i
][
j
][
0
]
==
c
then
return
i
,
j
end
end
end
return
-
1
,
-
1
end
function
Gds
.
AFIFindLastMI
(
c
)
local
i
,
j
for
i
=
0
,
1
do
for
j
=
0
,
13
do
if
lasts
[
i
][
j
][
0
]
==
c
then
return
i
,
j
end
end
end
return
-
1
,
-
1
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