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
62f397c7
Commit
62f397c7
authored
Apr 08, 2024
by
jwyxym
Committed by
GitHub
Apr 08, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
0f432776
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
236 additions
and
83 deletions
+236
-83
VgD.Lua
VgD.Lua
+141
-21
VgDefinition.Lua
VgDefinition.Lua
+2
-2
VgFuncLib.lua
VgFuncLib.lua
+19
-2
c10101001.lua
c10101001.lua
+7
-1
c10101004.lua
c10101004.lua
+1
-1
c10101006.lua
c10101006.lua
+7
-37
c10101008.lua
c10101008.lua
+1
-8
c10400855.lua
c10400855.lua
+2
-7
c10800730.lua
c10800730.lua
+4
-4
c10800855.lua
c10800855.lua
+52
-0
No files found.
VgD.Lua
View file @
62f397c7
This diff is collapsed.
Click to expand it.
VgDefinition.Lua
View file @
62f397c7
VgDefinition
=
{}
VgID
=
10101001
vgid
=
VgID
VgID
=
10000001
--min/max value
MIN_ID
=
1000
--4 digits, by DataManager::GetDesc()
MAX_ID
=
268435455
--28 bits, by DataManager::GetDesc()
...
...
@@ -126,6 +125,7 @@ REASON_LINK =0x10000000 --用于连接召唤
REASON_LOST_OVERLAY
=
0x20000000
--超量素材随着超量怪兽离场
REASON_MAINTENANCE
=
0x40000000
--维持代价
REASON_ACTION
=
0x80000000
--攻击宣言之际等
REASON_RIDEUP
=
REASON_XYZ
--用於骑升
REASON_PHASEDRAW
=
REASON_RULE
--抽卡
REASON_TRIGGER
=
REASON_EFFECT
--判定
--Location Reason
...
...
VgFuncLib.lua
View file @
62f397c7
...
...
@@ -39,6 +39,23 @@ function VgF.SequenceToGlobal(p,loc,seq)
return
0
end
end
function
VgF
.
AddCodeList
(
c
,
...
)
if
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
then
return
end
if
c
.
card_code_list
==
nil
then
local
mt
=
getmetatable
(
c
)
mt
.
card_code_list
=
{}
for
_
,
code
in
ipairs
{
...
}
do
mt
.
card_code_list
[
code
]
=
true
end
else
for
_
,
code
in
ipairs
{
...
}
do
c
.
card_code_list
[
code
]
=
true
end
end
end
function
VgF
.
IsCodeListed
(
c
,
code
)
return
c
.
card_code_list
and
c
.
card_code_list
[
code
]
end
function
VgF
.
True
()
return
true
end
...
...
@@ -174,7 +191,7 @@ function VgF.tgoval(e,re,rp)
return
rp
==
1
-
e
:
GetHandlerPlayer
()
end
function
VgF
.
Call
(
g
,
sumtype
,
sp
,
zone
)
if
not
zone
then
zone
=
0x
7
f
end
if
not
zone
then
zone
=
0x
3
f
end
return
Duel
.
SpecialSummon
(
g
,
sumtype
,
sp
,
sp
,
true
,
true
,
POS_FACEUP_ATTACK
,
zone
)
end
function
VgF
.
LvCondition
(
e
)
...
...
@@ -237,7 +254,7 @@ function VgF.EnegyCost(num)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
num
,
nil
,
10800730
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
1
,
1
,
nil
,
10800730
)
Duel
.
Sendto
Grave
(
g
,
REASON_COST
)
Duel
.
Sendto
(
g
,
tp
,
0
,
POS_FACEUP
,
REASON_COST
)
end
end
function
VgF
.
OverlayCost
(
num
)
...
...
c10101001.lua
View file @
62f397c7
...
...
@@ -11,9 +11,15 @@ end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Group
.
FromCards
(
c
)
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsSetCard
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
0x
3210
)
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsSetCard
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
0x
201
)
if
sg
then
g
:
Merge
(
sg
)
end
for
tc
in
VgF
.
Next
(
g
)
do
VgF
.
AtkUp
(
c
,
tc
,
10000
,
nil
)
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_DAMAGE
,
0
,
nil
)
for
tc
in
VgF
.
Next
(
g
)
do
Duel
.
ChangePosition
(
tc
,
POS_FACEDOWN
)
end
end
\ No newline at end of file
c10101004.lua
View file @
62f397c7
...
...
@@ -8,5 +8,5 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandlerPlayer
()
==
1
return
tp
==
1
and
Duel
.
GetTurnPlayer
()
==
tp
end
\ No newline at end of file
c10101006.lua
View file @
62f397c7
...
...
@@ -2,42 +2,9 @@
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
vgf
.
Stringid
(
vgid
,
9
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
0
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation2
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_CUSTOM
+
m
,
cm
.
operation3
,
vgf
.
OverlayCost
(
2
))
end
function
cm
.
condition
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
e
:
GetHandlerPlayer
()
return
vgf
.
LvCondition
(
e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
filter
(
c
)
return
vgf
.
RMonsterFilter
(
c
)
and
c
:
IsCode
(
10101009
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OVERLAY
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
tc
=
vgf
.
ReturnCard
(
tc
)
local
zone
=
vgf
.
SequenceToGlobal
(
tp
,
tc
:
GetLocation
(),
tc
:
GetSequence
())
e
:
SetValue
(
function
()
return
0
,
zone
end
)
c
:
SetMaterial
(
Group
.
FromCards
(
tc
))
local
mg
=
tc
:
GetOverlayGroup
()
if
mg
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
c
,
mg
)
end
c
:
SetMaterial
(
Group
.
FromCards
(
tc
))
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
tc
))
c
:
RegisterFlagEffect
(
ConditionFlag
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
201
)
vgf
.
AddCodeList
(
c
,
10101009
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation2
,
nil
,
vgf
.
RMonsterCondition
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_FIELD
,
EVENT_CUSTOM
+
m
,
cm
.
operation3
,
vgf
.
OverlayCost
(
2
),
cm
.
condition3
)
end
function
cm
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -51,4 +18,7 @@ function cm.operation3(e,tp,eg,ep,ev,re,r,rp)
Duel
.
HintSelection
(
g
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
\ No newline at end of file
end
function
cm
.
condition3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
()
==
e
:
GetHandler
()
end
c10101008.lua
View file @
62f397c7
...
...
@@ -2,12 +2,5 @@
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_MOVE
,
cm
.
operation
,
vgf
.
DisCardCost
(
1
),
cm
.
condition
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsLocation
(
LOCATION_GZONE
)
and
Duel
.
GetAttackTarget
()
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
DefenseEntirelyFlag
,
RESET_EVENT
+
EVENT_DAMAGE_STEP_END
,
0
,
1
)
vgd
.
CardToG
(
c
,
vgf
.
DisCardCost
(
1
))
end
\ No newline at end of file
c10400855.lua
View file @
62f397c7
--能量发生器
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgd
.
Rule
(
c
)
VgD
.
Rule
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
...
...
@@ -23,7 +23,7 @@ function cm.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_EMBLEM
)
e3
:
SetCountLimit
(
1
)
--e3:SetCost(cm.cost3
)
e3
:
SetCost
(
VgF
.
EnegyCost
(
7
)
)
e3
:
SetOperation
(
cm
.
op3
)
c
:
RegisterEffect
(
e3
)
end
...
...
@@ -47,11 +47,6 @@ function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local
token
=
Duel
.
CreateToken
(
tp
,
20401001
)
Duel
.
Sendto
(
token
,
tp
,
LOCATION_EMBLEM
,
POS_FACEUP
,
REASON_EFFECT
)
end
function
cm
.
cost3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
1
,
nil
,
20401001
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
1
,
1
,
nil
,
20401001
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
cm
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
\ No newline at end of file
c10800730.lua
View file @
62f397c7
local
cm
,
m
,
o
=
GetID
()
function
c
m
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
end
--能量
function
c
10800730
.
initial_effect
(
c
)
end
c10800855.lua
0 → 100644
View file @
62f397c7
--能量发生器
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetCondition
(
cm
.
con1
)
e1
:
SetOperation
(
cm
.
op1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_STANDBY
)
e2
:
SetRange
(
LOCATION_EMBLEM
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
cm
.
con2
)
e2
:
SetOperation
(
cm
.
op2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_EMBLEM
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
VgF
.
EnegyCost
(
7
))
e3
:
SetOperation
(
cm
.
op3
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsLocation
(
LOCATION_EMBLEM
)
and
tp
==
1
and
Duel
.
GetTurnPlayer
()
==
tp
end
function
cm
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
token1
=
Duel
.
CreateToken
(
tp
,
10800730
)
local
token2
=
Duel
.
CreateToken
(
tp
,
10800730
)
local
token3
=
Duel
.
CreateToken
(
tp
,
10800730
)
local
g
=
Group
.
FromCards
(
token1
,
token2
,
token3
)
Duel
.
Sendto
(
g
,
tp
,
LOCATION_EMBLEM
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
end
function
cm
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetMatchingGroupCount
(
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
nil
,
10800730
)
<
10
end
function
cm
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetMatchingGroupCount
(
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
nil
,
10800730
)
>=
10
then
return
end
local
token
=
Duel
.
CreateToken
(
tp
,
10800730
)
Duel
.
Sendto
(
token
,
tp
,
LOCATION_EMBLEM
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
end
function
cm
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
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