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
6208d785
Commit
6208d785
authored
May 10, 2024
by
jwyxym
Committed by
GitHub
May 10, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
b8f3f183
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
20 deletions
+32
-20
VgD.Lua
VgD.Lua
+15
-12
VgFuncLib.lua
VgFuncLib.lua
+14
-7
c10203001.lua
c10203001.lua
+2
-1
c10203003.lua
c10203003.lua
+1
-0
No files found.
VgD.Lua
View file @
6208d785
...
@@ -460,7 +460,7 @@ function VgD.SendToGCost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -460,7 +460,7 @@ function VgD.SendToGCost(e,tp,eg,ep,ev,re,r,rp,chk)
if
c
:
IsLocation
(
LOCATION_MZONE
)
then
if
c
:
IsLocation
(
LOCATION_MZONE
)
then
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
else
else
if
chk
==
0
then
return
(
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
OAFFECT_CODE_SENDTOG
)
or
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_GZONE
,
0
,
1
,
nil
)
or
Duel
.
IsExistingMatchingCard
(
VgF
.
IsAbleToGZone
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
)
)
end
if
chk
==
0
then
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
OAFFECT_CODE_SENDTOG
)
or
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_GZONE
,
0
,
1
,
nil
)
or
Duel
.
IsExistingMatchingCard
(
VgF
.
IsAbleToGZone
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
)
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
OAFFECT_CODE_SENDTOG
)
and
not
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_GZONE
,
0
,
1
,
nil
)
then
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
OAFFECT_CODE_SENDTOG
)
and
not
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_GZONE
,
0
,
1
,
nil
)
then
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
VgF
.
IsAbleToGZone
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
c
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
VgF
.
IsAbleToGZone
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
c
)
tc
=
VgF
.
ReturnCard
(
tc
)
tc
=
VgF
.
ReturnCard
(
tc
)
...
@@ -1020,27 +1020,30 @@ function VgD.EffectTypeContinuousChangeAttack(c,typ,val,con,tg,mc,code,reset,loc
...
@@ -1020,27 +1020,30 @@ function VgD.EffectTypeContinuousChangeAttack(c,typ,val,con,tg,mc,code,reset,loc
e1
:
SetValue
(
val
)
e1
:
SetValue
(
val
)
mc
:
RegisterEffect
(
e1
)
mc
:
RegisterEffect
(
e1
)
end
end
function
VgD
.
TriggerCountUp
(
c
,
num
,
reset
)
function
VgD
.
TriggerCountUp
(
c
,
num
,
reset
,
tc
)
if
not
reset
then
reset
=
0
end
if
tc
then
tc
=
VgF
.
ReturnCard
(
tc
)
else
tc
=
c
end
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
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_CUSTOM
+
EVENT_TRIGGERCOUNTUP
)
e1
:
SetCode
(
EVENT_CUSTOM
+
EVENT_TRIGGERCOUNTUP
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
if
reset
and
reset
>
0
then
e1
:
SetReset
(
reset
)
end
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
VgF
.
ReturnCard
(
eg
)
==
e
:
GetHandler
()
end
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
)
e1
:
SetOperation
(
VgD
.
TriggerCountUpOperation
(
num
))
e1
:
SetOperation
(
VgD
.
TriggerCountUpOperation
(
num
))
c
:
RegisterEffect
(
e1
)
t
c
:
RegisterEffect
(
e1
)
end
end
function
VgD
.
TriggerCountUpOperation
(
num
)
function
VgD
.
TriggerCountUpOperation
(
num
)
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
label
=
c
:
GetFlagEffectLabel
(
AttackTriggerFlag
)
local
label
=
c
:
GetFlagEffectLabel
(
AttackTriggerFlag
)
if
label
and
label
>
0
then
if
not
label
then
label
=
0
end
label
=
label
+
num
label
=
label
+
num
if
label
<
0
then
label
=
0
end
Debug
.
Message
(
label
)
c
:
ResetFlagEffect
(
AttackTriggerFlag
)
if
label
<
0
then
label
=
0
end
c
:
RegisterFlagEffect
(
AttackTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
label
)
c
:
ResetFlagEffect
(
AttackTriggerFlag
)
else
c
:
RegisterFlagEffect
(
AttackTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
label
)
c
:
RegisterFlagEffect
(
AttackTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
num
)
end
end
end
end
end
\ No newline at end of file
VgFuncLib.lua
View file @
6208d785
...
@@ -309,9 +309,10 @@ end
...
@@ -309,9 +309,10 @@ end
---@param pos integer 表示形式
---@param pos integer 表示形式
---@return integer Call成功的数量
---@return integer Call成功的数量
function
VgF
.
Call
(
g
,
sumtype
,
tp
,
zone
,
pos
)
function
VgF
.
Call
(
g
,
sumtype
,
tp
,
zone
,
pos
)
if
not
g
then
return
0
end
if
(
VgF
.
GetValueType
(
g
)
~=
"Card"
and
VgF
.
GetValueType
(
g
)
~=
"Group"
)
or
(
VgF
.
GetValueType
(
g
)
==
"Group"
and
g
:
GetCount
()
==
0
)
then
return
0
end
if
VgF
.
GetValueType
(
pos
)
~=
"number"
then
pos
=
POS_FACEUP_ATTACK
end
if
VgF
.
GetValueType
(
pos
)
~=
"number"
then
pos
=
POS_FACEUP_ATTACK
end
if
zone
and
zone
>
0
then
if
zone
and
zone
>
0
then
local
sc
=
VgF
.
ReturnCard
(
g
)
local
z
=
VgF
.
GetAvailableLocation
(
tp
,
zone
)
local
z
=
VgF
.
GetAvailableLocation
(
tp
,
zone
)
local
ct
=
bit
.
ReturnCount
(
z
)
local
ct
=
bit
.
ReturnCount
(
z
)
local
szone
local
szone
...
@@ -323,11 +324,19 @@ function VgF.Call(g,sumtype,tp,zone,pos)
...
@@ -323,11 +324,19 @@ function VgF.Call(g,sumtype,tp,zone,pos)
else
else
szone
=
z
szone
=
z
end
end
if
Duel
.
IsExistingMatchingCard
(
VgD
.
CallFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
,
szone
)
then
if
szone
==
0x20
and
Duel
.
GetMatchingGroupCount
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
>
0
then
local
tc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
mg
=
tc
:
GetOverlayGroup
()
if
mg
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
sc
,
mg
)
end
sc
:
SetMaterial
(
Group
.
FromCards
(
tc
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
tc
))
elseif
Duel
.
IsExistingMatchingCard
(
VgD
.
CallFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
,
szone
)
then
local
tc
=
Duel
.
GetMatchingGroup
(
VgD
.
CallFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
tp
,
szone
):
GetFirst
()
local
tc
=
Duel
.
GetMatchingGroup
(
VgD
.
CallFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
tp
,
szone
):
GetFirst
()
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
end
end
return
Duel
.
SpecialSummon
(
g
,
sumtype
,
tp
,
tp
,
false
,
false
,
pos
,
szone
)
return
Duel
.
SpecialSummon
(
sc
,
sumtype
,
tp
,
tp
,
false
,
false
,
pos
,
szone
)
else
else
local
sg
local
sg
local
z
=
bit
.
bnot
(
VgF
.
GetAvailableLocation
(
tp
))
local
z
=
bit
.
bnot
(
VgF
.
GetAvailableLocation
(
tp
))
...
@@ -478,10 +487,8 @@ end
...
@@ -478,10 +487,8 @@ end
---@return boolean 指示c能否去到G区域。
---@return boolean 指示c能否去到G区域。
function
VgF
.
IsAbleToGZone
(
c
)
function
VgF
.
IsAbleToGZone
(
c
)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
then
return
(
c
:
IsAttribute
(
SKILL_BLOCK
)
and
VgF
.
IsSequence
(
c
,
0
,
4
)
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_SENDTOG_MZONE
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
())
return
c
:
IsAttribute
(
SKILL_BLOCK
)
and
VgF
.
IsSequence
(
c
,
0
,
4
)
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_SENDTOG_MZONE
)
or
c
:
IsLocation
(
LOCATION_HAND
)
end
return
c
:
IsLocation
(
LOCATION_HAND
)
end
end
---用于效果的Cost。它返回一个执行“【费用】[将手牌中的num张卡舍弃]”的函数。
---用于效果的Cost。它返回一个执行“【费用】[将手牌中的num张卡舍弃]”的函数。
---@param num integer 要舍弃的卡的数量
---@param num integer 要舍弃的卡的数量
...
...
c10203001.lua
View file @
6208d785
...
@@ -24,7 +24,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -24,7 +24,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
vgf
.
Call
(
g
,
SUMMON_VALUE_REVOLT
,
tp
,
0x20
)
>
0
then
if
vgf
.
Call
(
g
,
SUMMON_VALUE_REVOLT
,
tp
,
0x20
)
>
0
then
vgd
.
TriggerCountUp
(
c
,
-
2
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
local
mg
=
Duel
.
GetOperatedGroup
()
vgd
.
TriggerCountUp
(
c
,
-
2
,
RESET_PHASE
+
PHASE_END
,
mg
)
end
end
end
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
c10203003.lua
View file @
6208d785
...
@@ -31,6 +31,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -31,6 +31,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
DisableShuffleCheck
()
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
ShuffleHand
(
tp
)
g
:
RemoveCard
(
vgf
.
ReturnCard
(
sg
))
g
:
RemoveCard
(
vgf
.
ReturnCard
(
sg
))
elseif
(
sel
==
1
and
a
and
b
)
or
(
sel
==
0
and
not
a
and
b
)
then
elseif
(
sel
==
1
and
a
and
b
)
or
(
sel
==
0
and
not
a
and
b
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
...
...
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