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
abfb4de5
Commit
abfb4de5
authored
Aug 23, 2024
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
魔合成+被ride当作+从魂中ride
parent
317c1acb
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
208 additions
and
168 deletions
+208
-168
VgD.Lua
VgD.Lua
+57
-63
VgDefinition.Lua
VgDefinition.Lua
+9
-5
VgFuncLib.lua
VgFuncLib.lua
+88
-77
c10201001.lua
c10201001.lua
+25
-0
c10202001.lua
c10202001.lua
+2
-1
c10203001.lua
c10203001.lua
+2
-0
c10401067.lua
c10401067.lua
+5
-5
c10401106.lua
c10401106.lua
+5
-5
c10401118.lua
c10401118.lua
+7
-6
c10402031.lua
c10402031.lua
+8
-6
No files found.
VgD.Lua
View file @
abfb4de5
...
...
@@ -478,6 +478,7 @@ function VgD.SupportOperation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
Duel
.
ChangePosition
(
c
,
POS_FACEUP_DEFENSE
)
c
:
RegisterFlagEffect
(
FLAG_SUPPORT
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
Duel
.
GetAttacker
():
RegisterFlagEffect
(
FLAG_SUPPORTED
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
Duel
.
RaiseEvent
(
c
,
EVENT_CUSTOM
+
EVENT_SUPPORT
,
e
,
0
,
tp
,
tp
,
0
)
end
function
VgD
.
SupportValue
(
e
)
...
...
@@ -793,6 +794,7 @@ end
function
VgD
.
ResetOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
GetFlagEffect
(
FLAG_SUPPORT
)
>
0
then
c
:
ResetFlagEffect
(
FLAG_SUPPORT
)
end
if
c
:
GetFlagEffect
(
FLAG_SUPPORTED
)
>
0
then
c
:
ResetFlagEffect
(
FLAG_SUPPORTED
)
end
if
c
:
GetFlagEffect
(
FLAG_DEFENSE_ENTIRELY
)
>
0
then
c
:
ResetFlagEffect
(
FLAG_DEFENSE_ENTIRELY
)
end
end
...
...
@@ -809,32 +811,41 @@ function VgD.SpellActivate(c,m,op,cost,con)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
VgD
.
MixCost
(
cost
))
e1
:
SetCondition
(
VgD
.
SpellCondtion
(
con
))
e1
:
SetTarget
(
VgD
.
SpellTarget
)
--
e1:SetCondition(VgD.SpellCondtion(con))
--
e1:SetTarget(VgD.SpellTarget)
e1
:
SetOperation
(
VgD
.
SpellOperation
(
op
))
c
:
RegisterEffect
(
e1
)
end
function
VgD
.
MixCostFilter
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
mc
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_MIX_DIFFERENT_NAME
)
and
c
:
IsCode
(
mc
:
GetCode
())
then
return
false
end
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
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
--c.cos_from, c.cos_to, c.cos_filter, c.cos_val
local
cfrom
,
cval
,
cfilter
=
c
.
cos_from
,
c
.
cos_val
,
c
.
cos_filter
local
mcfrom
,
mcval
,
mcfilter
=
mc
.
cos_from
,
mc
.
cos_val
,
mc
.
cos_filter
local
cfrom
,
cval
,
cfilter
,
mcfrom
,
mcval
,
mcfilter
=
{},
{},
{},
{},
{},
{}
table
.
copy
(
cfrom
,
c
.
cos_from
)
table
.
copy
(
cval
,
c
.
cos_val
)
table
.
copy
(
cfilter
,
c
.
cos_filter
)
table
.
copy
(
mcfrom
,
mc
.
cos_from
)
table
.
copy
(
mcval
,
mc
.
cos_val
)
table
.
copy
(
mcfilter
,
mc
.
cos_filter
)
if
#
cfrom
>
0
and
#
mcfrom
>
0
then
for
c_cost_from
,
cv
in
ipairs
(
cfrom
)
do
for
cv
=
1
,
#
cfrom
do
local
c_cost_from
=
VgF
.
ShiftLocationFromString
(
cfrom
[
cv
])
local
pos
=
0
for
mc_cost_from
,
mcv
in
ipairs
(
mcfrom
)
do
for
mcv
=
1
,
#
mcfrom
do
local
mc_cost_from
=
VgF
.
ShiftLocationFromString
(
mcfrom
[
mcv
])
if
mc_cost_from
==
c_cost_from
then
pos
=
mcv
local
mc_cos_val
=
mcval
[
mcv
]
local
c_cos_val
=
cval
[
cv
]
if
VgF
.
GetValueType
(
mc_cos_val
)
~=
"number"
then
mc_cos_val
=
0
end
if
VgF
.
GetValueType
(
c_cos_val
)
~=
"number"
then
c_cos_val
=
0
end
if
mc_cost_from
==
LOCATION_OVERLAY
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_OVERLAY_COST_FREE_WHEN_MIX
)
then
mc_cos_val
,
c_cos_val
=
0
,
0
end
local
mcg
=
VgF
.
GetMatchingGroup
(
mcfilter
[
mcv
],
tp
,
mc_cost_from
,
0
,
c
,
e
,
tp
)
local
cg
=
VgF
.
GetMatchingGroup
(
cfilter
[
cv
],
tp
,
c_cost_from
,
0
,
mc
,
e
,
tp
)
if
mcg
:
GetCount
()
<
mc_cos_val
or
cg
:
GetCount
()
<
c_cos_val
then
return
false
end
mcg
:
Merge
(
cg
)
if
mcg
:
GetCount
()
<
mc_cos_val
+
c_cos_val
then
return
false
end
pos
=
mcv
end
end
if
pos
>
0
then
...
...
@@ -843,35 +854,31 @@ if Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_MIX_DIFFERENT_NAME) and c:IsCode
table.remove
(
mcfilter
,
pos
)
else
local
c_cos_val
=
cval
[
cv
]
if
c_cost_from
==
LOCATION_OVERLAY
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_OVERLAY_COST_FREE_WHEN_MIX
)
then
c_cos_val
=
0
end
if
VgF
.
GetValueType
(
c_cos_val
)
~=
"number"
then
c_cos_val
=
0
end
if
c_cost_from
==
LOCATION_OVERLAY
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_OVERLAY_COST_FREE_WHEN_MIX
)
then
c_cos_val
=
0
end
local
cg
=
VgF
.
GetMatchingGroup
(
cfilter
[
cv
],
tp
,
c_cost_from
,
0
,
mc
,
e
,
tp
)
if
cg
:
GetCount
()
<
c_cos_val
then
return
false
end
end
end
if
#
mcfrom
>
0
then
for
mc_cost_from
,
mcv
in
ipairs
(
mcfrom
)
do
local
mc_cos_val
=
mcval
[
mcv
]
if
mc_cost_from
==
LOCATION_OVERLAY
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_OVERLAY_COST_FREE_WHEN_MIX
)
then
mc_cos_val
=
0
end
local
mcg
=
VgF
.
GetMatchingGroup
(
mcfilter
[
mcv
],
tp
,
mc_cost_from
,
0
,
c
,
e
,
tp
)
if
mcg
:
GetCount
()
<
mc_cos_val
then
return
false
end
end
end
elseif
#
mcfrom
>
0
and
not
chk
then
return
false
end
return
true
--VgF.LvCondition(c)
end
function
VgD
.
MixCost
(
cost
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
VgF
.
GetValueType
(
cost
)
~=
"function"
or
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
)
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
):
GetFirst
()
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
--[[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
()
--if VgF.GetValueType(cost)=="function" then cost(e,tp,eg,ep,ev,re,r,rp) end
if
bc
then
VgF
.
Sendto
(
LOCATION_LOCK
,
bc
,
POS_FACEUP
,
REASON_COST
)
e
:
SetLabelObject
(
bc
)
--[[local bce = bc:GetActivateEffect()
if bce and bce:GetCost() then bce:GetCost()(e,tp,eg,ep,ev,re,r,rp,chk,true) end]]
VgD
.
MixCostOperation
(
c
,
bc
,
e
,
tp
)
local
bce
=
bc
:
GetActivateEffect
()
if
VgF
.
GetValueType
(
cost
)
==
"function"
and
bce
and
bce
:
GetCost
()
then
VgD
.
MixCostOperation
(
c
,
bc
,
e
,
tp
)
elseif
VgF
.
GetValueType
(
cost
)
==
"function"
then
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
elseif
bce
and
bce
:
GetCost
()
then
bce
:
GetCost
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
end
else
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
...
...
@@ -879,9 +886,17 @@ function VgD.MixCost(cost)
end
end
function
VgD
.
MixCostOperation
(
c
,
bc
,
e
,
tp
)
local
cfrom
,
cto
,
cval
,
cval_max
,
cfilter
=
c
.
cos_from
,
c
.
cos_to
,
c
.
cos_val
,
c
.
cos_val_max
,
c
.
cos_filter
local
bcfrom
,
bcto
,
bcval
,
bcval_max
,
bcfilter
=
bc
.
cos_from
,
bc
.
cos_to
,
bc
.
cos_val
,
bc
.
cos_val_max
,
bc
.
cos_filter
local
g
=
{}
local
cfrom
,
cto
,
cval
,
cval_max
,
cfilter
,
bcfrom
,
bcto
,
bcval
,
bcval_max
,
bcfilter
table
.
copy
(
cfrom
,
c
.
cos_from
)
table
.
copy
(
cto
,
c
.
cos_to
)
table
.
copy
(
cval
,
c
.
cos_val
)
table
.
copy
(
cval_max
,
c
.
cos_val_max
)
table
.
copy
(
cfilter
,
bc
.
cos_filter
)
table
.
copy
(
bcfrom
,
bc
.
cos_from
)
table
.
copy
(
bcto
,
bc
.
cos_to
)
table
.
copy
(
bcval
,
bc
.
cos_val
)
table
.
copy
(
bcval_max
,
bc
.
cos_val_max
)
table
.
copy
(
bcfilter
,
bc
.
cos_filter
)
local
g_from
=
{}
local
g_to
=
{}
local
g_filter_c
=
{}
...
...
@@ -891,14 +906,14 @@ function VgD.MixCostOperation(c,bc,e,tp)
local
g_val_c_max
=
{}
local
g_val_bc_max
=
{}
local
except_group
=
Group
.
FromCards
(
c
,
bc
)
for
bc_cost_from
,
bcv
in
ipairs
(
bcfrom
)
do
for
bcv
=
1
,
#
bcfrom
do
local
bc_cost_from
=
VgF
.
ShiftLocationFromString
(
bcfrom
[
bcv
])
local
pos
=
0
for
c_cost_from
,
cv
in
ipairs
(
cfrom
)
do
if
bc_cost_from
==
c_cost_from
and
cto
[
cv
]
==
bcto
[
bcv
]
then
for
cv
=
1
,
#
cfrom
do
local
c_cost_from
=
VgF
.
ShiftLocationFromString
(
cfrom
[
cv
])
if
bc_cost_from
==
c_cost_from
and
VgF
.
ShiftLocationFromString
(
cto
[
cv
])
==
VgF
.
ShiftLocationFromString
(
bcto
[
bcv
])
then
pos
=
bcv
local
sg
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
bc_cost_from
,
0
,
except_group
)
table.insert
(
g
,
sg
)
table.insert
(
g_from
,
c_cost_from
)
table.insert
(
g_from
,
cfrom
[
cv
])
table.insert
(
g_to
,
cto
[
cv
])
table.insert
(
g_filter_c
,
cfilter
[
cv
])
table.insert
(
g_filter_bc
,
bcfilter
[
bcv
])
...
...
@@ -914,37 +929,13 @@ function VgD.MixCostOperation(c,bc,e,tp)
table.remove
(
bcval
,
pos
)
table.remove
(
bcval_max
,
pos
)
table.remove
(
bcfilter
,
pos
)
else
local
sg
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
bc_cost_from
,
0
,
except_group
)
table.insert
(
g
,
sg
)
table.insert
(
g_from
,
bc_cost_from
)
table.insert
(
g_to
,
bcto
[
bcv
])
table.insert
(
g_filter_c
,
nil
)
table.insert
(
g_filter_bc
,
bcfilter
[
bcv
])
table.insert
(
g_val_c
,
0
)
table.insert
(
g_val_bc
,
bcval
[
bcv
])
table.insert
(
g_val_c_max
,
0
)
table.insert
(
g_val_bc_max
,
bcval_max
[
bcv
])
end
end
if
#
cfrom
>
0
then
for
c_cost_from
,
cv
in
ipairs
(
cfrom
)
do
local
sg
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
c_cost_from
,
0
,
except_group
)
table.insert
(
g
,
sg
)
table.insert
(
g_to
,
cto
[
cv
])
table.insert
(
g_filter_c
,
cfilter
[
cv
])
table.insert
(
g_filter_bc
,
nil
)
table.insert
(
g_val_c
,
cval
[
cv
])
table.insert
(
g_val_bc
,
0
)
table.insert
(
g_val_c_max
,
cval_max
[
cv
])
table.insert
(
g_val_bc_max
,
0
)
end
end
for
i
=
1
,
#
g
do
local
tg
=
g
[
i
]
for
i
=
1
,
#
g_from
do
local
tg_from
=
VgF
.
ShiftLocationFromString
(
g_from
[
i
])
local
tg_to
=
VgF
.
ShiftLocationFromString
(
g_to
[
i
])
local
tg
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
tg_from
,
0
,
except_group
)
if
tg
:
GetCount
()
==
0
then
goto
continue
end
local
tg_from
=
g_from
[
i
]
local
tg_to
=
g_to
[
i
]
local
tg_filter_c
=
g_filter_c
[
i
]
local
tg_filter_bc
=
g_filter_bc
[
i
]
local
tg_val_c
=
g_val_c
[
i
]
...
...
@@ -978,11 +969,14 @@ function VgD.MixCostOperation(c,bc,e,tp)
hintmsg
=
HINTMSG_XMATERIAL
ext_params
=
{
VgF
.
GetVMonster
(
tp
)}
end
elseif
VgF
.
GetValueType
(
tg_to
)
==
"string"
then
hintmsg
=
HINTMSG_POSCHANGE
elseif
VgF
.
GetValueType
(
tg_to
)
==
"string"
and
tg_to
==
"POSCHANGE"
then
hintmsg
=
HINTMSG_POSCHANGE
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
hintmsg
)
local
sg
=
tg
:
SelectDoubleSubGroup
(
tp
,
tg_filter_c
,
tg_val_c
,
tg_val_c_max
,
tg_filter_bc
,
tg_val_bc
,
tg_val_bc_max
,
Group
.
FromCards
(
c
,
bc
))
VgF
.
Sendto
(
tg_to
,
sg
,
ext_params
)
if
VgF
.
GetValueType
(
tg_to
)
==
"string"
and
tg_to
==
"POSCHANGE"
and
tg_from
==
LOCATION_DAMAGE
then
Duel
.
ChangePosition
(
sg
,
POS_FACEDOWN_ATTACK
,
POS_FACEUP_ATTACK
)
elseif
VgF
.
GetValueType
(
tg_to
)
==
"string"
and
tg_to
==
"POSCHANGE"
and
tg_from
~=
LOCATION_DAMAGE
then
Duel
.
ChangePosition
(
sg
,
POS_FACEUP_DEFENCE
,
POS_FACEDOWN_ATTACK
,
POS_FACEUP_ATTACK
,
POS_FACEDOWN_DEFENCE
)
elseif
VgF
.
GetValueType
(
tg_to
)
==
"number"
then
VgF
.
Sendto
(
tg_to
,
sg
,
table.unpack
(
ext_params
))
end
::
continue
::
end
end
...
...
VgDefinition.Lua
View file @
abfb4de5
...
...
@@ -25,6 +25,9 @@ LOCATION_RIDE =LOCATION_EXTRA
LOCATION_DROP
=
LOCATION_GRAVE
LOCATION_LOCK
=
LOCATION_REMOVED
LOCATION_ALL
=
0xffff
LOCATION_LIST
=
{
0x1
,
0x2
,
0x4
,
0x10
,
0x20
,
0x40
,
0x80
,
0x400
,
0x800
,
0x1000
,
0x2000
,
0x4000
,
0x8000
}
--LOCATION_LIST={LOCATION_HAND,LOCATION_MZONE,LOCATION_DROP,LOCATION_LOCK,LOCATION_RIDE,LOCATION_OVERLAY,LOCATION_EXILE,LOCATION_DAMAGE,LOCATION_ORDER,LOCATION_SPARE,LOCATION_GZONE,LOCATION_EMBLEM}
LOCATION_LIST_STRING
=
{
"LOCATION_DECK"
,
"LOCATION_HAND"
,
"LOCATION_MZONE"
,
"LOCATION_DROP"
,
"LOCATION_LOCK"
,
"LOCATION_RIDE"
,
"LOCATION_OVERLAY"
,
"LOCATION_EXILE"
,
"LOCATION_DAMAGE"
,
"LOCATION_ORDER"
,
"LOCATION_SPARE"
,
"LOCATION_GZONE"
,
"LOCATION_EMBLEM"
}
--Locations (for redirect) 若在重定向类效果中仅指定LOCATION_DECK则为弹回卡组顶部
LOCATION_DECKBOT
=
0x10001
--弹回卡组底部
LOCATION_DECKSHF
=
0x20001
--弹回卡组并洗牌
...
...
@@ -860,11 +863,12 @@ FLAG_DAMAGE_TRIGGER =VgID+2 --多次伤害判定标识
FLAG_DEFENSE_ENTIRELY
=
VgID
+
3
--完全防御标识
FLAG_CONDITION
=
VgID
+
4
--处于XX状态标识
FLAG_SUPPORT
=
VgID
+
5
--支援状态标识
FLAG_ATTACK_AT_REAR
=
VgID
+
6
--后列攻击
FLAG_IMPRISON
=
VgID
+
7
--被收容
FLAG_SPELL_COUNT_LIMIT
=
VgID
+
8
--指令卡次数
FLAG_SPELL_USED_COUNT
=
VgID
+
9
--指令卡已使用次数
FLAG_ALSO_CAN_TRIGGER
=
VgID
+
10
--后防着也能驱动判定
FLAG_SUPPORTED
=
VgID
+
6
--被支援
FLAG_ATTACK_AT_REAR
=
VgID
+
7
--后列攻击
FLAG_IMPRISON
=
VgID
+
8
--被收容
FLAG_SPELL_COUNT_LIMIT
=
VgID
+
9
--指令卡次数
FLAG_SPELL_USED_COUNT
=
VgID
+
10
--指令卡已使用次数
FLAG_ALSO_CAN_TRIGGER
=
VgID
+
11
--后防着也能驱动判定
--AffectedByEffect
AFFECT_CODE_MIX
=
VgID
--魔合成
AFFECT_CODE_MIX_DIFFERENT_NAME
=
VgID
+
1
--魔合成(卡名不同)
...
...
VgFuncLib.lua
View file @
abfb4de5
...
...
@@ -317,6 +317,11 @@ function VgF.Call(g,sumtype,tp,zone,pos,chk)
szone
=
z
end
if
szone
==
0x20
and
Duel
.
GetMatchingGroupCount
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
>
0
then
if
VgF
.
VMonsterFilter
(
sc
:
GetOverlayTarget
())
then
VgF
.
Sendto
(
0
,
sc
,
tp
,
POS_FACEUP
,
REASON_EFFECT
)
local
_
,
code
=
c
:
GetOriginalCode
()
sc
=
Duel
.
CreateToken
(
tp
,
code
)
end
local
tc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
mg
=
tc
:
GetOverlayGroup
()
if
mg
:
GetCount
()
~=
0
then
...
...
@@ -517,14 +522,13 @@ function VgF.DisCardCost(val)
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
local
cm
=
_G
[
"c"
..
m
]
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
cm
.
cos_from
=
{
LOCATION_HAND
}
cm
.
cos_to
=
{
LOCATION_HAND
}
cm
.
cos_val
=
{
val
}
cm
.
cos_val_max
=
{
val
}
cm
.
cos_filter
=
{
nil
}
VgF
.
AddMixCostGroupFrom
(
c
,
m
,
"LOCATION_HAND"
)
VgF
.
AddMixCostGroupTo
(
c
,
m
,
"LOCATION_DROP"
)
VgF
.
AddMixCostGroupFilter
(
c
,
m
,
nil
)
VgF
.
AddMixCostGroupCountMin
(
c
,
m
,
val
)
VgF
.
AddMixCostGroupCountMax
(
c
,
m
,
val
)
end
return
VgF
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_HAND
,
0
,
val
,
nil
)
end
...
...
@@ -541,14 +545,13 @@ function VgF.EnergyCost(val)
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
local
cm
=
_G
[
"c"
..
m
]
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
cm
.
cos_from
=
{
LOCATION_EMBLEM
}
cm
.
cos_to
=
{
"POSCHANGE"
}
cm
.
cos_val
=
{
val
}
cm
.
cos_val_max
=
{
val
}
cm
.
cos_filter
=
{
function
(
tc
)
tc
:
IsCode
(
10800730
)
end
}
VgF
.
AddMixCostGroupFrom
(
c
,
m
,
"LOCATION_EMBLEM"
)
VgF
.
AddMixCostGroupTo
(
c
,
m
,
"0"
)
VgF
.
AddMixCostGroupFilter
(
c
,
m
,
function
(
tc
)
tc
:
IsCode
(
10800730
)
end
)
VgF
.
AddMixCostGroupCountMin
(
c
,
m
,
val
)
VgF
.
AddMixCostGroupCountMax
(
c
,
m
,
val
)
end
return
VgF
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
val
,
nil
,
10800730
)
end
...
...
@@ -565,14 +568,13 @@ function VgF.OverlayCost(val)
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
local
cm
=
_G
[
"c"
..
m
]
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
cm
.
cos_from
=
{
LOCATION_OVERLAY
}
cm
.
cos_to
=
{
LOCATION_DROP
}
cm
.
cos_val
=
{
val
}
cm
.
cos_val_max
=
{
val
}
cm
.
cos_filter
=
{
nil
}
VgF
.
AddMixCostGroupFrom
(
c
,
m
,
"LOCATION_OVERLAY"
)
VgF
.
AddMixCostGroupTo
(
c
,
m
,
"LOCATION_DROP"
)
VgF
.
AddMixCostGroupFilter
(
c
,
m
,
nil
)
VgF
.
AddMixCostGroupCountMin
(
c
,
m
,
val
)
VgF
.
AddMixCostGroupCountMax
(
c
,
m
,
val
)
end
return
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
nil
):
GetFirst
():
GetOverlayCount
()
>=
val
end
...
...
@@ -589,14 +591,13 @@ function VgF.OverlayFill(val)
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
local
cm
=
_G
[
"c"
..
m
]
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
cm
.
cos_from
=
{
LOCATION_DECK
}
cm
.
cos_to
=
{
LOCATION_OVERLAY
}
cm
.
cos_val
=
{
val
}
cm
.
cos_val_max
=
{
val
}
cm
.
cos_filter
=
{
nil
}
VgF
.
AddMixCostGroupFrom
(
c
,
m
,
"LOCATION_DECK"
)
VgF
.
AddMixCostGroupTo
(
c
,
m
,
"LOCATION_OVERLAY"
)
VgF
.
AddMixCostGroupFilter
(
c
,
m
,
nil
)
VgF
.
AddMixCostGroupCountMin
(
c
,
m
,
val
)
VgF
.
AddMixCostGroupCountMax
(
c
,
m
,
val
)
end
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
val
end
...
...
@@ -615,14 +616,13 @@ function VgF.DamageCost(val)
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
local
cm
=
_G
[
"c"
..
m
]
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
cm
.
cos_from
=
{
LOCATION_DAMAGE
}
cm
.
cos_to
=
{
LOCATION_DROP
}
cm
.
cos_val
=
{
val
}
cm
.
cos_val_max
=
{
val
}
cm
.
cos_filter
=
{
Card
.
IsFaceup
}
VgF
.
AddMixCostGroupFrom
(
c
,
m
,
"LOCATION_DAMAGE"
)
VgF
.
AddMixCostGroupTo
(
c
,
m
,
"POSCHANGE"
)
VgF
.
AddMixCostGroupFilter
(
c
,
m
,
Card
.
IsFaceup
)
VgF
.
AddMixCostGroupCountMin
(
c
,
m
,
val
)
VgF
.
AddMixCostGroupCountMax
(
c
,
m
,
val
)
end
return
VgF
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
val
,
nil
)
end
...
...
@@ -636,6 +636,10 @@ function VgF.IsCanBeCalled(c,e,tp,sumtype,pos,zone)
if
VgF
.
GetValueType
(
zone
)
~=
"number"
then
zone
=
VgF
.
GetAvailableLocation
(
tp
)
end
if
VgF
.
GetValueType
(
sumtype
)
~=
"number"
then
sumtype
=
0
end
if
VgF
.
GetValueType
(
pos
)
~=
"number"
then
pos
=
POS_FACEUP_ATTACK
end
if
zone
==
0x20
and
VgF
.
VMonsterFilter
(
c
:
GetOverlayTarget
())
then
local
_
,
code
=
c
:
GetOriginalCode
()
return
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
code
,
nil
,
TYPE_MONSTER
+
TYPE_EFFECT
,
c
:
GetBaseAttack
(),
c
:
GetBaseDefense
(),
c
:
GetOriginalLevel
(),
c
:
GetOriginalRace
(),
c
:
GetOriginalAttribute
())
end
return
zone
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
sumtype
,
tp
,
false
,
false
,
pos
,
tp
,
zone
)
end
---用于效果的Operation。执行“从loc_from中选取最少int_min,最多int_max张满足f的卡,送去loc_to。”。
...
...
@@ -998,11 +1002,12 @@ end
---@param sg integer 要操作的卡|卡片组。
---@return number 具体操作的卡的数量
function
VgF
.
Sendto
(
loc
,
sg
,
...
)
local
function
AddOverlayGroup
(
g
)
local
ext_params
=
{
...
}
local
function
AddOverlayGroup
(
g
,
o_loc
)
for
tc
in
VgF
.
Next
(
g
)
do
if
tc
:
GetOverlayCount
()
>
0
then
local
mg
=
tc
:
GetOverlayGroup
()
g
:
Merge
(
mg
)
VgF
.
Sendto
(
o_loc
,
mg
,
table.unpack
(
ext_params
)
)
end
end
end
...
...
@@ -1014,7 +1019,7 @@ function VgF.Sendto(loc,sg,...)
else
return
0
end
if
loc
==
LOCATION_DROP
then
AddOverlayGroup
(
g
)
AddOverlayGroup
(
g
,
LOCATION_DROP
)
local
function
repfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
(
c
:
IsLocation
(
LOCATION_GZONE
)
or
VgF
.
RMonsterFilter
(
c
))
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
GetLevel
()
%
2
==
1
end
...
...
@@ -1048,23 +1053,21 @@ function VgF.Sendto(loc,sg,...)
end
return
ct
elseif
loc
==
LOCATION_REMOVED
then
AddOverlayGroup
(
g
)
AddOverlayGroup
(
g
,
LOCATION_REMOVED
)
return
Duel
.
Remove
(
g
,
...
)
elseif
loc
==
LOCATION_EXILE
then
AddOverlayGroup
(
g
)
AddOverlayGroup
(
g
,
LOCATION_EXILE
)
return
Duel
.
Exile
(
g
,
...
)
elseif
loc
==
LOCATION_OVERLAY
then
AddOverlayGroup
(
g
)
local
list
=
{
...
}
local
c
=
nil
AddOverlayGroup
(
g
,
LOCATION_OVERLAY
)
local
ct
=
0
if
#
list
>
0
then
c
=
list
[
1
]
if
#
ext_params
>
0
then
local
c
=
ext_params
[
1
]
Duel
.
Overlay
(
c
,
g
)
ct
=
Duel
.
GetOperatedGroup
():
GetCount
()
else
for
tp
=
0
,
1
do
c
=
VgF
.
GetVMonster
(
tp
)
local
c
=
VgF
.
GetVMonster
(
tp
)
local
og
=
g
:
Filter
(
Card
.
IsControler
,
nil
,
tp
)
if
og
:
GetCount
()
>
0
then
Duel
.
Overlay
(
c
,
og
)
...
...
@@ -1074,47 +1077,16 @@ function VgF.Sendto(loc,sg,...)
end
return
ct
elseif
loc
==
LOCATION_TRIGGER
then
AddOverlayGroup
(
g
)
local
list
=
{
...
}
local
move_tp
=
list
[
1
]
local
target_tp
=
list
[
2
]
local
pos
=
list
[
3
]
local
enable
=
list
[
4
]
local
ct
=
0
for
tc
in
VgF
.
Next
(
g
)
do
if
Duel
.
MoveToField
(
tc
,
move_tp
,
target_tp
,
loc
,
pos
,
enable
)
then
ct
=
ct
+
1
end
if
Duel
.
MoveToField
(
tc
,
table.unpack
(
ext_params
)
)
then
ct
=
ct
+
1
end
end
return
ct
elseif
loc
==
LOCATION_MZONE
then
local
list
=
{
...
}
local
sumtype
=
list
[
1
]
local
tp
=
list
[
2
]
local
zone
=
nil
if
#
list
>
2
then
zone
=
list
[
3
]
end
local
pos
=
nil
if
#
list
>
3
then
pos
=
list
[
4
]
end
local
chk
=
1
if
#
list
>
4
then
chk
=
list
[
5
]
end
return
VgF
.
Call
(
g
,
sumtype
,
tp
,
zone
,
pos
,
chk
)
elseif
bit
.
band
(
loc
,
0xf800
)
>
0
then
AddOverlayGroup
(
g
)
local
list
=
{
...
}
local
tp
=
list
[
1
]
local
pos
=
list
[
2
]
local
reason
=
list
[
3
]
if
#
list
>=
4
then
local
seq
=
list
[
4
]
Duel
.
Sendto
(
g
,
tp
,
loc
,
pos
,
reason
,
seq
)
local
return_group
=
Duel
.
GetOperatedGroup
()
return
return_group
:
GetCount
()
end
Duel
.
Sendto
(
g
,
tp
,
loc
,
pos
,
reason
)
return
VgF
.
Call
(
g
,
table.unpack
(
ext_params
))
elseif
bit
.
band
(
loc
,
0xf800
)
>
0
or
loc
==
0
then
AddOverlayGroup
(
g
,
loc
)
Duel
.
Sendto
(
g
,
table.unpack
(
ext_params
))
local
return_group
=
Duel
.
GetOperatedGroup
()
return
return_group
:
GetCount
()
end
...
...
@@ -1158,4 +1130,43 @@ end
function
VgF
.
AddRideMaterialCode
(
c
,
m
,
...
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
ride_code
=
{
...
}
end
function
VgF
.
AddMixCostGroupFrom
(
c
,
m
,
...
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
cos_from
=
{
...
}
end
function
VgF
.
AddMixCostGroupTo
(
c
,
m
,
...
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
cos_to
=
{
...
}
end
function
VgF
.
AddMixCostGroupCountMin
(
c
,
m
,
...
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
cos_val
=
{
...
}
end
function
VgF
.
AddMixCostGroupCountMax
(
c
,
m
,
...
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
cos_val_max
=
{
...
}
end
function
VgF
.
AddMixCostGroupFilter
(
c
,
m
,
...
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
cos_filter
=
{
...
}
end
function
VgF
.
ShiftLocationFromString
(
str
)
local
loc
=
0
if
str
==
"POSCHANGE"
then
return
str
end
for
i
=
1
,
13
do
if
str
==
LOCATION_LIST_STRING
[
i
]
then
loc
=
LOCATION_LIST
[
i
]
break
end
end
return
loc
end
function
table
.
copy
(
copy
,
original
)
copy
=
{}
if
VgF
.
GetValueType
(
original
)
~=
"table"
then
return
end
for
i
=
1
,
#
original
do
table.insert
(
copy
,
original
[
i
])
end
end
\ No newline at end of file
c10201001.lua
View file @
abfb4de5
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgf
.
AddRideMaterialCode
(
c
,
m
,
10406013
)
vgf
.
AddRideMaterialSetCard
(
c
,
m
,
0xc014
,
0x74
)
vgd
.
EffectTypeContinuousChangeAttack
(
c
,
EFFECT_TYPE_SINGLE
,
5000
,
cm
.
con
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
op
,
cm
.
cost
,
vgf
.
VMonsterCondition
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
FLAG_SUPPORTED
)
>
0
and
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
and
vgf
.
RMonsterCondition
(
e
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
vgf
.
OverlayCost
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
and
vgf
.
DisCardCost
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
vgf
.
OverlayCost
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
vgf
.
DisCardCost
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
vgf
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
Duel
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
for
tc
in
vgf
.
Next
(
g
)
do
tc
:
RegisterFlagEffect
(
FLAG_SUPPORT
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
c
:
RegisterFlagEffect
(
FLAG_SUPPORTED
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
Duel
.
RaiseEvent
(
g
,
EVENT_CUSTOM
+
EVENT_SUPPORT
,
e
,
0
,
tp
,
tp
,
0
)
end
function
cm
.
filter
(
c
)
return
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
c
:
IsAttribute
(
SKILL_SUPPORT
)
and
vgf
.
RMonsterFilter
(
c
)
end
\ No newline at end of file
c10202001.lua
View file @
abfb4de5
...
...
@@ -3,7 +3,8 @@ local cm,m,o=GetID()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
--【永】:这张卡将要被RIDE之际,这张卡也当做「魔宝龙 道拉珠艾尔德」使用。
vgf
.
AddRideMaterialCode
(
c
,
m
,
10407005
)
vgf
.
AddRideMaterialSetCard
(
c
,
m
,
0xc00d
,
0x75
,
0xe8
)
--【自】【V】:这个单位攻击先导者时,通过【费用】[使用等级均不同的卡进行灵魂爆发4],选择对手的1张先导者,这个回合中,力量增减至1,对手有等级3以上的先导者的话,这个单位的☆+1。(仅将那个时点的力量增减至1,这之后那个单位的力量仍然能通过其他方式增减。)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation
,
cm
.
cost
,
cm
.
condition
)
--【永】【R】:这个回合中由于你的卡片的能力的费用同时使用4张以上的卡进行了灵魂爆发的话,这个单位的力量+5000。
...
...
c10203001.lua
View file @
abfb4de5
...
...
@@ -2,6 +2,8 @@ local cm,m,o=GetID()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
--【永】:这张卡将要被RIDE之际,这张卡也当做「朱斯贝克 “破天黎骑”」使用。
vgf
.
AddRideMaterialCode
(
c
,
m
,
10406010
)
vgf
.
AddRideMaterialSetCard
(
c
,
m
,
0x300d
,
0x77
,
0x8a
,
0x202
)
--【反抗舞装】
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
,
cm
.
operation
,
nil
,
cm
.
condition
)
--【永】【R】:这个回合中曾有你的等级3以上的先导者登场过的话,这个单位的力量+5000。
...
...
c10401067.lua
View file @
abfb4de5
...
...
@@ -5,11 +5,11 @@ function cm.initial_effect(c)
--通过【费用】[使用1张以上的你希望的张数的卡进行计数爆发]施放!
--由于这个费用支付的计数爆发1每有1张,选择对手的1张后防者,退场。
vgd
.
SpellActivate
(
c
,
m
,
cm
.
op
,
cm
.
cost
)
cm
.
cos_from
=
{
LOCATION_DAMAGE
}
cm
.
cos_to
=
{
"POSCHANGE"
}
cm
.
cos_val
=
{
1
}
cm
.
cos_val_max
=
{
100
}
cm
.
cos_filter
=
{
Card
.
IsFaceup
}
VgF
.
AddMixCostGroupFrom
(
c
,
m
,
"LOCATION_DAMAGE"
)
VgF
.
AddMixCostGroupTo
(
c
,
m
,
"POSCHANGE"
)
VgF
.
AddMixCostGroupFilter
(
c
,
m
,
Card
.
IsFaceup
)
VgF
.
AddMixCostGroupCountMin
(
c
,
m
,
1
)
VgF
.
AddMixCostGroupCountMax
(
c
,
m
,
100
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
vgf
.
GetMatchingGroupCount
(
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
nil
)
...
...
c10401106.lua
View file @
abfb4de5
...
...
@@ -2,11 +2,11 @@ local cm,m,o=GetID()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
SpellActivate
(
c
,
m
,
cm
.
op
,
cm
.
cost
)
cm
.
cos_from
=
{
LOCATION_OVERLAY
}
cm
.
cos_to
=
{
LOCATION_DROP
}
cm
.
cos_val
=
{
1
}
cm
.
cos_val_max
=
{
1
}
cm
.
cos_filter
=
{
function
(
tc
)
return
tc
:
IsLevel
(
3
)
end
}
VgF
.
AddMixCostGroupFrom
(
c
,
m
,
"LOCATION_OVERLAY"
)
VgF
.
AddMixCostGroupTo
(
c
,
m
,
"LOCATION_DROP"
)
VgF
.
AddMixCostGroupFilter
(
c
,
m
,
function
(
tc
)
return
tc
:
IsLevel
(
3
)
end
)
VgF
.
AddMixCostGroupCountMin
(
c
,
m
,
1
)
VgF
.
AddMixCostGroupCountMax
(
c
,
m
,
1
)
end
function
cm
.
filter
(
c
,
p
)
return
c
:
IsControler
(
p
)
and
vgf
.
RMonsterFilter
(
c
)
...
...
c10401118.lua
View file @
abfb4de5
...
...
@@ -4,12 +4,13 @@ local cm,m,o=GetID()
--抽1张卡,将这张卡放置到灵魂里,计数回充1。
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
SpellActivate
(
c
,
m
,
cm
.
operation
,
cm
.
cost
)
cm
.
cos_from
=
{
LOCATION_MZONE
}
cm
.
cos_to
=
{
LOCATION_DROP
}
cm
.
cos_val
=
{
2
}
cm
.
cos_val_max
=
{
2
}
cm
.
cos_filter
=
{
vgf
.
RMonsterFilter
}
vgd
.
SpellActivate
(
c
,
m
,
cm
.
op
,
cm
.
cost
)
VgF
.
AddMixCostGroupFrom
(
c
,
m
,
"LOCATION_MZONE"
)
VgF
.
AddMixCostGroupTo
(
c
,
m
,
"LOCATION_DROP"
)
VgF
.
AddMixCostGroupFilter
(
c
,
m
,
vgf
.
RMonsterFilter
)
VgF
.
AddMixCostGroupCountMin
(
c
,
m
,
2
)
VgF
.
AddMixCostGroupCountMax
(
c
,
m
,
2
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
vgf
.
IsExistingMatchingCard
(
vgf
.
RMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
2
,
nil
)
end
...
...
c10402031.lua
View file @
abfb4de5
...
...
@@ -2,20 +2,22 @@ local cm,m,o=GetID()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
SpellActivate
(
c
,
m
,
cm
.
op
,
cm
.
cost
)
cm
.
cos_from
=
{
LOCATION_HAND
}
cm
.
cos_to
=
{
LOCATION_DROP
}
cm
.
cos_val
=
{
1
}
cm
.
cos_val_max
=
{
1
}
cm
.
cos_filter
=
{
cm
.
filter
}
VgF
.
AddMixCostGroupFilter
(
c
,
m
,
cm
.
filter
)
VgF
.
AddMixCostGroupCountMin
(
c
,
m
,
1
)
VgF
.
AddMixCostGroupCountMax
(
c
,
m
,
1
)
VgF
.
AddMixCostGroupFrom
(
c
,
m
,
"LOCATION_HAND"
)
VgF
.
AddMixCostGroupTo
(
c
,
m
,
"LOCATION_DROP"
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
tp
,
2
,
REASON_EFFECT
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
vgf
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
local
g
=
vgf
.
SelectMatchingCard
(
HINTMSG_TODROP
,
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
g
=
vgf
.
SelectMatchingCard
(
HINTMSG_TODROP
,
e
,
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
vgf
.
Sendto
(
LOCATION_DROP
,
g
,
REASON_COST
)
end
function
cm
.
filter
(
c
)
...
...
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