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
3763ff78
Commit
3763ff78
authored
May 06, 2024
by
jwyxym
Committed by
GitHub
May 06, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
51a14325
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
13 deletions
+36
-13
VgD.Lua
VgD.Lua
+8
-5
VgFuncLib.lua
VgFuncLib.lua
+6
-3
c10203005.lua
c10203005.lua
+1
-1
c10301001.lua
c10301001.lua
+21
-4
No files found.
VgD.Lua
View file @
3763ff78
...
@@ -156,7 +156,7 @@ function VgD.CallFilter(c,tp,zone)
...
@@ -156,7 +156,7 @@ function VgD.CallFilter(c,tp,zone)
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
z
=
VgF
.
GetAvailableLocation
(
tp
)
local
z
=
bit
.
bnot
(
VgF
.
GetAvailableLocation
(
tp
)
)
local
rg
=
Duel
.
GetMatchingGroup
(
Card
.
IsPosition
,
sp
,
LOCATION_MZONE
,
0
,
nil
,
POS_FACEDOWN_ATTACK
)
local
rg
=
Duel
.
GetMatchingGroup
(
Card
.
IsPosition
,
sp
,
LOCATION_MZONE
,
0
,
nil
,
POS_FACEDOWN_ATTACK
)
for
tc
in
VgF
.
Next
(
rg
)
do
for
tc
in
VgF
.
Next
(
rg
)
do
local
szone
=
VgF
.
SequenceToGlobal
(
sp
,
tc
:
GetLocation
(),
tc
:
GetSequence
())
local
szone
=
VgF
.
SequenceToGlobal
(
sp
,
tc
:
GetLocation
(),
tc
:
GetSequence
())
...
@@ -494,8 +494,10 @@ function VgD.MonsterAttackAnnounceCondition(e,c)
...
@@ -494,8 +494,10 @@ function VgD.MonsterAttackAnnounceCondition(e,c)
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
()
if
not
VgF
.
VMonsterFilter
(
c
)
then
return
false
end
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
Duel
.
GetAttackTarget
()
==
bc
and
VgF
.
VMonsterFilter
(
c
)
local
a
=
c
:
GetFlagEffectLabel
(
AttackTriggerFlag
)
and
c
:
GetFlagEffectLabel
(
AttackTriggerFlag
)
>
0
return
bc
and
Duel
.
GetAttackTarget
()
==
bc
and
a
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
()
...
@@ -549,10 +551,11 @@ end
...
@@ -549,10 +551,11 @@ 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
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
cp
=
tp
local
cp
=
tp
if
chkcon
==
0
then
cp
=
1
-
tp
end
if
chkcon
==
0
then
return
Duel
.
GetTurnPlayer
()
==
cp
and
c
:
IsLocation
(
LOCATION_TRIGGER
)
and
(
rc
:
GetFlagEffectLabel
(
AttackTriggerFlag
)
and
rc
:
GetFlagEffectLabel
(
AttackTriggerFlag
)
>
0
)
cp
=
1
-
tp
end
return
Duel
.
GetTurnPlayer
()
==
cp
and
c
:
IsLocation
(
LOCATION_TRIGGER
)
end
end
end
end
function
VgD
.
CardTriggerOperation
(
chkop
,
f
)
function
VgD
.
CardTriggerOperation
(
chkop
,
f
)
...
...
VgFuncLib.lua
View file @
3763ff78
...
@@ -293,11 +293,11 @@ function VgF.tgoval(e,re,rp)
...
@@ -293,11 +293,11 @@ function VgF.tgoval(e,re,rp)
end
end
function
VgF
.
GetAvailableLocation
(
tp
,
zone
)
function
VgF
.
GetAvailableLocation
(
tp
,
zone
)
local
z
local
z
if
zone
then
z
=
zone
else
z
=
0x
e0
end
if
zone
then
z
=
zone
else
z
=
0x
1f
end
local
rg
=
Duel
.
GetMatchingGroup
(
Card
.
IsPosition
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
POS_FACEDOWN_ATTACK
)
local
rg
=
Duel
.
GetMatchingGroup
(
Card
.
IsPosition
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
POS_FACEDOWN_ATTACK
)
for
tc
in
VgF
.
Next
(
rg
)
do
for
tc
in
VgF
.
Next
(
rg
)
do
local
szone
=
VgF
.
SequenceToGlobal
(
tp
,
tc
:
GetLocation
(),
tc
:
GetSequence
())
local
szone
=
VgF
.
SequenceToGlobal
(
tp
,
tc
:
GetLocation
(),
tc
:
GetSequence
())
z
=
bit
.
bor
(
z
,
szone
)
z
=
bit
.
b
x
or
(
z
,
szone
)
end
end
return
z
return
z
end
end
...
@@ -316,6 +316,8 @@ function VgF.Call(g,sumtype,tp,zone,pos)
...
@@ -316,6 +316,8 @@ function VgF.Call(g,sumtype,tp,zone,pos)
local
ct
=
bit
.
ReturnCount
(
z
)
local
ct
=
bit
.
ReturnCount
(
z
)
local
szone
local
szone
if
ct
>
1
then
if
ct
>
1
then
z
=
bit
.
bnot
(
z
)
z
=
bit
.
bor
(
z
,
0xffffff00
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CallZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CallZONE
)
szone
=
Duel
.
SelectField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
z
)
szone
=
Duel
.
SelectField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
z
)
else
else
...
@@ -328,7 +330,8 @@ function VgF.Call(g,sumtype,tp,zone,pos)
...
@@ -328,7 +330,8 @@ function VgF.Call(g,sumtype,tp,zone,pos)
return
Duel
.
SpecialSummon
(
g
,
sumtype
,
tp
,
tp
,
false
,
false
,
pos
,
szone
)
return
Duel
.
SpecialSummon
(
g
,
sumtype
,
tp
,
tp
,
false
,
false
,
pos
,
szone
)
else
else
local
sg
local
sg
local
z
=
VgF
.
GetAvailableLocation
(
tp
)
local
z
=
bit
.
bnot
(
VgF
.
GetAvailableLocation
(
tp
))
z
=
bit
.
bor
(
z
,
0xffffff00
)
if
VgF
.
GetValueType
(
g
)
==
"Card"
then
sg
=
Group
.
FromCards
(
g
)
else
sg
=
Group
.
Clone
(
g
)
end
if
VgF
.
GetValueType
(
g
)
==
"Card"
then
sg
=
Group
.
FromCards
(
g
)
else
sg
=
Group
.
Clone
(
g
)
end
for
sc
in
VgF
.
Next
(
sg
)
do
for
sc
in
VgF
.
Next
(
sg
)
do
if
sc
:
IsLocation
(
LOCATION_EXTRA
)
then
if
sc
:
IsLocation
(
LOCATION_EXTRA
)
then
...
...
c10203005.lua
View file @
3763ff78
...
@@ -31,7 +31,7 @@ end
...
@@ -31,7 +31,7 @@ end
function
cm
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
return
Duel
.
GetTurnPlayer
()
==
tp
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
op
1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_Call
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_Call
)
local
g
=
vgf
.
GetVMonster
(
tp
):
GetOverlayGroup
():
FilterSelect
(
tp
,
cm
.
filter
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
vgf
.
GetVMonster
(
tp
):
GetOverlayGroup
():
FilterSelect
(
tp
,
cm
.
filter
,
1
,
1
,
nil
,
e
,
tp
)
if
g
then
if
g
then
...
...
c10301001.lua
View file @
3763ff78
...
@@ -3,6 +3,21 @@ function cm.initial_effect(c)
...
@@ -3,6 +3,21 @@ function cm.initial_effect(c)
vgf
.
VgCard
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation
,
vgf
.
OverlayCost
(
1
),
cm
.
condition
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation
,
vgf
.
OverlayCost
(
1
),
cm
.
condition
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
,
cm
.
operation1
,
nil
,
cm
.
condition1
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
,
cm
.
operation1
,
nil
,
cm
.
condition1
)
if
not
cm
.
global_check
then
cm
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetCondition
(
cm
.
checkcon
)
ge1
:
SetOperation
(
cm
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
cm
.
checkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_SELFRIDE
)
end
function
cm
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -20,12 +35,14 @@ function cm.filter(c)
...
@@ -20,12 +35,14 @@ function cm.filter(c)
end
end
function
cm
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
c
:
IsSummonType
(
SUMMON_TYPE_SELFRIDE
)
return
Duel
.
GetFlagEffect
(
tp
,
m
)
>
0
end
end
function
cm
.
operation1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
operation1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
zone
=
vgf
.
GetAvailableLocation
(
tp
)
local
zone
=
bit
.
bnot
(
vgf
.
GetAvailableLocation
(
tp
)
)
local
ct
=
bit
.
ReturnCount
(
zone
)
local
ct
=
bit
.
ReturnCount
(
zone
)
zone
=
bit
.
bor
(
zone
,
0xffffff00
)
if
ct
>
2
then
ct
=
2
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsCanBeSpecialSummoned
,
tp
,
LOCATION_HAND
,
0
,
0
,
ct
,
nil
,
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsCanBeSpecialSummoned
,
tp
,
LOCATION_HAND
,
0
,
0
,
ct
,
nil
,
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
if
g
:
GetCount
()
==
1
then
if
g
:
GetCount
()
==
1
then
...
@@ -40,9 +57,9 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -40,9 +57,9 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
end
end
Duel
.
SpecialSummonStep
(
tc1
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
,
szone
)
Duel
.
SpecialSummonStep
(
tc1
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
,
szone
)
if
szone
&
0x11
>
0
then
if
szone
&
0x11
>
0
then
zone
=
0x
e
zone
=
0x
f1
else
else
zone
=
0x
11
zone
=
0x
ee
end
end
local
tc2
=
g
:
GetNext
()
local
tc2
=
g
:
GetNext
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CallZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CallZONE
)
...
...
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