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
6346777a
Commit
6346777a
authored
Aug 24, 2024
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
0a5ce37d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
10 deletions
+45
-10
VgD.Lua
VgD.Lua
+27
-6
VgDefinition.Lua
VgDefinition.Lua
+4
-2
VgFuncLib.lua
VgFuncLib.lua
+5
-0
c10103001.lua
c10103001.lua
+2
-2
c10401048.lua
c10401048.lua
+7
-0
No files found.
VgD.Lua
View file @
6346777a
...
@@ -643,10 +643,12 @@ function VgD.CardTriggerOperation(chkop,f)
...
@@ -643,10 +643,12 @@ function VgD.CardTriggerOperation(chkop,f)
Duel
.
HintSelection
(
g
)
Duel
.
HintSelection
(
g
)
VgF
.
AtkUp
(
c
,
g
,
100000000
,
nil
)
VgF
.
AtkUp
(
c
,
g
,
100000000
,
nil
)
Duel
.
Draw
(
tp
,
1
,
REASON_TRIGGER
)
Duel
.
Draw
(
tp
,
1
,
REASON_TRIGGER
)
VgF
.
Sendto
(
LOCATION_EXILE
,
c
,
REASON_TRIGGER
)
if
c
:
IsRelateToEffect
(
e
)
then
VgF
.
Sendto
(
LOCATION_EXILE
,
c
,
REASON_TRIGGER
)
end
else
else
VgF
.
Sendto
(
LOCATION_DAMAGE
,
c
,
tp
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
Damage
(
tp
,
1
,
REASON_TRIGGER
)
VgF
.
Sendto
(
LOCATION_DAMAGE
,
c
,
tp
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
Duel
.
Damage
(
tp
,
1
,
REASON_TRIGGER
)
end
end
end
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
bc
=
rc
:
GetBattleTarget
()
local
bc
=
rc
:
GetBattleTarget
()
...
@@ -662,6 +664,7 @@ function VgD.CardTriggerOperation(chkop,f)
...
@@ -662,6 +664,7 @@ function VgD.CardTriggerOperation(chkop,f)
Duel
.
RaiseEvent
(
rc
,
EVENT_CUSTOM
+
EVENT_DAMAGE_TRIGGER
,
e
,
0
,
tp
,
tp
,
0
)
Duel
.
RaiseEvent
(
rc
,
EVENT_CUSTOM
+
EVENT_DAMAGE_TRIGGER
,
e
,
0
,
tp
,
tp
,
0
)
end
end
else
else
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
if
c
:
IsRace
(
TRIGGER_SUPER
)
then
if
c
:
IsRace
(
TRIGGER_SUPER
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
...
@@ -669,9 +672,9 @@ function VgD.CardTriggerOperation(chkop,f)
...
@@ -669,9 +672,9 @@ function VgD.CardTriggerOperation(chkop,f)
VgF
.
AtkUp
(
c
,
g
,
100000000
,
nil
)
VgF
.
AtkUp
(
c
,
g
,
100000000
,
nil
)
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
Duel
.
Draw
(
tp
,
1
,
REASON_TRIGGER
)
Duel
.
Draw
(
tp
,
1
,
REASON_TRIGGER
)
VgF
.
Sendto
(
LOCATION_EXILE
,
c
,
REASON_TRIGGER
)
if
c
:
IsRelateToEffect
(
e
)
then
VgF
.
Sendto
(
LOCATION_EXILE
,
c
,
REASON_TRIGGER
)
end
else
else
VgF
.
Sendto
(
LOCATION_HAND
,
c
,
nil
,
REASON_TRIGGER
)
if
c
:
IsRelateToEffect
(
e
)
then
VgF
.
Sendto
(
LOCATION_HAND
,
c
,
nil
,
REASON_TRIGGER
)
end
end
end
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
label
=
rc
:
GetFlagEffectLabel
(
FLAG_ATTACK_TRIGGER
)
local
label
=
rc
:
GetFlagEffectLabel
(
FLAG_ATTACK_TRIGGER
)
...
@@ -688,6 +691,24 @@ function VgD.CardTriggerOperation(chkop,f)
...
@@ -688,6 +691,24 @@ function VgD.CardTriggerOperation(chkop,f)
end
end
end
end
function
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
effect_when_trigger
tabel
.
copy
(
effect_when_trigger
,
c
.
effect_when_trigger
)
local
cost
,
con
,
tg
=
true
,
true
,
true
if
#
effect_when_trigger
==
0
then
return
end
if
VgF
.
GetValueType
(
effect_when_trigger
[
2
])
==
"function"
then
cost
=
effect_when_trigger
[
2
](
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
end
if
VgF
.
GetValueType
(
effect_when_trigger
[
3
])
==
"function"
then
con
=
effect_when_trigger
[
3
](
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
VgF
.
GetValueType
(
effect_when_trigger
[
4
])
==
"function"
then
tg
=
effect_when_trigger
[
4
](
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
end
if
VgF
.
GetValueType
(
effect_when_trigger
[
1
])
==
"function"
and
cost
and
con
and
tg
and
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
VgID
,
15
))
then
Duel
.
HintSelection
(
Group
.
FromCards
(
c
))
local
_
,
m
=
c
:
GetOriginalCode
()
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
if
VgF
.
GetValueType
(
effect_when_trigger
[
2
])
==
"function"
then
effect_when_trigger
[
2
](
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
VgF
.
GetValueType
(
effect_when_trigger
[
4
])
==
"function"
then
effect_when_trigger
[
4
](
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
effect_when_trigger
[
1
](
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
--vg规则
--vg规则
function
VgD
.
Rule
(
c
)
function
VgD
.
Rule
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -1078,7 +1099,7 @@ function VgD.EffectTypeTrigger(c,m,loc,typ,code,op,cost,con,tg,count,property,st
...
@@ -1078,7 +1099,7 @@ function VgD.EffectTypeTrigger(c,m,loc,typ,code,op,cost,con,tg,count,property,st
e1
:
SetType
(
typ
+
type2
)
e1
:
SetType
(
typ
+
type2
)
if
VgF
.
GetValueType
(
loc
)
==
"number"
then
e1
:
SetRange
(
loc
)
end
if
VgF
.
GetValueType
(
loc
)
==
"number"
then
e1
:
SetRange
(
loc
)
end
e1
:
SetCode
(
code
)
e1
:
SetCode
(
code
)
e1
:
SetProperty
(
property
+
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
property
+
EFFECT_FLAG_D
AMAGE_STEP
+
EFFECT_FLAG_D
ELAY
)
if
count
and
count
>
0
then
e1
:
SetCountLimit
(
count
)
end
if
count
and
count
>
0
then
e1
:
SetCountLimit
(
count
)
end
if
VgF
.
GetValueType
(
con
)
==
"function"
then
e1
:
SetCondition
(
con
)
end
if
VgF
.
GetValueType
(
con
)
==
"function"
then
e1
:
SetCondition
(
con
)
end
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
e1
:
SetCost
(
cost
)
end
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
e1
:
SetCost
(
cost
)
end
...
...
VgDefinition.Lua
View file @
6346777a
...
@@ -92,11 +92,13 @@ SKILL_DEBRIS =0x40 --结晶碎片
...
@@ -92,11 +92,13 @@ SKILL_DEBRIS =0x40 --结晶碎片
--触发类型 --种族
--触发类型 --种族
TRIGGER_ALL
=
0x3ffffff
--All
TRIGGER_ALL
=
0x3ffffff
--All
TRIGGER_NONE
=
0x1
--无
TRIGGER_NONE
=
0x1
--无
TRIGGER_CRITICAL_STRIKE
=
0x2
--暴击触发
TRIGGER_CRITICAL_STRIKE
=
0x2
--暴击触发
TRIGGER_DRAW
=
0x4
--抽牌触发
TRIGGER_DRAW
=
0x4
--抽牌触发
TRIGGER_HEAL
=
0x8
--治愈触发
TRIGGER_HEAL
=
0x8
--治愈触发
TRIGGER_ADVANCE
=
0x10
--前列触发
TRIGGER_ADVANCE
=
0x10
--前列触发
TRIGGER_SUPER
=
0x20
--超限触发
TRIGGER_SUPER
=
0x20
--超限触发
--组合类型
TRIGGER_CARDS
=
0x3e
--触发单位卡
--Category 效果分类
--Category 效果分类
CATEGORY_DEFENDER
=
0x1
--守护者
CATEGORY_DEFENDER
=
0x1
--守护者
--Reason 卡片到当前位置的原因
--Reason 卡片到当前位置的原因
...
...
VgFuncLib.lua
View file @
6346777a
...
@@ -1151,6 +1151,11 @@ function VgF.AddMixCostGroupFilter(c,m,...)
...
@@ -1151,6 +1151,11 @@ function VgF.AddMixCostGroupFilter(c,m,...)
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
cm
.
cos_filter
=
{
...
}
cm
.
cos_filter
=
{
...
}
end
end
function
VgF
.
AddEffectWhenTrigger
(
c
,
m
,
op
,
cost
,
con
,
tg
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
effect_when_trigger
=
{
op
,
cost
,
con
,
tg
}
end
function
VgF
.
ShiftLocationFromString
(
str
)
function
VgF
.
ShiftLocationFromString
(
str
)
local
loc
=
0
local
loc
=
0
if
str
==
"POSCHANGE"
then
return
str
end
if
str
==
"POSCHANGE"
then
return
str
end
...
...
c10103001.lua
View file @
6346777a
...
@@ -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
)
vgf
.
VgCard
(
c
)
vgf
.
VgCard
(
c
)
--【自】【V】【1回合1次】:你的攻击判定将等级3的卡判出的战斗结束时,通过【费用】[将手牌中的1张卡舍弃],选择你的1张后防者,重置,这个回合中,那个单位的力量+10000。
--【自】【V】【1回合1次】:你的攻击判定将等级3的卡判出的战斗结束时,通过【费用】[将手牌中的1张卡舍弃],选择你的1张后防者,重置,这个回合中,那个单位的力量+10000。
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_FIELD
,
EVENT_BATTLED
,
cm
.
operation
,
vgf
.
DisCardCost
(
1
),
cm
.
condition
,
nil
,
1
,
EFFECT_FLAG_DAMAGE_STEP
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_FIELD
,
EVENT_BATTLED
,
cm
.
operation
,
vgf
.
DisCardCost
(
1
),
cm
.
condition
,
nil
,
1
)
if
not
cm
.
global_check
then
if
not
cm
.
global_check
then
cm
.
global_check
=
true
cm
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
local
ge1
=
Effect
.
CreateEffect
(
c
)
...
@@ -25,7 +25,7 @@ function cm.initial_effect(c)
...
@@ -25,7 +25,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
checkfilter
(
c
,
tp
)
function
cm
.
checkfilter
(
c
,
tp
)
return
c
:
IsLocation
(
LOCATION_TRIGGER
)
and
c
:
IsLevel
(
3
)
and
c
:
IsControler
(
tp
)
and
Duel
.
GetTurnPlayer
()
==
tp
return
c
:
IsLocation
(
LOCATION_TRIGGER
)
and
c
:
IsLevel
(
3
)
and
c
:
IsControler
(
tp
)
end
end
function
cm
.
checkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
checkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
checkfilter
,
1
,
nil
,
tp
)
and
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetAttackTarget
()
return
eg
:
IsExists
(
cm
.
checkfilter
,
1
,
nil
,
tp
)
and
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetAttackTarget
()
...
...
c10401048.lua
View file @
6346777a
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_FIELD
,
EVENT_MOVE
,
vgf
.
DamageFill
(
1
),
vgf
.
OverlayCost
(
2
),
cm
.
con
,
nil
,
1
)
end
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
vgf
.
RMonsterCondition
(
e
)
and
eg
:
IsExists
(
cm
.
filter
,
1
,
nil
,
tp
)
and
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetAttackTarget
()
end
function
cm
.
filter
(
c
,
tp
)
return
c
:
IsRace
(
TRIGGER_CARDS
)
and
c
:
IsLocation
(
LOCATION_TRIGGER
)
and
c
:
IsControler
(
tp
)
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