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
adfd70da
Commit
adfd70da
authored
Feb 23, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 10501041
parent
8c8a7f8e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
12 deletions
+114
-12
c10501041.lua
c10501041.lua
+12
-0
vgd.lua
vgd.lua
+43
-5
vgfuncLib.lua
vgfuncLib.lua
+59
-7
No files found.
c10501041.lua
View file @
adfd70da
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
vgd
.
VgCard
(
c
)
vgd
.
VgCard
(
c
)
vgd
.
EffectTypeIgnition
(
c
,
m
,
LOCATION_RZONE
,
cm
.
op
,
vgf
.
CostAnd
(
vgf
.
DamageCost
(
1
),
vgf
.
ToOverlayCost
))
vgd
.
CannotBeTarget
(
c
,
m
,
LOCATION_VZONE
,
EFFECT_TYPE_SINGLE
,
nil
,
vgf
.
DarkWing
)
vgd
.
CannotBeAttackTarget
(
c
,
m
,
LOCATION_VZONE
,
EFFECT_TYPE_SINGLE
,
cm
.
val
,
vgf
.
DarkWing
)
end
end
function
cm
.
val
(
e
,
c
)
return
vgf
.
RMonsterFilter
(
c
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
vgf
.
Draw
(
0
,
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
vgf
.
SelectMatchingCard
(
HINTMSG_SELF
,
e
,
tp
,
LOCATION_REMOVED
,
0
,
0
,
1
,
nil
)
vgf
.
LevelUp
(
c
,
g
,
1
)
end
\ No newline at end of file
vgd.lua
View file @
adfd70da
...
@@ -1705,16 +1705,54 @@ function VgD.TriggerCountUpOperation(num)
...
@@ -1705,16 +1705,54 @@ function VgD.TriggerCountUpOperation(num)
end
end
end
end
---【永】这个单位不会被攻击
---@param c Card 拥有这个效果的卡
---@param m number|nil 效果的拥有者的卡号
---@param loc number|nil 生效的区域
---@param typ number|nil 只影响自己,则填EFFECT_TYPE_SINGLE;<br>影响场上,则填EFFECT_TYPE_FIELD。
---@param val function|nil 不会被 val 的卡选择
---@param con function|nil 这个效果的条件函数
---@param tg function|nil 这个效果的影响目标,影响全域范围才需填
---@param loc_self number|nil 这个效果影响的自己区域,影响全域范围才需填
---@return Effect|nil 这个效果
function
VgD
.
CannotBeAttackTarget
(
c
,
m
,
loc
,
typ
,
val
,
con
,
tg
,
loc_self
)
-- check func
local
fchk
=
VgF
.
IllegalFunctionCheck
(
"CannotBeAttackTarget"
,
c
)
if
fchk
.
con
(
con
)
or
fchk
.
tg
(
tg
)
then
return
end
-- set param
local
cm
=
_G
[
"c"
..
(
m
or
c
:
GetOriginalCode
())]
cm
.
is_has_continuous
=
true
typ
=
typ
or
EFFECT_TYPE_SINGLE
loc
,
con
=
VgF
.
GetLocCondition
(
loc
,
con
)
val
=
val
or
VgF
.
True
-- set effect
local
e
=
Effect
.
CreateEffect
(
c
)
e
:
SetRange
(
loc
)
e
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e
:
SetCondition
(
con
)
e
:
SetValue
(
val
)
if
typ
==
EFFECT_TYPE_FIELD
or
tg
or
loc_self
then
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetTargetRange
(
loc_self
or
LOCATION_MZONE
,
0
)
if
tg
then
e
:
SetTarget
(
tg
)
end
else
e
:
SetType
(
EFFECT_TYPE_SINGLE
)
e
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
end
c
:
RegisterEffect
(
e
)
return
e
end
---【永】这个单位不会被对手的卡片的效果选择
---【永】这个单位不会被对手的卡片的效果选择
---@param c Card 拥有这个效果的卡
---@param c Card 拥有这个效果的卡
---@param m number|nil 效果的拥有者的卡号
---@param m number|nil 效果的拥有者的卡号
---@param loc number 生效的区域
---@param loc number
|nil
生效的区域
---@param typ number 只影响自己,则填EFFECT_TYPE_SINGLE;<br>影响场上,则填EFFECT_TYPE_FIELD。
---@param typ number
|nil
只影响自己,则填EFFECT_TYPE_SINGLE;<br>影响场上,则填EFFECT_TYPE_FIELD。
---@param val
number
不会被 val 的效果选择
---@param val
function|nil
不会被 val 的效果选择
---@param con function|nil 这个效果的条件函数
---@param con function|nil 这个效果的条件函数
---@param tg function|nil 这个效果的影响目标,影响全域范围才需填
---@param tg function|nil 这个效果的影响目标,影响全域范围才需填
---@param loc_self number|nil 这个效果影响的自己区域,影响全域范围才需填
---@param loc_self number|nil 这个效果影响的自己区域,影响全域范围才需填
---@return Effect 这个效果
---@return Effect
|nil
这个效果
function
VgD
.
CannotBeTarget
(
c
,
m
,
loc
,
typ
,
val
,
con
,
tg
,
loc_self
)
function
VgD
.
CannotBeTarget
(
c
,
m
,
loc
,
typ
,
val
,
con
,
tg
,
loc_self
)
-- check func
-- check func
local
fchk
=
VgF
.
IllegalFunctionCheck
(
"CannotBeTarget"
,
c
)
local
fchk
=
VgF
.
IllegalFunctionCheck
(
"CannotBeTarget"
,
c
)
...
@@ -1722,7 +1760,7 @@ function VgD.CannotBeTarget(c, m, loc, typ, val, con, tg, loc_self)
...
@@ -1722,7 +1760,7 @@ function VgD.CannotBeTarget(c, m, loc, typ, val, con, tg, loc_self)
-- set param
-- set param
local
cm
=
_G
[
"c"
..
(
m
or
c
:
GetOriginalCode
())]
local
cm
=
_G
[
"c"
..
(
m
or
c
:
GetOriginalCode
())]
cm
.
is_has_continuous
=
true
cm
.
is_has_continuous
=
true
typ
=
typ
or
EFFECT_TYPE_SINGLE
typ
=
typ
or
EFFECT_TYPE_SINGLE
loc
,
con
=
VgF
.
GetLocCondition
(
loc
,
con
)
loc
,
con
=
VgF
.
GetLocCondition
(
loc
,
con
)
val
=
val
or
function
(
e
,
re
,
rp
)
val
=
val
or
function
(
e
,
re
,
rp
)
return
rp
==
1
-
e
:
GetHandlerPlayer
()
return
rp
==
1
-
e
:
GetHandlerPlayer
()
...
...
vgfuncLib.lua
View file @
adfd70da
...
@@ -385,7 +385,7 @@ function VgF.AtkUp(c, g, val, reset, resetcount)
...
@@ -385,7 +385,7 @@ function VgF.AtkUp(c, g, val, reset, resetcount)
for
tc
in
VgF
.
Next
(
g
)
do
for
tc
in
VgF
.
Next
(
g
)
do
if
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
VgF
.
GetValueType
(
val
)
==
"string"
and
val
==
"DOUBLE"
then
if
VgF
.
GetValueType
(
val
)
==
"string"
and
val
==
"DOUBLE"
then
val
=
tc
:
Get
LeftScale
()
val
=
tc
:
Get
Attack
()
end
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
@@ -402,7 +402,7 @@ function VgF.AtkUp(c, g, val, reset, resetcount)
...
@@ -402,7 +402,7 @@ function VgF.AtkUp(c, g, val, reset, resetcount)
if
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
tc
:
IsLocation
(
LOCATION_MZONE
)
then
local
tc
=
VgF
.
ReturnCard
(
g
)
local
tc
=
VgF
.
ReturnCard
(
g
)
if
VgF
.
GetValueType
(
val
)
==
"string"
and
val
==
"DOUBLE"
then
if
VgF
.
GetValueType
(
val
)
==
"string"
and
val
==
"DOUBLE"
then
val
=
tc
:
Get
LeftScale
()
val
=
tc
:
Get
Attack
()
end
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
@@ -429,7 +429,7 @@ function VgF.DefUp(c, g, val, reset, resetcount)
...
@@ -429,7 +429,7 @@ function VgF.DefUp(c, g, val, reset, resetcount)
for
tc
in
VgF
.
Next
(
g
)
do
for
tc
in
VgF
.
Next
(
g
)
do
if
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
VgF
.
GetValueType
(
val
)
==
"string"
and
val
==
"DOUBLE"
then
if
VgF
.
GetValueType
(
val
)
==
"string"
and
val
==
"DOUBLE"
then
val
=
tc
:
Get
LeftScal
e
()
val
=
tc
:
Get
Defens
e
()
end
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
@@ -445,7 +445,7 @@ function VgF.DefUp(c, g, val, reset, resetcount)
...
@@ -445,7 +445,7 @@ function VgF.DefUp(c, g, val, reset, resetcount)
local
tc
=
g
local
tc
=
g
if
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
VgF
.
GetValueType
(
val
)
==
"string"
and
val
==
"DOUBLE"
then
if
VgF
.
GetValueType
(
val
)
==
"string"
and
val
==
"DOUBLE"
then
val
=
tc
:
Get
LeftScal
e
()
val
=
tc
:
Get
Defens
e
()
end
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
@@ -512,6 +512,49 @@ function VgF.StarUp(c, g, val, reset, resetcount)
...
@@ -512,6 +512,49 @@ function VgF.StarUp(c, g, val, reset, resetcount)
end
end
end
end
end
end
---以c的名义,使g(中的每一张卡)的等级上升val,并在reset时重置。
---@param c Card 要使卡上升等级的卡
---@param g Card|Group 要被上升等级的卡
---@param val number|string 要上升的等级(可以为负,等级最低为0)
---@param reset number|nil 指示重置的时点,默认为“回合结束时”。无论如何,都会在离场时重置。
function
VgF
.
LevelUp
(
c
,
g
,
val
,
reset
,
resetcount
)
if
not
c
or
not
g
then
return
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
if
not
resetcount
then
resetcount
=
1
end
if
not
val
or
(
VgF
.
GetValueType
(
val
)
==
"number"
and
val
==
0
)
then
return
end
if
VgF
.
GetValueType
(
g
)
==
"Group"
and
g
:
GetCount
()
>
0
then
local
e
=
{}
for
tc
in
VgF
.
Next
(
g
)
do
if
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
VgF
.
GetValueType
(
val
)
==
"string"
and
val
==
"DOUBLE"
then
val
=
tc
:
GetLevel
()
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
val
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
,
resetcount
)
tc
:
RegisterEffect
(
e1
)
table.insert
(
e
,
e1
)
end
end
return
e
elseif
VgF
.
GetValueType
(
g
)
==
"Card"
then
local
tc
=
g
if
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
VgF
.
GetValueType
(
val
)
==
"string"
and
val
==
"DOUBLE"
then
val
=
tc
:
GetLevel
()
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
val
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
,
resetcount
)
tc
:
RegisterEffect
(
e1
)
return
e1
end
end
end
---判断c是否可以以规则的手段到G区域。
---判断c是否可以以规则的手段到G区域。
---@param c Card 要判断的卡
---@param c Card 要判断的卡
---@return boolean 指示c能否去到G区域。
---@return boolean 指示c能否去到G区域。
...
@@ -537,7 +580,16 @@ function VgF.DamageFill(val)
...
@@ -537,7 +580,16 @@ function VgF.DamageFill(val)
end
end
end
end
---用于多Cost。例如 VgF.CostAnd(vgf.DamageCost(1), vgf.DisCardCost(1))。
---用于效果的Cost。它返回一个执行“【费用】[将这个单位放置到灵魂里]”的函数。
function
VgF
.
ToOverlayCost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsRelateToEffect
(
e
)
end
VgF
.
Sendto
(
LOCATION_OVERLAY
,
c
)
end
end
---用于效果的Cost。它返回一个执行“【费用】[将手牌中的val张卡舍弃]”的函数。
function
VgF
.
CostAnd
(
...
)
function
VgF
.
CostAnd
(
...
)
local
funcs
=
{
...
}
local
funcs
=
{
...
}
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
@@ -1441,12 +1493,12 @@ end
...
@@ -1441,12 +1493,12 @@ end
---检查并转换 loc 以及 con 用于【起】等模板函数
---检查并转换 loc 以及 con 用于【起】等模板函数
function
VgF
.
GetLocCondition
(
loc
,
con
)
function
VgF
.
GetLocCondition
(
loc
,
con
)
local
con_exf
=
VgF
.
True
local
con_exf
=
VgF
.
True
if
loc
==
LOCATION_RZONE
then
if
loc
==
LOCATION_RZONE
then
loc
,
con_exf
=
LOCATION_MZONE
,
VgF
.
RMonsterCondition
loc
,
con_exf
=
LOCATION_MZONE
,
VgF
.
RMonsterCondition
elseif
loc
==
LOCATION_VZONE
then
elseif
loc
==
LOCATION_VZONE
then
loc
,
con_exf
=
LOCATION_MZONE
,
VgF
.
VMonsterCondition
loc
,
con_exf
=
LOCATION_MZONE
,
VgF
.
VMonsterCondition
end
end
loc
=
loc
or
LOCATION_MZONE
loc
=
loc
or
LOCATION_MZONE
local
condition
=
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
condition
=
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
not
con
or
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
))
and
con_exf
(
e
)
return
(
not
con
or
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
))
and
con_exf
(
e
)
end
end
...
...
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