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
8eceac44
Commit
8eceac44
authored
Apr 04, 2024
by
linmeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新小写
parent
5e5e6208
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
301 additions
and
301 deletions
+301
-301
VgD.Lua
VgD.Lua
+170
-170
VgDefinition.Lua
VgDefinition.Lua
+9
-9
VgFuncLib.lua
VgFuncLib.lua
+43
-43
c10101001.lua
c10101001.lua
+5
-5
c10101002.lua
c10101002.lua
+5
-5
c10101003.lua
c10101003.lua
+5
-5
c10101004.lua
c10101004.lua
+5
-5
c10101005.lua
c10101005.lua
+5
-5
c10101006.lua
c10101006.lua
+5
-5
c10101007.lua
c10101007.lua
+5
-5
c10101008.lua
c10101008.lua
+5
-5
c10101009.lua
c10101009.lua
+5
-5
c10101010.lua
c10101010.lua
+5
-5
c10101011.lua
c10101011.lua
+5
-5
c10101012.lua
c10101012.lua
+5
-5
c10101013.lua
c10101013.lua
+5
-5
c10101014.lua
c10101014.lua
+5
-5
c10101015.lua
c10101015.lua
+4
-4
c10102015.lua
c10102015.lua
+4
-4
c10400855.lua
c10400855.lua
+1
-1
No files found.
VgD.Lua
View file @
8eceac44
VgD
=
{}
vgd
=
{}
--骑升
--骑升
function
VgD
.
RideUp
(
c
)
function
vgd
.
RideUp
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PREDRAW
)
e1
:
SetCode
(
EVENT_PREDRAW
)
e1
:
SetCountLimit
(
1
,
V
gID
)
e1
:
SetCountLimit
(
1
,
v
gID
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetCondition
(
VgD
.
RideZeroCondition
)
e1
:
SetCondition
(
vgd
.
RideZeroCondition
)
e1
:
SetOperation
(
VgD
.
RideZeroOperation
)
e1
:
SetOperation
(
vgd
.
RideZeroOperation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_STANDBY
)
e2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_STANDBY
)
e2
:
SetRange
(
LOCATION_ALL
)
e2
:
SetRange
(
LOCATION_ALL
)
e2
:
SetCountLimit
(
1
,
V
gID
+
1
)
e2
:
SetCountLimit
(
1
,
v
gID
+
1
)
e2
:
SetCondition
(
VgD
.
RideUpCondition
)
e2
:
SetCondition
(
vgd
.
RideUpCondition
)
e2
:
SetOperation
(
VgD
.
RideUpOperation
)
e2
:
SetOperation
(
vgd
.
RideUpOperation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
VgD
.
RideUpFilter1
(
c
,
e
,
lv
,
code
,
rc
)
function
vgd
.
RideUpFilter1
(
c
,
e
,
lv
,
code
,
rc
)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
rc
:
IsAttribute
(
SKILL_SELF_RIDE
)
and
c
:
IsCode
(
code
)
then
if
rc
:
IsAttribute
(
SKILL_SELF_RIDE
)
and
c
:
IsCode
(
code
)
then
return
false
return
false
end
end
return
((
c
:
IsLevel
(
lv
,
lv
+
1
)
and
c
:
IsLocation
(
LOCATION_HAND
))
or
(
c
:
IsLevel
(
lv
+
1
)
and
c
:
IsLocation
(
LOCATION_RIDE
)))
and
c
:
IsType
(
TYPE_MONSTER
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RIDE
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
return
((
c
:
IsLevel
(
lv
,
lv
+
1
)
and
c
:
IsLocation
(
LOCATION_HAND
))
or
(
c
:
IsLevel
(
lv
+
1
)
and
c
:
IsLocation
(
LOCATION_RIDE
)))
and
c
:
IsType
(
TYPE_MONSTER
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RIDE
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
end
function
VgD
.
DisCardRideUpFilter
(
c
,
e
,
lv
,
code
,
rc
)
function
vgd
.
DisCardRideUpFilter
(
c
,
e
,
lv
,
code
,
rc
)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
return
c
:
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
VgD
.
RideUpFilter1
,
tp
,
LOCATION_HAND
+
LOCATION_RIDE
,
0
,
1
,
c
,
e
,
lv
,
code
,
rc
)
return
c
:
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
vgd
.
RideUpFilter1
,
tp
,
LOCATION_HAND
+
LOCATION_RIDE
,
0
,
1
,
c
,
e
,
lv
,
code
,
rc
)
end
end
function
VgD
.
RideUpFilter2
(
c
,
e
,
lv
,
code
,
rc
)
function
vgd
.
RideUpFilter2
(
c
,
e
,
lv
,
code
,
rc
)
return
c
:
IsLevel
(
lv
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCode
(
code
)
and
rc
:
IsAttribute
(
SKILL_SELF_RIDE
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RIDE
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
return
c
:
IsLevel
(
lv
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCode
(
code
)
and
rc
:
IsAttribute
(
SKILL_SELF_RIDE
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RIDE
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
end
function
VgD
.
RideUpCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
RideUpCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
vgf
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
if
not
rc
then
return
false
end
if
not
rc
then
return
false
end
local
lv
=
rc
:
GetLevel
()
local
lv
=
rc
:
GetLevel
()
local
code
=
rc
:
GetCode
()
local
code
=
rc
:
GetCode
()
local
rg1
=
Duel
.
GetMatchingGroup
(
VgD
.
RideUpFilter1
,
tp
,
LOCATION_HAND
+
LOCATION_RIDE
,
0
,
nil
,
e
,
lv
,
code
,
rc
)
local
rg1
=
Duel
.
GetMatchingGroup
(
vgd
.
RideUpFilter1
,
tp
,
LOCATION_HAND
+
LOCATION_RIDE
,
0
,
nil
,
e
,
lv
,
code
,
rc
)
local
rg2
=
Duel
.
GetMatchingGroup
(
VgD
.
RideUpFilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
lv
,
code
,
rc
)
local
rg2
=
Duel
.
GetMatchingGroup
(
vgd
.
RideUpFilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
lv
,
code
,
rc
)
local
a
=
rg1
:
GetCount
()
>
0
local
a
=
rg1
:
GetCount
()
>
0
local
b
=
rg2
:
GetCount
()
>
0
local
b
=
rg2
:
GetCount
()
>
0
return
Duel
.
GetTurnPlayer
()
==
tp
and
VgF
.
RuleCardCondtion
(
e
)
and
(
a
or
b
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
vgf
.
RuleCardCondtion
(
e
)
and
(
a
or
b
)
end
end
function
VgD
.
RideUpOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
RideUpOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
vgf
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
if
not
rc
then
return
end
if
not
rc
then
return
end
local
lv
=
rc
:
GetLevel
()
local
lv
=
rc
:
GetLevel
()
local
code
=
rc
:
GetCode
()
local
code
=
rc
:
GetCode
()
local
rg1
=
Duel
.
GetMatchingGroup
(
VgD
.
RideUpFilter1
,
tp
,
LOCATION_HAND
+
LOCATION_RIDE
,
0
,
nil
,
e
,
lv
,
code
,
rc
)
local
rg1
=
Duel
.
GetMatchingGroup
(
vgd
.
RideUpFilter1
,
tp
,
LOCATION_HAND
+
LOCATION_RIDE
,
0
,
nil
,
e
,
lv
,
code
,
rc
)
local
rg2
=
Duel
.
GetMatchingGroup
(
VgD
.
RideUpFilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
lv
,
code
,
rc
)
local
rg2
=
Duel
.
GetMatchingGroup
(
vgd
.
RideUpFilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
lv
,
code
,
rc
)
local
a
=
rg1
:
GetCount
()
>
0
local
a
=
rg1
:
GetCount
()
>
0
local
b
=
rg2
:
GetCount
()
>
0
local
b
=
rg2
:
GetCount
()
>
0
local
off
=
1
local
off
=
1
local
ops
=
{}
local
ops
=
{}
if
a
then
if
a
then
ops
[
off
]
=
VgF
.
Stringid
(
V
gID
,
3
)
ops
[
off
]
=
vgf
.
Stringid
(
v
gID
,
3
)
off
=
off
+
1
off
=
off
+
1
end
end
if
b
then
if
b
then
ops
[
off
]
=
VgF
.
Stringid
(
V
gID
,
4
)
ops
[
off
]
=
vgf
.
Stringid
(
v
gID
,
4
)
off
=
off
+
1
off
=
off
+
1
end
end
ops
[
off
]
=
VgF
.
Stringid
(
V
gID
,
5
)
ops
[
off
]
=
vgf
.
Stringid
(
v
gID
,
5
)
local
sel
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
if
sel
==
0
and
a
then
if
sel
==
0
and
a
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
VgD
.
DisCardRideUpFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
lv
,
code
,
rc
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
vgd
.
DisCardRideUpFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
lv
,
code
,
rc
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
local
sg
=
rg1
:
FilterSelect
(
tp
,
Card
.
IsLocation
,
1
,
1
,
nil
,
LOCATION_HAND
+
LOCATION_RIDE
)
local
sg
=
rg1
:
FilterSelect
(
tp
,
Card
.
IsLocation
,
1
,
1
,
nil
,
LOCATION_HAND
+
LOCATION_RIDE
)
...
@@ -79,7 +79,7 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -79,7 +79,7 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
end
end
sc
:
SetMaterial
(
Group
.
FromCards
(
rc
))
sc
:
SetMaterial
(
Group
.
FromCards
(
rc
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
rc
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
rc
))
VgF
.
Call
(
sc
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
vgf
.
Call
(
sc
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_RIDE
,
0
,
1
,
nil
,
10400855
)
then
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_RIDE
,
0
,
1
,
nil
,
10400855
)
then
local
tc
=
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_RIDE
,
0
,
nil
,
10400855
):
GetFirst
()
local
tc
=
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_RIDE
,
0
,
nil
,
10400855
):
GetFirst
()
Duel
.
Sendto
(
tc
,
tp
,
LOCATION_EMBLEM
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
Sendto
(
tc
,
tp
,
LOCATION_EMBLEM
,
POS_FACEUP
,
REASON_EFFECT
)
...
@@ -94,7 +94,7 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -94,7 +94,7 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
end
end
sc
:
SetMaterial
(
Group
.
FromCards
(
rc
))
sc
:
SetMaterial
(
Group
.
FromCards
(
rc
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
rc
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
rc
))
VgF
.
Call
(
sc
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
vgf
.
Call
(
sc
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
...
@@ -105,26 +105,26 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -105,26 +105,26 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
end
function
VgD
.
RideZeroCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
RideZeroCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
vgf
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
if
rc
then
return
false
end
if
rc
then
return
false
end
local
ct
=
Duel
.
GetMatchingGroupCount
(
VgD
.
RideZeroFilter
,
tp
,
LOCATION_RIDE
,
0
,
nil
,
e
,
tp
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
vgd
.
RideZeroFilter
,
tp
,
LOCATION_RIDE
,
0
,
nil
,
e
,
tp
)
return
VgF
.
RuleTurnCondtion
(
e
)
and
ct
>
0
and
VgF
.
RuleCardCondtion
(
e
)
return
vgf
.
RuleTurnCondtion
(
e
)
and
ct
>
0
and
vgf
.
RuleCardCondtion
(
e
)
end
end
function
VgD
.
RideZeroOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
RideZeroOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
VgD
.
RideZeroFilter
,
tp
,
LOCATION_RIDE
,
0
,
nil
,
e
,
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
vgd
.
RideZeroFilter
,
tp
,
LOCATION_RIDE
,
0
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
g
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
g
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
end
end
VgF
.
Call
(
g
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
vgf
.
Call
(
g
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
end
end
function
VgD
.
RideZeroFilter
(
c
,
e
,
tp
)
function
vgd
.
RideZeroFilter
(
c
,
e
,
tp
)
return
c
:
IsLevel
(
1
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RIDE
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
return
c
:
IsLevel
(
1
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RIDE
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
end
--Call到R位
--Call到R位
function
VgD
.
CallToR
(
c
)
function
vgd
.
CallToR
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
...
@@ -132,11 +132,11 @@ function VgD.CallToR(c)
...
@@ -132,11 +132,11 @@ function VgD.CallToR(c)
e1
:
SetProperty
(
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetProperty
(
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
0
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
0
)
e1
:
SetValue
(
SUMMON_TYPE_CALL
)
e1
:
SetValue
(
SUMMON_TYPE_CALL
)
e1
:
SetCondition
(
VgD
.
CallCondition
)
e1
:
SetCondition
(
vgd
.
CallCondition
)
e1
:
SetOperation
(
VgD
.
CallOperation
)
e1
:
SetOperation
(
vgd
.
CallOperation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
VgD
.
CallVal
(
zone
)
function
vgd
.
CallVal
(
zone
)
if
zone
>
0
then
if
zone
>
0
then
return
function
(
e
,
c
)
return
function
(
e
,
c
)
return
0
,
zone
return
0
,
zone
...
@@ -147,72 +147,72 @@ function VgD.CallVal(zone)
...
@@ -147,72 +147,72 @@ function VgD.CallVal(zone)
end
end
end
end
end
end
function
VgD
.
CallCondition
(
e
,
c
)
function
vgd
.
CallCondition
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
return
VgF
.
LvCondition
(
e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_CALL
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
return
vgf
.
LvCondition
(
e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_CALL
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
end
function
VgD
.
CallOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
CallOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
zone
=
0
local
zone
=
0
if
Duel
.
IsExistingMatchingCard
(
VgF
.
RMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
V
gID
,
7
))
then
if
Duel
.
IsExistingMatchingCard
(
vgf
.
RMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
vgf
.
Stringid
(
v
gID
,
7
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LEAVEONFIELD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LEAVEONFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
VgF
.
RMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
vgf
.
RMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
tc
then
if
tc
then
zone
=
VgF
.
SequenceToGlobal
(
tp
,
tc
:
GetLocation
(),
tc
:
GetSequence
())
zone
=
vgf
.
SequenceToGlobal
(
tp
,
tc
:
GetLocation
(),
tc
:
GetSequence
())
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
end
end
end
end
e
:
SetValue
(
VgD
.
CallVal
(
zone
))
e
:
SetValue
(
vgd
.
CallVal
(
zone
))
end
end
--战斗阶段
--战斗阶段
function
VgD
.
MonsterBattle
(
c
)
function
vgd
.
MonsterBattle
(
c
)
--攻击转守备
--攻击转守备
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetOperation
(
VgD
.
MonsterPosDefenseOperation
)
e1
:
SetOperation
(
vgd
.
MonsterPosDefenseOperation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--回合开始转攻
--回合开始转攻
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PREDRAW
)
e2
:
SetCode
(
EVENT_PREDRAW
)
e2
:
SetRange
(
LOCATION_ONFIELD
)
e2
:
SetRange
(
LOCATION_ONFIELD
)
e2
:
SetCondition
(
VgD
.
MonsterPosAttackCondition
)
e2
:
SetCondition
(
vgd
.
MonsterPosAttackCondition
)
e2
:
SetOperation
(
VgD
.
MonsterPosAttackOperation
)
e2
:
SetOperation
(
vgd
.
MonsterPosAttackOperation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--扣血
--扣血
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_BATTLED
)
e3
:
SetCode
(
EVENT_BATTLED
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
VgD
.
MonsterBattleDamageCondition
)
e3
:
SetCondition
(
vgd
.
MonsterBattleDamageCondition
)
e3
:
SetOperation
(
VgD
.
MonsterBattleDamageOperation
)
e3
:
SetOperation
(
vgd
.
MonsterBattleDamageOperation
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--攻击判定
--攻击判定
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_F
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_F
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e4
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e4
:
SetCondition
(
VgD
.
MonsterAttackCondition
)
e4
:
SetCondition
(
vgd
.
MonsterAttackCondition
)
e4
:
SetCost
(
VgD
.
MonsterAttackCost
)
e4
:
SetCost
(
vgd
.
MonsterAttackCost
)
e4
:
SetOperation
(
VgD
.
TriggerCard
)
e4
:
SetOperation
(
vgd
.
TriggerCard
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--多次判定
--多次判定
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e5
:
SetCode
(
EVENT_CUSTOM
+
EVENT_TRIGGER
)
e5
:
SetCode
(
EVENT_CUSTOM
+
EVENT_TRIGGER
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCondition
(
VgD
.
MonsterNextTrigger
)
e5
:
SetCondition
(
vgd
.
MonsterNextTrigger
)
e5
:
SetOperation
(
VgD
.
TriggerCard
)
e5
:
SetOperation
(
vgd
.
TriggerCard
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
--支援
--支援
local
e6
=
Effect
.
CreateEffect
(
c
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e6
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e6
:
SetCondition
(
VgD
.
SupportCondition
)
e6
:
SetCondition
(
vgd
.
SupportCondition
)
e6
:
SetOperation
(
VgD
.
SupportOperation
)
e6
:
SetOperation
(
vgd
.
SupportOperation
)
c
:
RegisterEffect
(
e6
)
c
:
RegisterEffect
(
e6
)
--防御
--防御
local
e7
=
Effect
.
CreateEffect
(
c
)
local
e7
=
Effect
.
CreateEffect
(
c
)
...
@@ -220,8 +220,8 @@ function VgD.MonsterBattle(c)
...
@@ -220,8 +220,8 @@ function VgD.MonsterBattle(c)
e7
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e7
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e7
:
SetRange
(
LOCATION_HAND
+
LOCATION_MZONE
)
e7
:
SetRange
(
LOCATION_HAND
+
LOCATION_MZONE
)
e7
:
SetCountLimit
(
1
)
e7
:
SetCountLimit
(
1
)
e7
:
SetCondition
(
VgD
.
SendToGCondition
)
e7
:
SetCondition
(
vgd
.
SendToGCondition
)
e7
:
SetOperation
(
VgD
.
SendToGOperation
)
e7
:
SetOperation
(
vgd
.
SendToGOperation
)
c
:
RegisterEffect
(
e7
)
c
:
RegisterEffect
(
e7
)
--其他永续
--其他永续
local
e10
=
Effect
.
CreateEffect
(
c
)
local
e10
=
Effect
.
CreateEffect
(
c
)
...
@@ -232,7 +232,7 @@ function VgD.MonsterBattle(c)
...
@@ -232,7 +232,7 @@ function VgD.MonsterBattle(c)
local
e11
=
Effect
.
CreateEffect
(
c
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e11
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e11
:
SetCondition
(
VgD
.
MonsterAttackAnnounceCondition
)
e11
:
SetCondition
(
vgd
.
MonsterAttackAnnounceCondition
)
c
:
RegisterEffect
(
e11
)
c
:
RegisterEffect
(
e11
)
local
e12
=
Effect
.
CreateEffect
(
c
)
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_SINGLE
)
e12
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
@@ -248,7 +248,7 @@ function VgD.MonsterBattle(c)
...
@@ -248,7 +248,7 @@ function VgD.MonsterBattle(c)
e14
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e14
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e14
:
SetRange
(
LOCATION_MZONE
)
e14
:
SetRange
(
LOCATION_MZONE
)
e14
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e14
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e14
:
SetCondition
(
VgF
.
VMonsterCondition
)
e14
:
SetCondition
(
vgf
.
VMonsterCondition
)
e14
:
SetValue
(
1
)
e14
:
SetValue
(
1
)
c
:
RegisterEffect
(
e14
)
c
:
RegisterEffect
(
e14
)
local
e15
=
Effect
.
CreateEffect
(
c
)
local
e15
=
Effect
.
CreateEffect
(
c
)
...
@@ -260,16 +260,16 @@ function VgD.MonsterBattle(c)
...
@@ -260,16 +260,16 @@ function VgD.MonsterBattle(c)
e16
:
SetType
(
EFFECT_TYPE_SINGLE
)
e16
:
SetType
(
EFFECT_TYPE_SINGLE
)
e16
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e16
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e16
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e16
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e16
:
SetCondition
(
VgD
.
MonsterCannotBeAttackedCondition
)
e16
:
SetCondition
(
vgd
.
MonsterCannotBeAttackedCondition
)
e16
:
SetValue
(
VgF
.
True
)
e16
:
SetValue
(
vgf
.
True
)
c
:
RegisterEffect
(
e16
)
c
:
RegisterEffect
(
e16
)
end
end
function
VgD
.
TriggerCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
TriggerCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tg
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
Duel
.
DisableShuffleCheck
()
Duel
.
DisableShuffleCheck
()
Duel
.
MoveToField
(
tg
:
GetFirst
(),
tp
,
tp
,
LOCATION_TRIGGER
,
POS_FACEUP
,
true
)
Duel
.
MoveToField
(
tg
:
GetFirst
(),
tp
,
tp
,
LOCATION_TRIGGER
,
POS_FACEUP
,
true
)
end
end
function
VgD
.
MonsterPosDefenseOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
MonsterPosDefenseOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
Duel
.
ChangePosition
(
c
,
POS_FACEUP_DEFENSE
)
Duel
.
ChangePosition
(
c
,
POS_FACEUP_DEFENSE
)
local
label
=
0
local
label
=
0
...
@@ -280,39 +280,39 @@ function VgD.MonsterPosDefenseOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -280,39 +280,39 @@ function VgD.MonsterPosDefenseOperation(e,tp,eg,ep,ev,re,r,rp)
end
end
c
:
RegisterFlagEffect
(
AttackTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
EVENT_PRE_BATTLE_DAMAGE
,
0
,
1
,
label
)
c
:
RegisterFlagEffect
(
AttackTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
EVENT_PRE_BATTLE_DAMAGE
,
0
,
1
,
label
)
end
end
function
VgD
.
MonsterPosAttackCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
MonsterPosAttackCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
Duel
.
GetTurnPlayer
()
==
tp
and
c
:
IsPosition
(
POS_DEFENSE
)
and
(
VgF
.
RMonsterFilter
(
c
)
or
VgF
.
VMonsterFilter
(
c
))
return
Duel
.
GetTurnPlayer
()
==
tp
and
c
:
IsPosition
(
POS_DEFENSE
)
and
(
vgf
.
RMonsterFilter
(
c
)
or
vgf
.
VMonsterFilter
(
c
))
end
end
function
VgD
.
MonsterPosAttackOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
MonsterPosAttackOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
Duel
.
ChangePosition
(
c
,
POS_FACEUP_ATTACK
)
Duel
.
ChangePosition
(
c
,
POS_FACEUP_ATTACK
)
Duel
.
Hint
(
HINT_LINES
,
tp
,
VgF
.
Stringid
(
V
gID
,
0
))
Duel
.
Hint
(
HINT_LINES
,
tp
,
vgf
.
Stringid
(
v
gID
,
0
))
end
end
function
VgD
.
MonsterBattleDamageCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
MonsterBattleDamageCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
if
not
bc
or
not
bc
:
IsRelateToBattle
()
then
return
false
end
if
not
bc
or
not
bc
:
IsRelateToBattle
()
then
return
false
end
local
atk
=
bc
:
GetAttack
()
local
atk
=
bc
:
GetAttack
()
local
def
=
c
:
GetAttack
()
local
def
=
c
:
GetAttack
()
return
VgF
.
VMonsterFilter
(
c
)
and
c
==
Duel
.
GetAttackTarget
()
and
atk
>=
def
and
bc
:
GetLeftScale
()
>
0
return
vgf
.
VMonsterFilter
(
c
)
and
c
==
Duel
.
GetAttackTarget
()
and
atk
>=
def
and
bc
:
GetLeftScale
()
>
0
end
end
function
VgD
.
MonsterBattleDamageOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
MonsterBattleDamageOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
local
label
=
bc
:
GetLeftScale
()
-
1
local
label
=
bc
:
GetLeftScale
()
-
1
bc
:
RegisterFlagEffect
(
DamageTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
EVENT_PRE_BATTLE_DAMAGE
,
0
,
1
,
label
)
bc
:
RegisterFlagEffect
(
DamageTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
EVENT_PRE_BATTLE_DAMAGE
,
0
,
1
,
label
)
VgD
.
TriggerCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
vgd
.
TriggerCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
function
VgD
.
MonsterNextTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
MonsterNextTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
eg
:
GetFirst
():
GetControler
()
==
tp
and
VgF
.
VMonsterFilter
(
c
)
return
eg
:
GetFirst
():
GetControler
()
==
tp
and
vgf
.
VMonsterFilter
(
c
)
end
end
function
VgD
.
SupportCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
SupportCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
VgF
.
GetColumnGroup
(
Duel
.
GetAttacker
()):
IsContains
(
e
:
GetHandler
())
and
Duel
.
GetTurnPlayer
()
==
tp
and
e
:
GetHandler
():
IsAttribute
(
SKILL_SUPPORT
)
return
vgf
.
GetColumnGroup
(
Duel
.
GetAttacker
()):
IsContains
(
e
:
GetHandler
())
and
Duel
.
GetTurnPlayer
()
==
tp
and
e
:
GetHandler
():
IsAttribute
(
SKILL_SUPPORT
)
end
end
function
VgD
.
SupportOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
SupportOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
V
gID
,
8
))
then
return
end
if
not
Duel
.
SelectYesNo
(
tp
,
vgf
.
Stringid
(
v
gID
,
8
))
then
return
end
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
Duel
.
ChangePosition
(
c
,
POS_FACEUP_DEFENSE
)
Duel
.
ChangePosition
(
c
,
POS_FACEUP_DEFENSE
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -322,15 +322,15 @@ function VgD.SupportOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -322,15 +322,15 @@ function VgD.SupportOperation(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetValue
(
c
:
GetAttack
())
e1
:
SetValue
(
c
:
GetAttack
())
Duel
.
GetAttacker
():
RegisterEffect
(
e1
)
Duel
.
GetAttacker
():
RegisterEffect
(
e1
)
end
end
function
VgD
.
SendToGCost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
vgd
.
SendToGCost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsPublic
()
and
(
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_SendtoG
)
or
Duel
.
IsExistingMatchingCard
(
VgF
.
Not
(
Card
.
IsPublic
),
tp
,
LOCATION_HAND
,
0
,
1
,
c
))
end
if
chk
==
0
then
return
c
:
IsPublic
()
and
(
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_SendtoG
)
or
Duel
.
IsExistingMatchingCard
(
vgf
.
Not
(
Card
.
IsPublic
),
tp
,
LOCATION_HAND
,
0
,
1
,
c
))
end
local
g
=
Group
.
FromCards
(
c
)
local
g
=
Group
.
FromCards
(
c
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_SendtoG
)
then
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_SendtoG
)
then
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
VgF
.
Not
(
Card
.
IsPublic
),
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
c
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
vgf
.
Not
(
Card
.
IsPublic
),
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
c
)
g
:
Merge
(
sg
)
g
:
Merge
(
sg
)
end
end
for
tc
in
VgF
.
Next
(
g
)
do
for
tc
in
vgf
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_PUBLIC
)
e1
:
SetCode
(
EFFECT_PUBLIC
)
...
@@ -338,52 +338,52 @@ function VgD.SendToGCost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -338,52 +338,52 @@ function VgD.SendToGCost(e,tp,eg,ep,ev,re,r,rp,chk)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
function
VgD
.
SendToGCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
SendToGCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
Duel
.
GetAttackTarget
()
local
bc
=
Duel
.
GetAttackTarget
()
return
bc
and
bc
:
IsControler
(
tp
)
and
bc
~=
c
and
VgF
.
IsAbleToGZone
(
c
)
return
bc
and
bc
:
IsControler
(
tp
)
and
bc
~=
c
and
vgf
.
IsAbleToGZone
(
c
)
end
end
function
VgD
.
SendToGOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
SendToGOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
Duel
.
GetAttackTarget
()
local
bc
=
Duel
.
GetAttackTarget
()
if
not
bc
or
not
VgF
.
IsAbleToGZone
(
c
)
or
not
c
:
IsRelateToEffect
(
e
)
then
return
false
end
if
not
bc
or
not
vgf
.
IsAbleToGZone
(
c
)
or
not
c
:
IsRelateToEffect
(
e
)
then
return
false
end
Duel
.
Sendto
(
c
,
tp
,
LOCATION_GZONE
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
Sendto
(
c
,
tp
,
LOCATION_GZONE
,
POS_FACEUP
,
REASON_EFFECT
)
local
def
=
c
:
GetDefense
()
local
def
=
c
:
GetDefense
()
VgF
.
AtkUp
(
c
,
bc
,
def
,
nil
)
vgf
.
AtkUp
(
c
,
bc
,
def
,
nil
)
end
end
function
VgD
.
MonsterAttackAnnounceCondition
(
e
,
c
)
function
vgd
.
MonsterAttackAnnounceCondition
(
e
,
c
)
return
e
:
GetHandler
():
IsPosition
(
POS_DEFENSE
)
or
VgF
.
IsSequence
(
e
:
GetHandler
(),
1
,
2
,
3
)
return
e
:
GetHandler
():
IsPosition
(
POS_DEFENSE
)
or
vgf
.
IsSequence
(
e
:
GetHandler
(),
1
,
2
,
3
)
end
end
function
VgD
.
MonsterAttackCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
MonsterAttackCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
Duel
.
GetAttackTarget
()
==
bc
and
VgF
.
VMonsterFilter
(
c
)
return
bc
and
Duel
.
GetAttackTarget
()
==
bc
and
vgf
.
VMonsterFilter
(
c
)
end
end
function
VgD
.
MonsterAttackCost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
vgd
.
MonsterAttackCost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
GetFlagEffect
(
CountTriggerFlag
)
==
0
end
if
chk
==
0
then
return
c
:
GetFlagEffect
(
CountTriggerFlag
)
==
0
end
c
:
RegisterFlagEffect
(
CountTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
,
0
,
1
)
c
:
RegisterFlagEffect
(
CountTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
,
0
,
1
)
end
end
function
VgD
.
MonsterCannotBeAttackedCondition
(
e
,
c
)
function
vgd
.
MonsterCannotBeAttackedCondition
(
e
,
c
)
return
VgF
.
IsSequence
(
e
:
GetHandler
(),
1
,
2
,
3
)
return
vgf
.
IsSequence
(
e
:
GetHandler
(),
1
,
2
,
3
)
end
end
--判定
--判定
function
VgD
.
CardTrigger
(
c
,
f
)
function
vgd
.
CardTrigger
(
c
,
f
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCondition
(
VgD
.
CardTriggerCondtion
(
0
))
e1
:
SetCondition
(
vgd
.
CardTriggerCondtion
(
0
))
e1
:
SetOperation
(
VgD
.
CardTriggerOperation
(
0
,
f
))
e1
:
SetOperation
(
vgd
.
CardTriggerOperation
(
0
,
f
))
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCondition
(
VgD
.
CardTriggerCondtion
(
1
))
e2
:
SetCondition
(
vgd
.
CardTriggerCondtion
(
1
))
e2
:
SetOperation
(
VgD
.
CardTriggerOperation
(
1
,
f
))
e2
:
SetOperation
(
vgd
.
CardTriggerOperation
(
1
,
f
))
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
VgD
.
CardTriggerCondtion
(
chkcon
)
function
vgd
.
CardTriggerCondtion
(
chkcon
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
cp
=
tp
local
cp
=
tp
...
@@ -391,24 +391,24 @@ function VgD.CardTriggerCondtion(chkcon)
...
@@ -391,24 +391,24 @@ function VgD.CardTriggerCondtion(chkcon)
return
Duel
.
GetTurnPlayer
()
==
cp
and
c
:
IsLocation
(
LOCATION_TRIGGER
)
return
Duel
.
GetTurnPlayer
()
==
cp
and
c
:
IsLocation
(
LOCATION_TRIGGER
)
end
end
end
end
function
VgD
.
CardTriggerOperation
(
chkop
,
f
)
function
vgd
.
CardTriggerOperation
(
chkop
,
f
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRace
(
TRRIGGER_CRITICAL_STRIKE
)
then
if
c
:
IsRace
(
TRRIGGER_CRITICAL_STRIKE
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CRITICAL_STRIKE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CRITICAL_STRIKE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g1
)
Duel
.
HintSelection
(
g1
)
VgF
.
StarUp
(
c
,
g1
,
1
,
nil
)
vgf
.
StarUp
(
c
,
g1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g2
)
Duel
.
HintSelection
(
g2
)
VgF
.
AtkUp
(
c
,
g2
,
10000
,
nil
)
vgf
.
AtkUp
(
c
,
g2
,
10000
,
nil
)
elseif
c
:
IsRace
(
TRRIGGER_DRAW
)
then
elseif
c
:
IsRace
(
TRRIGGER_DRAW
)
then
Duel
.
Draw
(
tp
,
1
,
REASON_TRIGGER
)
Duel
.
Draw
(
tp
,
1
,
REASON_TRIGGER
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g
)
Duel
.
HintSelection
(
g
)
VgF
.
AtkUp
(
c
,
g
,
10000
,
nil
)
vgf
.
AtkUp
(
c
,
g
,
10000
,
nil
)
elseif
c
:
IsRace
(
TRRIGGER_HEAL
)
then
elseif
c
:
IsRace
(
TRRIGGER_HEAL
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODROP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODROP
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_DAMAGE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_DAMAGE
,
0
,
1
,
1
,
nil
):
GetFirst
()
...
@@ -418,11 +418,11 @@ function VgD.CardTriggerOperation(chkop,f)
...
@@ -418,11 +418,11 @@ function VgD.CardTriggerOperation(chkop,f)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g
)
Duel
.
HintSelection
(
g
)
VgF
.
AtkUp
(
c
,
g
,
10000
,
nil
)
vgf
.
AtkUp
(
c
,
g
,
10000
,
nil
)
elseif
c
:
IsRace
(
TRRIGGER_ADVANCE
)
then
elseif
c
:
IsRace
(
TRRIGGER_ADVANCE
)
then
local
g
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
0
,
4
,
5
)
local
g
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
0
,
4
,
5
)
for
tc
in
VgF
.
Next
(
g
)
do
for
tc
in
vgf
.
Next
(
g
)
do
VgF
.
AtkUp
(
c
,
tc
,
10000
,
nil
)
vgf
.
AtkUp
(
c
,
tc
,
10000
,
nil
)
end
end
end
end
if
chkop
==
0
then
if
chkop
==
0
then
...
@@ -432,12 +432,12 @@ function VgD.CardTriggerOperation(chkop,f)
...
@@ -432,12 +432,12 @@ function VgD.CardTriggerOperation(chkop,f)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g
)
Duel
.
HintSelection
(
g
)
VgF
.
AtkUp
(
c
,
g
,
100000000
,
nil
)
vgf
.
AtkUp
(
c
,
g
,
100000000
,
nil
)
else
else
Duel
.
Sendto
(
c
,
tp
,
LOCATION_DAMAGE
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
Sendto
(
c
,
tp
,
LOCATION_DAMAGE
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
Damage
(
tp
,
1
,
REASON_TRIGGER
)
Duel
.
Damage
(
tp
,
1
,
REASON_TRIGGER
)
end
end
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
vgf
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
bc
=
rc
:
GetBattleTarget
()
local
bc
=
rc
:
GetBattleTarget
()
local
label
=
bc
:
GetFlagEffectLabel
(
DamageTriggerFlag
)
local
label
=
bc
:
GetFlagEffectLabel
(
DamageTriggerFlag
)
if
not
label
then
return
end
if
not
label
then
return
end
...
@@ -455,14 +455,14 @@ function VgD.CardTriggerOperation(chkop,f)
...
@@ -455,14 +455,14 @@ function VgD.CardTriggerOperation(chkop,f)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g
)
Duel
.
HintSelection
(
g
)
VgF
.
AtkUp
(
c
,
g
,
100000000
,
nil
)
vgf
.
AtkUp
(
c
,
g
,
100000000
,
nil
)
if
f
then
f
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
f
then
f
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
Duel
.
Exile
(
c
,
REASON_TRIGGER
)
Duel
.
Exile
(
c
,
REASON_TRIGGER
)
else
else
Duel
.
SendtoHand
(
c
,
nil
,
REASON_TRIGGER
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_TRIGGER
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
end
end
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
vgf
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
label
=
rc
:
GetFlagEffectLabel
(
AttackTriggerFlag
)
local
label
=
rc
:
GetFlagEffectLabel
(
AttackTriggerFlag
)
if
not
label
then
return
end
if
not
label
then
return
end
if
label
>
0
then
if
label
>
0
then
...
@@ -478,14 +478,14 @@ function VgD.CardTriggerOperation(chkop,f)
...
@@ -478,14 +478,14 @@ function VgD.CardTriggerOperation(chkop,f)
end
end
--vg规则
--vg规则
function
VgD
.
Rule
(
c
)
function
vgd
.
Rule
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_DRAW
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_DRAW
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetCountLimit
(
1
,
V
gID
+
2
)
e1
:
SetCountLimit
(
1
,
v
gID
+
2
)
e1
:
SetCondition
(
VgD
.
RuelDrawCondition
)
e1
:
SetCondition
(
vgd
.
RuelDrawCondition
)
e1
:
SetOperation
(
VgD
.
RuelDrawOperation
)
e1
:
SetOperation
(
vgd
.
RuelDrawOperation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e10
=
Effect
.
CreateEffect
(
c
)
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetType
(
EFFECT_TYPE_FIELD
)
e10
:
SetType
(
EFFECT_TYPE_FIELD
)
...
@@ -494,14 +494,14 @@ function VgD.Rule(c)
...
@@ -494,14 +494,14 @@ function VgD.Rule(c)
e10
:
SetRange
(
LOCATION_ALL
)
e10
:
SetRange
(
LOCATION_ALL
)
e10
:
SetTargetRange
(
1
,
0
)
e10
:
SetTargetRange
(
1
,
0
)
e10
:
SetValue
(
100
)
e10
:
SetValue
(
100
)
e10
:
SetCondition
(
VgF
.
RuleCardCondtion
)
e10
:
SetCondition
(
vgf
.
RuleCardCondtion
)
c
:
RegisterEffect
(
e10
)
c
:
RegisterEffect
(
e10
)
local
e11
=
Effect
.
CreateEffect
(
c
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e11
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e11
:
SetCode
(
EVENT_ADJUST
)
e11
:
SetCode
(
EVENT_ADJUST
)
e11
:
SetRange
(
LOCATION_ALL
)
e11
:
SetRange
(
LOCATION_ALL
)
e11
:
SetCondition
(
VgF
.
RuleCardCondtion
)
e11
:
SetCondition
(
vgf
.
RuleCardCondtion
)
e11
:
SetOperation
(
VgD
.
RuleWin
)
e11
:
SetOperation
(
vgd
.
RuleWin
)
c
:
RegisterEffect
(
e11
)
c
:
RegisterEffect
(
e11
)
local
e12
=
Effect
.
CreateEffect
(
c
)
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_FIELD
)
e12
:
SetType
(
EFFECT_TYPE_FIELD
)
...
@@ -520,7 +520,7 @@ function VgD.Rule(c)
...
@@ -520,7 +520,7 @@ function VgD.Rule(c)
e15
:
SetCode
(
EFFECT_CANNOT_SSET
)
e15
:
SetCode
(
EFFECT_CANNOT_SSET
)
c
:
RegisterEffect
(
e15
)
c
:
RegisterEffect
(
e15
)
end
end
function
VgD
.
RuleWin
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
RuleWin
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetCurrentChain
()
>
0
then
return
end
if
Duel
.
GetCurrentChain
()
>
0
then
return
end
for
WinReason
=
0x1
,
0xff
,
1
do
for
WinReason
=
0x1
,
0xff
,
1
do
if
WinReason
==
0x2
then
if
WinReason
==
0x2
then
...
@@ -536,10 +536,10 @@ function VgD.RuleWin(e,tp,eg,ep,ev,re,r,rp)
...
@@ -536,10 +536,10 @@ function VgD.RuleWin(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end
end
function
VgD
.
RuelDrawCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
RuelDrawCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
VgF
.
RuleTurnCondtion
(
e
)
and
VgF
.
RuleCardCondtion
(
e
)
return
vgf
.
RuleTurnCondtion
(
e
)
and
vgf
.
RuleCardCondtion
(
e
)
end
end
function
VgD
.
RuelDrawOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
vgd
.
RuelDrawOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
):
Select
(
tp
,
0
,
ct
,
nil
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
):
Select
(
tp
,
0
,
ct
,
nil
)
...
@@ -554,24 +554,24 @@ function VgD.RuelDrawOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -554,24 +554,24 @@ function VgD.RuelDrawOperation(e,tp,eg,ep,ev,re,r,rp)
end
end
--指令卡cost
--指令卡cost
function
VgD
.
SpellActivate
(
c
,
m
,
op
,
con
,
specialchk
,
num1
,
num2
,
num3
,
num4
,
num5
)
function
vgd
.
SpellActivate
(
c
,
m
,
op
,
con
,
specialchk
,
num1
,
num2
,
num3
,
num4
,
num5
)
if
not
specialchk
then
specialchk
=
0
end
if
not
specialchk
then
specialchk
=
0
end
if
not
num1
then
num1
=
0
end
if
not
num1
then
num1
=
0
end
if
not
num2
then
num2
=
0
end
if
not
num2
then
num2
=
0
end
if
not
num3
then
num3
=
0
end
if
not
num3
then
num3
=
0
end
if
not
num4
then
num4
=
0
end
if
not
num4
then
num4
=
0
end
if
not
num5
then
num5
=
0
end
if
not
num5
then
num5
=
0
end
VgD
.
SpellCostCategory
(
m
,
specialchk
,
num1
,
num2
,
num3
,
num4
,
num5
)
vgd
.
SpellCostCategory
(
m
,
specialchk
,
num1
,
num2
,
num3
,
num4
,
num5
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
V
gID
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
v
gID
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
VgD
.
SpellCost
(
num1
,
num2
,
num3
,
num4
,
num5
))
e1
:
SetCost
(
vgd
.
SpellCost
(
num1
,
num2
,
num3
,
num4
,
num5
))
if
con
then
e1
:
SetCondition
(
con
)
end
if
con
then
e1
:
SetCondition
(
con
)
end
e1
:
SetOperation
(
VgD
.
SpellOperation
(
op
))
e1
:
SetOperation
(
vgd
.
SpellOperation
(
op
))
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
VgD
.
SpellCost
(
num1
,
num2
,
num3
,
num4
,
num5
)
function
vgd
.
SpellCost
(
num1
,
num2
,
num3
,
num4
,
num5
)
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
mg
=
Group
.
FromCards
(
c
)
local
mg
=
Group
.
FromCards
(
c
)
...
@@ -579,88 +579,88 @@ function VgD.SpellCost(num1,num2,num3,num4,num5)
...
@@ -579,88 +579,88 @@ function VgD.SpellCost(num1,num2,num3,num4,num5)
if
chk
==
0
then
if
chk
==
0
then
local
b1
,
b2
,
b3
,
b4
,
b5
=
true
,
true
,
true
,
true
,
true
local
b1
,
b2
,
b3
,
b4
,
b5
=
true
,
true
,
true
,
true
,
true
local
b6
=
false
local
b6
=
false
if
c
.
Vg_SpecialCost
>
0
then
g
=
VgD
.
SpellSpecialChk
(
c
,
mg
)
else
g
=
mg
end
if
c
.
vg_SpecialCost
>
0
then
g
=
vgd
.
SpellSpecialChk
(
c
,
mg
)
else
g
=
mg
end
if
g
:
GetCount
()
>
0
or
c
.
V
g_SpecialCost
==
0
then
if
g
:
GetCount
()
>
0
or
c
.
v
g_SpecialCost
==
0
then
if
g
then
mg
:
Merge
(
g
)
end
if
g
then
mg
:
Merge
(
g
)
end
b6
=
true
b6
=
true
end
end
if
num1
>
0
then
b1
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
num1
,
mg
)
end
if
num1
>
0
then
b1
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
num1
,
mg
)
end
if
num2
>
0
then
b2
=
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
COUNTER_ENERGE
,
num2
,
REASON_COST
)
end
if
num2
>
0
then
b2
=
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
COUNTER_ENERGE
,
num2
,
REASON_COST
)
end
if
num3
>
0
then
b3
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
mg
):
GetFirst
():
GetOverlayGroup
():
FilterCount
(
VgF
.
True
,
mg
)
>=
num3
end
if
num3
>
0
then
b3
=
Duel
.
GetMatchingGroup
(
vgf
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
mg
):
GetFirst
():
GetOverlayGroup
():
FilterCount
(
vgf
.
True
,
mg
)
>=
num3
end
if
num4
>
0
then
b4
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
num4
)
>
0
end
if
num4
>
0
then
b4
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
num4
)
>
0
end
if
num5
>
0
then
b5
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
num5
,
mg
)
end
if
num5
>
0
then
b5
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
num5
,
mg
)
end
return
b1
and
b2
and
b3
and
b4
and
b5
and
b6
return
b1
and
b2
and
b3
and
b4
and
b5
and
b6
end
end
local
rc
=
nil
local
rc
=
nil
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_MIX
)
and
Duel
.
IsExistingMatchingCard
(
VgD
.
SpellMixFilter
,
tp
,
LOCATION_DROP
,
0
,
1
,
nil
,
c
,
num1
,
num2
,
num3
,
num4
,
num5
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_MIX
)
and
Duel
.
IsExistingMatchingCard
(
vgd
.
SpellMixFilter
,
tp
,
LOCATION_DROP
,
0
,
1
,
nil
,
c
,
num1
,
num2
,
num3
,
num4
,
num5
)
and
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
V
gID
,
6
))
then
and
Duel
.
SelectYesNo
(
tp
,
vgf
.
Stringid
(
v
gID
,
6
))
then
rc
=
Duel
.
SelectMatchingCard
(
tp
,
VgD
.
SpellMixFilter
,
tp
,
LOCATION_DROP
,
0
,
1
,
1
,
nil
,
c
,
num1
,
num2
,
num3
,
num4
,
num5
):
GetFirst
()
rc
=
Duel
.
SelectMatchingCard
(
tp
,
vgd
.
SpellMixFilter
,
tp
,
LOCATION_DROP
,
0
,
1
,
1
,
nil
,
c
,
num1
,
num2
,
num3
,
num4
,
num5
):
GetFirst
()
end
end
VgD
.
SpellCostOp
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
rc
,
num1
,
num2
,
num3
,
num4
,
num5
)
vgd
.
SpellCostOp
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
rc
,
num1
,
num2
,
num3
,
num4
,
num5
)
end
end
end
end
function
VgD
.
SpellCostCategory
(
m
,
specialchk
,
num1
,
num2
,
num3
,
num4
,
num5
)
function
vgd
.
SpellCostCategory
(
m
,
specialchk
,
num1
,
num2
,
num3
,
num4
,
num5
)
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
cm
.
V
g_SpecialCost
=
specialchk
cm
.
v
g_SpecialCost
=
specialchk
cm
.
V
g_DisCard
=
num1
cm
.
v
g_DisCard
=
num1
cm
.
V
g_Counter
=
num2
cm
.
v
g_Counter
=
num2
cm
.
V
g_OverLay
=
num3
cm
.
v
g_OverLay
=
num3
cm
.
V
g_OverLayFill
=
num4
cm
.
v
g_OverLayFill
=
num4
cm
.
V
g_Damage
=
num5
cm
.
v
g_Damage
=
num5
end
end
function
VgD
.
SpellMixFilter
(
c
,
mc
,
num1
,
num2
,
num3
,
num4
,
num5
)
function
vgd
.
SpellMixFilter
(
c
,
mc
,
num1
,
num2
,
num3
,
num4
,
num5
)
local
mg
=
Group
.
FromCards
(
c
,
mc
)
local
mg
=
Group
.
FromCards
(
c
,
mc
)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
b1
,
b2
,
b3
,
b4
,
b5
=
true
,
true
,
true
,
true
,
true
local
b1
,
b2
,
b3
,
b4
,
b5
=
true
,
true
,
true
,
true
,
true
local
b6
,
b7
=
false
,
false
local
b6
,
b7
=
false
,
false
local
g1
=
Group
.
CreateGroup
()
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
if
c
.
Vg_DisCard
>
0
then
num1
=
num1
+
c
.
V
g_DisCard
end
if
c
.
vg_DisCard
>
0
then
num1
=
num1
+
c
.
v
g_DisCard
end
if
c
.
Vg_Counter
>
0
then
num2
=
num2
+
c
.
V
g_Counter
end
if
c
.
vg_Counter
>
0
then
num2
=
num2
+
c
.
v
g_Counter
end
if
c
.
Vg_OverLay
>
0
then
num3
=
num3
+
c
.
V
g_OverLay
end
if
c
.
vg_OverLay
>
0
then
num3
=
num3
+
c
.
v
g_OverLay
end
if
c
.
Vg_OverLayFill
>
0
then
num4
=
num4
+
c
.
V
g_OverLayFill
end
if
c
.
vg_OverLayFill
>
0
then
num4
=
num4
+
c
.
v
g_OverLayFill
end
if
c
.
Vg_Damage
>
0
then
num5
=
num5
+
c
.
V
g_Damage
end
if
c
.
vg_Damage
>
0
then
num5
=
num5
+
c
.
v
g_Damage
end
if
c
.
Vg_SpecialCost
>
0
then
g1
=
VgD
.
SpellSpecialChk
(
c
,
mg
)
end
if
c
.
vg_SpecialCost
>
0
then
g1
=
vgd
.
SpellSpecialChk
(
c
,
mg
)
end
if
g1
:
GetCount
()
>
0
or
c
.
V
g_SpecialCost
==
0
then
if
g1
:
GetCount
()
>
0
or
c
.
v
g_SpecialCost
==
0
then
if
g1
then
mg
:
Merge
(
g1
)
end
if
g1
then
mg
:
Merge
(
g1
)
end
b6
=
true
b6
=
true
end
end
if
mc
.
Vg_SpecialCost
>
0
then
g2
=
VgD
.
SpellSpecialChk
(
c
,
mg
)
end
if
mc
.
vg_SpecialCost
>
0
then
g2
=
vgd
.
SpellSpecialChk
(
c
,
mg
)
end
if
g2
:
GetCount
()
>
0
or
mc
.
V
g_SpecialCost
==
0
then
if
g2
:
GetCount
()
>
0
or
mc
.
v
g_SpecialCost
==
0
then
if
g2
then
mg
:
Merge
(
g2
)
end
if
g2
then
mg
:
Merge
(
g2
)
end
b7
=
true
b7
=
true
end
end
if
num1
>
0
then
b1
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
num1
,
mg
)
end
if
num1
>
0
then
b1
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
num1
,
mg
)
end
if
num2
>
0
then
b2
=
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
COUNTER_ENERGE
,
num2
,
REASON_COST
)
end
if
num2
>
0
then
b2
=
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
COUNTER_ENERGE
,
num2
,
REASON_COST
)
end
if
num3
>
0
then
b3
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
mg
):
GetFirst
():
GetOverlayGroup
():
FilterCount
(
Card
.
IsAbleToGraveAsCost
,
mg
)
>=
num3
end
if
num3
>
0
then
b3
=
Duel
.
GetMatchingGroup
(
vgf
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
mg
):
GetFirst
():
GetOverlayGroup
():
FilterCount
(
Card
.
IsAbleToGraveAsCost
,
mg
)
>=
num3
end
if
num4
>
0
then
b4
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
num4
)
>
0
end
if
num4
>
0
then
b4
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
num4
)
>
0
end
if
num5
>
0
then
b5
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
num5
,
mg
)
end
if
num5
>
0
then
b5
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
num5
,
mg
)
end
return
b1
and
b2
and
b3
and
b4
and
b5
and
b6
and
b7
return
b1
and
b2
and
b3
and
b4
and
b5
and
b6
and
b7
end
end
function
VgD
.
SpellSpecialChk
(
c
,
mg
)
function
vgd
.
SpellSpecialChk
(
c
,
mg
)
local
t
=
{}
local
t
=
{}
local
g
local
g
for
i
,
v
in
ipairs
(
t
)
do
for
i
,
v
in
ipairs
(
t
)
do
if
c
.
V
g_SpecialCost
==
v
then
if
c
.
v
g_SpecialCost
==
v
then
local
a
local
a
end
end
end
end
return
mg
return
mg
end
end
function
VgD
.
SpellCostOp
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
mc
,
num1
,
num2
,
num3
,
num4
,
num5
)
function
vgd
.
SpellCostOp
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
mc
,
num1
,
num2
,
num3
,
num4
,
num5
)
local
mg
=
Group
.
FromCards
(
c
)
local
mg
=
Group
.
FromCards
(
c
)
if
mc
then
if
mc
then
Duel
.
Remove
(
mc
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
mc
,
POS_FACEUP
,
REASON_COST
)
e
:
SetLabelObject
(
mc
)
e
:
SetLabelObject
(
mc
)
mg
:
AddCard
(
mc
)
mg
:
AddCard
(
mc
)
if
mc
.
Vg_DisCard
>
0
then
num1
=
num1
+
mc
.
V
g_DisCard
end
if
mc
.
vg_DisCard
>
0
then
num1
=
num1
+
mc
.
v
g_DisCard
end
if
mc
.
Vg_Counter
>
0
then
num2
=
num2
+
mc
.
V
g_Counter
end
if
mc
.
vg_Counter
>
0
then
num2
=
num2
+
mc
.
v
g_Counter
end
if
mc
.
Vg_OverLay
>
0
then
num3
=
num3
+
mc
.
V
g_OverLay
end
if
mc
.
vg_OverLay
>
0
then
num3
=
num3
+
mc
.
v
g_OverLay
end
if
mc
.
Vg_OverLayFill
>
0
then
num4
=
num4
+
mc
.
V
g_OverLayFill
end
if
mc
.
vg_OverLayFill
>
0
then
num4
=
num4
+
mc
.
v
g_OverLayFill
end
if
mc
.
Vg_Damage
>
0
then
num5
=
num5
+
mc
.
V
g_Damage
end
if
mc
.
vg_Damage
>
0
then
num5
=
num5
+
mc
.
v
g_Damage
end
local
t
=
{}
local
t
=
{}
for
i
,
v
in
ipairs
(
t
)
do
for
i
,
v
in
ipairs
(
t
)
do
if
mc
.
V
g_SpecialCost
==
v
then
if
mc
.
v
g_SpecialCost
==
v
then
local
a
local
a
end
end
end
end
...
@@ -674,11 +674,11 @@ function VgD.SpellCostOp(e,tp,eg,ep,ev,re,r,rp,chk,c,mc,num1,num2,num3,num4,num5
...
@@ -674,11 +674,11 @@ function VgD.SpellCostOp(e,tp,eg,ep,ev,re,r,rp,chk,c,mc,num1,num2,num3,num4,num5
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
COUNTER_ENERGE
,
num2
,
REASON_COST
)
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
COUNTER_ENERGE
,
num2
,
REASON_COST
)
end
end
if
num3
>
0
then
if
num3
>
0
then
local
g
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
():
GetOverlayGroup
():
FilterSelect
(
tp
,
Card
.
IsAbleToGraveAsCost
,
num3
,
num3
,
mg
)
local
g
=
Duel
.
GetMatchingGroup
(
vgf
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
():
GetOverlayGroup
():
FilterSelect
(
tp
,
Card
.
IsAbleToGraveAsCost
,
num3
,
num3
,
mg
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
if
num4
>
0
then
if
num4
>
0
then
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
vgf
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
num4
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
num4
)
Duel
.
DisableShuffleCheck
()
Duel
.
DisableShuffleCheck
()
Duel
.
Overlay
(
rc
,
g
)
Duel
.
Overlay
(
rc
,
g
)
...
@@ -689,7 +689,7 @@ function VgD.SpellCostOp(e,tp,eg,ep,ev,re,r,rp,chk,c,mc,num1,num2,num3,num4,num5
...
@@ -689,7 +689,7 @@ function VgD.SpellCostOp(e,tp,eg,ep,ev,re,r,rp,chk,c,mc,num1,num2,num3,num4,num5
Duel
.
ChangePosition
(
g
,
POS_FACEDOWN
)
Duel
.
ChangePosition
(
g
,
POS_FACEDOWN
)
end
end
end
end
function
VgD
.
SpellOperation
(
op
)
function
vgd
.
SpellOperation
(
op
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
bool
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
bool
)
if
op
then
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
op
then
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
mc
=
e
:
GetLabelObject
()
local
mc
=
e
:
GetLabelObject
()
...
...
VgDefinition.Lua
View file @
8eceac44
VgD
efinition
=
{}
vgd
efinition
=
{}
V
gID
=
10101001
v
gID
=
10101001
--min/max value
--min/max value
MIN_ID
=
1000
--4 digits, by DataManager::GetDesc()
MIN_ID
=
1000
--4 digits, by DataManager::GetDesc()
MAX_ID
=
268435455
--28 bits, by DataManager::GetDesc()
MAX_ID
=
268435455
--28 bits, by DataManager::GetDesc()
...
@@ -875,17 +875,17 @@ FLAG_ID_CHAINING =1
...
@@ -875,17 +875,17 @@ FLAG_ID_CHAINING =1
FLAG_ID_UNION
=
2
FLAG_ID_UNION
=
2
FLAG_ID_NO_NORMAL_DRAW
=
3
FLAG_ID_NO_NORMAL_DRAW
=
3
--Flag
--Flag
CountTriggerFlag
=
V
gID
--计数标识
CountTriggerFlag
=
v
gID
--计数标识
AttackTriggerFlag
=
V
gID
+
1
--多次攻击判定标识
AttackTriggerFlag
=
v
gID
+
1
--多次攻击判定标识
DamageTriggerFlag
=
V
gID
+
2
--多次伤害判定标识
DamageTriggerFlag
=
v
gID
+
2
--多次伤害判定标识
--AffectedByEffect
--AffectedByEffect
AFFECT_CODE_MIX
=
V
gID
--魔合成
AFFECT_CODE_MIX
=
v
gID
--魔合成
AFFECT_CODE_SendtoG
=
V
gID
+
1
--
AFFECT_CODE_SendtoG
=
v
gID
+
1
--
--Counter
--Counter
COUNTER_ENERGE
=
0x1
--能量爆发
COUNTER_ENERGE
=
0x1
--能量爆发
--自定时点
--自定时点
EVENT_TRIGGER
=
V
gID
--判定时点
EVENT_TRIGGER
=
v
gID
--判定时点
EVENT_CRITICAL_STRIKE
=
V
gID
+
1
--暴击值结算时点
EVENT_CRITICAL_STRIKE
=
v
gID
+
1
--暴击值结算时点
POS_FACEUP_DEFENCE
=
POS_FACEUP_DEFENSE
POS_FACEUP_DEFENCE
=
POS_FACEUP_DEFENSE
...
...
VgFuncLib.lua
View file @
8eceac44
VgF
=
{}
vgf
=
{}
function
GetID
()
function
GetID
()
local
offset
=
self_code
<
100000000
and
1
or
100
local
offset
=
self_code
<
100000000
and
1
or
100
return
self_table
,
self_code
,
offset
return
self_table
,
self_code
,
offset
end
end
function
VgF
.
Stringid
(
code
,
id
)
function
vgf
.
Stringid
(
code
,
id
)
return
code
*
16
+
id
return
code
*
16
+
id
end
end
function
VgF
.
SequenceToGlobal
(
p
,
loc
,
seq
)
function
vgf
.
SequenceToGlobal
(
p
,
loc
,
seq
)
if
p
~=
0
and
p
~=
1
then
if
p
~=
0
and
p
~=
1
then
return
0
return
0
end
end
...
@@ -27,17 +27,17 @@ function VgF.SequenceToGlobal(p,loc,seq)
...
@@ -27,17 +27,17 @@ function VgF.SequenceToGlobal(p,loc,seq)
return
0
return
0
end
end
end
end
function
VgF
.
True
()
function
vgf
.
True
()
return
true
return
true
end
end
function
VgF
.
Next
(
g
)
function
vgf
.
Next
(
g
)
local
first
=
true
local
first
=
true
return
function
()
return
function
()
if
first
then
first
=
false
return
g
:
GetFirst
()
if
first
then
first
=
false
return
g
:
GetFirst
()
else
return
g
:
GetNext
()
end
else
return
g
:
GetNext
()
end
end
end
end
end
function
VgF
.
GetValueType
(
v
)
function
vgf
.
GetValueType
(
v
)
local
t
=
type
(
v
)
local
t
=
type
(
v
)
if
t
==
"userdata"
then
if
t
==
"userdata"
then
local
mt
=
getmetatable
(
v
)
local
mt
=
getmetatable
(
v
)
...
@@ -46,11 +46,11 @@ function VgF.GetValueType(v)
...
@@ -46,11 +46,11 @@ function VgF.GetValueType(v)
else
return
"Card"
end
else
return
"Card"
end
else
return
t
end
else
return
t
end
end
end
function
VgF
.
ReturnCard
(
g
)
function
vgf
.
ReturnCard
(
g
)
local
tc
local
tc
if
VgF
.
GetValueType
(
g
)
==
"Group"
then
if
vgf
.
GetValueType
(
g
)
==
"Group"
then
tc
=
g
:
GetFirst
()
tc
=
g
:
GetFirst
()
elseif
VgF
.
GetValueType
(
g
)
==
"Card"
then
elseif
vgf
.
GetValueType
(
g
)
==
"Card"
then
tc
=
g
tc
=
g
end
end
return
tc
return
tc
...
@@ -74,19 +74,19 @@ end
...
@@ -74,19 +74,19 @@ end
function
bit
.
bnot
(
a
)
function
bit
.
bnot
(
a
)
return
~
a
return
~
a
end
end
function
VgF
.
VMonsterFilter
(
c
)
function
vgf
.
VMonsterFilter
(
c
)
return
VgF
.
IsSequence
(
c
,
5
)
return
vgf
.
IsSequence
(
c
,
5
)
end
end
function
VgF
.
RMonsterFilter
(
c
)
function
vgf
.
RMonsterFilter
(
c
)
return
c
:
GetSequence
()
<
5
return
c
:
GetSequence
()
<
5
end
end
function
VgF
.
RMonsterCondition
(
e
,
c
)
function
vgf
.
RMonsterCondition
(
e
,
c
)
return
VgF
.
RMonsterFilter
(
e
:
GetHandler
())
return
vgf
.
RMonsterFilter
(
e
:
GetHandler
())
end
end
function
VgF
.
VMonsterCondition
(
e
,
c
)
function
vgf
.
VMonsterCondition
(
e
,
c
)
return
VgF
.
VMonsterFilter
(
e
:
GetHandler
())
return
vgf
.
VMonsterFilter
(
e
:
GetHandler
())
end
end
function
VgF
.
IsSequence
(
c
,
...
)
function
vgf
.
IsSequence
(
c
,
...
)
for
i
,
v
in
ipairs
{
...
}
do
for
i
,
v
in
ipairs
{
...
}
do
if
c
:
GetSequence
()
==
v
then
if
c
:
GetSequence
()
==
v
then
return
true
return
true
...
@@ -94,78 +94,78 @@ function VgF.IsSequence(c,...)
...
@@ -94,78 +94,78 @@ function VgF.IsSequence(c,...)
end
end
return
false
return
false
end
end
function
VgF
.
RuleCardCondtion
(
e
)
function
vgf
.
RuleCardCondtion
(
e
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ALL
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ALL
,
0
,
nil
)
return
e
:
GetHandler
()
==
g
:
GetFirst
()
return
e
:
GetHandler
()
==
g
:
GetFirst
()
end
end
function
VgF
.
RuleTurnCondtion
(
e
)
function
vgf
.
RuleTurnCondtion
(
e
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
local
a
=
Duel
.
GetTurnCount
(
tp
)
local
a
=
Duel
.
GetTurnCount
(
tp
)
local
b
=
Duel
.
GetTurnCount
(
1
-
tp
)
local
b
=
Duel
.
GetTurnCount
(
1
-
tp
)
return
a
+
b
==
1
return
a
+
b
==
1
end
end
function
VgF
.
Not
(
c
,
f
)
function
vgf
.
Not
(
c
,
f
)
return
not
f
(
c
)
return
not
f
(
c
)
end
end
function
VgF
.
GetColumnGroup
(
c
)
function
vgf
.
GetColumnGroup
(
c
)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
g
=
Group
.
CreateGroup
()
local
g
=
Group
.
CreateGroup
()
if
c
:
GetSequence
()
==
0
then
if
c
:
GetSequence
()
==
0
then
local
sg1
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
1
)
local
sg1
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
1
)
local
sg2
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
3
,
4
)
local
sg2
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
3
,
4
)
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
end
end
if
c
:
GetSequence
()
==
1
then
if
c
:
GetSequence
()
==
1
then
local
sg1
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
0
)
local
sg1
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
0
)
local
sg2
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
3
,
4
)
local
sg2
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
3
,
4
)
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
end
end
if
c
:
GetSequence
()
==
2
then
if
c
:
GetSequence
()
==
2
then
local
sg1
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
5
)
local
sg1
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
5
)
local
sg2
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
2
,
5
)
local
sg2
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
2
,
5
)
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
end
end
if
c
:
GetSequence
()
==
3
then
if
c
:
GetSequence
()
==
3
then
local
sg1
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
4
)
local
sg1
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
4
)
local
sg2
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
0
,
1
)
local
sg2
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
0
,
1
)
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
end
end
if
c
:
GetSequence
()
==
4
then
if
c
:
GetSequence
()
==
4
then
local
sg1
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
3
)
local
sg1
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
3
)
local
sg2
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
0
,
1
)
local
sg2
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
0
,
1
)
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
end
end
if
c
:
GetSequence
()
==
5
then
if
c
:
GetSequence
()
==
5
then
local
sg1
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
2
)
local
sg1
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
2
)
local
sg2
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
2
,
5
)
local
sg2
=
Duel
.
GetMatchingGroup
(
vgf
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
2
,
5
)
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
end
end
return
g
return
g
end
end
function
VgF
.
Call
(
g
,
sumtype
,
sp
,
zone
)
function
vgf
.
Call
(
g
,
sumtype
,
sp
,
zone
)
if
not
zone
then
zone
=
0x7f
end
if
not
zone
then
zone
=
0x7f
end
return
Duel
.
SpecialSummon
(
g
,
sumtype
,
sp
,
sp
,
true
,
true
,
POS_FACEUP_ATTACK
,
zone
)
return
Duel
.
SpecialSummon
(
g
,
sumtype
,
sp
,
sp
,
true
,
true
,
POS_FACEUP_ATTACK
,
zone
)
end
end
function
VgF
.
LvCondition
(
e
)
function
vgf
.
LvCondition
(
e
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
lv
=
c
:
GetLevel
()
local
lv
=
c
:
GetLevel
()
return
Duel
.
IsExistingMatchingCard
(
VgF
.
LvConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
lv
)
return
Duel
.
IsExistingMatchingCard
(
vgf
.
LvConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
lv
)
end
end
function
VgF
.
LvConditionFilter
(
c
,
lv
)
function
vgf
.
LvConditionFilter
(
c
,
lv
)
return
VgF
.
VMonsterFilter
(
c
)
and
c
:
IsLevelAbove
(
lv
)
return
vgf
.
VMonsterFilter
(
c
)
and
c
:
IsLevelAbove
(
lv
)
end
end
function
VgF
.
AtkUp
(
c
,
g
,
val
,
reset
)
function
vgf
.
AtkUp
(
c
,
g
,
val
,
reset
)
if
not
c
or
not
g
then
return
end
if
not
c
or
not
g
then
return
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
local
tc
=
VgF
.
ReturnCard
(
g
)
local
tc
=
vgf
.
ReturnCard
(
g
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
...
@@ -173,10 +173,10 @@ function VgF.AtkUp(c,g,val,reset)
...
@@ -173,10 +173,10 @@ function VgF.AtkUp(c,g,val,reset)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
function
VgF
.
StarUp
(
c
,
g
,
val
,
reset
)
function
vgf
.
StarUp
(
c
,
g
,
val
,
reset
)
if
not
c
or
not
g
then
return
end
if
not
c
or
not
g
then
return
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
local
tc
=
VgF
.
ReturnCard
(
g
)
local
tc
=
vgf
.
ReturnCard
(
g
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LSCALE
)
e1
:
SetCode
(
EFFECT_UPDATE_LSCALE
)
...
@@ -189,7 +189,7 @@ function VgF.StarUp(c,g,val,reset)
...
@@ -189,7 +189,7 @@ function VgF.StarUp(c,g,val,reset)
e2
:
SetCode
(
EFFECT_UPDATE_RSCALE
)
e2
:
SetCode
(
EFFECT_UPDATE_RSCALE
)
tc
:
RegisterEffect
(
e2
)
tc
:
RegisterEffect
(
e2
)
end
end
function
VgF
.
IsAbleToGZone
(
c
)
function
vgf
.
IsAbleToGZone
(
c
)
if
c
:
IsLocation
(
LOCATION_MZONE
)
then
if
c
:
IsLocation
(
LOCATION_MZONE
)
then
return
c
:
IsAttribute
(
SKILL_BLOCK
)
return
c
:
IsAttribute
(
SKILL_BLOCK
)
end
end
...
...
c10101001.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101002.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101003.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101004.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101005.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101006.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101007.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101008.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101009.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101010.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101011.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101012.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101013.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101014.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CallToR
(
c
)
vgd
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
vgd
.
MonsterBattle
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101015.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
VgD
.
SpellActivate
(
c
,
m
,
cm
.
op
)
vgd
.
SpellActivate
(
c
,
m
,
cm
.
op
)
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
...
...
c10102015.lua
View file @
8eceac44
--
--
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
vgd
.
RideUp
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
vgd
.
CardTrigger
(
c
,
nil
)
VgD
.
SpellActivate
(
c
,
m
,
nil
,
cm
.
op
,
0
,
1
)
vgd
.
SpellActivate
(
c
,
m
,
nil
,
cm
.
op
,
0
,
1
)
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
c10400855.lua
View file @
8eceac44
--能量发生器
--能量发生器
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
vgd
.
Rule
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
...
...
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