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
90520adf
Commit
90520adf
authored
Aug 24, 2024
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update VgD.Lua
parent
abfb4de5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
VgD.Lua
VgD.Lua
+5
-7
No files found.
VgD.Lua
View file @
90520adf
...
@@ -811,8 +811,8 @@ function VgD.SpellActivate(c,m,op,cost,con)
...
@@ -811,8 +811,8 @@ function VgD.SpellActivate(c,m,op,cost,con)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
VgD
.
MixCost
(
cost
))
e1
:
SetCost
(
VgD
.
MixCost
(
cost
))
--
e1:SetCondition(VgD.SpellCondtion(con))
e1
:
SetCondition
(
VgD
.
SpellCondtion
(
con
))
--
e1:SetTarget(VgD.SpellTarget)
e1
:
SetTarget
(
VgD
.
SpellTarget
)
e1
:
SetOperation
(
VgD
.
SpellOperation
(
op
))
e1
:
SetOperation
(
VgD
.
SpellOperation
(
op
))
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
...
@@ -820,8 +820,7 @@ function VgD.MixCostFilter(c,e,tp,eg,ep,ev,re,r,rp,mc,chk)
...
@@ -820,8 +820,7 @@ function VgD.MixCostFilter(c,e,tp,eg,ep,ev,re,r,rp,mc,chk)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_MIX_DIFFERENT_NAME
)
and
c
:
IsCode
(
mc
:
GetCode
())
then
return
false
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_MIX_DIFFERENT_NAME
)
and
c
:
IsCode
(
mc
:
GetCode
())
then
return
false
end
local
ce
=
c
:
GetActivateEffect
()
local
ce
=
c
:
GetActivateEffect
()
if
not
ce
or
(
ce
:
GetCost
()
and
not
ce
:
GetCost
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
))
then
return
false
end
if
not
ce
or
(
ce
:
GetCost
()
and
not
ce
:
GetCost
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
))
then
return
false
end
--c.cos_from, c.cos_to, c.cos_filter, c.cos_val
local
cfrom
,
cval
,
cfilter
,
mcfrom
,
mcval
,
mcfilter
local
cfrom
,
cval
,
cfilter
,
mcfrom
,
mcval
,
mcfilter
=
{},
{},
{},
{},
{},
{}
table
.
copy
(
cfrom
,
c
.
cos_from
)
table
.
copy
(
cfrom
,
c
.
cos_from
)
table
.
copy
(
cval
,
c
.
cos_val
)
table
.
copy
(
cval
,
c
.
cos_val
)
table
.
copy
(
cfilter
,
c
.
cos_filter
)
table
.
copy
(
cfilter
,
c
.
cos_filter
)
...
@@ -862,16 +861,15 @@ function VgD.MixCostFilter(c,e,tp,eg,ep,ev,re,r,rp,mc,chk)
...
@@ -862,16 +861,15 @@ function VgD.MixCostFilter(c,e,tp,eg,ep,ev,re,r,rp,mc,chk)
end
end
elseif
#
mcfrom
>
0
and
not
chk
then
return
false
elseif
#
mcfrom
>
0
and
not
chk
then
return
false
end
end
return
true
--
VgF.LvCondition(c)
return
VgF
.
LvCondition
(
c
)
end
end
function
VgD
.
MixCost
(
cost
)
function
VgD
.
MixCost
(
cost
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
chk_return
=
VgF
.
GetValueType
(
cost
)
~=
"function"
or
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
local
chk_return
=
VgF
.
GetValueType
(
cost
)
~=
"function"
or
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
if
chk
==
0
then
return
chk_return
end
if
chk
==
0
then
return
chk_return
end
if
--[[Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_MIX) and]]
VgF
.
IsExistingMatchingCard
(
VgD
.
MixCostFilter
,
tp
,
LOCATION_DROP
,
0
,
1
,
nil
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
chk_return
)
and
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
VgID
,
6
))
then
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_MIX
)
and
VgF
.
IsExistingMatchingCard
(
VgD
.
MixCostFilter
,
tp
,
LOCATION_DROP
,
0
,
1
,
nil
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
chk_return
)
and
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
VgID
,
6
))
then
local
bc
=
Duel
.
SelectMatchingCard
(
tp
,
VgD
.
MixCostFilter
,
tp
,
LOCATION_DROP
,
0
,
1
,
1
,
nil
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
chk_return
):
GetFirst
()
local
bc
=
Duel
.
SelectMatchingCard
(
tp
,
VgD
.
MixCostFilter
,
tp
,
LOCATION_DROP
,
0
,
1
,
1
,
nil
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
chk_return
):
GetFirst
()
--if VgF.GetValueType(cost)=="function" then cost(e,tp,eg,ep,ev,re,r,rp) end
if
bc
then
if
bc
then
VgF
.
Sendto
(
LOCATION_LOCK
,
bc
,
POS_FACEUP
,
REASON_COST
)
VgF
.
Sendto
(
LOCATION_LOCK
,
bc
,
POS_FACEUP
,
REASON_COST
)
e
:
SetLabelObject
(
bc
)
e
:
SetLabelObject
(
bc
)
...
...
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