Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
V
Vgdpro 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
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
xiaoye
Vgdpro Scripts
Commits
07606cd2
Commit
07606cd2
authored
May 04, 2024
by
EndOfFuture
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a0f85d5b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
VgFuncLib.lua
VgFuncLib.lua
+10
-5
No files found.
VgFuncLib.lua
View file @
07606cd2
...
...
@@ -647,16 +647,22 @@ function VgF.BackFilter(c)
local
seq
=
c
:
GetSequence
()
return
(
seq
==
1
or
seq
==
2
or
seq
==
3
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
VgF
.
Prison
Filter
(
c
,
ct
)
function
VgF
.
SetOrder
Filter
(
c
,
ct
)
return
c
:
GetSequence
()
==
ct
-
1
end
---返回p场上的设置指令。
---@param p integer
---@return Card
function
VgF
.
GetSetOrder
(
p
)
local
og
=
Duel
.
GetFieldGroup
(
p
,
LOCATION_ORDER
,
0
)
return
og
:
Filter
(
VgF
.
PrisonFilter
,
nil
,
og
:
GetCount
()):
GetFirst
()
end
---收容g(中的每一张卡)到p的监狱。没有监狱时,不操作。
---@param g Card|Group
---@param p integer
function
VgF
.
SendtoPrison
(
g
,
p
)
if
not
VgF
.
CheckPrison
(
p
)
or
not
g
then
return
end
local
og
=
Duel
.
GetFieldGroup
(
p
,
LOCATION_ORDER
,
0
)
local
oc
=
og
:
Filter
(
VgF
.
PrisonFilter
,
nil
,
og
:
GetCount
()):
GetFirst
()
local
oc
=
VgF
.
GetSetOrder
(
p
)
if
VgF
.
GetValueType
(
g
)
==
"Card"
then
Duel
.
Sendto
(
g
,
p
,
LOCATION_ORDER
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
g
:
RegisterFlagEffect
(
ImprisonFlag
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
vgf
.
Stringid
(
10105015
,
0
))
...
...
@@ -672,7 +678,6 @@ end
---@param p integer
---@return boolean 指示p场上有没有监狱。
function
VgF
.
CheckPrison
(
p
)
local
og
=
Duel
.
GetFieldGroup
(
p
,
LOCATION_ORDER
,
0
)
local
oc
=
og
:
Filter
(
VgF
.
PrisonFilter
,
nil
,
og
:
GetCount
()):
GetFirst
()
local
oc
=
VgF
.
GetSetOrder
(
p
)
return
oc
:
IsSetCard
(
0x3040
)
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