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
052f8350
Commit
052f8350
authored
May 29, 2024
by
jwyxym
Committed by
GitHub
May 29, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
f2d8e8b2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
95 additions
and
12 deletions
+95
-12
VgD.Lua
VgD.Lua
+6
-8
VgDefinition.Lua
VgDefinition.Lua
+2
-1
VgFuncLib.lua
VgFuncLib.lua
+21
-3
c10501003.lua
c10501003.lua
+30
-0
c10501020.lua
c10501020.lua
+23
-0
c10501120.lua
c10501120.lua
+13
-0
No files found.
VgD.Lua
View file @
052f8350
...
...
@@ -322,15 +322,13 @@ function VgD.MonsterBattle(c)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e7
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e7
:
SetCondition
(
VgD
.
SendToGCondition
(
VgF
.
IsAbleToGZone
))
e7
:
SetCondition
(
VgD
.
SendToGCondition
(
LOCATION_MZONE
))
e7
:
SetOperation
(
VgD
.
SendToGOperation
)
c
:
RegisterEffect
(
e7
)
local
e17
=
e7
:
Clone
()
e17
:
SetRange
(
LOCATION_HAND
)
e17
:
SetCost
(
VgD
.
SendToGCost
)
e17
:
SetCondition
(
VgD
.
SendToGCondition
(
function
(
tc
)
tc
:
IsType
(
TYPE_MONSTER
)
end
))
e17
:
SetCondition
(
VgD
.
SendToGCondition
(
LOCATION_HAND
))
c
:
RegisterEffect
(
e17
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
...
...
@@ -463,19 +461,19 @@ function VgD.SupportValue(e)
end
function
VgD
.
SendToGCost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
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
,
LOCATION_HAND
)
end
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
,
LOCATION_HAND
)
tc
=
VgF
.
ReturnCard
(
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
e
:
SetLabelObject
(
tc
)
end
end
function
VgD
.
SendToGCondition
(
f
)
function
VgD
.
SendToGCondition
(
loc
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
Duel
.
GetAttackTarget
()
return
bc
and
bc
:
IsControler
(
tp
)
and
bc
~=
c
and
(
vgf
.
GetValueType
(
f
)
~=
"function"
or
f
(
c
)
)
return
bc
and
bc
:
IsControler
(
tp
)
and
bc
~=
c
and
vgf
.
IsAbleToGZone
(
c
,
loc
)
end
end
function
VgD
.
SendToGOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
VgDefinition.Lua
View file @
052f8350
...
...
@@ -675,6 +675,7 @@ EVENT_DAMAGE_TRIGGER =VgID+2 --受伤判定完毕时点
EVENT_RIDE_START
=
VgID
+
3
--骑升时点
EVENT_SUPPORT
=
VgID
+
4
--支援时点
EVENT_TRIGGERCOUNTUP
=
VgID
+
5
--驱动追加
EVENT_SING
=
VgID
+
6
--演唱时
--攻击时(EVENT_ATTACK_ANNOUNCE)
--支援时(EVENT_CUSTOM+EVENT_SUPPORT)
...
...
@@ -867,12 +868,12 @@ ConditionFlag =VgID+4 --处于XX状态标识
SupportFlag
=
VgID
+
5
--支援状态标识
AttackAtRearFlag
=
VgID
+
6
--后列攻击
ImprisonFlag
=
VgID
+
7
--被收容
DamageFlag
=
VgID
+
8
--被收容
--AffectedByEffect
AFFECT_CODE_MIX
=
VgID
--魔合成
AFFECT_CODE_MIX_DIFFERENT_NAME
=
VgID
+
1
--魔合成(卡名不同)
AFFECT_CODE_SENDTOG
=
VgID
+
2
--需要两张卡才能防御
AFFECT_CODE_SENDTOG_MZONE
=
VgID
+
3
--不能截击
AFFECT_CODE_SENDTOG_HAND
=
VgID
+
4
--不能交盾
POS_FACEUP_DEFENCE
=
POS_FACEUP_DEFENSE
...
...
VgFuncLib.lua
View file @
052f8350
...
...
@@ -487,12 +487,31 @@ function VgF.StarUp(c,g,val,reset,resetcount)
return
e1
,
e2
end
end
---用于效果的Operation。它返回一个执行“[计数回充num]”的函数。
---@param num integer 计数回充的数量
---@return function 效果的Operation函数
function
VgF
.
DamageFill
(
num
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
VgF
.
DamageFillOP
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
function
VgF
.
DamageFillOP
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
num
,
num
,
nil
)
Duel
.
ChangePosition
(
g
,
POS_FACEUP_ATTACK
)
return
Duel
.
GetOperatedGroup
():
GetCount
()
end
---判断c是否可以以规则的手段到G区域。
---@param c Card 要判断的卡
---@return boolean 指示c能否去到G区域。
function
VgF
.
IsAbleToGZone
(
c
)
function
VgF
.
IsAbleToGZone
(
c
,
loc
)
local
tp
=
c
:
GetControler
()
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
()
if
loc
==
LOCATION_HAND
then
return
c
:
IsType
(
TYPE_MONSTER
)
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_SENDTOG_HAND
)
elseif
loc
==
LOCATION_MZONE
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
()
end
end
---用于效果的Cost。它返回一个执行“【费用】[将手牌中的num张卡舍弃]”的函数。
---@param num integer 要舍弃的卡的数量
...
...
@@ -610,7 +629,6 @@ function VgF.DamageCostOP(num,e,tp,eg,ep,ev,re,r,rp,chk)
end
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
num
,
nil
)
end
Debug
.
Message
(
chk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DAMAGE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
num
,
num
,
nil
)
Duel
.
ChangePosition
(
g
,
POS_FACEDOWN_ATTACK
)
...
...
c10501003.lua
View file @
052f8350
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeIgnition
(
c
,
m
,
LOCATION_MZONE
,
cm
.
op
,
vgf
.
DamageCost
(
1
),
vgf
.
VMonsterCondition
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
op2
,
nil
,
cm
.
con2
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_ORDER
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g
)
Duel
.
RaiseEvent
(
g
,
EVENT_CUSTOM
+
EVENT_SING
,
e
,
0
,
tp
,
tp
,
0
)
end
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0xa040
)
and
c
:
IsPosition
(
POS_FACEUP
)
end
function
cm
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
vgf
.
RMonsterFilter
(
c
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsPosition
,
tp
,
LOCATION_ORDER
,
0
,
2
,
nil
,
POS_FACEDOWN
)
end
function
cm
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_ORDER
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g
)
Duel
.
RaiseEvent
(
g
,
EVENT_CUSTOM
+
EVENT_SING
,
e
,
0
,
tp
,
tp
,
0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
AFFECT_CODE_SENDTOG_HAND
)
e1
:
SetTargetRange
(
0
,
1
)
Duel
.
RegisterEffect
(
e1
,
tp
)
vgf
.
EffectReset
(
c
,
e1
,
EVENT_BATTLED
)
end
\ No newline at end of file
c10501020.lua
View file @
052f8350
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
GlobalCheckEffect
(
c
,
m
,
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
,
EVENT_CHANGE_POS
,
cm
.
checkcon
,
cm
.
checkop
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_FIELD
,
EVENT_CUSTOM
+
EVENT_SUPPORT
,
cm
.
op
,
nil
,
cm
.
con
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
Duel
.
GetFlagEffect
(
tp
,
m
)
>
0
and
eg
:
IsContains
(
e
:
GetHandler
())
and
vgf
.
RMonsterFilter
(
c
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
vgf
.
AtkUp
(
c
,
c
,
5000
,
nil
)
vgf
.
EffectReset
(
c
,
e1
,
EVENT_BATTLED
)
if
vgf
.
IsSequence
(
c
,
2
)
then
vgf
.
DamageFillOP
(
1
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
function
cm
.
checkfilter
(
c
,
tp
,
re
)
return
c
:
IsLocation
(
LOCATION_ORDER
)
and
c
:
IsSetCard
(
0xa040
)
and
c
:
IsControler
(
tp
)
and
c
:
IsPosition
(
POS_FACEDOWN
)
and
vgf
.
VMonsterFilter
(
re
:
GetHandler
())
end
function
cm
.
checkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
checkfilter
,
1
,
nil
,
tp
,
re
)
end
function
cm
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
\ No newline at end of file
c10501120.lua
View file @
052f8350
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
ContinuousSpell
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_ORDER
,
EFFECT_TYPE_FIELD
,
EVENT_CUSTOM
+
EVENT_SING
,
cm
.
op
,
nil
,
cm
.
con
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
vgf
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
vgf
.
AtkUp
(
c
,
g
,
5000
)
Duel
.
ChangePosition
(
c
,
POS_FACEDOWN_ATTACK
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsContains
(
e
:
GetHandler
())
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