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
8e979dc0
Commit
8e979dc0
authored
Mar 26, 2024
by
jwyxym
Committed by
GitHub
Mar 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
c260df69
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
177 additions
and
108 deletions
+177
-108
VgD.Lua
VgD.Lua
+108
-72
VgFuncLib.lua
VgFuncLib.lua
+30
-10
c10101001.lua
c10101001.lua
+2
-2
c10101002.lua
c10101002.lua
+2
-2
c10101003.lua
c10101003.lua
+2
-2
c10101004.lua
c10101004.lua
+2
-2
c10101005.lua
c10101005.lua
+2
-2
c10101006.lua
c10101006.lua
+2
-2
c10101007.lua
c10101007.lua
+2
-2
c10101008.lua
c10101008.lua
+2
-2
c10101009.lua
c10101009.lua
+2
-2
c10101011.lua
c10101011.lua
+2
-2
c10101012.lua
c10101012.lua
+2
-2
c10101013.lua
c10101013.lua
+2
-2
c10101014.lua
c10101014.lua
+2
-2
c10101015.lua
c10101015.lua
+13
-0
No files found.
VgD.Lua
View file @
8e979dc0
...
@@ -6,7 +6,7 @@ function VgD.RideUp(c)
...
@@ -6,7 +6,7 @@ function VgD.RideUp(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
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_
RIDE
)
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
)
...
@@ -19,51 +19,56 @@ function VgD.RideUp(c)
...
@@ -19,51 +19,56 @@ function VgD.RideUp(c)
e2
:
SetOperation
(
VgD
.
RideUpOperation
)
e2
:
SetOperation
(
VgD
.
RideUpOperation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
VgD
.
RideUpFilter1
(
c
,
lv
)
function
VgD
.
RideUpFilter1
(
c
,
lv
,
code
,
rc
)
local
tp
=
c
:
GetControler
()
if
rc
:
IsAttribute
(
SKILL_SELF_RIDE
)
and
c
:
IsCode
(
code
)
then
return
false
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
)
end
function
VgD
.
DisCardRideUpFilter
(
c
,
lv
,
code
,
rc
)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
return
c
:
Is
Level
(
lv
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
)
return
c
:
Is
Discardable
()
and
Duel
.
IsExistingMatchingCard
(
VgD
.
RideUpFilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
,
lv
,
code
,
r
c
)
end
end
function
VgD
.
RideUpFilter2
(
c
,
lv
,
code
)
function
VgD
.
RideUpFilter2
(
c
,
lv
,
code
,
rc
)
return
c
:
IsLevel
(
lv
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCode
(
code
)
and
c
:
IsAttribute
(
SKILL_SELF_RIDE
)
return
c
:
IsLevel
(
lv
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCode
(
code
)
and
r
c
:
IsAttribute
(
SKILL_SELF_RIDE
)
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
.
R
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
V
MonsterFilter
,
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
,
lv
+
1
)
local
rg1
=
Duel
.
GetMatchingGroup
(
VgD
.
RideUpFilter1
,
tp
,
LOCATION_HAND
+
LOCATION_RIDE
,
0
,
nil
,
lv
,
code
,
rc
)
local
rg2
=
Duel
.
GetMatchingGroup
(
VgD
.
RideUpFilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
lv
,
code
)
local
rg2
=
Duel
.
GetMatchingGroup
(
VgD
.
RideUpFilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
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
VgD
.
RuleCardCondtion
(
e
)
and
(
a
or
b
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
VgD
.
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
.
R
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
V
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
if
not
rc
then
return
false
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
,
lv
+
1
)
local
rg1
=
Duel
.
GetMatchingGroup
(
VgD
.
RideUpFilter1
,
tp
,
LOCATION_HAND
+
LOCATION_RIDE
,
0
,
nil
,
lv
,
code
,
rc
)
local
rg2
=
Duel
.
GetMatchingGroup
(
VgD
.
RideUpFilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
lv
,
code
)
local
rg2
=
Duel
.
GetMatchingGroup
(
VgD
.
RideUpFilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
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
,
opval
=
{},
{}
local
ops
=
{}
if
a
then
if
a
then
ops
[
off
]
=
VgF
.
Stringid
(
VgID
,
3
)
ops
[
off
]
=
VgF
.
Stringid
(
VgID
,
3
)
opval
[
off
]
=
0
off
=
off
+
1
off
=
off
+
1
end
end
if
b
then
if
b
then
ops
[
off
]
=
VgF
.
Stringid
(
VgID
,
4
)
ops
[
off
]
=
VgF
.
Stringid
(
VgID
,
4
)
opval
[
off
]
=
0
off
=
off
+
1
off
=
off
+
1
end
end
ops
[
off
]
=
VgF
.
Stringid
(
VgID
,
5
)
ops
[
off
]
=
VgF
.
Stringid
(
VgID
,
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
,
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
VgD
.
DisCardRideUpFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
lv
,
code
,
rc
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RIDEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RIDEUP
)
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
)
...
@@ -96,19 +101,30 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -96,19 +101,30 @@ 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
.
RideZeroFilter
(
c
,
tp
)
local
loc
=
LOCATION_RIDE
if
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_RIDE
,
0
,
nil
)
<=
0
then
loc
=
LOCATION_DECK
end
return
c
:
IsLevel
(
1
)
and
c
:
IsLocation
(
loc
)
end
function
VgD
.
RideZeroCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
RideZeroCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
RMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
if
rc
then
return
false
end
if
rc
then
return
false
end
return
Duel
.
GetTurnCount
(
tp
)
+
Duel
.
GetTurnCount
(
1
-
tp
)
==
1
and
c
:
IsLevel
(
1
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
VgD
.
RideZeroFilter
,
tp
,
LOCATION_RIDE
+
LOCATION_DECK
,
0
,
nil
,
tp
)
return
Duel
.
GetTurnCount
(
tp
)
+
Duel
.
GetTurnCount
(
1
-
tp
)
==
1
and
ct
>
0
and
VgD
.
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
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
VgD
.
RideZeroFilter
,
tp
,
LOCATION_RIDE
+
LOCATION_DECK
,
0
,
nil
,
tp
)
VgF
.
Call
(
c
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RIDEUP
)
g
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
end
VgF
.
Call
(
g
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
end
end
--Call到
v
位
--Call到
R
位
function
VgD
.
CallTo
V
(
c
)
function
VgD
.
CallTo
R
(
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
)
...
@@ -137,9 +153,9 @@ end
...
@@ -137,9 +153,9 @@ 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
.
V
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
VgID
,
7
))
then
if
Duel
.
IsExistingMatchingCard
(
VgF
.
R
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
VgID
,
7
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LEAVEONFIELD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LEAVEONFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
VgF
.
V
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
VgF
.
R
MonsterFilter
,
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
)
...
@@ -181,7 +197,7 @@ function VgD.MonsterBattle(c)
...
@@ -181,7 +197,7 @@ function VgD.MonsterBattle(c)
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
.
Trigger
Monster
)
e4
:
SetOperation
(
VgD
.
Trigger
Card
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--多次判定
--多次判定
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
...
@@ -189,7 +205,7 @@ function VgD.MonsterBattle(c)
...
@@ -189,7 +205,7 @@ function VgD.MonsterBattle(c)
e5
:
SetCode
(
EVENT_CUSTOM
+
Trigger
)
e5
:
SetCode
(
EVENT_CUSTOM
+
Trigger
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCondition
(
VgD
.
MonsterNextTrigger
)
e5
:
SetCondition
(
VgD
.
MonsterNextTrigger
)
e5
:
SetOperation
(
VgD
.
Trigger
Monster
)
e5
:
SetOperation
(
VgD
.
Trigger
Card
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
--支援
--支援
local
e6
=
Effect
.
CreateEffect
(
c
)
local
e6
=
Effect
.
CreateEffect
(
c
)
...
@@ -225,7 +241,7 @@ function VgD.MonsterBattle(c)
...
@@ -225,7 +241,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
.
R
MonsterCondition
)
e14
:
SetCondition
(
VgF
.
V
MonsterCondition
)
e14
:
SetValue
(
1
)
e14
:
SetValue
(
1
)
c
:
RegisterEffect
(
e14
)
c
:
RegisterEffect
(
e14
)
local
e15
=
Effect
.
CreateEffect
(
c
)
local
e15
=
Effect
.
CreateEffect
(
c
)
...
@@ -245,11 +261,10 @@ function VgD.MonsterBattle(c)
...
@@ -245,11 +261,10 @@ function VgD.MonsterBattle(c)
e17
:
SetValue
(
VgF
.
True
)
e17
:
SetValue
(
VgF
.
True
)
c
:
RegisterEffect
(
e17
)
c
:
RegisterEffect
(
e17
)
end
end
function
VgD
.
Trigger
Monster
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
Trigger
Card
(
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
)
Duel
.
RaiseEvent
(
tg
,
ToTrigger
,
e
,
0
,
tp
,
tp
,
0
)
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
()
...
@@ -264,7 +279,7 @@ function VgD.MonsterPosDefenseOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -264,7 +279,7 @@ function VgD.MonsterPosDefenseOperation(e,tp,eg,ep,ev,re,r,rp)
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
.
VMonsterFilter
(
c
)
or
VgF
.
R
MonsterFilter
(
c
))
return
Duel
.
GetTurnPlayer
()
==
tp
and
c
:
IsPosition
(
POS_DEFENSE
)
and
(
VgF
.
RMonsterFilter
(
c
)
or
VgF
.
V
MonsterFilter
(
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
()
...
@@ -275,7 +290,7 @@ function VgD.MonsterBattleDamageCondition(e,tp,eg,ep,ev,re,r,rp)
...
@@ -275,7 +290,7 @@ 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
return
c
:
GetSequence
()
==
2
and
c
==
Duel
.
GetAttackTarget
()
and
VgF
.
R
MonsterFilter
(
c
)
return
c
:
GetSequence
()
==
2
and
c
==
Duel
.
GetAttackTarget
()
and
VgF
.
V
MonsterFilter
(
c
)
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
()
...
@@ -283,11 +298,11 @@ function VgD.MonsterBattleDamageOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -283,11 +298,11 @@ function VgD.MonsterBattleDamageOperation(e,tp,eg,ep,ev,re,r,rp)
if
not
bc
or
not
bc
:
IsRelateToBattle
()
then
return
end
if
not
bc
or
not
bc
:
IsRelateToBattle
()
then
return
end
local
atk
=
bc
:
GetAttack
()
local
atk
=
bc
:
GetAttack
()
local
def
=
c
:
GetAttack
()
local
def
=
c
:
GetAttack
()
if
atk
>=
def
then
VgD
.
Trigger
Monster
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
atk
>=
def
then
VgD
.
Trigger
Card
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
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
.
R
MonsterFilter
(
c
)
return
eg
:
GetFirst
():
GetControler
()
==
tp
and
VgF
.
V
MonsterFilter
(
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
)
...
@@ -309,7 +324,7 @@ end
...
@@ -309,7 +324,7 @@ 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
.
R
MonsterFilter
(
c
)
return
bc
and
Duel
.
GetAttackTarget
()
==
bc
and
VgF
.
V
MonsterFilter
(
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
()
...
@@ -324,21 +339,23 @@ function VgD.MonsterCannotBeAttackedCondition(e,c)
...
@@ -324,21 +339,23 @@ function VgD.MonsterCannotBeAttackedCondition(e,c)
end
end
--判定
--判定
function
VgD
.
Monster
Trigger
(
c
,
f
)
function
VgD
.
Card
Trigger
(
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_
CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
--e1:SetCode()
e1
:
SetRange
(
LOCATION_TRIGGER
)
e1
:
SetRange
(
LOCATION_TRIGGER
)
e1
:
SetCode
(
EVENT_CUSTOM
+
ToTrigger
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCondition
(
VgD
.
MonsterTriggerCondtion
(
0
))
e1
:
SetCode
(
EVENT_
)
e1
:
SetOperation
(
VgD
.
MonsterTriggerOperation
(
0
,
f
))
e1
:
SetCondition
(
VgD
.
CardTriggerCondtion
(
0
))
e1
:
SetOperation
(
VgD
.
CardTriggerOperation
(
0
,
f
))
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCondition
(
VgD
.
Monster
TriggerCondtion
(
1
))
e2
:
SetCondition
(
VgD
.
Card
TriggerCondtion
(
1
))
e2
:
SetOperation
(
VgD
.
Monster
TriggerOperation
(
1
,
f
))
e2
:
SetOperation
(
VgD
.
Card
TriggerOperation
(
1
,
f
))
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
VgD
.
Monster
TriggerCondtion
(
chkcon
)
function
VgD
.
Card
TriggerCondtion
(
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
...
@@ -346,27 +363,34 @@ function VgD.MonsterTriggerCondtion(chkcon)
...
@@ -346,27 +363,34 @@ function VgD.MonsterTriggerCondtion(chkcon)
return
Duel
.
GetTurnPlayer
()
==
cp
return
Duel
.
GetTurnPlayer
()
==
cp
end
end
end
end
function
VgD
.
Monster
TriggerOperation
(
chkop
,
f
)
function
VgD
.
Card
TriggerOperation
(
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
tc1
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
VgF
.
StarUp
(
c
,
tc1
,
1
)
Duel
.
HintSelection
(
g1
)
VgF
.
StarUp
(
c
,
g1
,
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
local
tc2
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
VgF
.
AtkUp
(
c
,
tc2
,
10000
)
Duel
.
HintSelection
(
g2
)
VgF
.
AtkUp
(
c
,
g2
,
10000
)
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
tc
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
VgF
.
AtkUp
(
c
,
tc
,
10000
)
Duel
.
HintSelection
(
g
)
VgF
.
AtkUp
(
c
,
g
,
10000
)
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
()
if
tc
then
if
tc
then
Duel
.
SendtoGrave
(
tc
,
REASON_TRIGGER
)
Duel
.
SendtoGrave
(
tc
,
REASON_TRIGGER
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g
)
VgF
.
AtkUp
(
c
,
g
,
10000
)
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
...
@@ -378,8 +402,9 @@ function VgD.MonsterTriggerOperation(chkop,f)
...
@@ -378,8 +402,9 @@ function VgD.MonsterTriggerOperation(chkop,f)
Duel
.
Exile
(
c
,
REASON_TRIGGER
)
Duel
.
Exile
(
c
,
REASON_TRIGGER
)
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
tc
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
VgF
.
AtkUp
(
c
,
tc
,
100000000
)
Duel
.
HintSelection
(
g
)
VgF
.
AtkUp
(
c
,
g
,
100000000
)
else
else
Duel
.
SendtoDamage
(
c
)
Duel
.
SendtoDamage
(
c
)
Duel
.
Damage
(
tp
,
1
,
REASON_TRIGGER
)
Duel
.
Damage
(
tp
,
1
,
REASON_TRIGGER
)
...
@@ -401,8 +426,9 @@ function VgD.MonsterTriggerOperation(chkop,f)
...
@@ -401,8 +426,9 @@ function VgD.MonsterTriggerOperation(chkop,f)
Duel
.
Exile
(
c
,
REASON_TRIGGER
)
Duel
.
Exile
(
c
,
REASON_TRIGGER
)
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
tc
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
VgF
.
AtkUp
(
c
,
tc
,
100000000
)
Duel
.
HintSelection
(
g
)
VgF
.
AtkUp
(
c
,
g
,
100000000
)
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
else
else
Duel
.
SendtoHand
(
c
,
nil
,
REASON_TRIGGER
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_TRIGGER
)
...
@@ -499,12 +525,16 @@ function VgD.RuleWin(e,tp,eg,ep,ev,re,r,rp)
...
@@ -499,12 +525,16 @@ function VgD.RuleWin(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end
end
function
VgD
.
RuelGFilter
(
c
,
lv
)
return
c
:
IsLevel
(
lv
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
VgD
.
RuelGCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
RuelGCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
R
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
V
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
if
not
rc
then
return
false
end
if
not
rc
then
return
false
end
local
lv
=
rc
:
GetLevel
()
+
1
local
lv
=
rc
:
GetLevel
()
+
1
local
rg
=
Duel
.
GetMatchingGroup
(
Card
.
IsLevel
,
tp
,
LOCATION_HAND
+
LOCATION_RIDE
,
0
,
nil
,
lv
):
Filter
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
)
local
ct1
=
Duel
.
GetMatchingGroupCount
(
VgD
.
RuelGFilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
lv
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
rc
:
IsLevelBelow
(
2
)
and
rg
:
GetCount
()
==
0
and
VgD
.
RuleCardCondtion
(
e
)
local
ct2
=
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_RIDE
,
0
,
nil
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
rc
:
IsLevelBelow
(
2
)
and
ct1
==
0
and
ct2
==
0
and
VgD
.
RuleCardCondtion
(
e
)
end
end
function
VgD
.
RuleGOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
RuleGOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
VgID
,
1
))
then
if
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
VgID
,
1
))
then
...
@@ -546,13 +576,19 @@ end
...
@@ -546,13 +576,19 @@ end
--指令卡cost
--指令卡cost
function
VgD
.
SpellActivate
(
c
,
m
,
con
,
op
,
specialchk
,
num1
,
num2
,
num3
,
num4
,
num5
)
function
VgD
.
SpellActivate
(
c
,
m
,
con
,
op
,
specialchk
,
num1
,
num2
,
num3
,
num4
,
num5
)
if
not
specialchk
then
specialchk
=
0
end
if
not
num1
then
num1
=
0
end
if
not
num2
then
num2
=
0
end
if
not
num3
then
num3
=
0
end
if
not
num4
then
num4
=
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_
CHAINING
)
e1
:
SetCode
(
EVENT_
FREE_CHAIN
)
e1
:
SetCost
(
VgD
.
SpellCost
(
num1
,
num2
,
num3
,
num4
,
num5
))
e1
:
SetCost
(
VgD
.
SpellCost
(
num1
,
num2
,
num3
,
num4
,
num5
))
e1
:
SetCondition
(
con
)
if
con
then
e1
:
SetCondition
(
con
)
end
e1
:
SetOperation
(
op
)
if
op
then
e1
:
SetOperation
(
op
)
end
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
VgD
.
SpellCost
(
num1
,
num2
,
num3
,
num4
,
num5
)
function
VgD
.
SpellCost
(
num1
,
num2
,
num3
,
num4
,
num5
)
...
@@ -570,10 +606,10 @@ function VgD.SpellCost(num1,num2,num3,num4,num5)
...
@@ -570,10 +606,10 @@ function VgD.SpellCost(num1,num2,num3,num4,num5)
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
.
R
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
mg
):
GetFirst
():
GetOverlayGroup
():
FilterCount
(
VgF
.
True
,
mg
)
>=
num3
end
if
num3
>
0
then
b3
=
Duel
.
GetMatchingGroup
(
VgF
.
V
MonsterFilter
,
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
g
:
GetCount
()
>
0
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
)
...
@@ -584,13 +620,13 @@ function VgD.SpellCost(num1,num2,num3,num4,num5)
...
@@ -584,13 +620,13 @@ function VgD.SpellCost(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
=
"c"
..
m
local
cm
=
_G
[
"c"
..
m
]
if
specialchk
>
0
then
cm
.
Vg_SpecialCost
=
specialchk
end
cm
.
Vg_SpecialCost
=
specialchk
if
num1
>
0
then
cm
.
Vg_DisCard
=
num1
end
cm
.
Vg_DisCard
=
num1
if
num2
>
0
then
cm
.
Vg_Counter
=
num2
end
cm
.
Vg_Counter
=
num2
if
num3
>
0
then
cm
.
Vg_OverLay
=
num3
end
cm
.
Vg_OverLay
=
num3
if
num4
>
0
then
cm
.
Vg_OverLayFill
=
num4
end
cm
.
Vg_OverLayFill
=
num4
if
num5
>
0
then
cm
.
Vg_Damage
=
num5
end
cm
.
Vg_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
)
...
@@ -615,7 +651,7 @@ function VgD.SpellMixFilter(c,mc,num1,num2,num3,num4,num5)
...
@@ -615,7 +651,7 @@ function VgD.SpellMixFilter(c,mc,num1,num2,num3,num4,num5)
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
.
R
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
mg
):
GetFirst
():
GetOverlayGroup
():
FilterCount
(
Card
.
IsAbleToGraveAsCost
,
mg
)
>=
num3
end
if
num3
>
0
then
b3
=
Duel
.
GetMatchingGroup
(
VgF
.
V
MonsterFilter
,
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
...
@@ -655,11 +691,11 @@ function VgD.SpellCostOp(e,tp,eg,ep,ev,re,r,rp,chk,c,mc,num1,num2,num3,num4,num5
...
@@ -655,11 +691,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
.
R
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
mg
,
c
):
GetFirst
():
Filter
(
Card
.
IsAbleToGraveAsCost
,
mg
)
local
g
=
Duel
.
GetMatchingGroup
(
VgF
.
V
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
mg
,
c
):
GetFirst
():
Filter
(
Card
.
IsAbleToGraveAsCost
,
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
.
R
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
mg
,
c
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
V
MonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
mg
,
c
):
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
)
...
...
VgFuncLib.lua
View file @
8e979dc0
...
@@ -39,6 +39,24 @@ function VgF.Next(g)
...
@@ -39,6 +39,24 @@ function VgF.Next(g)
else
return
g
:
GetNext
()
end
else
return
g
:
GetNext
()
end
end
end
end
end
function
VgF
.
GetValueType
(
v
)
local
t
=
type
(
v
)
if
t
==
"userdata"
then
local
mt
=
getmetatable
(
v
)
if
mt
==
Group
then
return
"Group"
elseif
mt
==
Effect
then
return
"Effect"
else
return
"Card"
end
else
return
t
end
end
function
VgF
.
ReturnCard
(
g
)
local
tc
if
VgF
.
GetValueType
(
g
)
==
"Group"
then
tc
=
g
:
GetFirst
()
elseif
VgF
.
GetValueType
(
g
)
==
"Card"
then
tc
=
g
end
return
tc
end
bit
=
{}
bit
=
{}
function
bit
.
band
(
a
,
b
)
function
bit
.
band
(
a
,
b
)
return
a
&
b
return
a
&
b
...
@@ -58,18 +76,18 @@ end
...
@@ -58,18 +76,18 @@ end
function
bit
.
bnot
(
a
)
function
bit
.
bnot
(
a
)
return
~
a
return
~
a
end
end
function
VgF
.
R
MonsterFilter
(
c
)
function
VgF
.
V
MonsterFilter
(
c
)
return
VgF
.
IsSequence
(
c
,
5
)
return
VgF
.
IsSequence
(
c
,
5
)
end
end
function
VgF
.
V
MonsterFilter
(
c
)
function
VgF
.
R
MonsterFilter
(
c
)
return
c
:
GetSequence
()
<
5
return
c
:
GetSequence
()
<
5
end
end
function
VgF
.
VMonsterCondition
(
e
,
c
)
return
VgF
.
VMonsterFilter
(
e
:
GetHandler
())
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
)
return
VgF
.
VMonsterFilter
(
e
:
GetHandler
())
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
...
@@ -130,10 +148,11 @@ function VgF.LvCondition(e)
...
@@ -130,10 +148,11 @@ function VgF.LvCondition(e)
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
.
R
MonsterFilter
(
c
)
and
c
:
IsLevelAbove
(
lv
)
return
VgF
.
V
MonsterFilter
(
c
)
and
c
:
IsLevelAbove
(
lv
)
end
end
function
VgF
.
AtkUp
(
c
,
tc
,
val
)
function
VgF
.
AtkUp
(
c
,
g
,
val
)
if
not
tc
then
return
end
if
not
g
then
return
end
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
)
...
@@ -141,8 +160,9 @@ function VgF.AtkUp(c,tc,val)
...
@@ -141,8 +160,9 @@ function VgF.AtkUp(c,tc,val)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
function
VgF
.
StarUp
(
c
,
tc
,
val
)
function
VgF
.
StarUp
(
c
,
g
,
val
)
if
not
tc
then
return
end
if
not
g
then
return
end
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
)
...
...
c10101001.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101002.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101003.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101004.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101005.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101006.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101007.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101008.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101009.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101011.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101012.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101013.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101014.lua
View file @
8e979dc0
...
@@ -3,7 +3,7 @@ local cm,m,o=GetID()
...
@@ -3,7 +3,7 @@ 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
.
CallTo
V
(
c
)
VgD
.
CallTo
R
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
MonsterBattle
(
c
)
VgD
.
Monster
Trigger
(
c
,
nil
)
VgD
.
Card
Trigger
(
c
,
nil
)
end
end
\ No newline at end of file
c10101015.lua
0 → 100644
View file @
8e979dc0
--
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
VgD
.
SpellActivate
(
c
,
m
,
nil
,
cm
.
op
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_DROP
,
0
,
1
,
1
,
nil
)
if
g
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
end
\ No newline at end of file
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