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
6faba86a
Commit
6faba86a
authored
Apr 21, 2024
by
jwyxym
Committed by
GitHub
Apr 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
fd0ae174
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
24 deletions
+31
-24
VgFuncLib.lua
VgFuncLib.lua
+28
-20
c10101015.lua
c10101015.lua
+1
-1
c20104001.lua
c20104001.lua
+2
-3
No files found.
VgFuncLib.lua
View file @
6faba86a
...
@@ -513,39 +513,47 @@ end
...
@@ -513,39 +513,47 @@ end
function
VgF
.
SearchCard
(
loc
,
f
)
function
VgF
.
SearchCard
(
loc
,
f
)
if
not
loc
then
return
end
if
not
loc
then
return
end
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
VgF
.
SearchCardOP
(
loc
,
f
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
function
(
c
)
if
VgF
.
GetValueType
(
f
)
==
"function"
and
not
f
(
c
)
then
return
false
end
return
c
:
IsAbleToHand
()
end
,
tp
,
loc
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
local
sg
=
Duel
.
GetOperatedGroup
()
local
sg
=
Duel
.
GetOperatedGroup
()
return
sg
:
GetCount
()
return
sg
:
GetCount
()
end
end
end
end
---用于效果的Operation。执行“从loc中选取1张满足f的卡,Call到R上。”。
function
VgF
.
SearchCardOP
(
loc
,
f
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
loc
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
function
(
c
)
if
VgF
.
GetValueType
(
f
)
==
"function"
and
not
f
(
c
)
then
return
false
end
return
c
:
IsAbleToHand
()
end
,
tp
,
loc
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
---用于效果的Operation。执行“从loc中选取1张满足f的卡,Call到R上。”。
---@param loc integer 要选取的区域。不填则返回nil,而不是效果的Operation函数。
---@param loc integer 要选取的区域。不填则返回nil,而不是效果的Operation函数。
---@param f function 卡片过滤的条件
---@param f function 卡片过滤的条件
---@return function|nil 效果的Operation函数
---@return function|nil 效果的Operation函数
function
VgF
.
SearchCardSpecialSummon
(
loc
,
f
)
function
VgF
.
SearchCardSpecialSummon
(
loc
,
f
)
if
not
loc
then
return
end
if
not
loc
then
return
end
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
VgF
.
SearchCardSpecialSummonOP
(
loc
,
f
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
function
(
c
)
if
VgF
.
GetValueType
(
f
)
==
"function"
and
not
f
(
c
)
then
return
false
end
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
,
tp
,
loc
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
loc
&
LOCATION_DECK
+
LOCATION_HAND
+
LOCATION_EXTRA
==
0
then
Duel
.
HintSelection
(
g
)
end
VgF
.
Call
(
g
,
0
,
tp
)
end
local
sg
=
Duel
.
GetOperatedGroup
()
local
sg
=
Duel
.
GetOperatedGroup
()
return
sg
:
GetCount
()
return
sg
:
GetCount
()
end
end
end
end
function
VgF
.
SearchCardSpecialSummonOP
(
loc
,
f
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
loc
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
function
(
c
)
if
VgF
.
GetValueType
(
f
)
==
"function"
and
not
f
(
c
)
then
return
false
end
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
,
tp
,
loc
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
loc
&
LOCATION_DECK
+
LOCATION_HAND
+
LOCATION_EXTRA
==
0
then
Duel
.
HintSelection
(
g
)
end
VgF
.
Call
(
g
,
0
,
tp
)
end
end
function
Group
.
CheckSubGroup
(
g
,
f
,
min
,
max
,
...
)
function
Group
.
CheckSubGroup
(
g
,
f
,
min
,
max
,
...
)
min
=
min
or
1
min
=
min
or
1
max
=
max
or
#
g
max
=
max
or
#
g
...
@@ -621,4 +629,4 @@ function VgF.CheckPrison(p)
...
@@ -621,4 +629,4 @@ function VgF.CheckPrison(p)
local
og
=
Duel
.
GetFieldGroup
(
p
,
LOCATION_ORDER
,
0
)
local
og
=
Duel
.
GetFieldGroup
(
p
,
LOCATION_ORDER
,
0
)
local
oc
=
og
:
Filter
(
VgF
.
PrisonFilter
,
nil
,
og
:
GetCount
()):
GetFirst
()
local
oc
=
og
:
Filter
(
VgF
.
PrisonFilter
,
nil
,
og
:
GetCount
()):
GetFirst
()
return
oc
:
IsSetCard
(
0x3040
)
return
oc
:
IsSetCard
(
0x3040
)
end
end
\ No newline at end of file
c10101015.lua
View file @
6faba86a
...
@@ -10,7 +10,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -10,7 +10,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g
)
Duel
.
HintSelection
(
g
)
VgF
.
AtkUp
(
c
,
g
,
5000
,
nil
)
VgF
.
AtkUp
(
c
,
g
,
5000
,
nil
)
vgf
.
SearchCard
(
LOCATION_DROP
,
cm
.
filter
)
vgf
.
SearchCard
OP
(
LOCATION_DROP
,
cm
.
filter
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
function
cm
.
filter
(
c
)
function
cm
.
filter
(
c
)
return
c
:
IsCode
(
10101006
)
return
c
:
IsCode
(
10101006
)
...
...
c20104001.lua
View file @
6faba86a
...
@@ -9,7 +9,7 @@ function cm.initial_effect(c)
...
@@ -9,7 +9,7 @@ function cm.initial_effect(c)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
vgf
.
SearchCard
(
LOCATION_DECK
,
cm
.
fliter
)
vgf
.
SearchCard
OP
(
LOCATION_DECK
,
cm
.
fliter
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
vgf
.
AtkUp
(
c
,
c
,
10000
,
nil
)
vgf
.
AtkUp
(
c
,
c
,
10000
,
nil
)
end
end
function
cm
.
fliter
(
c
)
function
cm
.
fliter
(
c
)
...
@@ -22,10 +22,9 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
...
@@ -22,10 +22,9 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
end
end
function
cm
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
vgf
.
SearchCardSpecialSummon
(
LOCATION_DROP
,
cm
.
fliter2
)
vgf
.
SearchCardSpecialSummon
OP
(
LOCATION_DROP
,
cm
.
fliter2
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetOperatedGroup
()
local
g
=
Duel
.
GetOperatedGroup
()
vgf
.
AtkUp
(
c
,
g
,
10000
)
vgf
.
AtkUp
(
c
,
g
,
10000
)
end
end
function
cm
.
fliter2
(
c
)
function
cm
.
fliter2
(
c
)
return
vgf
.
IsLevel
(
c
,
1
,
2
,
3
)
return
vgf
.
IsLevel
(
c
,
1
,
2
,
3
)
...
...
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