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
103b2164
Commit
103b2164
authored
Oct 09, 2024
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
7cb6bca0
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
143 additions
and
14 deletions
+143
-14
README.md
README.md
+1
-1
VgD.Lua
VgD.Lua
+32
-12
VgFuncLib.lua
VgFuncLib.lua
+15
-0
c10401024.lua
c10401024.lua
+1
-1
c10402020.lua
c10402020.lua
+26
-0
c10402021.lua
c10402021.lua
+10
-0
c10402022.lua
c10402022.lua
+21
-0
c10402023.lua
c10402023.lua
+5
-0
c10402024.lua
c10402024.lua
+18
-0
c10402025.lua
c10402025.lua
+14
-0
No files found.
README.md
View file @
103b2164
...
...
@@ -551,6 +551,6 @@ vgf..Sendto(loc,sg,...)
>
> **LOCATION_TRIGGER : tp,tp,LOCATION_FZONE,POS_FACEUP,true**
>
> **LOCATION_MZONE : sumtype,tp,zone,pos
,chk `chk为0则Call到不存在单位的圆阵`
**
> **LOCATION_MZONE : sumtype,tp,zone,pos**
>
> **其他区域 : c,tp,pos,reason**
\ No newline at end of file
VgD.Lua
View file @
103b2164
...
...
@@ -1474,22 +1474,42 @@ function VgD.GlobalCheckEffect(c,m,code,con,op)
end
end
function
VgD
.
CannotBeTarget
(
c
,
m
,
con
,
val
,
loc
)
function
VgD
.
CannotBeTarget
(
c
,
m
,
con
,
val
,
loc
,
tg
,
range
)
local
cm
=
_G
[
"c"
..
m
]
if
not
cm
.
is_has_continuous
then
cm
.
is_has_continuous
=
true
end
if
not
loc
then
loc
=
LOCATION_MZONE
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
loc
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
if
VgF
.
GetValueType
(
con
)
==
"function"
then
e1
:
SetCondition
(
con
)
end
if
VgF
.
GetValueType
(
val
)
==
"function"
then
e1
:
SetValue
(
val
)
else
e1
:
SetValue
(
function
(
e
,
re
,
rp
)
return
rp
==
1
-
e
:
GetHandlerPlayer
()
end
)
if
VgF
.
GetValueType
(
tg
)
==
"function"
or
VgF
.
GetValueType
(
tg
)
==
"number"
then
if
VgF
.
GetValueType
(
range
)
~=
"tabel"
then
range
=
{}
end
if
#
range
==
0
then
range
=
{
LOCATION_MZONE
,
0
}
elseif
#
range
==
1
then
table.insert
(
range
,
0
)
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
loc
)
e1
:
SetTargetRange
(
range
[
1
],
range
[
2
])
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
if
VgF
.
GetValueType
(
con
)
==
"function"
then
e1
:
SetCondition
(
con
)
end
if
VgF
.
GetValueType
(
val
)
==
"function"
then
e1
:
SetValue
(
val
)
else
e1
:
SetValue
(
function
(
e
,
re
,
rp
)
return
rp
==
1
-
e
:
GetHandlerPlayer
()
end
)
end
if
VgF
.
GetValueType
(
tg
)
==
"function"
then
e1
:
SetTarget
(
tg
)
end
c
:
RegisterEffect
(
e1
)
else
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
loc
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
if
VgF
.
GetValueType
(
con
)
==
"function"
then
e1
:
SetCondition
(
con
)
end
if
VgF
.
GetValueType
(
val
)
==
"function"
then
e1
:
SetValue
(
val
)
else
e1
:
SetValue
(
function
(
e
,
re
,
rp
)
return
rp
==
1
-
e
:
GetHandlerPlayer
()
end
)
end
c
:
RegisterEffect
(
e1
)
end
c
:
RegisterEffect
(
e1
)
end
function
VgD
.
NightEffect
(
c
,
m
)
local
cm
=
_G
[
"c"
..
m
]
...
...
VgFuncLib.lua
View file @
103b2164
...
...
@@ -572,6 +572,21 @@ function VgF.DamageFill(val)
return
Duel
.
GetOperatedGroup
():
GetCount
()
end
end
function
VgF
.
CostAnd
(
f1
,
f2
,
c1
,
c2
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
a
=
false
local
b
=
false
if
VgF
.
GetValueType
(
c1
)
~=
"nil"
then
a
=
f1
(
c1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
else
a
=
f1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
VgF
.
GetValueType
(
c2
)
~=
"nil"
then
b
=
f2
(
c2
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
else
b
=
f2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
return
a
and
b
end
if
VgF
.
GetValueType
(
c1
)
~=
"nil"
then
f1
(
c1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
else
f1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
VgF
.
GetValueType
(
c2
)
~=
"nil"
then
f2
(
c2
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
else
f2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
end
end
---用于效果的Cost。它返回一个执行“【费用】[将手牌中的val张卡舍弃]”的函数。
---@param val integer 要舍弃的卡的数量
---@return function 效果的Cost函数
...
...
c10401024.lua
View file @
103b2164
...
...
@@ -7,7 +7,7 @@ function cm.initial_effect(c)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
vgf
.
R
Monster
Condition
(
e
)
and
c
:
IsSummonLocation
(
LOCATION_HAND
)
return
vgf
.
R
Summon
Condition
(
e
)
and
c
:
IsSummonLocation
(
LOCATION_HAND
)
end
--效果二处理
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
c10402020.lua
View file @
103b2164
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation
,
cm
.
cost
,
cm
.
con
)
vgd
.
GlobalCheckEffect
(
c
,
m
,
EVENT_SPSUMMON_SUCCESS
,
cm
.
checkcon
)
end
function
cm
.
checkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_SELFRIDE
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
a
=
0
if
c
:
GetFlagEffect
(
m
)
>
0
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
a
=
Duel
.
SelectOption
(
tp
,
vgf
.
Stringid
(
m
,
0
),
vgf
.
Stringid
(
m
,
1
))
end
if
a
==
0
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
else
vgf
.
AtkUp
(
c
,
c
,
5000
)
vgf
.
StarUp
(
c
,
c
,
1
)
end
end
function
cm
.
filter
(
c
)
return
vgf
.
RMonsterFilter
(
c
)
and
c
:
IsLevel
(
3
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
vgf
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
4
,
nil
)
and
vgf
.
RMonsterCondition
(
e
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
vgf
.
DamageCost
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
and
vgf
.
OverlayCost
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
vgf
.
DamageCost
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
vgf
.
OverlayCost
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
\ No newline at end of file
c10402021.lua
View file @
103b2164
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation
,
nil
,
cm
.
con
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
vgf
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
1
,
nil
)
and
vgf
.
RMonsterCondition
(
e
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
e1
=
vgf
.
AtkUp
(
c
,
c
,
5000
)
vgf
.
EffectReset
(
c
,
e1
,
EVENT_BATTLED
)
end
\ No newline at end of file
c10402022.lua
View file @
103b2164
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_SPSUMMON_SUCCESS
,
cm
.
operation
,
vgf
.
CostAnd
(
vgf
.
DamageCost
,
vgf
.
DisCardCost
,
1
,
1
),
cm
.
condition
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
vgf
.
GetVMonster
(
tp
)
return
vgf
.
RSummonCondition
(
e
)
and
c
:
IsSummonLocation
(
LOCATION_HAND
)
and
tc
:
IsCode
(
10401008
,
10401046
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
2
)
Duel
.
ConfirmCards
(
tp
,
g
)
Duel
.
DisableShuffleCheck
()
local
ct
=
bit
.
ReturnCount
(
vgf
.
GetAvailableLocation
(
tp
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
local
sg
=
g
:
FilterSelect
(
tp
,
vgf
.
IsCanBeCalled
,
0
,
ct
,
nil
,
e
,
tp
)
if
sg
:
GetCount
()
>
0
then
vgf
.
Sendto
(
LOCATION_MZONE
,
sg
,
0
,
tp
)
g
:
Sub
(
sg
)
end
if
g
:
GetCount
()
>
1
then
Duel
.
SortDecktop
(
tp
,
tp
,
#
g
)
end
end
\ No newline at end of file
c10402023.lua
View file @
103b2164
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
CannotBeTarget
(
c
,
m
,
vgf
.
RMonsterCondition
,
nil
,
LOCATION_MZONE
,
cm
.
tg
)
end
function
cm
.
tg
(
e
,
tc
)
local
c
=
e
:
GetHandler
()
return
vgf
.
FrontFilter
(
tc
)
and
vgf
.
GetColumnGroup
(
c
):
IsContains
(
tc
)
and
tc
:
IsControler
(
c
:
GetControler
())
end
\ No newline at end of file
c10402024.lua
View file @
103b2164
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
SpellActivate
(
c
,
m
,
cm
.
op
,
vgf
.
CostAnd
(
vgf
.
DamageCost
,
vgf
.
OverlayCost
,
1
,
1
))
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
vgf
.
SelectMatchingCard
(
HINTMSG_LEAVEFIELD
,
e
,
tp
,
vgf
.
RMonsterFilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
vgf
.
Sendto
(
LOCATION_DROP
,
g
,
REASON_EFFECT
)
local
ct
=
bit
.
ReturnCount
(
vgf
.
GetAvailableLocation
(
tp
))
if
chk
>
0
then
if
ct
>
2
then
ct
=
2
end
else
if
ct
>
1
then
ct
=
1
end
end
local
sg
=
vgf
.
SelectMatchingCard
(
HINTMSG_CALL
,
e
,
tp
,
cm
.
filter
,
tp
,
LOCATION_DROP
,
0
,
0
,
ct
,
nil
,
g
:
GetFirst
():
GetLevel
(),
e
,
tp
)
if
sg
:
GetCount
()
>
0
then
vgf
.
Sendto
(
LOCATION_MZONE
,
sg
,
0
,
tp
)
end
end
end
function
cm
.
filter
(
c
,
lv
,
e
,
tp
)
return
c
:
IsLevel
(
lv
)
and
vgf
.
IsCanBeCalled
(
c
,
e
,
tp
)
end
\ No newline at end of file
c10402025.lua
View file @
103b2164
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
SpellActivate
(
c
,
m
,
cm
.
op
,
vgf
.
DamageCost
(
1
))
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
2
)
vgf
.
Sendto
(
LOCATION_GRAVE
,
g
,
REASON_EFFECT
)
local
ct
=
bit
.
ReturnCount
(
vgf
.
GetAvailableLocation
(
tp
))
if
vgf
.
GetVMonster
(
tp
):
IsCode
(
10104001
)
then
if
ct
>
2
then
ct
=
2
end
else
if
ct
>
1
then
ct
=
1
end
end
local
sg
=
vgf
.
SelectMatchingCard
(
HINTMSG_CALL
,
e
,
tp
,
cm
.
filter
,
tp
,
LOCATION_DROP
,
0
,
0
,
ct
,
nil
,
vgf
.
GetVMonster
(
tp
):
GetLevel
(),
e
,
tp
)
if
sg
:
GetCount
()
>
0
then
vgf
.
Sendto
(
LOCATION_MZONE
,
sg
,
0
,
tp
)
end
end
function
cm
.
filter
(
c
,
lv
,
e
,
tp
)
return
c
:
IsLevelBelow
(
lv
)
and
vgf
.
IsCanBeCalled
(
c
,
e
,
tp
)
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