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
48bf5f53
Commit
48bf5f53
authored
May 28, 2024
by
jwyxym
Committed by
GitHub
May 28, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
95721aaa
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
112 deletions
+54
-112
VgD.Lua
VgD.Lua
+3
-6
VgFuncLib.lua
VgFuncLib.lua
+43
-101
c10101006.lua
c10101006.lua
+2
-1
c10103005.lua
c10103005.lua
+2
-1
c10104002.lua
c10104002.lua
+2
-1
c10401003.lua
c10401003.lua
+2
-2
No files found.
VgD.Lua
View file @
48bf5f53
...
...
@@ -961,14 +961,11 @@ function VgD.EffectTypeTriggerWhenHitting(c,m,loc,typ,op,cost,con,tg,count,p,pro
end
function
VgD
.
EffectTypeTriggerWhenHittingCon
(
typ
,
con
,
p
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetAttacker
():
GetControler
()
~=
p
then
return
false
end
if
eg
:
GetFirst
():
GetControler
()
==
p
and
(
VgF
.
GetValueType
(
con
)
==
"function"
and
not
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
))
then
return
false
end
if
typ
==
EFFECT_TYPE_SINGLE
then
if
VgF
.
GetValueType
(
con
)
~=
"function"
or
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
end
return
false
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
end
return
VgF
.
GetValueType
(
con
)
~=
"function"
or
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
true
end
end
function
VgD
.
QuickSpell
(
c
,
code
,
op
,
cost
,
con
,
tg
)
...
...
VgFuncLib.lua
View file @
48bf5f53
...
...
@@ -380,34 +380,24 @@ end
---@param g Card|Group 要被上升攻击力的卡
---@param val integer 要上升的攻击力(可以为负)
---@param reset integer|nil 指示重置的时点,默认为“回合结束时”。无论如何,都会在离场时重置。
function
VgF
.
AtkUp
(
c
,
g
,
val
,
reset
,
resetcount
,
resettype
,
resetcode
)
function
VgF
.
AtkUp
(
c
,
g
,
val
,
reset
,
resetcount
)
if
not
c
then
return
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
if
not
resetcount
then
resetcount
=
1
end
if
not
resettype
then
resettype
=
EFFECT_TYPE_FIELD
end
if
not
resetcode
then
resetcode
=
0
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
if
not
val
or
val
==
0
then
return
end
if
VgF
.
GetValueType
(
g
)
==
"Group"
and
g
:
GetCount
()
>
0
then
local
e
=
{}
for
tc
in
VgF
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
val
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
,
resetcount
)
tc
:
RegisterEffect
(
e1
)
if
resetcode
>
0
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
resettype
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
resetcode
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetOperation
(
function
(
te
)
e1
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e2
)
end
table.insert
(
e
,
e1
)
end
return
e
elseif
VgF
.
GetValueType
(
g
)
==
"Card"
then
local
tc
=
VgF
.
ReturnCard
(
g
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -416,18 +406,7 @@ function VgF.AtkUp(c,g,val,reset,resetcount,resettype,resetcode)
e1
:
SetValue
(
val
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
,
resetcount
)
tc
:
RegisterEffect
(
e1
)
if
resetcode
>
0
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
resettype
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
resetcode
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetOperation
(
function
(
te
)
e1
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e2
)
end
return
e1
end
end
---以c的名义,使g(中的每一张卡)的盾值上升val,并在reset时重置。
...
...
@@ -435,13 +414,13 @@ end
---@param g Card|Group 要被上升盾值的卡
---@param val integer 要上升的盾值(可以为负)
---@param reset integer|nil 指示重置的时点,默认为“回合结束时”。无论如何,都会在离场时重置。
function
VgF
.
DefUp
(
c
,
g
,
val
,
reset
,
resetcount
,
resettype
,
resetcode
)
function
VgF
.
DefUp
(
c
,
g
,
val
,
reset
,
resetcount
)
if
not
c
then
return
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
if
not
resetcount
then
resetcount
=
1
end
if
not
resettype
then
resettype
=
EFFECT_TYPE_FIELD
end
if
not
val
or
val
==
0
then
return
end
if
VgF
.
GetValueType
(
g
)
==
"Group"
and
g
:
GetCount
()
>
0
then
local
e
=
{}
for
tc
in
VgF
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -449,19 +428,9 @@ function VgF.DefUp(c,g,val,reset,resetcount,resettype,resetcode)
e1
:
SetValue
(
val
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
,
resetcount
)
tc
:
RegisterEffect
(
e1
)
if
resetcode
>
0
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
resettype
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
resetcode
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetOperation
(
function
(
te
)
e1
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e2
)
end
table.insert
(
e
,
e1
)
end
return
e
elseif
VgF
.
GetValueType
(
g
)
==
"Card"
then
local
tc
=
VgF
.
ReturnCard
(
g
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -470,18 +439,7 @@ function VgF.DefUp(c,g,val,reset,resetcount,resettype,resetcode)
e1
:
SetValue
(
val
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
,
resetcount
)
tc
:
RegisterEffect
(
e1
)
if
resetcode
>
0
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
resettype
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
resetcode
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetOperation
(
function
(
te
)
e1
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e2
)
end
return
e1
end
end
---以c的名义,使g(中的每一张卡)的☆上升val,并在reset时重置。
...
...
@@ -489,13 +447,14 @@ end
---@param g Card|Group 要被上升☆的卡
---@param val integer 要上升的☆(可以为负)
---@param reset integer|nil 指示重置的时点,默认为“回合结束时”。无论如何,都会在离场时重置。
function
VgF
.
StarUp
(
c
,
g
,
val
,
reset
,
resetcount
,
resettype
,
resetcode
)
function
VgF
.
StarUp
(
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
resettype
then
resettype
=
EFFECT_TYPE_FIELD
end
if
not
val
or
val
==
0
then
return
end
if
VgF
.
GetValueType
(
g
)
==
"Group"
and
g
:
GetCount
()
>
0
then
local
t1
=
{}
local
t2
=
{}
for
tc
in
VgF
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -508,25 +467,10 @@ function VgF.StarUp(c,g,val,reset,resetcount,resettype,resetcode)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_RSCALE
)
tc
:
RegisterEffect
(
e2
)
if
resetcode
>
0
then
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
resettype
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
resetcode
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e3
:
SetOperation
(
function
(
te
)
e1
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetOperation
(
function
(
te
)
e2
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e4
)
end
table.insert
(
t1
,
e1
)
table.insert
(
t2
,
e2
)
end
return
t1
,
t2
elseif
VgF
.
GetValueType
(
g
)
==
"Card"
then
local
tc
=
VgF
.
ReturnCard
(
g
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -540,24 +484,7 @@ function VgF.StarUp(c,g,val,reset,resetcount,resettype,resetcode)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_RSCALE
)
tc
:
RegisterEffect
(
e2
)
if
resetcode
>
0
then
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
resettype
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
resetcode
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e3
:
SetOperation
(
function
(
te
)
e1
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetOperation
(
function
(
te
)
e2
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e4
)
end
return
e1
,
e2
end
end
---判断c是否可以以规则的手段到G区域。
...
...
@@ -817,17 +744,32 @@ function VgF.CheckPrison(p)
end
--重置Effect
function
VgF
.
EffectReset
(
c
,
e
,
code
,
con
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
code
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetLabelObject
(
e
)
if
VgF
.
GetValueType
(
con
)
==
"function"
then
e1
:
SetCondition
(
con
)
end
e1
:
SetOperation
(
VgF
.
EffectResetOperation
)
c
:
RegisterEffect
(
e1
)
if
VgF
.
GetValueType
(
e
)
==
"Effect"
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
code
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetLabelObject
(
e
)
if
VgF
.
GetValueType
(
con
)
==
"function"
then
e1
:
SetCondition
(
con
)
end
e1
:
SetOperation
(
VgF
.
EffectResetOperation
)
c
:
RegisterEffect
(
e1
)
elseif
VgF
.
GetValueType
(
e
)
==
"table"
then
for
i
,
v
in
ipairs
(
e
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
code
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetLabelObject
(
v
)
if
VgF
.
GetValueType
(
con
)
==
"function"
then
e1
:
SetCondition
(
con
)
end
e1
:
SetOperation
(
VgF
.
EffectResetOperation
)
c
:
RegisterEffect
(
e1
)
end
end
end
function
VgF
.
EffectResetOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
e
:
GetLabelObject
()
if
VgF
.
GetValueType
(
e1
)
==
"Effect"
then
e1
:
Reset
()
end
e
:
Reset
()
end
\ No newline at end of file
c10101006.lua
View file @
48bf5f53
...
...
@@ -7,7 +7,8 @@ function cm.initial_effect(c)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
VgF
.
AtkUp
(
c
,
c
,
10000
,
nil
,
nil
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
)
local
e1
=
vgf
.
AtkUp
(
c
,
c
,
5000
,
nil
)
vgf
.
EffectReset
(
c
,
e1
,
EVENT_BATTLED
)
if
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
nil
):
GetFirst
():
GetOverlayGroup
():
FilterCount
(
Card
.
IsAbleToGraveAsCost
,
nil
)
>=
2
and
Duel
.
SelectEffectYesNo
(
tp
,
vgf
.
stringid
(
VgID
,
10
))
then
local
cg
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
():
GetOverlayGroup
():
FilterSelect
(
tp
,
Card
.
IsAbleToGraveAsCost
,
2
,
2
,
nil
)
if
Duel
.
SendtoGrave
(
cg
,
REASON_COST
)
==
2
then
...
...
c10103005.lua
View file @
48bf5f53
...
...
@@ -7,5 +7,6 @@ function cm.initial_effect(c)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
vgf
.
AtkUp
(
c
,
c
,
5000
,
nil
)
local
e1
=
vgf
.
AtkUp
(
c
,
c
,
5000
,
nil
)
vgf
.
EffectReset
(
c
,
e1
,
EVENT_BATTLED
)
end
c10104002.lua
View file @
48bf5f53
...
...
@@ -22,7 +22,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
function
cm
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
vgf
.
AtkUp
(
c
,
c
,
10000
,
nil
)
local
e1
=
vgf
.
AtkUp
(
c
,
c
,
10000
,
nil
)
vgf
.
EffectReset
(
c
,
e1
,
EVENT_BATTLED
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
c10401003.lua
View file @
48bf5f53
...
...
@@ -8,8 +8,8 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local
ct
=
c
:
GetOverlayCount
()
if
ct
>=
5
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
if
ct
>=
10
then
vgf
.
AtkUp
(
c
,
c
,
10000
,
nil
,
nil
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
)
vgf
.
StarUp
(
c
,
c
,
1
,
nil
,
nil
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
)
local
t
=
{
vgf
.
AtkUp
(
c
,
c
,
10000
),
vgf
.
StarUp
(
c
,
c
,
1
)}
vgf
.
EffectReset
(
c
,
t
,
EVENT_BATTLED
)
end
if
ct
>=
15
then
local
g1
=
Duel
.
GetMatchingGroup
(
vgf
.
RMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
...
...
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